SUMMARY Using the dmabuf-wayland vo with mpv doesn't inhibit KDE's screensaver from activating. mpv appears to do the right thing, powerdevil/kwin not handling subsurfaces properly is suspected, see mpv issue: https://github.com/mpv-player/mpv/issues/15181 STEPS TO REPRODUCE 1. set the screensaver|screen blanking delay to a low value 2. run mpv --no-config --vo=dmabuf-wayland --stop-screensaver=yes|always <file> OBSERVED RESULT Screensaver/Screen blanking turns on, even while the video is playing (--stop-screensaver=default|yes) or paused (--stop-screensaver=always) EXPECTED RESULT powerdevil should recognize mpv playing and inhibiting the screen blanking. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.2.2 KDE Frameworks Version: 6.7.0 Qt Version: 6.8.0 Kernel Version: 6.11.5-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 PRO 4750U with Radeon Graphics Memory: 46.3 GiB of RAM Graphics Processor: AMD Radeon Graphics ADDITIONAL INFORMATION Other mpv vos (e.g., gpu-next) work properly.
https://github.com/mpv-player/mpv/pull/14209/commits/79b3866d6ef58e2de3d696ac3f4d7f11390a127b this mpv fix likely broke it
Yeah, KWin only sets up idle inhibit for the main surface of toplevels, not their subsurfaces. That's definitely wrong.
One could argue whether it's actually useful if the idle inhibitor is deactivated in case the surface gets obstructed. As a user, it would be unexpected to me. In either case, since other compositors work like this, I guess it's too late to argue. We could look into it in 6.4. It would be nice to use the visibility state of the SurfaceItem to determine whether an idle detector should be taken into account.
(In reply to Vlad Zahorodnii from comment #3) > One could argue whether it's actually useful if the idle inhibitor is > deactivated in case the surface gets obstructed. As a user, it would be > unexpected to me. In either case, since other compositors work like this, I > guess it's too late to argue. > > We could look into it in 6.4. It would be nice to use the visibility state > of the SurfaceItem to determine whether an idle detector should be taken > into account. Aren't those separate issues though? Currently kwin doesn't appear to consider subsurfaces with idle inhibitors, which means playing a video with dmabuf-wayland doesn't inhibit power saving/screen locking at all. Couldn't this be addressed for 6.3 already? Considering obstruction might be nice for when e.g. firefox starts using subsurfaces for playing videos. I need to manually block inhibitors from it, just so no random tab with video playing keeps my screen from turning off.