[unattended-wayland] DRM display wake fires on every hourly --server restart, waking idle-off monitors with no session
Bug Description
With the rustdesk-unattended-wayland build (drm + drm-wake), the monitors are powered back on once an hour while the machine is idle and locked, even though no client ever connects.
Cause, as far as I can trace it in master (47a2a3c83d):
src/platform/linux.rs:--servicekills and restarts--serverwhenlast_restart.elapsed().as_secs() > 3600("restart server if new connections all closed, or every one hour").src/server/drm_capturer.rs: the new--serverrunswarm_availability(), which callsquery_displays(). That opens a_drmconnection only to readDrmDisplayList(log:drm: consumer cache warmed (3 displays) at startup).src/ipc/drm.rs:handle_drm_conn()spawnsdrm_capture_worker()for every accepted connection, and the worker callsdrm_enumerate_settled("a consumer connected")before anyDrmStartarrives.- The compositor has idle-disabled the connectors, so
drm_enumerate_settledfinds undriven connectors.enable-drm-display-wakedefaults to on, sodrm_wake_displays()creates theRustDesk DRM display wakeuinput device and wakes the outputs.
The display wake exists so that a real session can capture idle-off outputs (#15420). In this path it fires for a cache-warming probe instead. The other query_displays() callers (the availability refresh) go through the same handshake.
How to Reproduce
- Install the unattended-wayland build on a KDE Plasma Wayland session and start the service.
- Lock the screen and let the outputs idle off (DPMS).
- Don't connect any client. Wait for the hourly
--serverrestart. - The monitors turn back on. The kernel log shows the wake device being created at the same moment:
05:55:36 kernel: input: RustDesk UInput Keyboard as /devices/virtual/input/input110
05:55:36 kernel: input: mouce-library-fake-mouse as /devices/virtual/input/input111
05:55:36 kernel: input: RustDesk DRM display wake as /devices/virtual/input/input112This repeats every hour. In my retained log it happened 37 hours in a row (2026-09-25 02:55 to 2026-09-26 14:56), each time at the --server restart, with no incoming connection in the server/cm logs during that period. Every wake was followed by DRM hotplug uevents on the GPU, and the lock screen came up on the woken outputs.
Expected Behavior
A display-list probe (cache warm-up or availability refresh) should not wake the displays. The wake should only run when a capture is actually requested for a session. Two possible ways: run the wake/settle step after DrmStart instead of at connection time, or let the consumer mark a connection as a probe so the producer skips the wake.
Setting enable-drm-display-wake=N is not a workaround, because then a real session against idle-off outputs has nothing to capture.
Operating system(s) on local (controlling) side and remote (controlled) side
N/A (no client connected) -> CachyOS (Arch-based), KDE Plasma 6.7.5 Wayland, kwin 6.7.5, NVIDIA 615.71.09, 3 monitors
RustDesk Version(s) on local (controlling) side and remote (controlled) side
N/A -> rustdesk-unattended-wayland 1.4.9 nightly (the official .deb repackaged for Arch). The 1.5.0 nightly .deb and master (47a2a3c83d) contain the same code path.
Screenshots
N/A. Nothing appears in the RustDesk UI, because no session is involved. The evidence is the kernel log above.
Additional Context
On KDE with NVIDIA, each wake causes a DRM hotplug burst. On this machine that repeatedly left plasmashell hung after long idle periods: its panels were gone after the next unlock. That hang is a Plasma bug in its own right, but the hourly wake raises the exposure to 24 hotplug cycles a day on an idle machine.
Source: rustdesk/rustdesk