LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 10-24-2007, 01:08 PM   #1
Lockywolf
Member
 
Registered: Jul 2007
Posts: 683

Rep: Reputation: 253Reputation: 253Reputation: 253
ACPI events


Hi all.

I have HP-Compaq 6710s laptop

wWho can advice any acpi scripts for slackware to supend it via s2ram (uswsusp) when the lid is closed, switch governors when adapter is present|is not present, etc...

I looked at ubuntu scripts, but they seem to be ubuntu-specific.
 
Old 10-24-2007, 01:18 PM   #2
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Here is what I have for s2ram on lid close.
Note that I've also got a custom modification to my rc.S and rc.6 scripts to remove/create /etc/powerdown file when halt/reboot occurs - I'm impatient, and I often shutdown the system and immediately close the lid. This ugly hack prevents that from occurring. :-)

Code:
root@liberty:~# cat /etc/acpi/events/lid 
event=button/lid.*
action=/etc/acpi/actions/lid.sh %e
Code:
root@liberty:~# cat /etc/acpi/actions/lid.sh 
#!/bin/sh

# Suspend to ram when the lid is closed

# First, let's make sure we're not shutting down or rebooting
if [ ! -e /etc/powerdown ]; then
  sync ; sync # Just in case...
  echo -n mem > /sys/power/state
fi
 
  


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
acpi actions don't trigger events xnomad Linux - Software 0 04-30-2007 10:03 PM
No ACPI battery events on HP compaq nx9000 (kernel 2.6.14-suspend2-r7) wookie2 Linux - Laptop and Netbook 5 01-12-2006 08:08 PM
no gnome sound events, mtrr overlaps, acpi sleep resume Markup Linux - Software 2 07-27-2005 05:19 AM
Question on creating ACPI events... sephkeene Linux - Laptop and Netbook 0 08-27-2004 01:15 AM
acpi events? raven Linux - Laptop and Netbook 2 10-12-2003 02:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:32 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