Suspend-to-ram broken on IBM/Lenovo Thinkpad T61p [FIXED]

Bug #235284 reported by Christian Iversen
46
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hal-info (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: hal-info

Suspend-to-ram does not work out-of-the-box on Hardy. (At least not with the binary driver.)

With a fresh install of Kubuntu 8.04, the screen would not come back up after a suspend.

For reference, I've seen the following suggestions. It should be noted that they are ALL false:

 - Using "NvAGP" "1" in xorg.conf
 - Using acpi_sleep=s3_mode in grub
 - Using acpi_sleep=s3_bios in grub
 - Calling pm-utils directly instead of using HAL
 - Using TuxOnIce/USWSusp/etc instead of HAL

The problem is that the quirk s3_mode is applied, and therefore POSTing the display after resume. This smashes the driver state, and thus hangs the laptop.

For some reason, T61p has the following information in the file /usr/share/hal/fdi/information/10freedesktop/20-video-quirk-pm-lenovo.fdi:

      <!-- T61 (8895), intel card 32bit works with S3_MODE, but 64bit needs VBE_MODE
           T61p (6460), does not work with the NVidia driver-->
      <match key="system.hardware.product" prefix_outof="8895;8897;6457;6460;6464;6465">
        <merge key="power_management.quirk.s3_bios" type="bool">true</merge>
        <merge key="power_management.quirk.vbemode_restore" type="bool">true</merge>
      </match>

It seems that the information is outdated. The 6460 (my T61p) works very well with the nvidia driver. It does NOT, however, work well with "s3_bios" = true, since that crashes the display on resume.

Attached patch fixes the issue. I'm quite sure it's the right way to fix this, but there could be some other way I'm not aware of.

The neat thing here, is that NO other change is necessary. With the newest hardy packages, suspend works perfectly now.

Revision history for this message
Christian Iversen (chrivers) wrote :
Revision history for this message
Christian Iversen (chrivers) wrote :

Please note the following:
 - You should reboot your laptop after applying this patch (or at least restart hal)
 - This is for 64-bit ubuntu. I haven't tested on 32-bit, but I assume it's the same situation

Revision history for this message
malte (dmz17) wrote :

This fix seems to work for me, although the machine now resumes unto a white background with only cursor arrow visible. Entering my password blindly gets rid of the white background and gets me into the Desktop.

Nice work!

Revision history for this message
Christian Iversen (chrivers) wrote :

Thanks :)

Yeah, I've seen the same problem occasionally.

I don't know exactly why it happens, but I'm convinced it can be fixed by doing either a "xrefresh" or setting DOUBLE_CONSOLE_SWITCH to true.

Maybe you could try creating an executable shell script in /usr/lib/pm-utils/sleep.d/90xrefresh, with the following contents?

[[[
#!/bin/bash

case "$1" in
        thaw|resume)
                xrefresh
                ;;
esac

exit $?
]]]

Revision history for this message
Christoph Lechleitner (lech) wrote :

When you say "suspend works perfectly now", does that include both, suspend to ram (Fn+F4) and suspend to disk (Fn+F12)?
What is your BIOS revision please?

Revision history for this message
Trampas (trampas) wrote :

I have a 6465 T61p and I just confirmed that this fix worked, changing the model to 6465 for mine. This does seem to work with the Nvidia Drivers.

Thanks
Trampas

Revision history for this message
Christian Iversen (chrivers) wrote :

I wasn't able to set up an encrypted swap volume from the installer, so I can't test suspend-to-disk. There could be all sorts of issues with that as well, so I hope someone else will test that.

My BIOS is revision is 7LETB6WW (2.16).

By the way, my xrefresh-hack mentioned a little earlier in this thread is broken. It can't work, since pm-suspend scripts are run as root, and you need to run X-commands as the currently logged-in user. I'll see if I can find another way to fix the screen garbage problem. (Which is annoying, for sure, but not dangerous)

Changed in hal-info:
status: New → Confirmed
Revision history for this message
Robbob (rob-kirkbride) wrote :

Thank you very much. This works for me too with a T61P and Nvidia FX570M. I get the white screen, but as it's stated above - just simply put the password in.

Just to confirm I removed the acpi_sleep stuff from my grub parameters.

This needs to be fixed in the package and pushed as a proper update.

Revision history for this message
Andy Goossens (andygoossens) wrote :

I have a T61p with model number 6460 and nVidia Quadro FX 570M. I'm running a 32-bit Kubuntu 8.04 (KDE3 version). Latest BIOS updates are installed.

I reverted all my previous modifications and applied this fix. And now resuming after suspend to RAM just works :-) I did not (yet?) see the white screen.

BTW: Resume after hibernation is still broken.

Revision history for this message
UbuntuHappy (pwward) wrote :

Andy,
I am at the same bios version as Christian above and using Ubuntu Hardy 64-bit on my T61p. I am wondering what bios you use as it seems that Christian and I are running the latest.

Thank you Christian for your work on this bug.

Revision history for this message
Lorant Nemeth (loci) wrote :

Hi,

applying the patch didn't help me (applied patch by hand, than restarted hal), but downgrading hal-info package to version 20080317+git20080318-1ubuntu4 and restarting hal solved the problem.
Even previously and currently I have the "white screen effect" about 50% of the cases. Let me know if you need any further info.

