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
+31 -2
View File
@@ -3,7 +3,7 @@
## Agent-accessible host
- **hp-chell** (`hp-chell.lan.1qaz.ca`) — KDE neon (Debian-based) x86_64 laptop (Intel Core m7-6Y75, 4 cores, 15GiB RAM, 117GB disk, Intel HD Graphics 515), full sudo (nopasswd) account `agent-user` (uid 60123). Provisioned 2026-09-03.
- Auth: SSH key preferred (this machine's `~/.ssh/id_ed25519.pub` is already in the host's `authorized_keys`) — `ssh agent-user@hp-chell.lan.1qaz.ca`.
- Auth: SSH key preferred (this machine's `~/.ssh/id_ed25519.pub` is already in the host's `authorized_keys`) — `ssh agent-user@hp-chell.lan.1qaz.ca`. When working *on* hp-chell itself as `matt` (no nopasswd sudo), `matt`'s own `~/.ssh/id_ed25519.pub` is also authorized (added 2026-09-27) — use `ssh agent-user@localhost 'sudo ...'` for root.
- Fallback password: stored in local Bitwarden vault, item id `1db3b9f6-a82e-4692-846a-b4bb002a5be6` (name "agent-user@hp-chell.lan.1qaz.ca (SSH)") — fetch with `bw get password 1db3b9f6-a82e-4692-846a-b4bb002a5be6` (vault must be unlocked; `bw unlock`).
- Host inventory/specs: see `~/AGENT_INFO.md` on the host itself. Original provisioning prompt saved at `~/AGENT_PROMPT.txt` on the host.
- Groups: adm,cdrom,sudo,dip,plugdev,lpadmin,sambashare,docker. Has docker, tailscale0 interface (not connected as of provisioning), python3.12, git, jq, rsync, tmux.
@@ -71,8 +71,37 @@ selects the newest installed kernel, so `7.0.0-30-generic` is what boots
by default now; `6.17.0-42-generic` remains available via the GRUB
"Advanced options" submenu as a known-good fallback if ever needed.
**2026-09-27, SDDM → Plasma Login**: an `apt upgrade` (which also
brought kernel `7.0.0-34-generic`) switched the display manager to
`plasmalogin` (`/etc/X11/default-display-manager`). Its greeter runs
under `kwin_wayland` (user `plasmalogin`, uid 984, `plasma-login*.service`
in its systemd *user* manager), so the SDDM `Xsetup` hook above no
longer fires and the black screen came back. Findings:
- A resolution change via `kscreen-doctor` (1600x900 and back) is **not**
enough under KWin: the eDP panel fitter absorbs it (kernel adjusted
mode stays native 3200x1800, no real pipe modeset). Going to 1600x900
and staying there would also be unusable anyway — KWin keeps the 1.85x
scale, giving an 865x487 logical greeter.
- A DPMS cycle (`kscreen-doctor --dpms off` then `--dpms on`) fully
disables the CRTC (`i915_display_info` shows pipe A `active=no`) and
its re-enable is a genuine full modeset — that un-sticks the pipe.
- `kscreen-doctor` needs the greeter's session bus to *apply* changes
(`DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/984/bus`,
`WAYLAND_DISPLAY=wayland-0`); with `KSCREEN_BACKEND_INPROCESS=1` it
reads outputs fine but silently fails to set ("Cannot find output
with id 1"). Mode specs must match exactly (`1600x900@59.95`, not
`@60`) or use mode ids.
- i915 debugfs is under `/sys/kernel/debug/dri/1/` on this box (DRM
minor 1), not `dri/0`.
Fix: `/usr/local/libexec/hp-chell-i915-dpms-cycle` (no-op unless kernel
`7.*` and user `plasmalogin`; waits for KWin, then cycles DPMS), run via
`/etc/systemd/user/plasma-login.service.d/10-i915-kernel7-dpms-cycle.conf`
as `ExecStartPre` (plasma-login.service is ordered after
plasma-login-kwin_wayland.service, so KWin is already up).
Setup script for a fresh install: `setup-i915-kernel7-fix.sh` (in this
repo) installs the `Xsetup` fix and sets `GRUB_TIMEOUT=5` /
repo) installs both the SDDM `Xsetup` fix and the Plasma Login drop-in, and sets `GRUB_TIMEOUT=5` /
`GRUB_TIMEOUT_STYLE=menu` so the boot menu is visible for 5s. Idempotent,
safe to re-run.