Suspension, Hibernation and GRUB

Actually, this is two somewhat-related problems, although GRUB is involved with only one.

When I suspend 11.2 to RAM (aka “standby” in Windows parlance), suspend mode is achieved, but on “awakening”, the PC powers up in a hang state, totally unresponsive, requiring a “hard” (power off/on) reboot. (Windows does the suspend/standby procedure correctly).

The second problem is more GRUB-related. When I suspend 11.2 to Disk (aka “Hibernate” in Windows parlance), suspend state is correctly attained, and is recoverable and functions. The problem seems to be in GRUB. When starting the suspended/hibernating PC, the normal BIOS boot menu is followed by “Grub stage 2”, and proceeds directly to 11.2. (The GRUB menu is not presented). (When Windows is suspended/hibernated, the “GRUB stage 2” message is followed by the GRUB menu, allowing me to choose 11.2 or Windows (or Ubuntu). If 11.2 (or Ubuntu) is selected, it boots, is used and Windows remains in the “hibernate” state).

In summary, I can have a “hibernatedWindows, and switch to 11.2, back to Windows, (re-hibernate), back to 11.2, etc etc. How do I/what do I do to allow a “suspended11.2 to remain, while switching to Windows, then back ?

(FWIW, 11.2 does not take that long (unlike Windows >:() to boot up, so this may sound like an unnecessary exercise. However, after much ado to have 11.2 & GRUB controlling boot management (11.2, Windows and Ubuntu) :), I would like to understand all options).

I don’t know if you have found the solution, put take a look at Suspend to disk - openSUSE

Haven’t got a solution ready, but I know it can be done; my son used to have this on an old laptop, since that appeared to bring it back to life a lot faster than a real boot.

Back, done it.

Open a terminal window and do:

su -c ‘kwrite /usr/lib/pm-utils/sleep.d/99Zgrub’
This opens the file mentioned in the link in an editor, with root permissions. Now go to the end of the file, where you’ll see:


###### main()

if  "$1" = hibernate ] ||  "$1" = suspend -a "$2" = suspend_hybrid ]; then
                prepare-grub
fi
if  "$1" = thaw ] ||  "$1" = resume -a "$2" = suspend_hybrid ]; then
                grub-once-restore
fi

change it to:


###### main()

if  "$1" = hibernate ] ||  "$1" = suspend -a "$2" = suspend_hybrid ]; then
#                prepare-grub
fi
if  "$1" = thaw ] ||  "$1" = resume -a "$2" = suspend_hybrid ]; then
#                grub-once-restore
fi

Look carefully, it’s just the two '#'s that make the difference. They have to be on the exact same line. Tested this, my laptop goes into suspend, on boot it shows the GRUB menu, I can choose, if I choose openSUSE 11.2 it comes out of suspend. Looks like exactly what you want.

Good luck, let us know if this works for you.

There is a bug with the suspend. https://bugzilla.novell.com/show_bug.cgi?id=551315 I haven’t seen a solution to it yet.

If you follow Knurpht’s post your Suspend to Disk issue should be sorted.

For Suspend to Ram, please tell us what graphic hardware you’re having and what driver you’re using.

If you follow Knurpht’s post your Suspend to Disk issue should be sorted.

Sorted. SUSE now suspends (hibernates) to disk (as Windows), and restores to GRUB. Although a straight SUSE boot is rather quick, this is a great feature for laptop power management!

For Suspend to Ram, please tell us what graphic hardware you’re having and what driver you’re using.

Laptop is a Gateway MX7340, with a Samsung GM monitor. The display adaptor(s) are:

00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02) (prog-if 00 [VGA controller])                              
        Subsystem: Rioworks Device 202f                                         
        Flags: bus master, fast devsel, latency 0, IRQ 16                       
        Memory at d8000000 (32-bit, prefetchable) [size=128]                   
        Memory at e0380000 (32-bit, non-prefetchable) [size=512]               
        I/O ports at eff0 [size=8]                                              
        Expansion ROM at <unassigned> [disabled]                                
        Capabilities: [d0] Power Management version 1                           

