Suspend and Hibernate are broken on an IBM Thinkpad R50e

Bug #47508 reported by Lee.Tambiah on 2006-05-30
This bug report is a duplicate of:  Bug #40621: vbetool breaks resume on R50e. Edit Remove
10
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Medium
Unassigned

Bug Description

After reading that some users have there hibernate and suspend functions working correctly, I have filed this as a bug in regards to the laptop IBM Think pad R50e. The hibernate function did work in breezy. Dapper is a fresh installation , not an upgrade from the breezy release.

MACHINE SPECIFICATIONS

Model: IBM ThinkPad R50e
CPU Type: Intel(R) Pentium(R) M processor most likely “Dothan” type
CPU Speed: 1.7GHz
Installed Memory: 512MB
Graphics: Intel Extreme Graphics Processor 855GM chip set

CURRENT SYMPTOMS

Symptoms at current on Dapper with full updates as of 30/05/06 15:25 UK time.

From choosing "System>Quit>Hibernate"

1. Screen Blanks
2. See screen saver for brief second
3. Sleep light turns flashes on and off
4. Disk activity is active
5. Machine turns off

Now when turning the machine back on it simply loads back up into Ubuntu as though I had shut the system down.

From choosing System>Quit>Suspend

1. Screen blanks
2. Powers down and sleep light remains on.

The power down seems to work correctly.

Pressing the “Fn” button to resume from suspend the power comes back to life but with blank screen and flashing sleep light. Only way to get back now it seems is to turn the machine off with the power button and reboot.

If you require outputs so you can see whats happening please tell me what your require and how to do so and I will post this too.

Regards

L.Tambiah

Lee.Tambiah (flossgeek) wrote :

May I add that by going to the directory /etc/acpi/ and then running the "sleep.sh" does nothing. However changing the "sleep.sh" code to the following and running works perfectly.

Sleep Code Hack(sleep.sh)

#!/bin/bash

# change to console 1
FGCONSOLE=`fgconsole`
chvt 6

# safe video state
cat /proc/bus/pci/00/02.0 > /tmp/video_state

# sync filesystem
sync

# sync hardware clock with system time
hwclock --systohc

# go to sleep
echo -n 3 > /proc/acpi/sleep

# waking up
# restore system clock
hwclock --hctosys

# restore video state
cat /tmp/video_state > /proc/bus/pci/00/02.0

# change back to X
chvt $FGCONSOLE

# clean up behind us
rm /tmp/video_state

Reference: http://www.thinkwiki.org/wiki/Problem_with_display_remaining_black_after_resume#Solution_for_ThinkPads_with_Intel_Extreme_Graphics_2

Lee.Tambiah (flossgeek) wrote :

Im not 100% sure but I believe the suspend icon is the sleep function. So I now have the Suspend working correctly applying the hack above...

Axel Bojer (axelb) wrote :

Why is this unconfirmed?
Take a look here:
http://ubuntuforums.org/search.php?searchid=14363294&pp=25
There are dozens of people complaining about it.

Axel Bojer (axelb) wrote :

Resumé:
************

Remove totally and reinstall
----------------------------------------
After having experimentet around with tips on some of the links mentioned here, I decided to remove almost everything connected to hibernation and sleep functions, because, clearly, it was the upgrade that broke it.
I ran:

    sudo apt-get remove --purge powersaved, kpowersave, acpi*, klaptopdeamon kde-guidance

As expected, suspend to RAM (Fn+F4) and to disk (Fn+F12) does not work anymore (no reaction).
I then installed just the acpi part:

    sudo apt-get install acpid acpitools acpi-support kde-guidance

and found, that the scripts installed by acpi-support in /etc/acpi actually worked, but the Fn+F4 and Fn+F12 still don't give anything.
To be exact: hibernation.sh worked as is, but sleep.sh had to be altered and xorg.conf, as described in: http://www.thinkwiki.org/wiki/Installing_Ubuntu_on_a_ThinkPad_R50e
I also changed /etc/default/acpi-support as described.

tpb or kmilo (both will work) actually got most of the other keys to work (but not the Access IBM button--se the mentioned thinkwiki.org pages there are many, linked together in one complex).

Klaptopdaemon
-------------
I then reinstalled the klaptopdaemon, and the keys still does not work, but I can monitor my battery power.
And from the Klaptop menu (a battery icon in the panel) I can choose Suspend to disk and suspend to RAM. This is what happens:

Suspend to RAM: It locks the screen and I am not able to log in again, no matter what password I give it tells me it is wrong. I have tried resetting the password to just "q", but it still don't work. I don't know where this bug resides. Alt+Ctrl+Delete works, though, so I can log in again. Better than starting all over.
Suspend to disk: Same as above.

Kpowersave
----------
Then I tried just powersaved, but it gives the described weird behavior, so I think this package is broken concerning these machines (all or most IBM Thinkpads probably). This is what happens:

Suspend to disk: Logges me out, when I am back, it is as if I had just restarted the machine. It seems it gives me GUI and then throws me out again because the process is similar to the one being performed by hibernation.sh (see above), except this time it don't work

Suspend to RAM: Freezes totally, I can't even use Alt+Ctrl+Escape to restart, I have to use the power button.

Kpowersaved gives the exact same result (as expected since it uses powersaved as its basis).

