Bug 495904 - gnome-session does not send SessionOver, which can cause suspend during shutdown
Summary: gnome-session does not send SessionOver, which can cause suspend during shutdown
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-power-manager
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F11Blocker, F11FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2009-04-15 14:18 UTC by Matthias Clasen
Modified: 2009-04-24 14:53 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-04-24 14:53:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Matthias Clasen 2009-04-15 14:18:08 UTC
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.

Comment 1 Richard Hughes 2009-04-15 15:34:36 UTC
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.

Comment 2 Matthias Clasen 2009-04-15 15:39:34 UTC
Upstream bug: http://bugzilla.gnome.org/show_bug.cgi?id=579064

Comment 3 Matthias Clasen 2009-04-20 06:10:30 UTC
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"));
        }

Comment 4 Richard Hughes 2009-04-20 15:01:48 UTC
(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

Comment 5 Matthias Clasen 2009-04-21 01:25:21 UTC
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.

Comment 6 Richard Hughes 2009-04-22 13:43:31 UTC
(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.

Comment 7 Matthias Clasen 2009-04-22 14:45:21 UTC
Works fine for me.

Comment 8 Richard Hughes 2009-04-24 14:53:20 UTC
Tagged for f11-final.


Note You need to log in before you can comment on or make changes to this bug.