GNOME Bugzilla – Bug 692954
systemd: Inhibit the lid as well when suspend is inhibited
Last modified: 2013-01-31 22:47:39 UTC
This doesn't seem to work though, as systemd still suspends on lid close...
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.
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 ")
Not sure what happened, it seems to work correctly now. I'd like to get this patch in before 3.7.5.
Attachment 234927 [details] pushed as 9540eff - systemd: Inhibit the lid as well when suspend is inhibited
Wait a minute, the whole point of the lid-switch in logind was to ignore inhibitors when closing the lid!
(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.
(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.