LinuxQuestions.org
Help answer threads with 0 replies.
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 06-05-2004, 10:26 PM   #1
matrixrabbit
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Rep: Reputation: 0
Slackware, ACPI standby/hibernate howto???


Hello! Linux newbie here.. please help!

I have a T30 IBM thinkpad running Kernel 2.6.3 with Slackware 9.1 and fluxbox.
I had ACPI compiled into my kernel when i recompiled from 2.4, and lately i've been reading around to find out how to exactly use ACPI. I'm still quite confused though on how to change the state of my computer (all the S0, S1, S2, etc..) I read a couple threads here and there, and most refer to a file either /sys/proc/state or /proc/acpi/sleep that I need to do some sort of 'echo' command to. Unfortunately, I could find neither (lucky for me). I have known slackware to be a bit...untradtional when it came to finding configuration files, etc... so I went searching around.

My /proc/acpi directory has many subdirectories of the different components of my computer, i figured I had to do something here??:

root@rufus:/proc/acpi# ls -l
total 0
dr-xr-xr-x 3 root root 0 Jun 5 23:12 ac_adapter
dr-xr-xr-x 4 root root 0 Jun 5 23:12 battery
dr-xr-xr-x 5 root root 0 Jun 5 22:54 button
-r-------- 1 root root 0 Jun 5 23:12 dsdt
dr-xr-xr-x 3 root root 0 Jun 5 23:12 embedded_controller
-r-------- 1 root root 0 Jun 5 22:09 event
-r-------- 1 root root 0 Jun 5 23:12 fadt
-r--r--r-- 1 root root 0 Jun 5 23:12 info
dr-xr-xr-x 3 root root 0 Jun 5 23:12 power_resource
dr-xr-xr-x 3 root root 0 Jun 5 23:12 processor
dr-xr-xr-x 3 root root 0 Jun 5 23:12 thermal_zone

so where do I go from here? I also stumbled across the 'sleep' command, then proceeded to experiment with it, but absolutely nothing happens when I type it. So I have still failed to put my computer to sleep. My main questions are: How do I change the state of my computer? If there is a file I need to do some sort of 'echo' command to, any ideas to where slackware would put it? Why doesn't the 'sleep' command do anything to my computer? and if I can even get that far, how then can I map my keys so Fn-F4 (the sleep key-combination in windows) will put my computer to sleep?
 
Old 06-06-2004, 01:46 PM   #2
ming0
Member
 
Registered: Jul 2003
Location: Boston
Distribution: Ubuntu: Warty & Hoary
Posts: 113

Rep: Reputation: 16
I have had luck with 'Software Suspend 2', but to use this, you will need to patch your kernel. Check it out here.

It was a bit difficult for me to figure out how to use the patches, and I recommend using the --dry-run option when you are testing the patches.

The hibernate script on the above site is great for getting your computer all ready to sleep.

Good luck!
 
Old 06-07-2004, 05:30 AM   #3
priller
Member
 
Registered: Jan 2004
Distribution: Debian etch
Posts: 202

Rep: Reputation: 30
I've had a quick go at getting hibernate to work on a compaq laptop and game up, when it did resume properly ( not very often ) it wasn't any quicker than a normal boot.
 
Old 06-07-2004, 10:50 AM   #4
Astro
Member
 
Registered: Jan 2003
Location: Ballston Lake, NY
Distribution: Slackware, Debian
Posts: 665

Rep: Reputation: 30
I use `apm -s` to suspend my laptop.
 
Old 06-07-2004, 12:19 PM   #5
ming0
Member
 
Registered: Jul 2003
Location: Boston
Distribution: Ubuntu: Warty & Hoary
Posts: 113

Rep: Reputation: 16
Swsusp 2 makes a HUGE difference in boot times for me--and as long as I don't put a pcmcia card in or pull one out during hibernate--it seems to work flawlessly (sound and video both come back perfectly--I can hibernate with an mp3 going and when I unhibernate it will be playing right where it left off).

