After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 705105 - Rhythmbox while playing disables automatic screen lock
Rhythmbox while playing disables automatic screen lock
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: Plugins (other)
3.0
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-07-29 21:18 UTC by Luis Henrique Mello
Modified: 2014-03-09 07:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdb warning when I enable/disable another dbus-related plugin (246 bytes, application/octet-stream)
2013-07-31 15:20 UTC, Luis Henrique Mello
  Details
Patch to fix GTK_APPLICATION_INHIBIT_IDLE being passed instead of GTK_APPLICATION_INHIBIT_SUSPEND by the Power Manager plugin (972 bytes, patch)
2013-10-29 23:20 UTC, Luis Henrique Mello
none Details | Review

Description Luis Henrique Mello 2013-07-29 21:18:15 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
Comment 1 Luis Henrique Mello 2013-07-31 14:54:40 UTC
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.
Comment 2 Luis Henrique Mello 2013-07-31 15:06:00 UTC
Alas, if I restart rhythmbox, even with the plugin above disabled, the screen locks no more again.
Comment 3 Luis Henrique Mello 2013-07-31 15:20:53 UTC
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.
Comment 4 Luis Henrique Mello 2013-09-27 15:52:25 UTC
Problem still persists with 3.0 and either dbus 1.16.12 or 1.16.14.
Comment 5 Luis Henrique Mello 2013-10-21 19:59:43 UTC
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
Comment 6 Luis Henrique Mello 2013-10-25 21:59:16 UTC
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."
Comment 7 Luis Henrique Mello 2013-10-29 23:20:45 UTC
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.
Comment 8 Matthias Clasen 2013-11-26 01:02:22 UTC
looks right to me, fwiw
Comment 9 Heiko Adams 2014-01-19 15:39:57 UTC
Any progress on this issue??
Comment 10 Luis Henrique Mello 2014-01-20 01:29:25 UTC
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.
Comment 11 Luis Henrique Mello 2014-02-11 01:18:50 UTC
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?