Lately, when I shutdown (using the panel shutdown dialog) and then close the lid, what happens is that my machine suspends instead of shutting down, and when I later resume, it proceeds to shut down. Highly annoying. I think the problem is that gpm is not aware that a shutdown is already in progress and it should ignore the lid close.
gnome-session doesn't send the SessionOver signal at all. It's never emitted in gsm-manager.c at all. If gnome-session emitted that, it would be a trivial patch to gnome-power-manager to exit when this signal is emitted. Reassigning, and then when g-s is fixed we can trivially patch g-p-m.
Upstream bug: http://bugzilla.gnome.org/show_bug.cgi?id=579064
Actually, the org.gnome.SessionManager.ClientPrivate.EndSession signal is probably the right thing to use. Of course, both of these require gpm to actually register with the session. Currently, it has: /* optionally register with the session */ session = gpm_session_new (); if (FALSE) { egg_warning ("register with the session requires logout handling"); gpm_session_register_client (session, "gnome-power-manager", getenv ("DESKTOP_AUTOSTART_ID")); }
(In reply to comment #3) > Actually, the org.gnome.SessionManager.ClientPrivate.EndSession signal is > probably the right thing to use. This works: commit 8c56ff7be6ed6c9fc12a94137266329db31a8919 Author: Richard Hughes <richard> Date: Mon Apr 20 16:00:22 2009 +0100 Connect to gnome-session and exit on logout Register with the session and handle EndSession to fix RH#495904
I tested git master briefly, and it works fine, indeed. shutdown-and-close-lid now does shutdown, not suspend in the middle of a half-finished shutdown. I guess we should also make sure that logout-and-close-lid leads to a suspend when the login session becomes active.
(In reply to comment #5) > I guess we should also make sure that logout-and-close-lid leads to a suspend > when the login session becomes active. I think this is a different bug, with a different solution. Can you please try the packages here: http://koji.fedoraproject.org/koji/buildinfo?buildID=98858 and then we can look at getting the bump into f11-final if there are no problems. Thanks.
Works fine for me.
Tagged for f11-final.