I still have not tried the manual method of defining keycodes etc. But the thinkwiki-pages (http://www.thinkwiki.org/wiki/) gives a long description on how to do this.

Axel Bojer (axelb) wrote :
Peter Whittaker (pwwnow) wrote :

Folks, in what versions of Ubuntu are you experiencing this problem? If the problem occurs in Edgy (6.10) or Feisty (current development), please attach the output of the following commands:

uname -a

sudo lspci -vv

sudo lspci -vvn

sudo dmidecode

When attempting to hibernate or resume, if the machine goes to sleep but does come back, then, after rebooting, please attach

/var/log/kern.log.0

This file will contain logging information right up to the point where the machine went to sleep.

Thanks!

Note: If the problem no longer occurs in Edgy or Feisty, we'll mark this as Fix released.

Changed in acpi-support:
status: Unconfirmed → Needs Info
Axel Bojer (axelb) wrote :

https://launchpad.net/ubuntu/+source/acpi-support/+bug/40621
seems very related and has more information

BTW: I am using dapper, not Edgy or Feisty.

Further, I found the following work around:

Solution
--------
I then looked in man acpid and in /var/log/acpid. It seems, by default acpi runs the following two scripts:

Suspend to RAM: /etc/acpi/sleepbtn.sh
Suspend to disk: /etc/acpi/hibernatebtn.sh

They does not make what they are supposed to somehow, but hibernate.sh and sleep.sh works (se above).
So, renaming those two and then symlinking them to hibernate.sh and sleep.sh instead just works :-)
Code:

    ln -s /etc/acpi/sleep.sh /etc/acpi/sleepbtn.sh
    ln -s /etc/acpi/hibernate.sh /etc/acpi/hibernatebtn.sh

Now Fn+F4 and Fn+F12 calls those scripts instead.
The same perhaps also applies to the menue options in Klaptop, but since I still can not log in I don't know yet.

Kdesktop_lock
-------------
Then my second problem; it has a bug report:
    http://bugs.kde.org/show_bug.cgi?id=126728

Kdesktopt_lock is preventing me form logging in again if I lock my screen, or uses hibernatin/sleep. But by going to a shell (Ctrl+Alt+F1) and, as root do

    killall kdekstop_lock

I am able to be back where I left. Suspend to RAM then eems to do what it's supposed to, also from this menue, but suspend to disk just does exactly the same. Now where did hibernate go?

    klaptop_acpi_helper --hibernate
and
    klaptop_acpi_helper --suspend

says: Can't find /usr/sbin/pmi

    klaptop_acpi_helper --standby

does nothing, says nothing.

    klaptop_acpi_helper --software-suspend

says: Can't find /usr/sbin/hibernate

I will have to take a closer look at this later, for now I can at least use the buttons, the menu I just will have to leave untouched until the mentioned KDE bug is solved, then both options will give me sleep--or maybe someone has fixed that too by then :-P

Peter Whittaker (pwwnow) wrote :

Axel, flossgeek, I'm tempted to mark this bug as a duplicate of #40621, but I need you to confirm something. Can you please perform the following test?

0. ThinkPad R50e with clean Dapper or Edgy install (no hacked/modded scripts, ACPI or otherwise).

1. In /etc/defaults/acpi-support, set POST_VIDEO=false

2. In /etc/X11/xorg.conf, add Option "VBERestore" "true" (refer to https://launchpad.net/ubuntu/+source/acpi-support/+bug/40621/comments/37 for specific section)

3. Attempt suspend to RAM and resume, attempt suspend to disk and resume

If the test works, then this bug is likely a duplicate of $40621.

If suspend still fails, then there is another bug at work. However, it is unlikely it will be fixed on Dapper, please refer to the last part of https://wiki.ubuntu.com/TimeBasedReleases for more information as to why a backport of any such fix is unlikely.

https://help.ubuntu.com/community/UbuntuBackports also has useful comments re stability and backporting. My guess is that any fix to this problem would be too "big" to backport, that is, it would touch too many things and have too great a chance of destabilizing Dapper.

Lee.Tambiah (flossgeek) wrote :

I tested your solution on Edgy 6.10 Release with no hacks in place, I am pleased to say that following your instructions worked without any issues. Suspend and Hibernate worked!

* Note in the /etc/default/acpi-support file I did not comment out the:

- ACPI_SLEEP = true

or the

- ACPI_HIBERNATE=true

both lines were left uncommented.

huiii (a00ps) wrote :

hello,

i can confirm this.
on my laptop running ubuntu feisty 7.04, sleep works but on wake up no screen but black and freezing.
i did JUST what axel bojer recommends, to make this symlinks:

    ln -s /etc/acpi/sleep.sh /etc/acpi/sleepbtn.sh
    ln -s /etc/acpi/hibernate.sh /etc/acpi/hibernatebtn.sh

nothing else, no hacks, no nothing.
AND IT WORKS!!!

thanks a lot.

huiii (a00ps) wrote :

UPDATE:
actually it works now, but just with the intel 915 graphic-card the sleep function works fine...
my laptop has two graphic-cards, the other one is nvidia 6600 go, and now it goes to sleep after the changes but when waking up the system will hang and the screen stays black...

GioSico (john-giosico) wrote :

I too have the 'on wake' from suspend black screen of death with a small box of vertical wavy lines.

I am running Feisty on a HP Pavillion dv6000.

Moving away the btn files and then sim linking them as follows fixed my sleep problem but not my hibernate problem ...

ln -s /etc/acpi/sleep.sh /etc/acpi/sleepbtn.sh
ln -s /etc/acpi/hibernate.sh /etc/acpi/hibernatebtn.sh

GioSico (john-giosico) wrote :

Actually I take back ... while suspend did work the first time ... via a left click on the power icon in the top right ... it no longer works via that method of via closing the laptop lid. I will try replacing the sleep/hib .sh scripts as defined about and repost.

GioSico (john-giosico) wrote :

I have tried all of these suggestions and the ones in the bug below with no luck ... I also posted some output file in the bug below ...

if anyone has any suggestions they would be much appreciated ...

https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/40621

Launchpad Janitor (janitor) wrote :

[Expired for acpi-support (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