I shut down in like 5-10 seconds and reboot in about 20 (I'll time it and post the times here after work tonight)

It makes me use my laptop even more now that I can shut it off and turn it on quickly.
 
Old 06-07-2004, 04:53 PM   #6
matrixrabbit
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Original Poster
Rep: Reputation: 0
hey, i was going through applying the patches for my kernel for Software Suspend. My kernel version is 2.6.3, but the highest kernel version specific patch was 2.6.2, and i proceeded to use that one, I get numerous messages saying
"Reversed (or previously applied) patch detected! Assume -R? [n]"
What does this mean? should I go ahead and type "yes"?
 
Old 06-07-2004, 11:30 PM   #7
ming0
Member
 
Registered: Jul 2003
Location: Boston
Distribution: Ubuntu: Warty & Hoary
Posts: 113

Rep: Reputation: 16
Go here [sourceforge.net] for the latest patches and test releases.

There is nothing for 2.6.3 or 2.6.4, but you CAN get a patch for 2.6.5 or 2.6.6

I wouldn't recommend using a patch not designed specifically for a kernel version...

So get a new kernel (I'll assume 2.6.6) and download the following--unzip and untar it, and then add the whole and incremental patches (first patch the w/ version specific--then the core):

software-suspend-2.0.0.81-for-2.6.6.tar.bz2

Then install the current (.18) suspend script.

I think this should work... I used the SMP highmem patch for 2.6.5, so I can't guarantee you this is correct. However, you could ask Nigel, the current maintainer of the project, for help if you run into any more trouble. He is VERY good about keeping in touch with people on the swsusp mailing list, and will answer your questions quickly.

Let us know about your progress, and I wish you luck!

--Dean

Oh, and I timed my up and down for hibernating--I may have exaggerated a little

from pressing power to fully resumed KDE desktop = 27 seconds

pressing power to fully off = 19 seconds

but it seems to be at least twice as fast as usual...

Last edited by ming0; 06-09-2004 at 01:54 AM.
 
Old 06-08-2004, 10:16 AM   #8
matrixrabbit
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Original Poster
Rep: Reputation: 0
wow, thanks guys. it works. I recompiled, added patches, and i now have a /proc/acpi/sleep =).

I do have another question though, when I do suspend to disk (S4 I believe), do I have to have a line added to lilo.conf to tell my computer where ot look for my image? I have heard people having multiple problems with comming back up after full hibernation; result was possible corruption of their data. So just to jump ahead of this so none of my data gets messed up, should I be adding resume2="/dev/hda3"? (hda3 being my swap partition) Or maybe something of the like?
 
Old 06-08-2004, 12:17 PM   #9
ming0
Member
 
Registered: Jul 2003
Location: Boston
Distribution: Ubuntu: Warty & Hoary
Posts: 113

Rep: Reputation: 16
That's what I have I think (in lilo)...

You are going to want to try hibernating make sure you start from a console (like do 'telinit 2') and if you have success, then try from an X11 session.

I almost forgot--if you have any ext3 partitions, you need to install a fsck program. Read the swsusp2's FAQ very carefully--it'll tell you what program you need.

And you know that all you need to do to hibernate is type 'hibernate' right?
 
Old 06-10-2004, 12:19 PM   #10
matrixrabbit
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Original Poster
Rep: Reputation: 0
I read through the swsusp FAQ, and determined that the fsck i needed was e2fsprogs, which i have..so that's all good to go. However when I entered in resume2="/dev/hda3" into my lilo, then proceeded to run 'lilo' , I got an error saying "Unrecgonized token "resume2" at or above line 37 in flie '/etc/lilo.conf'.....so er, is that supposed to happen? I tried just "resume" instead of "resume2", but the same error appeared. Should I just ignore this and proceed to try to hibernate? or??
-thanks for all your help so far.
 
Old 06-16-2004, 02:20 AM   #11
ming0
Member
 
Registered: Jul 2003
Location: Boston
Distribution: Ubuntu: Warty & Hoary
Posts: 113

Rep: Reputation: 16
Ok,

Try adding this to the append section... it should look like this:
Code:
append = "resume2=swap:/dev/hda3"
You can add it to your existing append section. (I think it's delimited by commas)

They don't make this very clear in the swsusp2 howto

I had the same problem.

I won't be checking this as often, but if you are still trying, I will still try helping
 
  


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
How to setup Standby and Hibernate as options during shutdown murkin Linux - Distributions 0 09-08-2005 12:16 PM
hibernate, standby phoenix7 Linux - General 3 05-06-2005 05:03 AM
ACPI hibernate mode (linux 2.4.22, Mandrake 9.2, Dell Inspiron 1100) arvind_s Linux - Laptop and Netbook 0 12-14-2004 03:04 AM
ACPI problem -- not resuming from hibernate GoBillsBN Linux - Laptop and Netbook 13 04-20-2004 12:33 PM
ACPI problem -- not resuming from hibernate GoBillsBN Mandriva 2 03-24-2004 02:29 PM

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

All times are GMT -5. The time now is 07:33 PM.

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