Summary: | Turn off screen when PM-inhibiting app is not the active app | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Martin Klapetek <mklapetek> |
Component: | Power management & brightness | Assignee: | Plasma Development Mailing List <plasma-devel> |
Status: | CONFIRMED --- | ||
Severity: | wishlist | CC: | bugseforuns, kde, voidpointertonull+bugskdeorg |
Priority: | NOR | ||
Version: | 6.2.4 | ||
Target Milestone: | 1.0 | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Martin Klapetek
2017-04-03 16:58:15 UTC
Interesting idea. Might be tricky, though, as the process that created the inhibition and/or the application name it tells me does not neccessarily correspond with a window on the system. Also, depending on the type of inhibition I would want it to say on, e.g. a copy process should keep the device on even if I'm doing something else or am idle. 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. As a note: if the audio goes through HDMI turning off the screen is a bad idea if music is inhibiting. So it might need coupling with pulseaudio to check the output channel. 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. |