Dual-core Thinkpad fails to suspend with cpu governor active

Bug #70602 reported by David McBride on 2006-11-06
10
Affects Status Importance Assigned to Milestone
linux-source-2.6.17 (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: linux-source-2.6.17

Greetings,

I have found a bug in Ubuntu 6.10 / Edgy related to software-suspend.

When sending my ThinkPad R60e to sleep (eg by closing the lid), the machine will sometimes fail to suspend correctly.

After some experimentation, it appears that this is a kernel bug related to cpufreq governors. If a cpufreq governor other than "performance" is active (eg "ondemand"), then the laptop will usually fail to suspend properly. In this error case, the screen goes blank but the machine never enters a suspend mode, and can still be controlled with CTRL-ALT-DELETE, SysRq, etc.

(There have been some lengthy discussions on LKML discussing the broken state of cpufreq locking - see http://lkml.org/lkml/2006/8/24/232)

Installing the following scripts seems to reliably correct this problem:

#!/bin/sh
# /etc/acpi/suspend.d/01-cpu-governor.sh
echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "performance" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

#!/bin/sh
# /etc/acpi/resume.d/01-cpu-governor.sh
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

Cheers,
David
--
David McBride <email address hidden>
Department of Computing, Imperial College, London

Confirming - I encountered the bug on a ThinkPad X60s.

I didn't have any problems resuming, but occasionally suspending failed, hanging the system as described.

After setting up the scripts posted in the original description, the problem hasn't occured again.

Changed in linux-source-2.6.17:
status: Unconfirmed → Confirmed

After extended testing, I did experience a few lockups even with this work-around, so I'm no longer sure if it really works or if it's all that's needed. Here's what I found out so far:

Instead of suspending properly, my ThinkPad is trying to resume immediately after the suspend, but fails to come back on. The real problem is not that it doesn't resume properly, but that it doesn't suspend properly, I believe. This is evident in the syslog:

When freezing the CPU, right after the syslog entry "CPU1 is down", it says "Stopping tasks:" and displays a progress bar out of equals signs (=). When suspend works properly, the progress bar is finished with a pipe symbol (|). When suspend fails, the progress bar is left unfinished (=). If it doesn't finish stopping all tasks, it says "Restarting tasks...<6> Strange, kseriod not stopped", followed by lots of "Strange, XXX not stopped", then "Thawing cpus ..."

I'll investigate further, but so far this looks like some kind of process not being terminated and thus preventing a proper suspend - which will in turn block a successful resume afterwards. I have to reset the notebook by keeping the power button pressed down. It doesn't happen very often, maybe once in twenty suspend attempts, but it's still a problem.

I welcome any comments and suggestions since this is the only major problem I have with Ubuntu running on my ThinkPad X60s - thanks!

After further investigation, I believe my problem is related to Bug #61407 - I always got the message "stopping tasks timed out after 20 seconds", then the ThinkPad tries to resume, but the laptop display stays off. Reconnecting to the docking station enables the external display which is connected to it. Turning on the laptop display on resume does work when suspending succeeds, though, it only fails when suspending itself fails.

Should this bug perhaps be marked as a duplicate of Bug #61407 - or is the cpufreq problem really a seperate issue?

Timo Aaltonen (tjaalton) wrote :

Have you tried if this is fixed in Feisty?

Changed in linux-source-2.6.17:
status: Confirmed → Needs Info
Albert Cardona (cardona) wrote :

My thinkpad T60 also fails repeatedly to go to sleep. Resume is always fine (if it succeeded to sleep, that is).

By "Installing the following scripts" you mean, to run it a single time, to set such values in the corresponding files?

I'd appreciate some info (thank you). This madness of unreliable sleep is unbearable.

Launchpad Janitor (janitor) wrote :

[Expired for linux-source-2.6.17 (Ubuntu) because there has been no activity for 60 days.]

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers