Linux - HardwareThis 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.
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.
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?
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...
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.