Revision history for this message
Robbob (rob-kirkbride) wrote :

Just had to reapply this patch again today - did the update of the kernel modules replace the file?

Why hasn't this change been pushed through the standard update mechanism? Doing this would ensure all other people with Thinkpad T61ps to work correctly.

Revision history for this message
whn (whn-launchpad) wrote :

I have a T61p 6459 CTO with the Nvida graphics card and the BIOS version from lshw "version: 7LETB2WW (2.12 ) (02/20/2008)". I'm having the same problem where after Suspend to RAM the display does not come back on. Other than this the system is alive because by typing blindly I can log back in and run commands or log into a virtual console and shutdown the system. I did a variation of Christian's fix which normally leaves the top of the screen with some garbage but does not interfere with the X windows session being unlocked which also refreshes the display.

Revision history for this message
Andy Goossens (andygoossens) wrote :

UbuntuHappy,
My current BIOS version is 7LETB9WW (2.19 )

Revision history for this message
chazchaz101 (chazchaz101) wrote :

A new section appears tp have been added to /usr/share/hal/fdi/information/10freedesktop/20-video-quirk-pm-lenovo.fdi which happens to be right in the middle of the area where this patch is applied. The problem can still be solved by changing the same lines and adding the new section, but the patch its self no longer works. I would post a new one, but I didn't back up my original copy before I changed it.

Revision history for this message
garythornton1956 (gary-scdynamics-eu) wrote :

I edited the fdi manually to reflect the patch and it worked fine for me suspending to ram (Fn+f4) but not to disk (Fn+f12). Suspend to disk required a restart. It's not perfect but I can live with it.

It is one of the things that the ubuntu team (or lenovo guys) should look at.

Revision history for this message
Dmik (dmik-for-maillists) wrote :

I can confirm that the suggested fix works for me (model 6460, Fn+F4), and I see a normal login window after resume. Thank you!

Revision history for this message
Rys Sommefeldt (rys) wrote :

Just to confirm that this fix works for me on a 6460 with Hardy 64-bit, using suspend on lid close and Fn+F4. Thanks very much!

Revision history for this message
Kevin Kaland (kkaland) wrote :

I've got a T61p 6459CTO. This actually worked for me. I couldn't believe it. It works flawlessly. I have not tested suspend-to-disk but suspend-to-ram now works properly.

Kevin

Revision history for this message
Rawbin (robin-randhawa) wrote :

Just wanted to confirm that having hit this problem on an Ubuntu Hardy 64-bit installation on a T61p 6460 laptop, Christian's patch solved the problem perfectly.

I hope the proposed changes have propagated to the pertinent mainline packages.
Thanks Christian! :)

Revision history for this message
Guillaume Giroux (gug-microflex) wrote :

Works for me too. T61p 6460 w/ Hardy 64, Bios 2.19, nvidia 570M (nvidia-glx-new 169.12+2.6.24.14-21.50 from hardy-proposed).

Login window reappears fine.

But with compiz enabled I get either an all-black screen or all-white screen upon resume, entering my password makes the desktop reappear. Anybody knows what's wrong with compiz ?

Revision history for this message
Eero (eero+launchpad) wrote :

Patch works for me too. I have Hardy 64bit on T61 6460 and lspci shows:
 01:00.0 VGA compatible controller: nVidia Corporation Quadro NVS 140M (rev a1)
nvidia-glx-new version is 169.12+2.6.24.13-19.45

Revision history for this message
Gert van Dijk (gertvdijk) wrote :

Also my 6457 model works with this patch.
Where is this apparently wrong information comming from? And why is this only in Ubuntu? (At least Debian Lenny works fine out of the box)

Revision history for this message
cucu (curdegn) wrote :

Fresh installed ubuntu 8.04 64Bit on T61p 6457-C65 with newest nvidia drivers (173.14.12). Can not make it work.
Any suggestions about the proper "merge key"-lines?
Many thanks

Revision history for this message
Gert van Dijk (gertvdijk) wrote :

@cucu
That is the proper nVIDIA driver version (which Envy installs for you). Full step-by-step install instructions for your laptop (same as mine) can be found on a ThinkWiki page (http://www.thinkwiki.org/wiki/Install_Ubuntu_Hardy_Heron_on_a_T61p) which I updated some time ago for the 6457 model (since it seemed to work for that model as well). It should work then.

Revision history for this message
cucu (curdegn) wrote :

@gertvdijk, thanks for answer
Did it exactly as per (http://www.thinkwiki.org/wiki/Install_Ubuntu_Hardy_Heron_on_a_T61p):
Lenovo T61p 6457-C65, newest Bios (ver. 2.21, 2008-07-01), fresh installed Ubuntu 8.04 64bit, newest nvidia drivers installed with "Envy", modification of /usr/share/hal/fdi/information/10freedesktop/20-video-quirk-pm-lenovo.fdi, reboot and then Fn+F4 to test. Suspend works but Resume not. Just get a black screen with a blinking cursor in the upper left.
Any suggestion where to start the debugging?
Do anyone else have it worked out on a 6457-C65?

Revision history for this message
eMaX (mnott) wrote :

This also helped on ubuntu jaunty alpha on a thinkpad T61 (not T61p). Am not able to use gnome-power-manager's suspend feature (was earlier in the alpha cycle), but am able to sudo /usr/sbin/s2ram -f

HTH,

M

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.