LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 09-20-2007, 06:16 AM   #1
dizzi
Member
 
Registered: Jun 2004
Location: Yorkshire, UK
Distribution: Slackware, Mepis LiveCD
Posts: 146

Rep: Reputation: 15
Blank /sys/power/state file


Hi

I am attempting to enable standby/suspend on my laptop - I have never tried this before on Linux. Anyway, I have done a bit of reading up on it and discovered that the commands echo -n standby > /sys/power/state or
echo -n mem > /sys/power/state should effect this. The problem though is that the /sys/power/state file is just an empty file which results in write error: No such device message.

My kernel is acpi-enabled and everything acpi-related such as cpu frequency scaling works. Are there options in the kernel (huge-smp-2.6.21.5-smp) that need to be enabled (that are disabled by default) in order to get suspend/standby to work? Or are there other programs I need to install?

Cheers
 
Old 09-20-2007, 07:37 AM   #2
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware, OpenBSD, FreeBSD
Posts: 728

Rep: Reputation: 168Reputation: 168
Please see this thread:

http://www.linuxquestions.org/questi...d.php?t=566633

You need to enable "CONFIG_HOTPLUG_CPU" in your kernel.

HTH
 
Old 09-21-2007, 04:14 AM   #3
dizzi
Member
 
Registered: Jun 2004
Location: Yorkshire, UK
Distribution: Slackware, Mepis LiveCD
Posts: 146

Original Poster
Rep: Reputation: 15
Thanks for the info m8.

Cheers
 
Old 11-18-2007, 02:48 PM   #4
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Rep: Reputation: 30
Hmm, well adding support for CPU hotplugging in the kernel didn't do the trick for me.
Code:
root@gabriel:/sys/power# echo -n "standby" > state 
bash: echo: write error: No such device
Google really doesn't return much for this problem. Does anyone have any other ideas?
 
Old 11-18-2007, 10:10 PM   #5
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
Umm .. .I am not sure but isn't this supported only in 2.6.23 ? Could you try with 2.6.23 kernel ... cos all of it is working fine for me in 2.6.23 and I am pretty sure I read somewhere that this works only in 2.6.23 ...
 
Old 11-18-2007, 11:04 PM   #6
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,453

Rep: Reputation: Disabled
There used to be a conflict between smp kernels and hibernation (if you enabled smp you would not have the config option for suspend). Perhaps this has gone away in 2.6.23. In any case, you could try tuxonice (used to be called suspend2) which you can find at http://www.tuxonice.net/.

Brian
 
Old 11-19-2007, 04:01 PM   #7
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Rep: Reputation: 30
I'm using Slackware 12.0 with a 2.6.21.5 kernel, something I forgot to mention. I intended to try tuxonice anyway but for "suspend to disk" aka hibernation. Does it support standby too?
 
Old 11-19-2007, 09:14 PM   #8
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,453

Rep: Reputation: Disabled
On my laptop (hp zv5000 AMD64) it was the only way to get both to work acceptably.

Brian
 
Old 11-20-2007, 11:39 AM   #9
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Rep: Reputation: 30
So there, tried TuxOnIce today and it gives a very similar error:
Code:
/usr/local/share/hibernate/scriptlets.d/suspend2: line 564: echo: write error: Device or resource busy
Maybe you have any idea what this all is about. I might as well do something wrong myself. If you don't have any idea I'll subscribe to TuxOnIce's mailing list and seek help there.
 
Old 11-20-2007, 11:54 AM   #10
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,453

Rep: Reputation: Disabled
If you are suspending to a file, try suspending to swap. If not, perhaps the following thread may help: http://lists.tuxonice.net/lurker/mes...e5b7a4.en.html

Brian
 
Old 11-20-2007, 12:06 PM   #11
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Rep: Reputation: 30
Quote:
Originally Posted by BCarey View Post
If you are suspending to a file, try suspending to swap. If not, perhaps the following thread may help: http://lists.tuxonice.net/lurker/mes...e5b7a4.en.html

Brian
Thanks for a quick response.
Yes I am suspending to a swap partition.
The thread you linked was indeed the only thing that google gave me and unfortunately that seems to be dealing with swap files, not partitions. So it didn't seem of much use.

Something else, found this from dmseg:
Code:
Replacing swsusp.
No storage allocator is currently active. Rechecking whether we can use one.
Suspend2: SwapAllocator: No swap signature found at specified location.
Compression Driver: Argh! Nothing follows me in the pipeline!
compression didn't initialise okay.
Suspend2: Initialise modules failed!
That repeats actually like 20 times in dmseg.

I'm using /dev/sda3 as the swap partition for hibernation. I thought the error came because the swap was not on (I use /dev/sda2 as my real swap, this one was made just for hibernation) but swapon'ing it didn't help eighter. The error in the script I gave before comes at the moment that the script tries to run
Code:
echo > $SWSUSP_ROOT/do_suspend
The screen blanks actually for a second when trying to hibernate but then goes back to X.
 
Old 11-20-2007, 12:36 PM   #12
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,453

Rep: Reputation: Disabled
Did you add the line 'append = "resume=swap:/dev/sda3"' to your lilo.conf, rerun lilo, and reboot?

Brian

BTW You don't need a separate swap partition to do this if your "normal" swap partition is big enough.
 
Old 11-20-2007, 01:17 PM   #13
kummiliim
Member
 
Registered: Mar 2007
Location: Tallinn, Estonia
Distribution: Slackware 12.0
Posts: 276

Rep: Reputation: 30
Quote:
Originally Posted by BCarey View Post
Did you add the line 'append = "resume=swap:/dev/sda3"' to your lilo.conf, rerun lilo, and reboot?
Yup

Quote:
Originally Posted by BCarey View Post
BTW You don't need a separate swap partition to do this if your "normal" swap partition is big enough.
Yeah, when I first installed Linux here I made it a "thinkpad hibernation partition". Afterwards I realised I didn't need a special partition for it. Since it seemed too much trouble to merge it with some other partition, I made it a separate swap so I could still use it for suspending.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Unable to change the Virtual Machine Power State swiswire Debian 3 09-29-2008 02:58 PM
VMware: Unable to change virtual machine power state niteshadw Ubuntu 1 08-21-2007 11:11 AM
'echo -n mem > /sys/power/state' Operation not permitted error hollywoodb Linux - Laptop and Netbook 7 10-09-2006 02:45 PM
(echo -n "standby" > /sys/power/state) only allowed for root? brynjarh Debian 5 02-14-2005 09:08 AM
Power Management(sysfs) /sys/power/state mavrick613 Linux - General 0 05-24-2004 03:04 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration