LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   slackware + suspend-to-ram? (https://www.linuxquestions.org/questions/slackware-14/slackware-suspend-to-ram-566633/)

janhe 07-04-2007 01:25 PM

slackware + suspend-to-ram?
 
How can I use /etc/acpi/acpi_handler.sh to make the system suspend-to-ram when I hit the sleep button.

What should I put after
Quote:

case "$2" in
sleep)
probably a call to another script/program/utility.
Can you recommend one?

and... does the generic-smp kernel support sleep states, it looks to me like it doesn't, but I just want to check.

tuxdev 07-04-2007 01:46 PM

Do something like
Code:

echo platform > /sys/power/disk; echo disk > /sys/power/state
(This does suspend-to-disk, though)

janhe 07-04-2007 02:07 PM

Code:

root@jan:~# echo platform > /sys/power/disk; echo disk > /sys/power/state
-su: /sys/power/disk: Permission denied
-su: echo: write error: Invalid argument
root@jan:~#

that doesn't seem to work. I kind of expected it. The tutorials all say there should be something like "mem and some other thing" coming out when you do
Code:

cat /sys/power/state
but I simply get a blank line.

chess 07-04-2007 02:40 PM

I noticed something similar on my Thinkpad x40 during the 12.0 RC stage and found this page on the thinkwiki.org site:

http://www.thinkwiki.org/wiki/Proble...suspend-to-ram

(look at the second one on the list about "Write Error.")

As far as I can tell, the regular Slackware kernels do not have "CONFIG_HOTPLUG_CPU" enabled so I recompiled my kernel and enabled that option and then acpi suspend to ram worked fine (with the appropriate acpi event and handler scripts, of course). I emailed Pat about this during the RC testing and he replied and said he would try to put this in the final 12.0 kernels but I have not had a chance to see if it was added.

Alien Bob 07-04-2007 02:48 PM

Quote:

Originally Posted by Jackson1995
As far as I can tell, the regular Slackware kernels do not have "CONFIG_HOTPLUG_CPU" enabled so I recompiled my kernel and enabled that option and then acpi suspend to ram worked fine (with the appropriate acpi event and handler scripts, of course). I emailed Pat about this during the RC testing and he replied and said he would try to put this in the final 12.0 kernels but I have not had a chance to see if it was added.

Unfortunately:

Code:

# CONFIG_HOTPLUG_CPU is not set

Eric

janhe 07-04-2007 03:08 PM

well, I'm using the 2.6 series since 2.6.7 was out, always custom compiled.
Though, it would have been nice to run a official slackware kernel once again...

Edit:
On the other hand, it is a nice excuse to patch it for bootsplash support

janhe 07-05-2007 10:02 AM

Finally it works!
The bootsplash stops people from asking
Quote:

should your laptop do that? I've got the same and that one doesn't do that
I added the CONFIG_HOTPLUG_CPU (aka SUSPEND_SMP) option.
I also compiled in all the acpi modules.
Now I'm using klaptop_acpi_helper to take care of the suspend.

BTW to work in kde, klaptop_acpi_helper needs chmod +s .
The dialog to do that in KDE complains about klaptop_acpi_helper not having the same size and checksum as it had when it was compiled. It also did that under 11.0

chess 07-05-2007 10:05 AM

That is great to hear, thanks for posting a follow up, janhe.


All times are GMT -5. The time now is 02:16 AM.