Nvidia optimus and failure to load display manager

Hi everyone,

Sorry for yet another thread on this frustrating topic.

In short, I have about a month-old install of Endeavour on a new laptop that has one of the dreaded dual intel/nvidia setups. The original install worked fine (with the nvidia drivers option selected from the live iso), but I updated the drivers in some way and now sddm (my usual dm) won’t start up. I don’t actually think it’s a problem with sddm specifically, as I’ve tried lightdm without luck as well. It could be something in my X config, the driver, my kernel settings… but I’m at a loss. I’ve been trying for a few days now to tweak everything I’ve been able to find online, to no avail.

I’ve tried all of the steps in the pages that seem to get mentioned in relation to this class of problem: I’ve installed, uninstalled, and reinstalled the drivers using the Nvidia Installer script (and just the packages, without the script); I’ve tried the things in the Nvidia Optional Enhancements and Troubleshooting page; and I’ve tried setting up Optimus Manager (and when that didn’t help, also Optimus Switch). I’ve also gone through about a dozen threads about nvidia driver problems or optimus setup problems, both here and on the Arch forums, and nothing I tried based on those threads seemed to help.

I’m wondering whether anyone would be willing to be an extra set of knowledgeable eyeballs and see if there’s anything glaring in my logs and config files that might suggest what’s going on or what more I could try. I’m sorry to create yet another thread about this, but I’m spinning my wheels, and need to get real work done, so this is my last resort before just scrapping it and doing a fresh install. I do really want to figure out what the matter is though, so that I can learn something and troubleshoot this better if it happens again!

I’m including the most immediately relevant logs/files below, but if there’s something that I’m forgetting, please let me know. There is no /etc/X11/xorg.conf on the system, or other nvidia-related xorg config files, other than what is generated automatically by optimus-manager.

Thanks for reading all of this!

