LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   power button turns computer off (http://www.linuxquestions.org/questions/linux-hardware-18/power-button-turns-computer-off-125659/)

kaega2 12-14-2003 12:48 AM

power button turns computer off
 
Hey, I suppose this might have seemed like a stupid question from the title

When I am in windows and I press the power button it shuts the computer down (by actually shutting down the programs and waiting for windows to shutdown). I had an option in the screen saving setup to change it so that the power button would put the computer to sleep or shut it down or hibernate

In mandrake, the computer just goes off when you push the power. I would like it to at least be disabled so that when I press the button with my toe (it happens) it won't shut down. Also so that my cousin is unable to just turn off the computer when I have it set to a password screen. Any help would be appreciated

DavidPhillips 12-14-2003 01:45 AM

It depends on your hardware, and the associated power management setup.

Or you may be able to use powerswitch.o



More Info?

Guru3 12-14-2003 03:56 AM

It seems like your computer has an ACPI compatible BIOS, but linux generally only uses the APM features of a BIOS. Either check your BIOS or get a kernel module for ACPI... Or recompile the kernel with ACPI support.

Faecal 12-14-2003 07:07 PM

Disconnect the power button, and connect the reset button to the power header on the motherboard. Reset buttons are generally more difficult to hit by accident. ;-)

On the software side, in order to mess with the behaviour of things like the power button, you're probably going to need to be running an ACPI enabled kernel. I have no idea if Mandrake's default one is. This could be a great fun adventure in kernel compilation for you!

kaega2 12-14-2003 10:14 PM

You were right about my bios, it only supports ACPI. But it says that Mandrake supports it too, so I don't know what's going on. And it's working in the way that when I shut down the computer turns off by it's self when it's finishing shutting down.

I went into my configuration and it has an option for ACPI to be on or off and it says that it's on. Now, there's also an option for "Force no APIC", I'm not sure what that is. Can anyone explain what that does. (I'm too lazy right now to try it myself)

jsmarshall85 12-14-2003 11:02 PM

i have a question. why would you want to power off your computer that way in the first place? just choose shutdown from a menu or at the command line as root just type shutdown now

kaega2 12-14-2003 11:04 PM

You people must be simple...

It powers off that way right now, I DON'T want it to power off that way. I don't want the computer to shut down when the power button is pressed. And it's more for my cousin then me.

DavidPhillips 12-15-2003 02:16 AM

these commands

chkconfig acpid on
service acpid start

If no errors then you need to look at /var/log/messages for acpi messages

you need events in /etc/acpi/events

[david@zeus events]$ pwd
/etc/acpi/events

[david@zeus events]$ ls
lid.conf power-button-2.4.conf power-button-2.6.conf

[david@zeus events]$ cat power-button-2.4.conf
event=button pow*
action=/sbin/poweroff

[root@zeus root]# service acpid restart
Stopping acpi daemon: [ OK ]
Starting acpi daemon: [ OK ]

[root@zeus root]# tail /var/log/acpid | grep rules
[Mon Dec 15 01:11:31 2003] 3 rules loaded

kaega2 12-15-2003 09:59 AM

Thanks, I'll check that out. I don't have time to try it right now but it sounds promising


All times are GMT -5. The time now is 01:12 PM.