Bug 117491

Summary: System -> Log Out -> Suspend doesn't restore X session
Product: [openSUSE] SUSE Linux 10.1 Reporter: Aidan Skinner <aidan>
Component: GNOMEAssignee: Rodrigo Moya <rodrigo>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Blocker    
Priority: P5 - None CC: hpj
Version: Beta 3   
Target Milestone: Beta 5   
Hardware: Other   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Package with fix

Description Aidan Skinner 2005-09-16 16:37:01 UTC
When I suspend my laptop with the menu and then power it up again, I am left at
the GDM login screen. When I suspend using my laptops (Dell D600) suspend key, I
am placed back into my running X session as is right and proper.
Comment 1 Forgotten User ZhJd0F0L3x 2005-09-16 22:20:28 UTC
a work around could be using kpowersave to initiate suspend (it should work on
GNOME, too)
Comment 2 Timo Hoenig 2005-09-17 11:03:36 UTC
Unfortunately, this is also present in RC4.
Comment 3 Stanislav Brabec 2005-09-19 09:59:21 UTC
See also bug 71003 comment 2.
Comment 4 Timo Hoenig 2005-09-19 10:02:47 UTC
The expected behavior is to trigger the suspend without closing the current GNOME session.
Comment 5 JP Rosevear 2005-11-22 22:17:54 UTC
*** Bug 134542 has been marked as a duplicate of this bug. ***
Comment 6 Rodrigo Moya 2006-01-19 14:31:36 UTC
gdm is running --suspend-to-disk, while we do --suspend-to-ram in the power manager applet.

Does running 'powersave --suspend-to-ram' trigger the expected behavior?

It seems to me --suspend-to-disk does not work on all systems. What do you get apart from not coming back to the GNOME session? I get a kernel panic :(
Comment 7 Rodrigo Moya 2006-01-19 18:21:20 UTC
sorry, it is suspend-to-ram what doesn't work in all systems.
Comment 8 Timo Hoenig 2006-01-19 19:59:17 UTC
Rodrigo, are you trying to fix this for some 10.0 update?  I'll have a look how things are working with 10.1 Beta1.
Comment 9 Timo Hoenig 2006-01-20 11:33:21 UTC
Moving to 10.1.

The problem remains, it has _nothing_ changed.

Reproducable:

- Log into GNOME
- Choose "Log Out" from the "Desktop" entry in gnome-panel
- Choose radio button for "Suspend the computer"
- Click OK

(* at this point you already see X shutting down rather than staying as-is *)

- System suspends & power off
- Power on & system resumes
- You'll find yourself back in GDM, your previous session is destroyed.

We really need to get this fixed.

Moving to 10.1.
Comment 10 Rodrigo Moya 2006-01-21 10:55:55 UTC
I'm fixing it for NLD10/10.1.

Aidan, could you please tell me if running 'powersave --suspend-to-ram' on the command line does trigger the expected result?
Comment 11 Timo Hoenig 2006-01-21 12:30:52 UTC
Rodrigo, what we're doing is a suspend to disk (see 'gdm-conf.patch'):

+RebootCommand=/sbin/shutdown -r now
+HaltCommand=/sbin/shutdown -h now
+SuspendCommand=/usr/bin/powersave --suspend-to-disk

We're currently _not_ providing any option to trigger suspend to ram with GDM.

When I first hit this bug (10.0) I could narrow down the problem to GDM:

- using kpowersave left X running. After resume the X session was still running.
- using 'powersave --suspend-to-disk' left X running. After resume the X session was still running.
- using the log out button of GDM to trigger suspend to disk killed the X session. After resume you were thrown back to the GDM login screen. Session destroyed.

(I expect the very same results for 10.1)
Comment 12 Forgotten User ZhJd0F0L3x 2006-01-21 13:05:49 UTC
by no means you should default to suspend-to-ram. It just does not work on too many machines and though is disabled per default.

Also, it looks like GDM first logs out, then suspends. This is fundamentally wrong.
For suspend, it should not log out, but instead lock the screen; then trigger suspend. If you log the user out, suspend is basically useless since then it will be almost like a reboot for him.
Comment 13 Timo Hoenig 2006-01-26 11:28:17 UTC
Same with Beta2.

Any updates?  Anyone working on it at all?

Moving to Beta2.
Comment 14 Rodrigo Moya 2006-01-26 12:36:11 UTC
yes, I'm working on it
Comment 15 Timo Hoenig 2006-02-03 11:11:31 UTC
Still present in Beta 3.
Comment 16 JP Rosevear 2006-02-08 22:34:19 UTC
Progress?
Comment 17 Rodrigo Moya 2006-02-09 02:01:33 UTC
Created attachment 67121 [details]
Package with fix
Comment 18 Rodrigo Moya 2006-02-09 02:11:17 UTC
Attached package submitted to autobuild. Timo, can you confirm it works for you?
Comment 19 Timo Hoenig 2006-02-09 09:19:52 UTC
Gave it a try on Beta3 with the updated package.

The problem is not fixed.  The logout dialog simply disappears once I choose "Suspend the computer" and hit OK.  It leaves the X session running and does not suspend the system at all.
Comment 20 Rodrigo Moya 2006-02-16 17:18:12 UTC
Fixed package submitted to autobuild