! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
org.freedesktop.PowerManagement.Inhibit should not inhibit screensaver locking
Status:
RESOLVED: MOVED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Mike 2019-09-08 03:55:23 CEST
xfce4-power-manager currently inhibits the screensaver when org.freedesktop.PowerManagement.Inhibit.Inhibit has been called, but there's an entirely separate dbus call for inhibiting the screensaver (org.freedesktop.ScreenSaver) and that should be handled by the screensaver not the power-manager.

Chromium is (for the most part) correctly inhibiting power management while it's busy doing things in the background, other apps are doing this too, but from what I've seen none as often as Google-Chrome/Chromium.
There's some reports with people saying that Chromium is doing so when it shouldn't be, while they might be right, it's still separate from the fact that screensaver inhibiting is a completely separate DBUS call.

For example, Chromium will send a DBUS call to both org.freedesktop.ScreenSaver.Inhibit and org.freedesktop.PowerManagement.Inhibit.Inhibit when playing a <video>, but will call *only* org.freedesktop.PowerManagement.Inhibit.Inhibit when playing <audio> or doing WebRTC in the background.
This to me seems like the correct behaviour, I don't want my screensaver triggering when I'm watching YouTube videos, but audio playing in the background and non-interactive WebRTC requests should probably still keep the system from going to sleep. Except that xfce4-power-manager is forcing the screensaver to stay awake even when ScreenSaver.Inhibit isn't being called.


I think this mostly means removing most of the xfpm_power_inhibit_changed_cb function in xfpm-power.c, I'm not confident enough in my C to make a patch myself though.


I'll admit it's debatable as to whether Chromium should be inhibiting so heavily for WebRTC and such, but that's a conversation for a different bug on their own bug tracker. Here's some related links/bugs with people talking about that which give some extra context for this issue:
https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1600622
https://forum.xfce.org/viewtopic.php?pid=44252
https://support.google.com/chrome/forum/AAAAP1KN0B0EZpNDL4GzyU/?hl=en&gpf=%23!topic%2Fchrome%2FEZpNDL4GzyU%3Bcontext-place%3Dforum%2Fchrome
https://unix.stackexchange.com/questions/451413/disabling-chromium-xfce-power-management-inhibition/451414
Comment 1 Git Bot editbugs 2020-05-27 01:47:08 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-power-manager/-/issues/65.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #15941

Reported by:
Mike
Reported on: 2019-09-08
Last modified on: 2020-05-27

People

Assignee:
Ali Abdallah
CC List:
4 users

Version

Attachments

Additional information