Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-11-2005, 08:42 AM
|
#1
|
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
How to Shutdown with Power Button?
How can I make it so that when I hit the power button on the case my PC will go through it's regular shutdown sequence (runlevel 0)?
Right now if I hit the power button the PC goes into like a sleep mode or something and I need to hit a key on the keyboard to wake it up. I'd like to change that sleep mode for a shutdown/halt. How can I accomplish this?
BTW, I am using Linux 2.4.29 (APM). Thanks!
Last edited by win32sux; 04-11-2005 at 11:36 AM.
|
|
|
04-11-2005, 02:29 PM
|
#2
|
Member
Registered: Dec 2003
Location: Northern VA
Posts: 493
Rep:
|
Hrm, usually holding down the power button for 3 to 4 seconds will cause it to power off...don't know if it does anything on the system level.
|
|
|
04-11-2005, 04:58 PM
|
#3
|
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
Original Poster
|
Quote:
Originally posted by Technoslave
Hrm, usually holding down the power button for 3 to 4 seconds will cause it to power off...don't know if it does anything on the system level.
|
thanks for the reply...
yeah, holding the button down for a few seconds cuts the power abruptly - a very bad thing, as the shutdown scripts aren't run...
i need the system to go into runlevel 0 when the power button is hit (without the need to hold it down)...
i want the effect of hitting the power button to be the same as issuing the "shutdown -h now" command...
|
|
|
04-12-2005, 11:42 AM
|
#4
|
Member
Registered: Dec 2003
Location: Northern VA
Posts: 493
Rep:
|
That's not going to happen, AFAIK. What it does is causes the hard drives to write out their cache and then shuts everything down in as gentle a state as possible, as compared to say an abrupt power loss. The kernel may or may not interpret this correctly, maybe someone else will know.
The only problems you should see with regards to applications are those that when starting look to see if a pid file is present then refuse to start up b/c it wasn't shut down properly. I don't know of many that do that though.
|
|
|
07-01-2006, 02:14 AM
|
#5
|
LQ Newbie
Registered: May 2005
Location: Denmark
Distribution: Mandriva
Posts: 5
Rep:
|
I run the latest mandriva on a Fujitsu-Siemens Scenic xS. When I push the power button, it logs off properly and does a regular shutdown. However, thhe next time I start, it boots in CLI instead of X.
|
|
|
07-01-2006, 12:02 PM
|
#6
|
LQ Veteran
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642
Rep:
|
Quote:
Originally Posted by mpdc
However, thhe next time I start, it boots in CLI instead of X.
|
Just enter the following to start X
|
|
|
07-01-2006, 01:19 PM
|
#7
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
You need ACPI enabled in kernel and acpid running. Then the powerbutton will trigger an ACPI event, I believe it is shutdown by default.
|
|
|
All times are GMT -5. The time now is 09:08 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|