GNOME Bugzilla – Bug 705105
Rhythmbox while playing disables automatic screen lock
Last modified: 2014-03-09 07:36:16 UTC
When playing a file or stream in rhythmbox, the preferences on 'power' settings are overriden, that is, the screen doesn't lock automatically after a a few minutes without user input. gnome-shell 3.8.3 rhythmbox 2.99.1
I DISABLED one plugin which is enabled by default: - MPRIS D-Bus interface And then I got my screen locked as usual with rhythmbox playing. I have dbus 1.6.12 installed.
Alas, if I restart rhythmbox, even with the plugin above disabled, the screen locks no more again.
Created attachment 250553 [details] gdb warning when I enable/disable another dbus-related plugin gdb outputs this warning when I enable/disable the other dbus-related plugin, the MediaServer 2 D-Bus interface.
Problem still persists with 3.0 and either dbus 1.16.12 or 1.16.14.
This behaviour is caused by the 'power-manager' plugin. It is listed as 'built in' and thus cannot be selected from the Plugins dialog box in Rhythmbox. To make it visible within Rhythmbox, there's a workaround: edit /usr/lib/rhythmbox/plugins/power-manager/power-manager.plugin and change the line: Builtin=true to Builtin=false
From this discussion: https://bugs.archlinux.org/task/36290 : "The description of the plugin doesn't match what it's doing. The plugin is supposed to inhibit suspend, which would be done by passing GTK_APPLICATION_INHIBIT_SUSPEND. What it does however is passing GTK_APPLICATION_INHIBIT_IDLE, which means the session manager will never kick in the screensaver."
Created attachment 258496 [details] [review] Patch to fix GTK_APPLICATION_INHIBIT_IDLE being passed instead of GTK_APPLICATION_INHIBIT_SUSPEND by the Power Manager plugin A buddy from the Arch Linux bugtracker came up with a patch - http://pastebin.com/3w2nifQZ - which fixes the bug. I'm attaching the raw patch.
looks right to me, fwiw
Any progress on this issue??
This was discussed here: https://mail.gnome.org/archives/rhythmbox-devel/2013-October/msg00005.html BUT, I tested the patch and it *did* inhibit automatic suspend (I set it to 15 minutes and played for 30 minutes and my computer didn't suspend) so it appears to be indeed the right flag.
Nah, the thing is that automatic suspend does not work when the screen is idle - https://bugzilla.gnome.org/show_bug.cgi?id=712706 I tested the patched rhythmbox making sure that the automatic screen lock was disabled and saw that Torben Hohn was right: "It looks like GTK_APPLICATION_INHIBIT_SUSPEND prevents laptops from suspending when the lid is closed, so it's not the right flag to use here." So what is the right flag, if there is one?