Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ACPI commands
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
cyfred
Retired Dev
Retired Dev


Joined: 23 Aug 2002
Posts: 596

PostPosted: Tue Jan 28, 2003 11:55 am    Post subject: ACPI commands Reply with quote

Howdy,

I have my laptop setup nicely running Gentoo and all seems to work well, except for the power management side of things.

What I cant get to work it the ACPI command executions.
For example I have in /etc/acpi/events/default
Code:
event=button power.*
action=/sbin/init 0

Which should shutdown the PC when the power button is pressed.
The log file /var/log/acpid shows that the power button was registered as being pressed, but also shows that nothing was done.

My reckoning is that acpid hasnt got permission to execute /sbin/halt but that is the only thing I can come up with.

Also what action should I set to have the machine enter suspend or standby modes? There is a lot on things needing S1 S3 S4 etc... but nothing on what the actual commands are.

Someone please help :?
Back to top
View user's profile Send private message
fbix
n00b
n00b


Joined: 16 Jan 2003
Posts: 3

PostPosted: Tue Jan 28, 2003 12:14 pm    Post subject: Reply with quote

My system send to this event to me:


received event "button/power PWRF 00000080 00000002"

so I've modified
/etc/acpi/events/default:



event=button/power.*
action=/sbin/init 0

and it's worked

bix

[/quote]
Back to top
View user's profile Send private message
cyfred
Retired Dev
Retired Dev


Joined: 23 Aug 2002
Posts: 596

PostPosted: Tue Jan 28, 2003 12:16 pm    Post subject: Reply with quote

What about suspending?
What command do I use to suspend and standby the system?
I want to put the machine into either (depending which works) by pressing the power button, not shut it down.
Back to top
View user's profile Send private message
Reformist
Guru
Guru


Joined: 06 Oct 2002
Posts: 323

PostPosted: Mon Feb 24, 2003 6:14 am    Post subject: Reply with quote

I would also like to know how to do this. Lol is this even possible? The mor eI work with linux on my laptop, the less I hear of a succesful power-managed system....
_________________
-Phil Crosby
Back to top
View user's profile Send private message
monkeyBox
Tux's lil' helper
Tux's lil' helper


Joined: 14 Feb 2003
Posts: 111
Location: Dallas, TX

PostPosted: Tue Mar 04, 2003 8:42 pm    Post subject: Reply with quote

I'd also like to know... It suprises me how hard it is to find information on this. ACPI has been around long enough I would think it would have been fully implemented sooner. Oh well.

The basic things I'm wanting to do but can't figure out how:

    CPU speed stepdown
    Suspend to ram (normal suspend)
    Suspend to disk (hibernation)


if ANYONE knows how to do ANY of these please let us know!!
Back to top
View user's profile Send private message
Jimboberella
Guru
Guru


Joined: 19 Jun 2002
Posts: 358
Location: Brisbane/Australia

PostPosted: Tue Mar 04, 2003 9:40 pm    Post subject: Reply with quote

In my experince with linux on laptops, all the automatic power saving features have just worked. Sleep mode and all. This is on Dell and Compaq models over the past few years, with Mandrake.
Back to top
View user's profile Send private message
monkeyBox
Tux's lil' helper
Tux's lil' helper


Joined: 14 Feb 2003
Posts: 111
Location: Dallas, TX

PostPosted: Tue Mar 04, 2003 11:27 pm    Post subject: Reply with quote

Jimboberella wrote:
In my experince with linux on laptops, all the automatic power saving features have just worked. Sleep mode and all. This is on Dell and Compaq models over the past few years, with Mandrake.


Are you saying you know how to use the features I mentioned above (at least in gentoo anyways)? If so, could you please enlighten us? :)
Back to top
View user's profile Send private message
Reformist
Guru
Guru


Joined: 06 Oct 2002
Posts: 323

PostPosted: Sat Mar 08, 2003 5:50 am    Post subject: Reply with quote

"Just worked"? How did you enable standby? Is it set to a timer or did you run a command? If so, which command did you run?

Please be a bit more specific. I'm almost to the impression that I can just "think" my computer off and it will "just work".

Forgive my sarcasm.
_________________
-Phil Crosby
Back to top
View user's profile Send private message
Reformist
Guru
Guru


Joined: 06 Oct 2002
Posts: 323

PostPosted: Tue Mar 11, 2003 11:06 pm    Post subject: Reply with quote

