Plasma 6.1 Beta KWin watchdog triggered on wake

This isn’t quite a KDE bug, so as per the Bug Reporting Guidelines, I figured I’d ask here about it first.

Since upgrading to KDE Plasma 6.1 Beta, I’ve noticed that when I let my system sleep for a while and come back to it, the UI locks up for a moment before I’m thrown back to SDDM. In diagnosing this, I’ve found the following journal entries:

May 30 10:02:40 myhost kernel: PM: resume devices took 0.660 seconds
May 30 10:02:40 myhost kernel: PM: hibernation: Basic memory bitmaps freed
May 30 10:02:40 myhost kernel: OOM killer enabled.
May 30 10:02:40 myhost kernel: Restarting tasks ... done.
May 30 10:02:40 myhost kernel: PM: hibernation: hibernation exit
May 30 10:02:40 myhost wpa_supplicant[1901]: wlp1s0: CTRL-EVENT-DSCP-POLICY clear_all
May 30 10:02:40 myhost wpa_supplicant[1901]: nl80211: deinit ifname=wlp1s0 disabled_11b_rates=0
May 30 10:02:40 myhost systemd-logind[1729]: Lid opened.
May 30 10:02:40 myhost rtkit-daemon[2036]: The canary thread is apparently starving. Taking action.
May 30 10:02:40 myhost systemd[334366]: plasma-kwin_wayland.service: Watchdog timeout (limit 15s)!
May 30 10:02:40 myhost systemd[1932]: plasma-kwin_wayland.service: Killing process 1986 (kwin_wayland_wr) with signal SIGHUP.
May 30 10:02:40 myhost systemd[1932]: plasma-kwin_wayland.service: Killing process 1992 (kwin_wayland) with signal SIGHUP.
May 30 10:02:40 myhost systemd[1932]: plasma-kwin_wayland.service: Killing process 2074 (Xwayland) with signal SIGHUP.
May 30 10:02:40 myhost systemd[1932]: plasma-kwin_wayland.service: Killing process 327030 (kscreenlocker_g) with signal SIGHUP.
May 30 10:02:44 myhost kwin_wayland_wrapper[2074]: (EE) could not connect to wayland server
May 30 10:02:44 myhost systemd[1932]: plasma-kwin_wayland.service: Failed with result 'watchdog'.

While the watchdog was introduced in KWin 6.0.90[1], I’m pretty sure this is indicative of a larger issue. There are several threads and a Red Hat KB article[2] mentioning that this is caused by s2idle sleep and how systemd tracks time for the watchdog.[3] Unfortunately, the workaround mentioned of forcing S3/deep sleep won’t work for my system, since my system outright doesn’t support S3 sleep:

# cat /sys/power/mem_sleep
[s2idle]
# echo "deep" > /sys/power/mem_sleep
tee: /sys/power/mem_sleep: Invalid argument

Nonetheless, assuming this reaches stable, it doesn’t make for a great user experience. But it’s also not something I’d expect KDE developers to be able to resolve outside of re-reverting the change. For now I’ve had some luck changing plasma-kwin_wayland.service’s WatchdogSec to 3min, but we’ll see how that goes when my laptop sleeps overnight.

So, all of this to ask: even if the root cause of the issue isn’t actually KWin, would it still be suitable to report this as a KWin bug?


  1. systemd: Set up a watchdog (!5125) · Merge requests · Plasma / KWin · GitLab ↩︎

  2. systemd services are killed by watchdog when resuming from suspend/s2idle - Red Hat Customer Portal ↩︎

  3. There’s some discussion of what causes CLOCK_MONOTONIC to keep counting in systemd#9538 on GitHub. While the issue is for journald, the cause seems to be the same. ↩︎

Please report this to the bug tracker. There might be workarounds or the plasma devs could reach out to upstream to solve this.

1 Like

That makes sense to me. Thanks!