Powering off an HDMI monitor kills the KDE X11 session (hybrid-GPU laptop)
xorgkdekscreennvidiaprimecrashsuspendlogind
On a laptop whose external monitor hangs off the NVIDIA GPU and whose internal panel hangs off the AMD iGPU, turning the monitor's power off looks to the system exactly like unplugging it. KDE's kscreen then tries to light up the internal panel across GPUs, Xorg segfaults, and the whole Plasma session dies. With the lid closed, logind then suspends. The user experiences "the machine crashed", but uptime shows no reboot.
The sequence (seen twice on VictusPop, 2026-10-03 and 2026-10-06)
- External monitor (Dell S2721QS, 4K, HDMI, NVIDIA
DFP-0) reports disconnected for about 1 s because it was powered off (to avoid burn-in while long jobs ran). - kscreen disables the HDMI output and tries to enable
eDP-1-0(internal panel, AMD via PRIME) at 1920x1080@144. - Kernel logs
nvidia-drm ... Failed to get memory pages for NvKmsKapiMemory; Xorg dies with signal 11;kscreen_backendsegfaults inKSC_XRandR.so. Which component is truly at fault (NVIDIA driver vs Xorg) was not established. - The session is gone. Its lid inhibitor (powerdevil) is dead and the lid is closed, so
systemd-logind: Suspending...follows. Suspend is a consequence, not the cause. Opening the lid wakes to the login screen.
Triage
- First:
uptimeandjournalctl --list-boots. No new boot means a session crash, not a kernel crash. - Signatures:
journalctl -b 0 -k | grep KSC_XRandR,The X11 connection broke,DFP-0: disconnectedin the previous~/.local/share/xorg/Xorg.N.log. - The X display number increments with each crash (
:1to:2to:3). Read the live one withps -C Xorg -o args=; never hard-code:1in scripts. - apport may write
/var/crash/_usr_lib_xorg_Xorg.1000.crashonly the first time;coredumpctlmay not be installed. - Unrelated log noise to filter:
rtw89_8852be ... IO_PAGE_FAULT,nvidia-powerd ... DPFC failed,pcieport ... PME: Spurious native interrupt,ACPI BIOS Error ... BAT1.
Options and why they were rejected
- Disable kscreen auto-configuration (
~/.config/kded5rc[Module-kscreen] autoload=falseplusqdbus org.kde.kded5 /kded unloadModule kscreen): stops the reaction, but KDE no longer auto-arranges monitors. Rejected. - Disable lid-close sleep: only removes the suspend; the session still dies.
- Xorg
Monitorsection withOption "Ignore" "true"foreDP-1-0: untested; needs root and a logout, and the internal panel would stay dark. - Do not power the monitor off; black the screen instead. Chosen. A fullscreen black window per monitor with a global toggle shortcut (see Automating KDE Plasma 5 from a shell (qdbus, global shortcuts, taskbar pins, idle inhibit), the screen-off tool). The backlight stays on, but the image is black and nothing is unplugged.
Gotchas
- Using the internal panel on such a laptop always crosses GPUs; "keep using the NVIDIA card" is already what happens.
- Any "blackout" tool must hold off the idle screen locker (
org.freedesktop.ScreenSaver.Inhibit) or the lock screen replaces it.
See also
- NVIDIA hybrid graphics on a Pop!_OS laptop (system76-power modes, PRIME)
- "Mouse and keyboard dead" on X11: frozen display vs stuck grab
- Automating KDE Plasma 5 from a shell (qdbus, global shortcuts, taskbar pins, idle inhibit)