[Powerdevil] [Bug 378404] Turn off screen when PM-inhibiting app is not the active app

Pedro V bugzilla_noreply at kde.org
Sat Nov 18 12:15:15 GMT 2023


https://bugs.kde.org/show_bug.cgi?id=378404

Pedro V <voidpointertonull+bugskdeorg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |voidpointertonull+bugskdeor
                   |                            |g at gmail.com

--- Comment #4 from Pedro V <voidpointertonull+bugskdeorg at gmail.com> ---
Currently with Firefox playing a video in a non-active tab, there's no power
management inhibition, so the described way of playing music from YouTube and
still having automatic session locking already works with Firefox.
Not sure about Chromium though specifically. Gave Google Chrome a try some time
ago, and it could neither work in a Wayland-only environment, nor it could use
the GPU for video decoding, so I wouldn't expect that to be a good showcase of
otherwise decently working Linux/KDE features.

The minimization desire also works with for example mpv which seems to release
its power management inhibition when minimized, so it's possible to keep on
listening to the video while automatic session locking and screen timeout is
working.

What's a bit tricky though is ignoring the inhibitions of programs not
"active":
- A window not in focus can be still watched by the user, even if it's
partially occluded. The window manager would need to keep track of whether
there's anything visible from the window and toggle the activity of the
inhibition based on that
- The source of the inhibition could be a program with no windows, or possibly
a program which has a window, but it has a reason to have the inhibition around
without desiring to have anything visible tied to that

(In reply to Kai Uwe Broulik from comment #2)
> Fun fact: KDE's proprietary power management system allows a distinction
> between "keep screen on" (video playback) and "just keep the machine on"
> (audio playback). Chrome does that on Gnome, even, but on Plasma it just
> uses the FDO interface which only knows all or nothing. I did file a
> wishlist entry about that against Chrome but it has not yet been resolved.

That sounds interesting. Does anything use it, or does it still exist to begin
with?
Firefox and mpv apparently doesn't, and I just recently ran into a bug report
of Elisa even inhibiting screen locking, so I have doubts of it having support
worth noting.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Plasma-devel mailing list