You are not logged in.

#1 2016-09-09 20:31:14

nguillaumin
Member
Registered: 2015-06-09
Posts: 4

[solved] xdg-screensaver suspend not working on Gnome 3

Hi,

I'm using Gnome 3.20.4-1 and I'm trying to use xdg-screensaver suspend <window id> to temporarily suspend the screensaver on my system. I'm getting a valid window ID to pass with xwininfo.

The command doesn't return any error, but the screensaver is not suspended, it still kicks in after 5mn (as configured in my power settings). Note that gnome-screensaver is not installed, so presumably it's the power management screen blanking functions that kicks in.

The strange thing is that it works perfectly fine under Debian Testing in the same circumstances (Power settings set to 5mn blank, no gnome-screensaver installed), hence my posting in the Arch forums.

Looking at xdg-screensaver, it goes through DBus to try to inhibit idle detection. Using dbus-monitor interface=org.gnome.SessionManager I was able to track the call, which looks alright. I also did that in Debian Testing, and there's a slight difference where Arch has an additional line with "NameLost". I don't know what that means. Logs below are when running xdg-screensaver suspend then xdg-screensaver resume.

Arch:

signal time=1473451731.131075 sender=org.freedesktop.DBus -> destination=:1.147 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.147"
signal time=1473451731.131127 sender=org.freedesktop.DBus -> destination=:1.147 serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
   string ":1.147"
method call time=1473451740.150481 sender=:1.150 -> destination=org.gnome.SessionManager serial=6 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=Inhibit
   string "Terminal"
   uint32 48242559
   string "Terminal"
   uint32 8
signal time=1473451740.151236 sender=:1.9 -> destination=(null destination) serial=313 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=InhibitorAdded
   object path "/org/gnome/SessionManager/Inhibitor19"
method call time=1473451740.152330 sender=:1.13 -> destination=:1.9 serial=824 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=IsInhibited
   uint32 16

Debian:

signal sender=org.freedesktop.DBus -> dest=:1.77 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.77"
method call sender=:1.79 -> dest=org.gnome.SessionManager serial=7 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=Inhibit
   string "debian@debian: ~"
   uint32 25166811
   string "debian@debian: ~"
   uint32 8
signal sender=:1.2 -> dest=(null destination) serial=102 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=InhibitorAdded
   object path "/org/gnome/SessionManager/Inhibitor2"
method call sender=:1.22 -> dest=:1.2 serial=494 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=IsInhibited
   uint32 16

They both say "InhibitorAdded" though, so it looks alright...

Any idea what might be going on, or where to look next? Is xdg-screensaver suspend working for people with Gnome 3?

Thanks,

Nico

Last edited by nguillaumin (2016-09-15 05:30:59)

Offline

#2 2016-09-15 05:30:45

nguillaumin
Member
Registered: 2015-06-09
Posts: 4

Re: [solved] xdg-screensaver suspend not working on Gnome 3

I found the issue. xdg-screensaver depends on xprop but it's not installed as a dependency. Unfortunately it doesn't complain that it's missing (and there seem to be some code to deal with it missing and still work) so it was difficult to track down.

Installing xprop makes it work. I'll see if I can report the bug somewhere...

Offline

Board footer

Powered by FluxBB