LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Blank /sys/power/state file (http://www.linuxquestions.org/questions/slackware-14/blank-sys-power-state-file-586031/)

dizzi 09-20-2007 06:16 AM

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

chess 09-20-2007 07:37 AM

Please see this thread:

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

You need to enable "CONFIG_HOTPLUG_CPU" in your kernel.

HTH

dizzi 09-21-2007 04:14 AM

Thanks for the info m8.

Cheers

kummiliim 11-18-2007 02:48 PM

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?

duryodhan 11-18-2007 10:10 PM

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

BCarey 11-18-2007 11:04 PM

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

kummiliim 11-19-2007 04:01 PM

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?

BCarey 11-19-2007 09:14 PM

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

Brian

kummiliim 11-20-2007 11:39 AM

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.

BCarey 11-20-2007 11:54 AM

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

kummiliim 11-20-2007 12:06 PM

Quote:

Originally Posted by BCarey (Post 2965508)
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.

BCarey 11-20-2007 12:36 PM

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.

kummiliim 11-20-2007 01:17 PM

Quote:

Originally Posted by BCarey (Post 2965541)
Did you add the line 'append = "resume=swap:/dev/sda3"' to your lilo.conf, rerun lilo, and reboot?

Yup

Quote:

Originally Posted by BCarey (Post 2965541)
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.


All times are GMT -5. The time now is 04:37 AM.