Take a look at our
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message

Suspend to RAM problem

Linux on ThinkPads
Post Reply
Message
Author
Edy
Posts: 1
Joined: Fri Jan 06, 2006 3:47 pm

Suspend to RAM problem

#1 Post by Edy » Fri Jan 06, 2006 4:09 pm

Hello!
I have a new Thinkpad R50e (UROSYxx, 1834SYG) with a fresh Suse Linux 9.3 and XP Home on it. I'm trying to set up the suspend to RAM mode on linux. The system has ACPI and ibm-acpi package of course, but it still doesn't work. I had set the Power management in Yast and follow the instructions on thinkwiki.org about ACPI and suspend to ram. When i close the the lid it goes to Suspend mode but after that when i open, it shows:
"Stopping Tasks:================"
and doesn't respond to anything (i can't switch to console mode, either), i can only shut down it by pushing the main shut-down button. I have been searcing for the correct proved solution for 4 hours now, but still no results. Any ideas?

sanjoy
Posts: 3
Joined: Wed May 03, 2006 1:35 pm
Location: Cambridge, England
Contact:

#2 Post by sanjoy » Wed May 03, 2006 6:18 pm

Looks like something with the ACPI system is waiting for an event that never happens. I spent a long time on a similar issue with my Thinkpad 600X. See http://bugzilla.kernel.org/show_bug.cgi?id=5989 and then lots of further emails on the linux-acpi mailling list.

Some things to try to perhaps debug it are:

1. unload as many modules as possible and see if it still hangs. In the old days (six months ago), I had to unload usb_uhci though it now suspends fine. Other likely culprits are network-interface drivers, though in my case they don't prevent the sleep/wake, they just return in a mangled state.

2. Try suspending without closing the lid, so you can see what's going on:

Code: Select all

echo mem > /sys/power/state
3. In combination with 2, turn on ACPI debugging to give an idea of what stage in the sleep it's hanging in:

Code: Select all

echo 0x10 > /proc/acpi/debug_level
echo 0x10 > /proc/acpi/debug_layer
then try #2 above.

4. Capture the debugging output across a serial console.

5. Did it ever work? Try a more recent kernel. Lots of ACPI bugs are fixed in each one. Perhaps try this change before anything else. You didn't say what kernel you are using.

5. The linux-acpi list was very helpful for me, and they want to make ACPI work as well as possible in Linux. People there will probably want to know at least:

a. Kernel version
b. ACPI-related message at boot: e.g.

Code: Select all

dmesg | grep ACPI
c. Does it hang when you do

Code: Select all

echo mem > /sys/power/state"
or only when you close the lid? What steps does the lid-closing do?

-Sanjoy

sbellon
Posts: 12
Joined: Mon Feb 27, 2006 5:37 pm

#3 Post by sbellon » Sat May 20, 2006 4:28 am

Sorry to hi-jack this thread, but I have a problem with suspend-to-ram on my new ThinkPad T60 as well. I get the following:

# echo mem > /sys/power/state
bash: echo: write error: Operation not permitted

The device is there:

# ls -al /sys/power/state
-rw-r--r-- 1 root root 0 2006-05-20 11:27 /sys/power/state
# cat /sys/power/state
standby mem

This is with a 2.6.16 kernel:

# uname -a
Linux io 2.6.16 #1 SMP PREEMPT Mon May 8 21:16:54 CEST 2006 i686 GNU/Linux

I have not found a solution to that problem yet. Anybody any ideas?

teetee
Junior Member
Junior Member
Posts: 310
Joined: Wed Jul 27, 2005 7:51 am
Location: Rhode Island 02874

#4 Post by teetee » Sat May 20, 2006 11:32 pm

Just some additional info:
1. make sure the ACPI code on your R50e doesn't need fix
Ref. http://gentoo-wiki.com/HOWTO_Fix_Common_ACPI_Problems
2. hang when suspending offten indicates that you try to force to remove a kernel module which is in use or some kernel built-in drivers don't like to be disconnected. Try to recompile your kernel and build all the drivers into modules. Then after the new kernel is installed, remove all the modules (remember the order) and try suspend when there is no modules on the system and see how it goes.



