Summary
On systems where a GPU takes a long time to initialize (e.g. NVIDIA 580-open driver with GSP firmware, ~22 seconds), lightdm.service starts the X server before the GPU's DRM device is registered. X then configures only the already-present GPU (the Intel iGPU), and outputs attached to the late-arriving GPU (all external monitors in my case) are never properly configured. The result on every cold boot is that only the laptop panel works; a warm systemctl restart lightdm works fine because the GPU is already initialized.
Environment
- LightDM 1.30.0 (package
1.30.0-0ubuntu14)
- Pop!_OS 24.04 LTS (Ubuntu 24.04 base), kernel 7.0.11-76070011-generic
- Hybrid laptop: Intel UHD (CometLake-H GT2) + NVIDIA RTX 2080 Super Mobile
- NVIDIA driver:
nvidia-driver-580-open 580.173.02 (open kernel modules + GSP firmware)
- External monitors connected through the NVIDIA GPU (USB-C dock, DP MST)
- Session: Xfce (X11),
system76-power graphics nvidia (discrete mode), proper
OutputClass configs in place (Driver "nvidia", PrimaryGPU "Yes", ModulePath set)
Evidence (journal, cold boot)
23:55:58 kernel: [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
23:56:09 systemd[1]: Starting lightdm.service - Light Display Manager...
23:56:09 systemd[1]: Started lightdm.service - Light Display Manager.
23:56:20 kernel: [drm] [nvidia-drm] Failed to get dynamic displays during device registration.
23:56:20 kernel: [drm] Initialized nvidia-drm 0.0.0 for 0000:01:00.0 on minor 1
23:56:30 kernel: nvidia 0000:01:00.0: [drm] fb1: nvidia-drmdrmfb frame buffer device
X starts at 23:56:09; the NVIDIA DRM device only exists from 23:56:20. Xorg's log shows
the NVIDIA card being hotplugged ~6s after server start, getting claimed by
modesetting as a GPU screen (modeset(G0)) instead of the nvidia driver
(the OutputClass ModulePath is not applied at that point), ending in
(EE) modeset(G0): Failed to create pixmap and a single-provider X screen.
Steps to reproduce
- Hybrid Intel+NVIDIA laptop, NVIDIA open driver (slow GSP init), external monitors on the NVIDIA GPU.
- LightDM as display manager, X11 session.
- Cold boot.
- Only the iGPU panel is configured; external displays stay off.
xrandr --listproviders shows 1 provider.
sudo systemctl restart lightdm (GPU now initialized) → everything works, 2 providers.
Expected behavior
LightDM (or its systemd unit) should offer a way to wait for GPU/DRM devices to be ready
before launching the X server — e.g. a config option listing DRM devices to wait for, or
ordering against dev-dri-cardN.device — so that slow-probing GPUs are present when the
server performs initial output configuration.
Workaround
A systemd drop-in delaying lightdm until a DRM card bound to the nvidia driver exists:
# /etc/systemd/system/lightdm.service.d/wait-nvidia.conf
[Service]
ExecStartPre=/bin/sh -c 'for i in $(seq 1 60); do for d in /sys/class/drm/card*/device/driver; do [ "$(basename $(readlink -f $d))" = "nvidia" ] && exit 0; done; sleep 0.5; done; exit 0'
This fully fixes the issue, which confirms the race. It would be great to have a supported
mechanism instead of a hand-rolled drop-in.
Summary
On systems where a GPU takes a long time to initialize (e.g. NVIDIA 580-open driver with GSP firmware, ~22 seconds),
lightdm.servicestarts the X server before the GPU's DRM device is registered. X then configures only the already-present GPU (the Intel iGPU), and outputs attached to the late-arriving GPU (all external monitors in my case) are never properly configured. The result on every cold boot is that only the laptop panel works; a warmsystemctl restart lightdmworks fine because the GPU is already initialized.Environment
1.30.0-0ubuntu14)nvidia-driver-580-open580.173.02 (open kernel modules + GSP firmware)system76-power graphics nvidia(discrete mode), properOutputClassconfigs in place (Driver "nvidia",PrimaryGPU "Yes", ModulePath set)Evidence (journal, cold boot)
X starts at 23:56:09; the NVIDIA DRM device only exists from 23:56:20. Xorg's log shows
the NVIDIA card being hotplugged ~6s after server start, getting claimed by
modesettingas a GPU screen (modeset(G0)) instead of the nvidia driver(the
OutputClassModulePath is not applied at that point), ending in(EE) modeset(G0): Failed to create pixmapand a single-provider X screen.Steps to reproduce
xrandr --listprovidersshows 1 provider.sudo systemctl restart lightdm(GPU now initialized) → everything works, 2 providers.Expected behavior
LightDM (or its systemd unit) should offer a way to wait for GPU/DRM devices to be ready
before launching the X server — e.g. a config option listing DRM devices to wait for, or
ordering against
dev-dri-cardN.device— so that slow-probing GPUs are present when theserver performs initial output configuration.
Workaround
A systemd drop-in delaying lightdm until a DRM card bound to the nvidia driver exists:
This fully fixes the issue, which confirms the race. It would be great to have a supported
mechanism instead of a hand-rolled drop-in.