I’m not sure if this is the right place to ask this question, but I’ll try
I’ve configured my OS (Kubuntu 22) to lock the screen and then turn off the displays after X minutes. However, it stops working when I’m listening to music or a podcast on YouTube or a media player application.
And I want it to work. I want the screen to lock, and then I want it to turn off the monitors, even if there’s something playing as a “video” (which is actually just audio, which matters to me).
I’ve searched for a solution, but all the results on Google are about how to disable screen locking when a video is playing. However, I want the exact opposite. I want it enabled. I want my OS to lock the screen and then turn off the monitors after X minutes.
Do you happen to know how to achieve this?
I don’t know a ton about these things, but something that might be worth trying…if you’re using a Flatpak version of one of those apps, you could try overriding the Flatpak permissions so it can’t “talk” to
org.freedesktop.ScreenSaver, which I think is how Flatpak apps tell the base system that they want to inhibit screen locking.
In this example, maybe try changing “talk” to “see” on that line? (Sorry, I don’t have Firefox installed as a Flatpak on my system but just showing where the settings dialog option is?)
And maybe someone else with more in-depth knowledge can give a more holistic/better answer, but hopefully that helps with some angles to investigate!
Thanks, but no, these are not applications installed via Flatpak, but ‘regular’ ones, meaning, for example, Haruna (media player) is preventing the screen saver from kicking in.
Nevertheless, it seems like the clue is on point - I mean, it’s something related to communication with X11(?). Unfortunately, I don’t see anything like that in the settings, and I’ve gone through everything accessible via the GUI (System Settings app).
I’m pretty sure the setting you are looking for is app specific and will have to be set on each of the offending apps.
I did not find anything similar in the Haruna player, but I did find it in VLC Media Player! I’ll test it tonight, but it sounds like it’s exactly what I’m looking for!
Thanks! I’ll report the results in a few hours.
The more general answer is that there is no way to override specific screen locking inhibition requests from apps at the Plasma level. However you’ve been pointed to (thanks @WilsonEPhillips!) certain apps possibly having options not to request an inhibition in the first place.
OK, so thanks to everyone!
@WilsonEPhillips - tried SMPlayer, it does work, but only after the video finishes, but thanks to your answer I tried a few video players and VLC Media Player does have this option (Disable screensaver) and unchecking it works just like I wanted - it just allows the system to lock the screens and then turn off the monitors
So thank you very much everyone again!