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 692954 - systemd: Inhibit the lid as well when suspend is inhibited
systemd: Inhibit the lid as well when suspend is inhibited
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: gnome-session
unspecified
Other All
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-31 18:03 UTC by Bastien Nocera
Modified: 2013-01-31 22:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
systemd: Inhibit the lid as well when suspend is inhibited (1.42 KB, patch)
2013-01-31 18:03 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2013-01-31 18:03:28 UTC
This doesn't seem to work though, as systemd still suspends on lid close...
Comment 1 Bastien Nocera 2013-01-31 18:03:35 UTC
Created attachment 234927 [details] [review]
systemd: Inhibit the lid as well when suspend is inhibited

Otherwise, even though we shouldn't suspend, we'll still do
it when closing the lid, as gnome-session fails to tell systemd
not to handle the lid switch.
Comment 2 Bastien Nocera 2013-01-31 18:15:33 UTC
I get this in my /var/log/messages.

Jan 31 19:07:27 sirocco dbus-daemon[565]: dbus[565]: [system] Rejected send message, 2 matched rules; type="method_return", sender=":1.2" (uid=0 pid=552 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.17" (uid=1000 pid=907 comm="gnome-session ")
Jan 31 19:07:27 sirocco dbus[565]: [system] Rejected send message, 2 matched rules; type="method_return", sender=":1.2" (uid=0 pid=552 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.17" (uid=1000 pid=907 comm="gnome-session ")
Comment 3 Bastien Nocera 2013-01-31 19:43:20 UTC
Not sure what happened, it seems to work correctly now. I'd like to get this patch in before 3.7.5.
Comment 4 Bastien Nocera 2013-01-31 21:08:53 UTC
Attachment 234927 [details] pushed as 9540eff - systemd: Inhibit the lid as well when suspend is inhibited
Comment 5 Giovanni Campagna 2013-01-31 21:41:06 UTC
Wait a minute, the whole point of the lid-switch in logind was to ignore inhibitors when closing the lid!
Comment 6 Bastien Nocera 2013-01-31 21:55:56 UTC
(In reply to comment #5)
> Wait a minute, the whole point of the lid-switch in logind was to ignore
> inhibitors when closing the lid!

gnome-session doesn't differentiate between suspend and lid-close. But you're right, this is actually not the way to solve the problem.

commit 86cf902bedc410810d083289f269c395d2e66fd6
Author: Bastien Nocera <hadess@hadess.net>
Date:   Thu Jan 31 22:55:27 2013 +0100

    Revert "systemd: Inhibit the lid as well when suspend is inhibited"
    
    This reverts commit 9540eff45540ba2ce985be0c02af73a14e41d43f.
Comment 7 Colin Walters 2013-01-31 22:47:39 UTC
(In reply to comment #2)
> I get this in my /var/log/messages.
> 
> Jan 31 19:07:27 sirocco dbus-daemon[565]: dbus[565]: [system] Rejected send
> message, 2 matched rules; type="method_return", sender=":1.2" (uid=0 pid=552
> comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)"
> error name="(unset)" requested_reply="0" destination=":1.17" (uid=1000 pid=907
> comm="gnome-session ")

See http://cgit.freedesktop.org/systemd/systemd/commit/?id=1a37b9b9043ef83e9900e460a9a1fccced3acf89

We need to do this same fix in more places in the systemd codebase.