sbellon: Check if you have sysfs mounted. You might need to recompile the kernel to have sysfs support. Try # cat /proc/mounts and see if sysfs is there.

sbellon
Posts: 12
Joined: Mon Feb 27, 2006 5:37 pm

#5 Post by sbellon » Sun May 21, 2006 9:25 am

sysfs is present and mounted (otherwise stat'ing or read'ing /sys/power/state wouldn't be possible at all):

$ mount | grep sysfs
sysfs on /sys type sysfs (rw)

fbarrus
Posts: 1
Joined: Tue Jun 06, 2006 10:36 pm
Location: USA

hotpluggable CPUs needed for suspend on core duo

#6 Post by fbarrus » Fri Jun 09, 2006 9:32 am

I had this same problem on my Thinkpad T60p with 2.6.16 FC5:

# echo mem > /sys/power/state
bash: echo: write error: Operation not permitted

This didn't happen with the stock kernel, but only after I had
customized it for the machine. So I went back to the stock version
and selectively made sets of changes to the config until I narrowed
it down to a single option that made the difference:
Hotpluggable CPUs.

This is listed as an experimental option, but it appears to be
necessary to get suspend to work with the Core Duo.
I'm guessing the second CPU needs to be shutdown as
if it were unplugged prior to suspending.

Unfortunately, upon returning from suspend my machine locks up,
which I think is the SATA problem. So I'm on to finding what patches
I need to fix that next...

sbellon
Posts: 12
Joined: Mon Feb 27, 2006 5:37 pm

#7 Post by sbellon » Fri Jun 09, 2006 1:55 pm

Wow, fbarrus, that helps a lot. I get the same now as well. After wakeup on the command line there are debug messages that indicate that the serial ata controller has a problem, indeed. Not yet have had time to investigate further. If you find a solution, it would be very nice to hear about it! :-)

walkerd
Posts: 3
Joined: Mon Jun 26, 2006 4:18 am
Location: Slovakia
Contact:

Standby.

#8 Post by walkerd » Thu Jun 29, 2006 5:22 am

Great. The hotplug CPU helped. This was only problem in my case. I do not observer the problem with the SATA after resuming. I know that there was problem with the SATA in older kernels - 2.6.12 - and special SATA patch was needed, but with the recent 2.6.17 I have no problem with the SATA at all.

Malcolm
Posts: 2
Joined: Wed Aug 09, 2006 3:59 am
Location: Russia
Contact:

#9 Post by Malcolm » Tue Aug 15, 2006 4:08 am

Hi. I have a problem with ArchLinux and IBM R50e (suspend-to-ram).
I use this script:

Code: Select all

#!/bin/sh
# if launched through a lid event and lid is open, do nothing
echo "$1" | grep "button/lid" && grep -q open /proc/acpi/button/lid/LID/state && exit 0
# remove USB 1.1 driver
rmmod uhci_hcd
touch /root/video_state
cat /proc/bus/pci/00/02.0 > /root/video_state
# sync filesystem and clock
/opt/kde/bin/dcop --all-users --all-sessions kdesktop KScreensaverIface lock
sync
/sbin/hwclock --systohc
FGCONSOLE=`fgconsole`
chvt 6
# go to sleep
sleep 5 && echo -n "mem" > /sys/power/state
/sbin/hwclock --adjust
/sbin/hwclock --hctosys
modprobe uhci_hcd
cat /root/video_state > /proc/bus/pci/00/02.0
echo -n "lcd_enable" > /proc/acpi/ibm/video
chvt $FGCONSOLE
rm /root/video_state
And i use kde with Xorg 7.0.
Then notebook go to sleep well, but he can't wake-up. Notebook power "on", but display and usb don't wake-up.
What I can doing?
Thanks.

walkerd
Posts: 3
Joined: Mon Jun 26, 2006 4:18 am
Location: Slovakia
Contact:

