SUMMARY When powerdevil turns off the screen after X minutes of inactivity, the screen constantly turns back on for ~4 seconds, then stays off for ~22 seconds, then turns on again for ~4 seconds, and so on indefinitely. The backlight stays off, though. This only happens in the Wayland session. The screen stays off solidly in the X11 session. This suspicious message appears in journalctl every 30 seconds, but not all the time, and not just when the screen is off: Jun 02 18:32:52 home xdg-desktop-portal-kde[203852]: xdp-kde-background: GetAppState called: no parameters STEPS TO REPRODUCE 1. Pick the Wayland session when you log in 2. Wait for the screen to turn off, or turn it off with this command I found at askubuntu.com: sleep 1 && dbus-send --session --print-reply --dest=org.kde.kglobalaccel /component/org_kde_powerdevil org.kde.kglobalaccel.Component.invokeShortcut string:'Turn Off Screen' 3. Turn the screen towards a light source, otherwise the difference is not really visible 4. Wait OBSERVED RESULT The screen continuously turns on and off. EXPECTED RESULT The screen should stay off. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch Linux (available in About System) KDE Plasma Version: 5.24.5 KDE Frameworks Version: 5.94.0 Qt Version: 5.15.4+kde+r146-1 Kernel version: 5.18.0-arch1-1 ADDITIONAL INFORMATION The computer is a laptop, HP 250 G7. The CPU is Intel Core i3 7020u, with Intel 620 graphics. The screen is a cheap TN type made by BOE, connected through eDP. It's the internal screen, and I don't have any external ones connected.
That's a WTF bug for sure.
I found this kinda similar Gnome bug, which they fixed: https://gitlab.gnome.org/GNOME/mutter/-/issues/1991 I don't know if it's useful. It might have been fixed by accident, since no commit is mentioned.
In order to show what KWin and the kernel are doing, you can execute > kwriteconfig5 --file startkderc --group General --key systemdBoot true then reboot, then execute > echo 0xFF | sudo tee /sys/module/drm/parameters/debug and > sudo dmesg -w > dmesg.log (leave it running) then turn the screen off, let it happen once and cancel the dmesg command. Then upload that dmesg.log and also the output of > journalctl --boot 0 --user-unit plasma-kwin_wayland Also, if you put KWIN_DRM_NO_AMS=1 into /etc/environment, does the behavior change?
Created attachment 149591 [details] drm debug messages
Created attachment 149592 [details] messages from kwin_wayland
I put KWIN_DRM_NO_AMS=1 in /etc/environment and rebooted. The behaviour didn't change, so I removed it and rebooted again. Then I obtained journalctl.log and dmesg.log as you instructed. They are attached.
hmm, the driver is reporting hotplugs when the screen has been turned off for a bit. While I have never heard of it happening with eDP, it is somewhat common with external monitors. I think this one can be sanely worked around in KWin though
However, in the 4 seconds in between two hotplugs, I don't see KWin doing anything... So it might not be KWin's doing after all. Do you have the Xorg driver xf86-video-intel installed? If so, if you remove it, does it still work correctly on Xorg?
I don't have xf86-video-intel. I removed it a long time ago because of some other bug(s).
Updating everything did not magically fix it. KDE Plasma Version: 5.25.4 KDE Frameworks Version: 5.97.0 Qt Version: 5.15.5+kde+r174-1 / 6.3.1 Wayland version: 1.21.0 Kernel version: 5.19.3-arch1-1
Plasma 6 ships with a workaround for such buggy hotplug notifications, so this should no longer happen