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 745762 - Screen blanking stopped working
Screen blanking stopped working
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: gnome-session
3.15.x
Other Linux
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-06 21:26 UTC by Bastien Nocera
Modified: 2015-03-09 15:11 UTC
See Also:
GNOME target: 3.16
GNOME version: ---


Attachments
Fix SessionIsActive property (1.14 KB, patch)
2015-03-06 23:18 UTC, Matthias Clasen
accepted-commit_now Details | Review
manager: don't connect to systemd until exported on bus (6.30 KB, patch)
2015-03-09 15:10 UTC, Ray Strode [halfline]
none Details | Review

Description Bastien Nocera 2015-03-06 21:26:40 UTC
mutter and gnome-shell 3.15.91

Running:
gdbus call --session --dest org.gnome.Mutter.DisplayConfig --object-path /org/gnome/Mutter/DisplayConfig --method org.freedesktop.DBus.Properties.Set org.gnome.Mutter.DisplayConfig PowerSaveMode '<3>'

will blank the screen, and bring it back to life straight away.
Comment 1 Bastien Nocera 2015-03-06 21:41:09 UTC
OK, this wasn't a good example as:
sleep 2 ; gdbus call --session --dest org.gnome.Mutter.DisplayConfig --object-path /org/gnome/Mutter/DisplayConfig --method org.freedesktop.DBus.Properties.Set org.gnome.Mutter.DisplayConfig PowerSaveMode '<3>'
works.

gnome-settings-daemon doesn't seem to be calling for mutter to blank the screen when doing Win+L.
Comment 2 Bastien Nocera 2015-03-06 21:53:45 UTC
$ gdbus introspect --session --dest org.gnome.SessionManager --object-path /org/gnome/SessionManager | grep IsActive
      readonly b SessionIsActive = false;

That's why gnome-settings-daemon isn't poking at the screen.
Comment 3 Bastien Nocera 2015-03-06 21:57:17 UTC
$ loginctl 
   SESSION        UID USER             SEAT            
         1       1000 hadess           seat0           
        c1         42 gdm              seat0           

2 sessions listed.

$ loginctl show-session 1 | grep -i active
Active=yes
State=active
Comment 4 Matthias Clasen 2015-03-06 23:18:10 UTC
Created attachment 298753 [details] [review]
Fix SessionIsActive property

GsmSystemd emits its cold-plug notify::active signal out of
init(), giving GsmManager no chance to connect its signal handler
in time to catch the initial emission. And even if we did,
the GsmManager handler can only operate once the skeleton object
exists.
Therefore, do our own cold-plug after creating the skeleton.

This is fallout from the GDBus port.
Comment 5 Bastien Nocera 2015-03-06 23:26:26 UTC
Comment on attachment 298753 [details] [review]
Fix SessionIsActive property

Tested and works for me.
Comment 6 Ray Strode [halfline] 2015-03-09 15:01:48 UTC
Attachment 298753 [details] pushed as cf40833 - Fix SessionIsActive property
Comment 7 Ray Strode [halfline] 2015-03-09 15:10:49 UTC
Created attachment 298894 [details] [review]
manager: don't connect to systemd until exported on bus

We now properly resync our active state after being exported
over the bus, but we still have a signal connection set up
prematurely.  If it did get called, it would lead to scary
messages on the console.

This commit moves the signal connection down to the same place
we test our active state at startup.
Comment 8 Ray Strode [halfline] 2015-03-09 15:11:08 UTC
Attachment 298894 [details] pushed as cd84c50 - manager: don't connect to systemd until exported on bus