# suspend2 on thinkpad t61

## johnny99

I have a thinkpad T61 and I really miss a quick suspend and resume.  

This system uses the nvidia-drivers & madwifi-ng packages.  

Both drivers blacklisted in suspend2  file /etc/hibernate/blacklisted-modules.

I tried 2.6.20-suspend2-r6 with suspend2, and 2.6.20-gentoo-r8 with apm.  

I have followed many posts about suspend2, but they seem to be older,  

and I can't follow them to an end that reaches my expectations for a simple suspend and resume.  

With your help, can I attain a method of simple suspend and resume?

----------

## zigver

Try a 2.6.19 kernel.  I had it working fine on my T60 and then upgraded to 2.6.21 only to find out there are problems with suspend2 and this kernel.

----------

## Mad Merlin

You don't need suspend2 to use the hardware suspend to RAM capabilities on the T series, simply 

```
echo mem >/sys/power/state
```

You might find my T60 writeup useful.

Also, why are you using the madwifi drivers for wireless? I thought all of the T61s had Intel (ipw4965 or ipw3945) wireless cards.

Finally, AFAIK, none of the T60 or T61s support APM, only ACPI.

----------

## johnny99

 *Mad Merlin wrote:*   

> You don't need suspend2 to use the hardware suspend to RAM capabilities on the T series, simply 
> 
> ```
> echo mem >/sys/power/state
> ```
> ...

 

Almost a home run!  Thank you.  

Indeed, this did make the system go to sleep and wake up again.

However, once awake the responsiveness to input is delayed and choppy.

Clock cycles are wasted on something.

I read your how-to.  Very nice work.  Thank you.

I tried to characterize what is causing the choppiness, taking your notes into account.

I let the system waking up and settle.  Then I start watching 'top' and 'vmstat'. 

Vmstat shows the 'r' column (The number of processes waiting for run time) average stays high, while the other columns don't look abnormal and 'bi' and 'bo' (block received and sent) are at zero.

I need to perform more tests, leaving modules unloaded before the suspend.

I would love any advice on determining the cause.

 *Mad Merlin wrote:*   

> Also, why are you using the madwifi drivers for wireless? I thought all of the T61s had Intel (ipw4965 or ipw3945) wireless cards.

 

One of the wireless card options for a thinkpad t61 is the Atherose Communications Inc.  AR5212 802.11abg NIC (rev 01).  I chose this card because it has served me well in my older thinkpad R51.  This card uses the madwifi-ng driver.

 *Mad Merlin wrote:*   

> Finally, AFAIK, none of the T60 or T61s support APM, only ACPI.

 

----------

## Mad Merlin

I've seen some reports where the hard drive controller doesn't wake up completely/correctly, and the machine usually crashes upon trying to access the hard drive, I haven't run into it myself though. You should be able to go into the BIOS and change the hard drive mode from AHCI to Compatible, which may help, although you'll lose NCQ capability as the drive will appear as an IDE drive instead of a SATA drive (although it should still be at /dev/sda).

----------

## johnny99

 *Mad Merlin wrote:*   

> I've seen some reports where the hard drive controller doesn't wake up completely/correctly, and the machine usually crashes upon trying to access the hard drive, I haven't run into it myself though. You should be able to go into the BIOS and change the hard drive mode from AHCI to Compatible, which may help, although you'll lose NCQ capability as the drive will appear as an IDE drive instead of a SATA drive (although it should still be at /dev/sda).

 

On this T61, in both AHCI or Compatible mode,

 system doesn't freeze after waking up, but it does stall.

 X %cpu jumps to 99% when performing minor tasks, like switching windows, moving a window.

 This laptop has a Nvidia Quadro NVS 140M and I'm using the module x11-drivers/nvidia-drivers-100.14.11.

If I restart X (/etc/init.d/xdm restart), system starts behaving correctly without rebooting.

This is not an acceptable work around.  Do Nvidia drivers get any better with suspend over time?

----------

## Mad Merlin

I've never used the Nvidia drivers together with suspend, as there was no Nvidia option on the T60 (I wish there was, don't get me started on ATI...).

----------

## johnny99

Looks like this is not uncommon.

In nV News Forums > Linux Support Forums  > NVIDIA Linux 

similar observations have been made.

http://www.nvnews.net/vbulletin/showthread.php?t=94258&highlight=thinkpad

They even noticed the LCD power level can only be controlled from a non-X virtual terminal.

----------

## johnny99

Found an improvement posted to the nvnews.net forum that helps.

By turning off hardware acceleration, the problem seems to have lessoned, but it's still some delay.

# Change xorg.conf

edit /etc/X11/xorg.conf, 

under Section "Device"

    Option         "RenderAccel" "0"

# Restart X and unload nvidia driver

/etc/init.d/xdm stop

rmmod nvidia

/etc/init.d/xdm start

# Test ram suspend

echo mem > /sys/power/state

I noticed some delay in window redraw, but not a deal breaker like before.

----------