inxi -Fxxxa
  Host: algedi Kernel: 5.16.5-arch1-1 x86_64 bits: 64 compiler: gcc v: 11.1.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=fb0965fc-c17d-4a4e-8b77-7ea5be2c2c47 rw
    quiet loglevel=3 nowatchdog nvme_load=YES
  Console: tty 3 DM: LightDM 1.30.0, SDDM Distro: EndeavourOS base: Arch Linux
  Type: Laptop System: Dell product: XPS 15 9510 v: N/A serial: <superuser required> Chassis:
    type: 10 serial: <superuser required>
  Mobo: Dell model: 01V4T3 v: A01 serial: <superuser required> UEFI: Dell v: 1.7.0
    date: 12/09/2021
  ID-1: BAT0 charge: 84.3 Wh (100.0%) condition: 84.3/84.3 Wh (100.0%) volts: 13.0 min: 11.4
    model: BYD DELL M59JH19 type: Li-poly serial: 3880 status: Full
  Info: model: 11th Gen Intel Core i7-11800H bits: 64 type: MT MCP arch: Tiger Lake family: 6
    model-id: 0x8D (141) stepping: 1 microcode: 0x3C
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache: L1: 640 KiB
    desc: d-8x48 KiB; i-8x32 KiB L2: 10 MiB desc: 8x1.2 MiB L3: 24 MiB desc: 1x24 MiB
  Speed (MHz): avg: 814 high: 978 min/max: 800/4600 scaling: driver: intel_pstate
    governor: powersave cores: 1: 915 2: 801 3: 789 4: 801 5: 801 6: 801 7: 794 8: 778 9: 801
    10: 978 11: 774 12: 800 13: 801 14: 800 15: 793 16: 801 bogomips: 73744
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
  Device-1: Intel TigerLake-H GT1 [UHD Graphics] vendor: Dell driver: i915 v: kernel
    bus-ID: 0000:00:02.0 chip-ID: 8086:9a60 class-ID: 0300
  Device-2: NVIDIA GA107M [GeForce RTX 3050 Ti Mobile] vendor: Dell driver: nvidia
    alternate: nouveau, nvidia_drm, nvidia bus-ID: 0000:01:00.0 chip-ID: 10de:25a0 class-ID: 0302
  Device-3: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo bus-ID: 3-11:4
    chip-ID: 0c45:6a11 class-ID: 0e02
  Display: server: X.org driver: loaded: modesetting tty: 216x67
  Message: Advanced graphics data unavailable in console. Try -G --display
  Device-1: Intel Tiger Lake-H HD Audio vendor: Dell driver: snd_hda_intel v: kernel
    alternate: snd_sof_pci_intel_tgl bus-ID: 0000:00:1f.3 chip-ID: 8086:43c8 class-ID: 0403
  Sound Server-1: ALSA v: k5.16.5-arch1-1 running: yes
  Sound Server-2: PulseAudio v: 15.0 running: no
  Sound Server-3: PipeWire v: 0.3.45 running: no
  Device-1: Intel Tiger Lake PCH CNVi WiFi vendor: Rivet Networks driver: iwlwifi v: kernel
    bus-ID: 0000:00:14.3 chip-ID: 8086:43f0 class-ID: 0280
  IF: wlan0 state: up mac: 2c:6d:c1:12:ee:7c
  Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 3-14:6
    chip-ID: 8087:0026 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 1 state: up address: see --recommends
  Hardware-1: Intel Volume Management Device NVMe RAID Controller driver: vmd v: 0.6 port: N/A
    bus-ID: 0000:00:0e.0 chip-ID: 8086:9a0b rev: class-ID: 0104
  Local Storage: total: 2.75 TiB used: 280.01 GiB (9.9%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital model: PC SN730 NVMe WDC 1024GB
    size: 953.87 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD
    serial: 2144HJ440213 rev: 11170012 temp: 45.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 type: USB vendor: Western Digital model: WDS200T2B0B-00YS70
    size: 1.82 TiB block-size: physical: 512 B logical: 512 B type: SSD serial: 21385H800823
    scheme: GPT
  ID-1: / raw-size: 641.03 GiB size: 629.9 GiB (98.26%) used: 235.16 GiB (37.3%) fs: ext4
    dev: /dev/nvme0n1p7 maj-min: 259:7
  ID-2: /boot/efi raw-size: 240 MiB size: 236 MiB (98.33%) used: 91.3 MiB (38.7%) fs: vfat
    dev: /dev/nvme0n1p1 maj-min: 259:1
  Alert: No swap data was found.
  System Temperatures: cpu: 52.0 C mobo: N/A gpu: nvidia temp: 55 C
  Fan Speeds (RPM): N/A
  Processes: 245 Uptime: 5m wakeups: 31 Memory: 31.08 GiB used: 699.8 MiB (2.2%) Init: systemd
  v: 250 tool: systemctl Compilers: gcc: 11.1.0 Packages: pacman: 1453 lib: 440
  Shell: Bash (login) v: 5.1.16 running-in: tty 3 inxi: 3.3.12
[  1888.239] 
X.Org X Server
X Protocol Version 11, Revision 0
[  1888.245] Current Operating System: Linux algedi 5.16.4-arch1-1 #1 SMP PREEMPT Sat, 29 Jan 2022 19:08:13 +0000 x86_64
[  1888.245] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=fb0965fc-c17d-4a4e-8b77-7ea5be2c2c47 rw quiet loglevel=3 nowatchdog nvme_load=YES
[  1888.249]  
[  1888.250] Current version of pixman: 0.40.0
[  1888.254] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[  1888.254] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  1888.260] (==) Log file: "/home/xxxx/.local/share/xorg/Xorg.0.log", Time: Tue Feb  1 00:44:37 2022
[  1888.262] (==) Using config directory: "/etc/X11/xorg.conf.d"
[  1888.264] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  1888.264] (==) No Layout section.  Using the first Screen section.
[  1888.264] (==) No screen section available. Using defaults.
[  1888.264] (**) |-->Screen "Default Screen Section" (0)
[  1888.264] (**) |   |-->Monitor "<default monitor>"
[  1888.264] (==) No device specified for screen "Default Screen Section".
	Using the first device section listed.
