You are not logged in.
Pages: 1
I always thought that typing "shutdown -h now" (or even "halt") in a terminal was too much for me. So many letters to type!
I just found a nicer way to turn off my Arch Linux box.
1) pacman -Sy acpid
2) create a file named /etc/acpi/events/power with the following content:
# shutdown when pressing power off
event=button/power.*
action=/sbin/shutdown -h now
3) /etc/rc.d/acpid start
Now you can turn off your computer by simply pressing power off.
(Yawn) Time to go to sleep...
Offline
Very nice. Freebsd have this feature and I always wondered how to do it on linux.
Thanks a lot
Kaleph
jabber: kaleph@jabber.org
Offline
Offline
You mean with this I can simply press the power button on my cpu and the computer will go into a clean/soft/whatever shutdown? Without giving me any problems on the hard disk? :!: :?: :shock:
Offline
You still can have some problems if you don't close KDE/GNOME/other apps properly.
http://pdfinglis.tripod.com/widget.html
"In order to make an apple pie from scratch, you must first create the universe."
-- Carl Sagan, Cosmos
Offline
You still can have some problems if you don't close KDE/GNOME/other apps properly.
if you can get suspend-to-disc working and have it hibernate on button press - which persists everything to your swap partition
Offline
It looks like the wiki is broken at the moment, i can't access to some links
So i just filed a feature request:
Offline
phrakture: I wouldn't recommend software suspend to anybody beacuse it is extremely unstable. It actually destroyed my previous shiny Gentoo system with it. This is why I gave Arch a try...
Or wait! I recommend software suspend to those using Gentoo system! This way they will switch to Arch faster
http://pdfinglis.tripod.com/widget.html
"In order to make an apple pie from scratch, you must first create the universe."
-- Carl Sagan, Cosmos
Offline
Bummer... this didn't do anything for me. Perhaps it has to supported by your kernel? (I roll my own) or my hardware is just teh suck.
Offline
I am simply using the precompiled kernel26 package of Arch. I believe that the only requirement is to have ACPI compiled in. You can check it by verifying that you have a /proc/acpi directory tree.
Maybe the logs in /var/log/acpid could help you to find out why the poweroff event could not be properly handled?
Offline
phrakture: I wouldn't recommend software suspend to anybody beacuse it is extremely unstable.
there's a patch - the swsup in the kernel sucks... the new one is called swsup2 and should be merged in in the near future....
about this not doing anything - append "acpi=on" to your kernel boot line
Offline
Appending "acpi=on" didn't do the trick. And I do have acpi enabled in my kernel. /var/log/acpid just says:
[Fri Oct 29 14:03:20 2004] starting up
[Fri Oct 29 14:03:20 2004] 1 rule loaded
No help there. Finally my rule looks like this:
/etc/acpi/events/power:
event=button/power.*
action=/sbin/halt
Having "action=/sbin/shutdown -h now"
Didn't do it either...
Offline
rehcra wrote:phrakture: I wouldn't recommend software suspend to anybody beacuse it is extremely unstable.
there's a patch - the swsup in the kernel sucks... the new one is called swsup2 and should be merged in in the near future....
I tried each of 3 implementations of suspending. EACH didn't work properly on my machine. From time to time the system wasn't restored properly. One of the implementations shut down my hardisk TWICE, resulting in a longer poweroff time than neccessary. Finally, my filesystem was corrupted. And swsup2 you are talking about didn't support SMP at that time (I don't know if this has changed).
I consider the current version on swsup (and alternatives) a shit. Just like propertial ATI drivers are a shit.
I don't want to sacrifice stability only because I'm lazy.
http://pdfinglis.tripod.com/widget.html
"In order to make an apple pie from scratch, you must first create the universe."
-- Carl Sagan, Cosmos
Offline
Laziness is good with computers! Thanks for the tip! It works like a charm.
Offline
I just alias'ed 'sudo shutdown -h now' to something simple..
like.... bonk
I have sudo for my user account on my home box to only ask for pass once per session...and I generally use it long before shutdown..
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
you just took my desktop a further step in being a windows clone :?
nice stuff never the less
Offline
Appending "acpi=on" didn't do the trick. And I do have acpi enabled in my kernel. /var/log/acpid just says:
[Fri Oct 29 14:03:20 2004] starting up [Fri Oct 29 14:03:20 2004] 1 rule loaded
Here is my /var/log/acpid:
[Thu Oct 28 22:15:23 2004] starting up
[Thu Oct 28 22:15:23 2004] 1 rule loaded
[Thu Oct 28 23:37:25 2004] received event "button/power PWRF 00000080 00000001"
[Thu Oct 28 23:37:25 2004] executing action "/sbin/shutdown -h now"
[Thu Oct 28 23:37:25 2004] BEGIN HANDLER MESSAGES
[Thu Oct 28 23:37:26 2004] END HANDLER MESSAGES
[Thu Oct 28 23:37:26 2004] action exited with status 0
[Thu Oct 28 23:37:26 2004] completed event "button/power PWRF 00000080 00000001"
[Thu Oct 28 23:37:27 2004] exiting
[Fri Oct 29 20:01:56 2004] starting up
[Fri Oct 29 20:01:56 2004] 1 rule loaded
[Fri Oct 29 23:11:36 2004] received event "button/power PWRF 00000080 00000001"
[Fri Oct 29 23:11:36 2004] executing action "/sbin/shutdown -h now"
[Fri Oct 29 23:11:36 2004] BEGIN HANDLER MESSAGES
[Fri Oct 29 23:11:36 2004] END HANDLER MESSAGES
[Fri Oct 29 23:11:36 2004] action exited with status 0
[Fri Oct 29 23:11:36 2004] completed event "button/power PWRF 00000080 00000001"
[Fri Oct 29 23:11:39 2004] exiting
[Sat Oct 30 09:49:01 2004] starting up
[Sat Oct 30 09:49:01 2004] 1 rule loaded
It looks like your acpid properly loads the /etc/acpi/events/power file. However it never catches the poweroff ACPI event. I would say it comes either from the ACPI kernel layer or from your hardware.
If you have Windows installed on your PC, you could test if the poweroff button is propely handled by Windows. If not, your hardware is not ACPI compatible: bad luck . If it is, the problem probably comes from the ACPI kernel layer.
In the last case, you should test ACPI with an unmodified Arch kernel26 package. If it works there - the ACPI layer is broken in your homebuilt kernel.
If it still does not work... maybe you should get in touch with upstream ACPI (kernel, acpid) devs. Or check google with something like linux+ACPI+problem+your_motherboard_model :?.
I am using this tip on 2 PCs: one recent P4 2.8Gz (Dell), and one older Athlon 800Mhz (Via chipset). It works flawlessly on both.
Offline
It appears it's my hardware. I'm not really bummed about it... but still... stupid hardware.
Offline
Pages: 1