00:02.1 Display controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)                                                                   
        Subsystem: Rioworks Device 202f                                         
        Flags: bus master, fast devsel, latency 0                               
        Memory at d0000000 (32-bit, prefetchable) [size=128]                   
        Memory at e0300000 (32-bit, non-prefetchable) [size=512]               
        Capabilities: [d0] Power Management version 1     

As near as I can determine, the driver is -Intel.

There is a bug with the suspend. https://bugzilla.novell.com/show_bug.cgi?id=551315 I haven’t seen a solution to it yet.

As I read this post, the problem(s) described fit my situation almost exactly. The suspend-to-Ram (either from the GUI or command line (“s2ram --force”) suspend correctly (from outward appearance). However, all keys are totally unresponsive, save the power on, which starts the recovery then hangs solid, with only the “caps lock” indicator flashing,[/size][/size][/size][/size][/size]

Flashing “Caps lock” normally signals kernel panic.
I do not know whether this would help in the case of suspend causing kernel panic, but you can try:

Suspend to RAM - openSUSE

Try to experiments with the different parameters from init=/bin/bash as described earlier in that page so that you don’t lose any important data. If a particular combination works for you, then try using it under X.

This doesn’t seem to be as much about hardware, as a d-bus/kernel issue. On resume, or coming out of hibernation it fails.

/usr/lib/pm-utils/sleep.d/10NetworkManager =====
Error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible
causes include: the remote application did not send a reply, the message bus
security policy blocked the reply, the reply timeout expired, or the network
connection was broken.

What I need to know is kernel versions, and does this only happen to user
accounts or is it system wide. I will log in as root on my desktop, which is
running Factory, and see. First I set the power manager to the same as laptop
settings, to see if I can trigger that. If I do, then I’ll try logging in as
root. Upon completion of that, I’ll try logging in as root on my laptop to
see what results I get there.

I still don’t know how to fix this yet, but at least once this stuff is done
we’ll know a bit more.

My desktop, running Factory with kernel 2.6.33-5 worked fine with the hibernation. So no issues there. I’d say it seems to be “fixed” with the new kernel.

I’ll check root on my laptop later.

What I need to know is kernel versions, and does this only happen to user
accounts or is it system wide.

My kernel is 2.6.31.12 (straight from the install DVD). The suspend-to-RAM fails on my user account, and from the root account.

My other laptop has an ATI legacy Radeon graphics adaptor, so until I get that business sorted, it runs in “failsafe”. Suspension does not seem an option there.

I found a kernel for 11.2 that is 2.6.33. Now a word of caution. It is not typically recommended to add this repo. Adding this repo is generally for the more experienced users. I only bring it up here, as it may provide a fix. Index of /repositories/Kernel:/HEAD/openSUSE_11.2

I found a kernel for 11.2 that is 2.6.33. Now a word of caution. It is not typically recommended to add this repo. Adding this repo is generally for the more experienced users.

I will take your recommendation, as I do not consider myself sufficiently experienced (in Linux) to attempt a test kernel. (Were it Windows, I most likely would have done such, then wrote this post! :open_mouth: ).

Since the “Suspend-to-disk” (“hibernate”) works (and is quite fast, in both suspending and restoring), I will live with such until a solution is found. I just changed the power management options for “closing the lid”.

This solution might work for some. However, in my case, it did not. Instead, my laptop suspended but then would not respond to anything. Evenntually I did a hard stop by holding down the power key. However, when I restarted, it just returned to the same sleep state.

If you try this and this happens to you, a simple fix is to shutdown, unplug the laptop, remove the battery for a few minutes. Plug it back in and startup and then add the battery. This “reset” my bios and any other impacted hardware.