Cannot resume from a suspend to ram on a Lenovo s10-3 using kernel 3.x
Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Cannot resume from a suspend to ram on a Lenovo s10-3 using kernel 3.x
Hello.
I have a Lenovo ideapad s10-3 running Arch Linux.
uname -r => 3.2.11-1-ARCH
kernel boot in /boot/grub/menu.lst => kernel /vmlinuz-linux root=/dev/disk/by-label/root quiet ro
This netbook always had a problem with resuming from suspend (pm-suspend), web search shows not just on Arch, but on kernel 2.6.x there was a solution, as stated in the Arch wiki: https://wiki.archlinux.org/index.php..._.26_Hibernate
However since moved to kernel 3.x it stopped working again and adding nohpet to the kernel boot line doesn't work either.
The netbook suspends (all LED's go off and power LED blinks) but won't resume (Power LED is stable on, WiFi LED stays off, Screen stays off, HDD LED shows activity and then stays off).
I tried to suspend with music running in the background to see if it's just the screen staying off or something else, music doesn't resume either.
Like the wiki suggests, I have acpid running.
Searching the web I found a few suggestions but none worked:
adding nohpet acpi_osi=linux noapic acpi=off(refused to boot at all) to the boot line, tried all together and each by its own.
Tried to suspend using
pm-suspend --quirk-s3-bios --quirk-s3-mode, with the different boot options.
Tried suspending using
echo mem > /sys/power/state
Tried it all in init3 so it's not X11 driver's fault.
Check your scripts in acpi or mebbe update pm-utils.
For a while in kernel 2.6.x there was an option for 'deprecated /proc/acpi files' in case you were running 'old software'. We all were - acpitools, and many scripts have not been updated. I looked into my box and /proc/acpi is not there in kernel 3.x and stuff is broken. Post the results of your enquiries - I have to update my own laptop :-D.
I'm not really sure what you mean...
I have acpid installed, not acpi since I don't find a use for acpi.
What is it about acpi scripts do I need to check?
/etc/acpi/handler.sh
Code:
#!/bin/sh
# Default acpi script that takes an entry for all actions
minspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`
maxspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`
setspeed="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"
set $*
case "$1" in
button/power)
#echo "PowerButton pressed!">/dev/tty5
case "$2" in
PBTN|PWRF) logger "PowerButton pressed: $2" ;;
*) logger "ACPI action undefined: $2" ;;
esac
;;
button/sleep)
case "$2" in
SLPB|SBTN) echo -n mem >/sys/power/state ;;
*) logger "ACPI action undefined: $2" ;;
esac
;;
ac_adapter)
case "$2" in
AC|ACAD|ADP0)
case "$4" in
00000000)
echo -n $minspeed >$setspeed
#/etc/laptop-mode/laptop-mode start
;;
00000001)
echo -n $maxspeed >$setspeed
#/etc/laptop-mode/laptop-mode stop
;;
esac
;;
*) logger "ACPI action undefined: $2" ;;
esac
;;
battery)
case "$2" in
BAT0)
case "$4" in
00000000) #echo "offline" >/dev/tty5
;;
00000001) #echo "online" >/dev/tty5
;;
esac
;;
CPU0)
;;
*) logger "ACPI action undefined: $2" ;;
esac
;;
button/lid)
case "$3" in
close)
#echo "LID closed!">/dev/tty5
;;
open)
#echo "LID opened!">/dev/tty5
;;
esac
;;
*)
logger "ACPI group/action undefined: $1 / $2"
;;
esac
/etc/acpi/events/anything
Code:
# Pass all events to our one handler script
event=.*
action=/etc/acpi/handler.sh %e
pm-utils version is pm-utils-1.4.1-4, I often update my system using pacman -Syu so it's usually up to date.
I had this problem for a long time but hadn't had the time / energy to deal with it.
/*I found time now cause I am way too unmotivated to write a paper in CS for uni.*/
Ok. Being technically precise, acpid is the executable I was referring to. acpi is a generally used term to apply to the business of necessary control, and not the executable or it's peculiarities in particular.
If you have that one great handler script, it usually needs tweaking.
In /etc/acpi/events the events your box responds to should exist. Here's mine: (Cleaned of crap)
Quote:
bash-4.1$ ls /etc/acpi/events
ac battery lidbtn powerbtn video_brightnessdown video_brightnessup videobtn
If you stop acpid, restart it with -l (Logging) and fiddle things like lidbtn, the events it sees will be displayed. Then you can put handlers in small pointers in /etc/acpi/events to the scripts in /etc/acpi. Grab fedora's or debian's scripts - they give you plenty to start with. Then fiddle them for your box to fix issues. Here's my suspend stuff (which works).
in /etc/acpi/events:
Quote:
# /etc/acpi/events/battery
# Called when AC power goes away and we switch to battery
event=battery
action=/etc/acpi/Decbattery.sh
My suspend script needs fixing - else I'll let xfce's power manager do it. XFCE's power manager uses Hal, and I always considered Hal the fast track to a home for the insane.
EDIT: Why not use pm-suspend & pm-hibernate if they are installed?
Last edited by business_kid; 03-18-2012 at 04:31 AM.
Reason: Brain switched on
ls /etc/acpi/events
anything
cat /etc/acpi/events/anything
# Pass all events to our one handler script
event=.*
action=/etc/acpi/handler.sh %e
So it basically catches all events, no?
Everything works, AC to battery, turning off screen when the lid if closed, battery % reporting, anything I can think of.
All except resuming from suspend.
I don't use pm-hibernate since I don't want to hibernate and never tried it, but I do use pm-suspend and it doesn't work.
I prefer it to work with xfce4's suspend, I have xfce4-power-manager installed.
But making it work via xfce comes after making it work at all :P
So far all and any way I tried to suspend, none worked. (I mean resuming never works, suspends fine)
I suspend -> screen, fan, HDD, LED's all go out except the power LED which blinks.
I resume by either pressing any key or opening the lid -> fan,LED's,HDD goes on.
The HDD LED shows activity and then turns off, sometimes the wireless LED doesn't turn back on and the screen stays off without even back light.
If I suspend from a terminal then I should be back there when I resume (not set to lock on resume) but even if I blindly type any command, say reboot, it doesn't do anything.
I'm pretty sure it's not just the screen, if I had to guess I would say the screen stays off because something somewhere doesn't resume.
The laptop (netbook) is a Lenovo S10-3 (not S10-3t).
As far as I know it has issues with WiFi and resume under linux.
Both of the issues are fixable, except that the resume part doesn't work for me. (adding nohpet to kernel boot options)
Lenovo is the sucessor to the IBM Thinkpad. They certainly had issues, and were a factor in abandoning apm code.( What worked other places didn't work there)
There are kernel fixes for them, and sites that specialise. I never owned one. If a Lenovo owner doesn't see this and chime in, try linux-laptop.net.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.