Friday 31 December 2010

Suspend and Resume using Ubuntu 10.10 on the Lenovo Thinkpad W500

Following an upgrade to Ubuntu 10.10 (Maverick Meerkat) and a series of kernel updates, I'm now finding that the Thinkpad fails to suspend correctly each time.

Regardless of whether I initiate suspend using the [Fn] + [F4] key sequence, or by closing the lid, or similar, I get the same problem.

The screen goes blank, and the half-moon suspend indicator flashes. At the time, I get a blank screen, and cannot switch to any other virtual terminal to look at dmesg, logs etc.

When this first happened, I left it for an hour but it didn't suspend. I ended up having to power off completely, which is a pain.

The PC is a 4061-BL5 Lenovo ThinkPad W500 and I have the 2.6.35-24-generic-pae kernel.

I have seen this: -

<snip>
When the XHCI module is loaded for USB 3.0 operation the system cannot suspend.

Manually unloading XHCI will allow suspend to complete normally. To avoid future suspend problems, the workaround is to add SUSPEND_MODULES="xhci-hcd" to /etc/pm/config.d/unload_module then the system can suspend normally. (522998)
</snip>

https://wiki.ubuntu.com/MaverickMeerkat/ReleaseNotes

but I'm not using USB 3.0 ( I don't think the W500 supports it ).

I've also seen references to problems with suspend/resume when using the SD-card reader, but again this doesn't apply.

Digging further, with a lot of assistance from other Ubuntu-on-Thinkpad users, I found that the problem ONLY occurred if I used the integrated Intel graphics adapter, which is reported as follows by the command lspci | grep -i "vga": -

00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)

If I switched to the OTHER graphics card, the discrete ATI Radeon card: -

01:00.0 VGA compatible controller: ATI Technologies Inc Mobility Radeon HD 3650

via the BIOS, then suspend/resume work OK.

Sadly, however, the ATI card draws a LOT more power, meaning that the battery life is very poor, whereas the Intel card is much more efficient.

Thankfully one of my colleagues found the following bug report on Launchpad: -

Suspend problem with Maverick on ThinkPad W500

and posted this script: -

/etc/pm/sleep.d/20_chvt_mjf

#!/bin/sh
case "$1" in
suspend) chvt 1; ;;
resume) chvt 7; ;;
esac
return 0

I created this script, set it as executable ( via the command chmod a+x /etc/pm/sleep.d/20_chvt_mjf ) and then tried the suspend process again.

This appears to have done the job. I'll keep an eye on it, and report back.

So, in conclusion, using the integrated Intel graphics option , I can safely suspend/resume and also get a better battery life.

We shall see ...

2 comments:

NotesSensei said...

The problem also occurs with the ATI card when a certain collaborative client is loaded. I'll try that script and see if it improves.

Dave Hay said...

Can you expand further ? I use Notes 8.5.2 on Ubuntu without any problems. The suspend/resume problem occurs reasonably regularly with the ATI card, whether Notes is running or not. Cheers, Dave

Visual Studio Code - Wow 🙀

Why did I not know that I can merely hit [cmd] [p]  to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub...