Page 1 of 1

[Idea] Properly Shutdown When Power Button Pressed

Posted: Wed Jan 10, 2007 3:56 am
by Pyrite
Firstly, would it be possible? Like, when the power button is pressed and the power is on, to run the halt command and then power off?

Posted: Mon Feb 26, 2007 6:57 am
by orochi
it might be the bios' function to handle what happens when the power button is pressed, but i'm not sure perhaps something can be setup to do this.

Posted: Tue Feb 27, 2007 1:35 am
by Pyrite
Well, Windows XP has this capability. Why can't linux? :?:

Posted: Thu Mar 01, 2007 12:43 pm
by orochi
Well I see this in one of two ways.

First, if your using a software exploit to load a .xbe and ultimately linux, your still booting from the Microsoft bios, this does not have the functionality to do this.


Secondly, regardless of the above being original bios, or cromwell. Linux, kernel or userland must support this feature. Perhaps through an ACPI or other means. Quick google search didnt pull up anything, but than again, I'm tired and its 4:45AM. Ive seen posts where someone has mapped controller buttons using a perl script, perhaps that is an alternative.

Posted: Fri Mar 02, 2007 10:36 pm
by ShALLaX
It's not possible, you cant hijack the power button.

Posted: Thu May 10, 2007 11:46 am
by blighty
I just disconnect them altogether to stop myself and others turning it off the wrong way.

Like shallax said, the switch is wired to the psu & can`t be controlled.

bLiGhTy.

Posted: Thu May 10, 2007 3:54 pm
by ShALLaX
It's not wired directly to the PSU at all ;p

Posted: Thu Jun 14, 2007 6:28 am
by blighty
blighty wrote:I just disconnect them altogether to stop myself and others turning it off the wrong way.

Like shallax said, the switch is wired to the psu & can`t be controlled.

bLiGhTy.
Don't know why I said it was, :D

I blame the beer! :D

bLiGhTy = Plonka.

bLiGhTy.

Posted: Fri Jun 15, 2007 10:29 am
by cheesyboofs
Could one hijack the Eject button to do the same?

Posted: Fri Jun 15, 2007 3:14 pm
by clpalmer
I should start building and selling small button boards that run over USB. Write some simple drivers for them and you can have buttons to do whatever you want. Could sell a 4-button board for probably <$20. Just have to find a nice way to mount/package/connect them.

Posted: Mon Jul 16, 2007 8:58 pm
by blighty
can I get a deal on 2?

bLiGhTy.

Posted: Tue Jul 17, 2007 3:43 am
by orochi
someone had a perl script that would detect joystick button presses and perform a command, i dont remember if that post is still on the forums still

Posted: Tue Jul 17, 2007 3:52 pm
by clpalmer
Is there a custom driver for the eject button or is it tied into the DVD drive itself? If there is one, then as cheesy said, couldn't it be hacked to eject on a quick press, but gracefully shut down on a long press?

Posted: Tue Jul 17, 2007 3:53 pm
by clpalmer
Or if there isn't down + up events, maybe a triple quick press or something.

Posted: Wed Jul 18, 2007 7:05 am
by orochi
Controller solution found on the forums here:

viewtopic.php?t=3037&highlight=perl+controller