[  1888.264] (**) |   |-->Device "nvidia"
[  1888.264] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[  1888.264] (==) Automatically adding devices
[  1888.264] (==) Automatically enabling devices
[  1888.264] (==) Automatically adding GPU devices
[  1888.264] (==) Automatically binding GPU devices
[  1888.264] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  1888.264] (WW) The directory "/usr/share/fonts/misc" does not exist.
[  1888.264] 	Entry deleted from font path.
[  1888.264] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[  1888.264] 	Entry deleted from font path.
[  1888.264] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi".
[  1888.264] 	Entry deleted from font path.
[  1888.264] 	(Run 'mkfontdir' on "/usr/share/fonts/100dpi").
[  1888.264] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi".
[  1888.264] 	Entry deleted from font path.
[  1888.264] 	(Run 'mkfontdir' on "/usr/share/fonts/75dpi").
[  1888.264] (==) FontPath set to:
[  1888.264] (==) ModulePath set to "/usr/lib/xorg/modules"
[  1888.264] (**) Extension "Composite" is enabled
[  1888.264] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[  1888.264] (II) Module ABI versions:
[  1888.264] 	X.Org ANSI C Emulation: 0.4
[  1888.264] 	X.Org Video Driver: 25.2
[  1888.264] 	X.Org XInput driver : 24.4
[  1888.264] 	X.Org Server Extension : 10.0
[  1888.265] (++) using VT number 3

[  1888.266] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[  1888.267] (II) xfree86: Adding drm device (/dev/dri/card1)
[  1888.267] (II) Platform probe for /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1
[  1888.267] (II) systemd-logind: got fd for /dev/dri/card1 226:1 fd 11 paused 0
[  1888.267] (II) xfree86: Adding drm device (/dev/dri/card0)
[  1888.267] (II) Platform probe for /sys/devices/pci0000:00/0000:00:02.0/drm/card0
[  1888.267] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 12 paused 0
[  1888.268] (**) OutputClass "nvidia" ModulePath extended to "/usr/lib/nvidia/xorg,/usr/lib/xorg/modules,/usr/lib/xorg/modules"
[  1888.268] (--) PCI:*(0@0:2:0) 8086:9a60:1028:0a61 rev 1, Mem @ 0x6164000000/16777216, 0x4000000000/268435456, I/O @ 0x00004000/64, BIOS @ 0x????????/131072
[  1888.268] (--) PCI: (1@0:0:0) 10de:25a0:1028:0a61 rev 161, Mem @ 0xa0000000/16777216, 0x6000000000/4294967296, 0x6100000000/33554432, I/O @ 0x00003000/128
[  1888.269] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[  1888.269] (II) "glx" will be loaded by default.
[  1888.269] (II) LoadModule: "modesetting"
[  1888.269] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[  1888.270] (II) Module modesetting: vendor="X.Org Foundation"
[  1888.270] 	compiled for, module version = 1.21.1
[  1888.270] 	Module class: X.Org Video Driver
[  1888.270] 	ABI class: X.Org Video Driver, version 25.2
[  1888.270] (II) LoadModule: "glx"
[  1888.270] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[  1888.271] (II) Module glx: vendor="X.Org Foundation"
[  1888.271] 	compiled for, module version = 1.0.0
[  1888.271] 	ABI class: X.Org Server Extension, version 10.0
[  1888.271] (II) LoadModule: "nvidia"
[  1888.271] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[  1888.271] (II) Module nvidia: vendor="NVIDIA Corporation"
[  1888.271] 	compiled for, module version = 1.0.0
[  1888.271] 	Module class: X.Org Video Driver
[  1888.271] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[  1888.271] (II) NVIDIA dlloader X Driver  495.46  Wed Oct 27 16:28:42 UTC 2021
[  1888.271] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[  1888.271] xf86EnableIO: failed to enable I/O ports 0000-03ff (Operation not permitted)
[  1888.271] (WW) Falling back to old probe method for modesetting
[  1888.271] (WW) Falling back to old probe method for modesetting
[  1888.271] (II) modeset(G0): using drv /dev/dri/card1
[  1888.271] (II) modeset(G1): using drv /dev/dri/card0
[  1888.271] (EE) No devices detected.
[  1888.271] (EE) 
Fatal server error:
[  1888.271] (EE) no screens found(EE) 
[  1888.271] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[  1888.271] (EE) Please also check the log file at "/home/xxxx/.local/share/xorg/Xorg.0.log" for additional information.
[  1888.271] (EE) 
[  1888.288] (EE) Server terminated with error (1). Closing log file.
# vim:set ft=sh
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(piix ide_disk reiserfs)
MODULES="i915 nvidia nvidia_modeset nvidia_uvm nvidia_drm"

# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries

# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.

# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS=(base)
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect block filesystems)
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev block filesystems)
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS=(base udev block mdadm encrypt filesystems)
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS=(base udev block lvm2 filesystems)
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS="base udev autodetect modconf block keyboard keymap consolefont filesystems fsck"

# Use this to compress the initramfs image. By default, zstd compression
# is used. Use 'cat' to create an uncompressed image.

# Additional options for the compressor

Sorry, the full journalctl -b0 was too long… you can find it here: https://dpaste.com/G7KFALPQY

Feb 03 17:41:02 algedi kernel: pcieport 10000:e0:01.2: can't derive routing for PCI INT C
Feb 03 17:41:02 algedi kernel: pcieport 10000:e0:01.2: PCI INT C: no GSI
Feb 03 17:41:02 algedi kernel: pcieport 10000:e0:01.2: PME: Signaling with IRQ 148
Feb 03 17:41:02 algedi kernel: pcieport 10000:e0:01.2: AER: enabled with IRQ 148
Feb 03 17:41:02 algedi kernel: pcieport 10000:e0:01.2: DPC: enabled with IRQ 148
Feb 03 17:41:02 algedi kernel: pcieport 10000:e0:01.2: DPC: error containment capabilities: Int Msg #0, RPExt+ PoisonedTLP+ SwTrigger+ RP PIO Log 4, DL_ActiveErr+
Feb 03 17:41:04 algedi sddm[729]: Failed to read display number from pipe
Feb 03 17:41:04 algedi sddm[729]: Display server stopping...
Feb 03 17:41:04 algedi sddm[729]: Attempt 1 starting the Display server on vt 1 failed
Feb 03 17:56:57 algedi kernel: nvidia: module license 'NVIDIA' taints kernel.
Feb 03 17:56:57 algedi kernel: Disabling lock debugging due to kernel taint
Feb 03 17:56:57 algedi kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 509
Feb 03 17:56:57 algedi kernel: 
Feb 03 17:56:57 algedi kernel: nvidia 0000:01:00.0: enabling device (0006 -> 0007)
Feb 03 17:56:57 algedi kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module  510.47.03
Feb 03 17:41:03 algedi python3[617]: [105] INFO: Available modules: ['nouveau', 'acpi_call', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
Feb 03 17:41:03 algedi python3[617]: [105] INFO: Unloading modules ['nvidia_drm', 'nvidia_modeset', 'nvidia_uvm', 'nvidia'] (if loaded)
Feb 03 17:41:03 algedi python3[617]: [108] INFO: switching=none, nothing to do

relevant log parts …

Thanks for highlighting the relevant parts!

I’m not sure how to interpret the pcieport messages, but I hadn’t considered them previously so that’s a new lead, thanks!

The sddm messages are what I spent the most time trying to follow up on, but I can’t determine exactly what’s causing the failure to read display number from pipe. The last quoted bit about the nvidia modules is related, as I added them following the second point on the Troubleshooting page, thinking the issue was that the drivers weren’t loaded early enough. I believe they’re being unloaded by the optimus-manager script in this boot, which was setting me to intel mode. I’ll try again in nvidia mode and see how things differ.

The kernel taint warnings, as I understand it, are simply a result of loading a proprietary driver, and are thus to be expected.

the only really needed setting for optimus is adding nvidia-drm.modeset=1 to the kernel parameter inside grub what will per default boot on intel GPU but let you use render offloading.

the pcie stuff could be unrelated…

But the last part with python3 shows that your optimus-manager setup is not working or not set up correctly.

There was a user reporting a similar issue solved by using LTS Kernel.
And you could try to use nvidia-470xx from AUR as a workaround if the issue is with latest Nvidia


I am afraid you have applied more than one methods in parallel and they broke your system. At least that’s from the logs investigation.
Each method uses their own files and utilities to do their job. You can’t have them all acting together. You have to clean the previous utility and its files, before you try a different approach.

In general, you only need to install the standard driver packages (nvidia-dkms and nvidia settings, while the actual package names maybe different) and make sure there is no xorg conf file in /etc/X11/xorg.conf.d/ for nvidia (or optimus-whatever).
If this is failing, then you check journal and xorg logs to see what’s the problem and correct it.

From your current logs, it seems some optimus-manager python script is trying to do automations, but fails, unloading nvidia drivers and because nouveau is blacklisted by default (via nvidia package), your nvidia card is unusable.
Intel should be usable, but maybe the smart AI disables it, I can’t tell.
If you have only one monitor and is connected to the nvidia card output, no wonder there is no X. But still guessing.

I suggest you undo what you did and start from scratch, preferably manually the Arch way (by Arch wiki instructions for nvidia).

More info that might help us get a better picture:

pacman -Qs nvidia
ls -l /etc/X11/xorg.conf.d/
grep -iwE "nvidia|optimus" /var/log/pacman.log
systemctl --failed
grep -i cmdline /etc/default/grub

This is especially true if you installed Optimus Manager first and then tried to uninstall it. Because of how it works, you can’t uninstall it fully from yay (since it is an AUR package). You should run optimus-manager --cleanup before uninstalling it.

Also, you should make sure that the Optimus Manager service is disabled.

systemctl disable optimus-manager.service

and then try rebooting.

Finally, you might try adding a acpi kernel parameter to your grub. Dell, especially on their non-Linux laptops, are notorious for not implementing the ACPI standard properly. This can cause problems with Optimus laptops under Linux. One of which, is the GPU not initializing properly. Using a kernel parameter can help fix this.


Thanks very much to @joekamprad, @petsam, and @linesma for taking the time to reply! I really appreciate your input and ultimately I’ve resolved this issue.

I think I gave the impression in my post that I sort of tried everything at once, but I did try my best to backtrack and undo my changes before trying something different. Obviously I missed something in the process, however, and ended up with a conflict somewhere. I think I got tired and frustrated and careless.

You were all right that something was wrong with optimus-manager. I’d uninstalled the package before without it changing anything, but as @linesma noted I did so without the --cleanup tag and something must have been left behind. I had originally installed optimus-manager to see if it would help the display manager start up, then tried removing it when it didn’t, tried optimus-switch instead without success, removed that too, then installed optimus-manager again… what a mess.

I uninstalled optimus-manager again, and went through and scrubbed every mention of it I could find in the various relevant folders and config files. This was before linesma suggested the --cleanup command, but I think I must have covered all of the same bases manually, as when I rebooted, sddm ran correctly. The critical issue is now fixed, so I can declare this resolved.

Disappointingly, I still am not sure exactly what caused the original problem or what fixed it, since the display manager wouldn’t start before I ever installed optimus-manager. Clearly there were multiple things wrong at once.

(I’ll also definitely do some further reading about the ACPI kernel parameters – I was actually trying to troubleshoot another issue before this that I think is power management related, so that will be useful.)

Thanks again to all three of you for your help, and see you around the forums!


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.