Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way to make my PC hibernate when I press the power button? By power button I meant my CPU's power button. Obviously when I press this button somewhere some signal is sent which I don't know about since I am new to Linux. Can it be intercepted to enable my PC to hibernate?

share|improve this question
Searching for "power button" on this site yielded this helpful answer that includes the needed pointer to acpid which is also explained here where you find references to for example pm-utils which might also help. – sr_ Oct 25 '11 at 8:34
@sr_: Does this daemon come with all linux distros, or do I have to install it by myself? – MD Sayem Ahmed Oct 25 '11 at 8:50
I guess it's really common among Linux distributions. What's yours? Look at ps aux | grep acpid, it might already be running. – sr_ Oct 25 '11 at 8:51
Assuming you use acpid and pm-utils, this can easily be adjusted to your needs. – sr_ Oct 25 '11 at 9:01
@sr_: acpid is a (the?) correct way to handle this kind of events, so I guess you can write one of your comments as an answer :-) – njsg Feb 14 '12 at 19:49
up vote 2 down vote accepted

You probably (could) use acpid (check via ps aux | grep acpid). Then have a look at this article in the ArchWiki explaining how to use pm-utils to extend acpid to easily achieve whatever effect you'd like when some hardware button is pressed.

If, however, you use GNOME, there other (also GUI) ways, see this comprehensive thread on askubuntu.com

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.