Fix kernel 7.x black screen under Plasma Login via DPMS cycle

An apt upgrade switched the display manager from SDDM to plasmalogin,
whose kwin_wayland greeter never runs the SDDM Xsetup hook. Add a
plasma-login.service user drop-in that cycles DPMS off/on with
kscreen-doctor on 7.x kernels, forcing the full modeset that un-sticks
i915 pipe A (a plain resolution change is absorbed by the eDP panel
fitter and doesn't help). Verified across a cold reboot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ergosteur
2026-09-27 11:57:44 -04:00
co-authored by Claude Opus 5.5
parent 78e52ffb29
commit 9c3b8e48ee
2 changed files with 80 additions and 6 deletions
+49 -4
View File
@@ -4,10 +4,11 @@
# Run on a fresh hp-chell (HP Chromebook 13 "chell", coreboot/MrChromebox
# firmware, KDE neon) install to apply two things:
#
# 1. The kernel 7.x cold-boot black-screen workaround: a
# /usr/share/sddm/scripts/Xsetup hook that forces a second modeset
# on eDP-1 to un-stick i915's pipe A on 7.x kernels. See project
# CLAUDE.md for the full diagnosis writeup.
# 1. The kernel 7.x cold-boot black-screen workaround, which forces a
# second modeset on eDP-1 to un-stick i915's pipe A on 7.x kernels:
# a /usr/share/sddm/scripts/Xsetup hook (SDDM) and a
# plasma-login.service drop-in doing a DPMS cycle (Plasma Login).
# See project CLAUDE.md for the full diagnosis writeup.
# 2. GRUB_TIMEOUT=5 / GRUB_TIMEOUT_STYLE=menu, so the boot menu is
# visible for 5 seconds (useful for picking a fallback kernel like
# 6.17.0-42-generic if a future 7.x point release regresses again).
@@ -50,6 +51,50 @@ esac
EOF
chmod 755 /usr/share/sddm/scripts/Xsetup
# Plasma Login (plasmalogin, replaced SDDM on neon in 2026-09) runs its
# greeter under kwin_wayland, so the SDDM Xsetup hook above never fires.
# Equivalent fix there: a DPMS off/on cycle via kscreen-doctor, run from
# the greeter's own systemd user manager right after KWin comes up. A
# plain resolution change is NOT enough under KWin -- the eDP panel
# fitter absorbs it as a fastset without a real pipe modeset; DPMS off
# fully disables the CRTC so the "on" is a genuine full modeset.
echo "==> installing plasmalogin greeter i915 kernel-7.x workaround"
install -d /usr/local/libexec
cat > /usr/local/libexec/hp-chell-i915-dpms-cycle << 'EOF'
#!/bin/sh
# Run as the plasmalogin greeter user (from plasma-login.service's
# ExecStartPre). Forces a full modeset on kernel 7.x to un-stick i915
# pipe A after the cold-boot first modeset. See hp-chell CLAUDE.md.
case "$(uname -r)" in
7.*) ;;
*) exit 0 ;;
esac
[ "$(id -un)" = plasmalogin ] || exit 0
export WAYLAND_DISPLAY="${WAYLAND_DISPLAY:-wayland-0}"
export QT_QPA_PLATFORM=wayland
# wait (up to ~20s) for KWin's output management to answer
i=0
until kscreen-doctor -o >/dev/null 2>&1; do
i=$((i + 1))
[ "$i" -ge 40 ] && { echo "kscreen-doctor never came up" >&2; exit 0; }
sleep 0.5
done
kscreen-doctor --dpms off >/dev/null 2>&1
sleep 1
kscreen-doctor --dpms on >/dev/null 2>&1
echo "cycled DPMS off/on (i915 kernel 7.x cold-boot workaround)"
EOF
chmod 755 /usr/local/libexec/hp-chell-i915-dpms-cycle
install -d /etc/systemd/user/plasma-login.service.d
cat > /etc/systemd/user/plasma-login.service.d/10-i915-kernel7-dpms-cycle.conf << 'EOF'
[Service]
ExecStartPre=-/usr/local/libexec/hp-chell-i915-dpms-cycle
EOF
echo "==> setting GRUB_TIMEOUT=5 / GRUB_TIMEOUT_STYLE=menu"
grub_conf=/etc/default/grub