I think Jimboberella means by BIOS functions and timers. Unfortunately for me, I have no such settings in my BIOS because my BIOS is ghetto, came by default on an HP laptop. The users in this thread are looking for a specific command to put the system into standby, or hibernation. WIthout such commands ACPI is useless, and it appears there are no such commands because I'd think someone would have found them by now.

Or maybe I (we're) just blind.
_________________
-Phil Crosby
Back to top
View user's profile Send private message
Reformist
Guru
Guru


Joined: 06 Oct 2002
Posts: 323

PostPosted: Tue Mar 11, 2003 11:35 pm    Post subject: Reply with quote

Ok, it's quite obvious the level of ACPI functionality is either non-existant, or mystical and hidden, even to the developers.

I've found from this thread (6 months ago)
https://forums.gentoo.org/viewtopic.php?t=4526&highlight=standby

That none of them have any idea how to do any kind of standby or software suspend (hibernation).

The very idea of software suspend (hibernation) is new and beta, and currently under development. I would have thought more progress in terms of the maturity of something like this would have been made, but you never can tell it seems...
https://forums.gentoo.org/viewtopic.php?t=29159&highlight=software+suspend
http://www.darav.de/gentoo/swsusp.html
http://fchabaud.free.fr/English/default.php3?COUNT=3&FILE0=Tricks&FILE1=Laptop&FILE2=Swsusp
_________________
-Phil Crosby
Back to top
View user's profile Send private message
Ian Goldby
Guru
Guru


Joined: 18 May 2002
Posts: 539
Location: (Inactive member)

PostPosted: Sun Mar 16, 2003 2:41 pm    Post subject: Reply with quote

Ok, for documentation have a look at:I assume from this that
Code:
$ cat S0 > /proc/acpi/sleep
should suspend the system, and so on.

I haven't tried any of this yet. I'm just compiling my kernel to enable APCI instead of APM, since APM seems to be incompatible with xfree4.3.0, causing it to freeze on resuming from a suspend.
Back to top
View user's profile Send private message
Ian Goldby
Guru
Guru


Joined: 18 May 2002
Posts: 539
Location: (Inactive member)

PostPosted: Sun Mar 16, 2003 3:37 pm    Post subject: Reply with quote

Ok, that should have been
Code:
# echo -n 1 > /proc/acpi/sleep
Well, it sort of worked, though not in any useful sense. The next prompt didn't appear, and the power light started to flash. But the CPU fan didn't stop, and it woke up again just with a move of the mouse. Not very useful, really.

One warning:
Code:
# echo -n 5 > /proc/acpi/sleep
caused an immediate power-off without going through the proper shutdown procedure. Don't do this at home, kids. Also, when I tried to set the alarm (cat xxxx > /proc/acpi/alarm) I got a complete freeze. Don't do that either, unless you like rescuing corrupted filesystems.
Back to top
View user's profile Send private message
Ian Goldby
Guru
Guru


Joined: 18 May 2002
Posts: 539
Location: (Inactive member)

PostPosted: Sun Mar 16, 2003 3:42 pm    Post subject: Reply with quote

According to this
Code:
# echo -n 3 > state
executed in the /proc/acpi/fan/FAN directory should turn the fan off. Doesn't work for me.
Back to top
View user's profile Send private message
Reformist
Guru
Guru


Joined: 06 Oct 2002
Posts: 323

PostPosted: Mon Mar 17, 2003 3:33 pm    Post subject: Reply with quote

Greaty job iangoldby, this is some much needed information! Now we know how to execute a few power commands, and when they work, well, it will be easy to write a front end.

None of the sleep states worked for me (by executing echo -n x > /proc/acpi/sleep, where x is 1-5) except the 5th stage, which you tried, which gave me a hard reboot. "Soft restart" indeed. They say that mode corresponds to the windows' shutdown command; I'd say it needs some work.

Anyway, good info to know. If any of the states work for anyone, or if there is progress... post!
_________________
-Phil Crosby
Back to top
View user's profile Send private message
Reformist
Guru
Guru


Joined: 06 Oct 2002
Posts: 323

PostPosted: Mon Mar 17, 2003 3:35 pm    Post subject: Reply with quote

Also, for those interested, the doc links that iangoldby posted also contain information on how to "step down" your cpu, to consume less power. Not sure if it actually works, but it is supported and looks very cool. I didn't try this out, because sleep modes are the most neccessary for me, and CPU stepping is only useful to me if it is done automatically while the system is detected as being idle.
_________________
-Phil Crosby
Back to top
View user's profile Send private message
CodeHacker84
n00b
n00b


Joined: 22 Jan 2003
Posts: 68
Location: Rapids of Cedar, IA

PostPosted: Mon Mar 17, 2003 6:22 pm    Post subject: Reply with quote

I have followed the links that iangoldboy has posted, and I am currently reading the ACPI 2.0 standard. It seems to me that there is a misconception on the S5 power state at this point, because according to the ACPI 2.0 standard, section 2.4; the Sleep 5 state is defined to be a state where the system saves nothing and does a "soft power off," meaning that it is a state similar to flipping a power switch, but it can be controlled electronically. The Sleep 4 state is where one would want to be for a typical "Hibernate" command, where all system information is saved to disk, and one of the higher sleep states would be for a "Sleep" command.

P.S. Sorry for the lengthy post, but this also helps me clarify my understanding of all this information that I've absorbed in the past 24 hours.
_________________
Athlon64 3200
1GB Corsair PC3200 C2
MSI K8T Neo FIS2R
CoolerMaster WaveMaster (Black)
Antec TruePower 550W
120 GB WD SATA Drive
160 GB WD PATA Drive
54x32x54 CD-R/RW
Dual head: ATI 9800 AiW/LG1720P && Voodoo3 PCI/IBM G40 CRT
Back to top
View user's profile Send private message
Ian Goldby
Guru
Guru


Joined: 18 May 2002
Posts: 539
Location: (Inactive member)

PostPosted: Mon Mar 17, 2003 7:31 pm    Post subject: Reply with quote

I had a go with the CPU throttling, and it made X very choppy indeed, so I guess it was working :wink:

(I've given up on APCI for now and have gone back to APM, but I still can't get it to restore after a sleep when KDE is running. I think I will have to resign myself to booting the PC every time I want to use it.)

Ian
Back to top
View user's profile Send private message
zumo
n00b
n00b


Joined: 11 Mar 2003
Posts: 8

PostPosted: Wed Mar 19, 2003 1:23 am    Post subject: Hibernate feature found (maybe?) Reply with quote

I think I may have found a hibernate program. I will try it out when I have time, but hopefully you all will try it out in parallel :wink: Linkage below:

http://sourceforge.net/projects/swsusp
Back to top
View user's profile Send private message
Ian Goldby
Guru
Guru


Joined: 18 May 2002
Posts: 539
Location: (Inactive member)

PostPosted: Wed Mar 19, 2003 7:22 pm    Post subject: Reply with quote

There's a good thread on swsusp here.

I thought 1 minute 19 seconds to restore from suspend versus 1 minute 56 seconds to boot from scratch was distinctly unimpressive, and rather defeats the point.
Back to top
View user's profile Send private message
CodeHacker84
n00b
n00b


Joined: 22 Jan 2003
Posts: 68
Location: Rapids of Cedar, IA

PostPosted: Mon Mar 24, 2003 2:38 pm    Post subject: Reply with quote

Yes, the latency between the suspended state and the working state suggests to me that the suspend command is using a higher sleep state (S4) than, IMHO, it should (S2). I think that the purpose of a suspend should be to reduce power consumption to low levels, but that restores should be rather quick. Perhaps the developers should make a distinction somewhere between a high sleep state (S4) and a low sleep state (S2), not unlike *GASP* WinBlows' "hibernate" and "sleep" commands.

[EDIT] Oh, perhaps someone can find a way to just "dump" all the contents of memory to disk and then merely restore from the "dump." Of course, I suppose that all the other things that need to be saved (such as /proc) increase the latency to the point where almost any hibernate command is pointless, like iangoldby said.
_________________
Athlon64 3200
1GB Corsair PC3200 C2
MSI K8T Neo FIS2R
CoolerMaster WaveMaster (Black)
Antec TruePower 550W
120 GB WD SATA Drive
160 GB WD PATA Drive
54x32x54 CD-R/RW
Dual head: ATI 9800 AiW/LG1720P && Voodoo3 PCI/IBM G40 CRT
Back to top
View user's profile Send private message
Ian Goldby
Guru
Guru


Joined: 18 May 2002
Posts: 539
Location: (Inactive member)

PostPosted: Mon Mar 24, 2003 5:30 pm    Post subject: Reply with quote

I may be talking nonsense here, but doesn't swsusp just store the entire state of the PC to disk and then completely power-off? Then when you power back on later, it goes through a customised boot process that restores the PC to where it last was.

That's very different to APM/APCI suspend/hibernate functions, where removing all power will cause you to lose the state of the machine.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum