LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having 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


Reply
  Search this Thread
Old 03-17-2012, 11:45 AM   #1
masmddr
Member
 
Registered: Jun 2005
Location: Israel
Distribution: Arch Linux
Posts: 92

Rep: Reputation: 16
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.

Any help would be highly appreciated.
 
Old 03-17-2012, 12:42 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,252

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
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.
 
Old 03-17-2012, 01:04 PM   #3
masmddr
Member
 
Registered: Jun 2005
Location: Israel
Distribution: Arch Linux
Posts: 92

Original Poster
Rep: Reputation: 16
Thank you for replaying.

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.*/

/proc/acpi/wakeup
Code:
Device	S-state   Status   Sysfs node
EXP1	  S4	*disabled  pci:0000:00:1c.0
EXP2	  S4	*disabled  
EXP3	  S4	*disabled  pci:0000:00:1c.2
EXP4	  S4	*disabled  
PCIB	  S3	*disabled  pci:0000:00:1e.0
USB1	  S3	*enabled   pci:0000:00:1d.0
USB2	  S3	*enabled   pci:0000:00:1d.1
USB4	  S3	*enabled   pci:0000:00:1d.3
EUSB	  S3	*enabled   pci:0000:00:1d.7
LID	  S3	*enabled
/proc/acpi/button/lid/LID/state
Code:
state:      open
 
Old 03-18-2012, 04:28 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,252

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
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
 
Old 03-18-2012, 05:53 AM   #5
masmddr
Member
 
Registered: Jun 2005
Location: Israel
Distribution: Arch Linux
Posts: 92

Original Poster
Rep: Reputation: 16
Thanks for clarifying.

Code:
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)
 
Old 03-18-2012, 10:12 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,252

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Ok then.

Have you tried
Quote:
sync; echo mem > /sys/power/state
My box works, but takes it's time entering suspend & hibernate.
 
Old 03-18-2012, 10:48 AM   #7
masmddr
Member
 
Registered: Jun 2005
Location: Israel
Distribution: Arch Linux
Posts: 92

Original Poster
Rep: Reputation: 16
Tried it now, with and without the kernel boot options, also tried
Quote:
sync; pm-suspend
Suspends quickly, doesn't resume.
 
Old 03-18-2012, 11:18 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,252

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
It's probably a video thing. I would check that default script for a /propc/acpi reference.
 
Old 03-18-2012, 11:58 AM   #9
masmddr
Member
 
Registered: Jun 2005
Location: Israel
Distribution: Arch Linux
Posts: 92

Original Poster
Rep: Reputation: 16
Thank you for your help.

I guess next time I buy a laptop, I'll make sure to do proper research about it before buying it.
Although many users report nohpet solves this issue.

This is beyond me and my understanding of computers, I give up :P
 
Old 03-18-2012, 01:02 PM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,252

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
If you're still stuck:
Essential information is logged to the dmesg buffer. You can faultfind from there. There is some command in the rc scripts

/bin/dmesg -s <buffer_size> > file

which stores the dmesg buffer. Pepper the rc scripts with it and see what you learn sending the different files to a usb disk

Explain exactly what happens and what doesn't during a resume. You press the power button (I presume), and . . .?

Also, What's your laptop? Some have notable quirks.
 
Old 03-18-2012, 02:41 PM   #11
masmddr
Member
 
Registered: Jun 2005
Location: Israel
Distribution: Arch Linux
Posts: 92

Original Poster
Rep: Reputation: 16
Sorry, not sure what you mean with dmesg.

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)
 
Old 03-19-2012, 04:32 AM   #12
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,252

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
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.
 
1 members found this post helpful.
Old 03-19-2012, 08:41 AM   #13
masmddr
Member
 
Registered: Jun 2005
Location: Israel
Distribution: Arch Linux
Posts: 92

Original Poster
Rep: Reputation: 16
Thank you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Suspend/resume in Debian Squeeze with the 2.6.37 Liquorix kernel on the Lenovo G555 LXer Syndicated Linux News 0 02-08-2011 11:20 PM
Not able to resume from suspend to ram tijix Linux - Laptop and Netbook 2 07-27-2010 03:00 PM
[SOLVED] Getting Lenovo W510 to go to Sleep/Suspend to RAM dimm0k Linux - Laptop and Netbook 2 06-08-2010 01:20 PM
Suspend To RAM (S3) - Resume Fails ls37 Linux - Newbie 1 12-22-2008 12:30 PM
Lenovo Thinkpad T61p - Takes a long time to resume from suspend kwesadilo Linux - Laptop and Netbook 5 07-26-2008 12:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 01:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration