Wait for Wayland session before launching kscreen-doctor #1

Merged
hendrik-hog merged 1 commits from fix/kscreen-doctor-boot-race into main 2026-07-28 21:28:29 +02:00
Owner

The udev rule fires the DRM "change" event during early boot, before the
user's Plasma Wayland session (and its wayland-0 socket) exists. kscreen-doctor
then cannot initialise any Qt platform plugin (Failed to create wl_display /
could not connect to display :0) and aborts, producing core dumps on every
boot — even though the script ignores its output and is otherwise fine.

Add a wait_for_wayland guard that waits up to 30s for the session socket
before touching kscreen-doctor, and skips silently if the session never
comes up (a later drm event retries once the user is logged in). The existing
flock debounce means only the first boot-time invocation waits; once the
session is ready it proceeds and applies the scale earlier than before.

The udev rule fires the DRM "change" event during early boot, before the user's Plasma Wayland session (and its wayland-0 socket) exists. kscreen-doctor then cannot initialise any Qt platform plugin (Failed to create wl_display / could not connect to display :0) and aborts, producing core dumps on every boot — even though the script ignores its output and is otherwise fine. Add a wait_for_wayland guard that waits up to 30s for the session socket before touching kscreen-doctor, and skips silently if the session never comes up (a later drm event retries once the user is logged in). The existing flock debounce means only the first boot-time invocation waits; once the session is ready it proceeds and applies the scale earlier than before.
hendrik-hog added 1 commit 2026-07-28 21:28:17 +02:00
The udev rule fires the DRM "change" event during early boot, before the
user's Plasma Wayland session (and its wayland-0 socket) exists. kscreen-doctor
then cannot initialise any Qt platform plugin (Failed to create wl_display /
could not connect to display :0) and aborts, producing core dumps on every
boot — even though the script ignores its output and is otherwise fine.

Add a wait_for_wayland guard that waits up to 30s for the session socket
before touching kscreen-doctor, and skips silently if the session never
comes up (a later drm event retries once the user is logged in). The existing
flock debounce means only the first boot-time invocation waits; once the
session is ready it proceeds and applies the scale earlier than before.

Co-Authored-By: Claude <noreply@anthropic.com>
hendrik-hog merged commit c55ea68535 into main 2026-07-28 21:28:29 +02:00
hendrik-hog deleted branch fix/kscreen-doctor-boot-race 2026-07-28 21:28:32 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: hendrik-hog/Helper-Scripts#1