#10 Post by walkerd » Tue Aug 15, 2006 5:00 am

What driver do you use? The one from X.org or propietary from ATI? I am using ATI and there is no problem with that drivers and also OpenGL is running fine ...
Malcolm wrote:Hi. I have a problem with ArchLinux and IBM R50e (suspend-to-ram).
I use this script:

Code: Select all

#!/bin/sh
# if launched through a lid event and lid is open, do nothing
echo "$1" | grep "button/lid" && grep -q open /proc/acpi/button/lid/LID/state && exit 0
# remove USB 1.1 driver
rmmod uhci_hcd
touch /root/video_state
cat /proc/bus/pci/00/02.0 > /root/video_state
# sync filesystem and clock
/opt/kde/bin/dcop --all-users --all-sessions kdesktop KScreensaverIface lock
sync
/sbin/hwclock --systohc
FGCONSOLE=`fgconsole`
chvt 6
# go to sleep
sleep 5 && echo -n "mem" > /sys/power/state
/sbin/hwclock --adjust
/sbin/hwclock --hctosys
modprobe uhci_hcd
cat /root/video_state > /proc/bus/pci/00/02.0
echo -n "lcd_enable" > /proc/acpi/ibm/video
chvt $FGCONSOLE
rm /root/video_state
And i use kde with Xorg 7.0.
Then notebook go to sleep well, but he can't wake-up. Notebook power "on", but display and usb don't wake-up.
What I can doing?
Thanks.

Malcolm
Posts: 2
Joined: Wed Aug 09, 2006 3:59 am
Location: Russia
Contact:

#11 Post by Malcolm » Tue Aug 15, 2006 11:06 am

walkerd wrote:What driver do you use? The one from X.org or propietary from ATI? I am using ATI and there is no problem with that drivers and also OpenGL is running fine ...
I use xf-video-i810 package, i810 driver. In my notebook integrated video card. 852GM/855GM
that my section in xorg.conf

Code: Select all

Section "Device"
        Identifier  "Card0"
        Driver      "i810"
        BusID           "PCI:0:2:0"
        VendorName  "All"
        BoardName   "All"
        Option "VBERestore" "true"
EndSection
Archlinux, 2.6.16-beyond, modules: nvram i810 speedstep_centrino cpufreq_conservative ibm_acpi
daemons: bluetooth network netfs crond alsa powersaved laptop-mode kdm cpufreqd

walkerd
Posts: 3
Joined: Mon Jun 26, 2006 4:18 am
Location: Slovakia
Contact:

#12 Post by walkerd » Tue Aug 15, 2006 11:35 am

Aha, this is intel, with this kind card I have no experience :( sorry.

Jozef
Malcolm wrote:
walkerd wrote:What driver do you use? The one from X.org or propietary from ATI? I am using ATI and there is no problem with that drivers and also OpenGL is running fine ...
I use xf-video-i810 package, i810 driver. In my notebook integrated video card. 852GM/855GM
that my section in xorg.conf

Code: Select all

Section "Device"
        Identifier  "Card0"
        Driver      "i810"
        BusID           "PCI:0:2:0"
        VendorName  "All"
        BoardName   "All"
        Option "VBERestore" "true"
EndSection
Archlinux, 2.6.16-beyond, modules: nvram i810 speedstep_centrino cpufreq_conservative ibm_acpi
daemons: bluetooth network netfs crond alsa powersaved laptop-mode kdm cpufreqd

sbellon
Posts: 12
Joined: Mon Feb 27, 2006 5:37 pm

#13 Post by sbellon » Sun Oct 08, 2006 12:43 pm

I still have the SATA resume problem after suspending to RAM, even with the latest 2.6.18 kernel. Would any kind soul who got it working please mind posting their output of

# grep "CONFIG_SCSI_[SP]\?ATA" /usr/src/linux/.config

?

I suspect it's just a wrong kernel configuration setting, perhaps even only a "module instead of builtin" or vice versa problem. Thanks a lot!

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 5 guests