Linux, Tech

Software suspend, hibernate Debian Lenny on Thinkpad R61

I recently installed Debian Lenny KDE on my Thinkpad R61. The installation went smooth but suspend/hibernate did not work. When suspend was initiated from KPowersave or Guidance, the machine would go into suspend (the moon LED on the Thinkpad panel blinks) but it immediately resumes in to the KDE session.

After reading about software suspend in the debian wiki, I decided pm-utils and uswsusp was the recommended way to go.

http://wiki.debian.org/Suspend

http://en.opensuse.org/S2ram

I played with the s2ram script with different options, ‘s2ram -f‘, ‘s2ram -f -a 3‘, but I still got the same problem of suspend-immediate-wakeup (hibernate also had the same problem).

Then, I found thinkwiki had the exact problem description.

http://www.thinkwiki.org/wiki/Problems_with_ACPI_suspend-to-ram

http://www.thinkwiki.org/wiki/Installing_Fedora_8_on_a_ThinkPad_T61#Suspend_to_RAM

The problem is that the USB kernel modules are not unloaded for the suspend to complete. So, I created file called ‘defaults’ under /etc/pm/config.d/ with the following flags enabled (this is the preferred location for pm-utils customization – ref: /usr/lib/pm-utils/defaults):

# The default sleep/wake system to use.  Valid values are:
#   kernel    The built-in kernel suspend/resume support.
#             Use this if nothing else is supported on your system.
#   uswsusp   If your system has support for the userspace
#             suspend programs (s2ram/s2disk/s2both), then use this.
#   tuxonice  If your system has support for tuxonice, use this.
#
# The system defaults to "kernel" if this is commented out.
SLEEP_MODULE="uswsusp"

# If you need to unload any modules to suspend/resume, add them here.
SUSPEND_MODULES="uhci_hcd ehci_hcd"

Bam. Suspend and Hibernate were working beautifully. Just not quite. When the machine was waking up from hibernate nicely, splashy was emitting some errors. I got it working by reinstalling splashy and libsplashy1 and adding the kernel options for splashy in my grub menu. hwinfo was useful in finding the correct vga parameter that would be supported by my R61 (1280×800).

/boot/grub/menu.lst:

kernel          /boot/vmlinuz-2.6.26-2-686 root=/dev/sda3 ro quiet vga=0x368 splash

thinkpad:~# hwinfo --framebuffer
02: None 00.0: 11001 VESA Framebuffer
[Created at bios.450]
Unique ID: rdCR.pM4x9oRqolF
Hardware Class: framebuffer
Model: "Intel(r)Crestline Graphics Controller"
Vendor: "Intel Corporation"
Device: "Intel(r)Crestline Graphics Controller"
SubVendor: "Intel(r)Crestline Graphics Chip Accelerated VGA BIOS"
SubDevice:
Revision: "Hardware Version 0.0"
Memory Size: 7 MB + 448 kB
Memory Range: 0xe0000000-0xe076ffff (rw)
Mode 0x0360: 768x480 (+768), 8 bits
Mode 0x0361: 768x480 (+1536), 16 bits
Mode 0x0362: 768x480 (+3072), 24 bits
Mode 0x0363: 960x600 (+960), 8 bits
Mode 0x0364: 960x600 (+1920), 16 bits
Mode 0x0365: 960x600 (+3840), 24 bits
Mode 0x0366: 1280x800 (+1280), 8 bits
Mode 0x0367: 1280x800 (+2560), 16 bits
Mode 0x0368: 1280x800 (+5120), 24 bits
Mode 0x0305: 1024x768 (+1024), 8 bits
Mode 0x0317: 1024x768 (+2048), 16 bits
Mode 0x0318: 1024x768 (+4096), 24 bits
Mode 0x0312: 640x480 (+2560), 24 bits
Mode 0x0314: 800x600 (+1600), 16 bits
Mode 0x0315: 800x600 (+3200), 24 bits
Mode 0x0301: 640x480 (+640), 8 bits
Mode 0x0303: 800x600 (+832), 8 bits
Mode 0x0311: 640x480 (+1280), 16 bits
Config Status: cfg=new, avail=yes, need=no, active=unknown

thinkpad:~# update-initramfs -u

This post was very helpful:

http://forums.debian.net/viewtopic.php?p=201686&sid=cc4c5c6d9573baa02f407dc1f36b587c#p201686

Standard