[Idea] Properly Shutdown When Power Button Pressed

Request new features that might make using Gentoox better.
Post Reply
Pyrite
Novice
Posts: 27
Joined: Sun Jan 07, 2007 9:42 am

[Idea] Properly Shutdown When Power Button Pressed

Post 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?
orochi
Gentoox Guru!
Posts: 606
Joined: Sun Oct 24, 2004 8:11 am

Post 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.
Pyrite
Novice
Posts: 27
Joined: Sun Jan 07, 2007 9:42 am

Post by Pyrite »

Well, Windows XP has this capability. Why can't linux? :?:
orochi
Gentoox Guru!
Posts: 606
Joined: Sun Oct 24, 2004 8:11 am

Post 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.
ShALLaX
Site Admin
Posts: 1973
Joined: Sun Aug 10, 2003 9:25 pm
Location: England
Contact:

Post by ShALLaX »

It's not possible, you cant hijack the power button.
The original Xbox adaptation of Gentoo
blighty
Adept
Posts: 56
Joined: Tue Apr 25, 2006 9:36 am
Contact:

Post 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.
2x xbox v1.0 gentoox home native
2x stock 10GB`s (both built for free :D )

Thanks 2 cheesyboofs, Steinar T & of course ShALLaX.

Falcon; jtag, xbr, 160gb hdd
ShALLaX
Site Admin
Posts: 1973
Joined: Sun Aug 10, 2003 9:25 pm
Location: England
Contact:

Post by ShALLaX »

It's not wired directly to the PSU at all ;p
The original Xbox adaptation of Gentoo
blighty
Adept
Posts: 56
Joined: Tue Apr 25, 2006 9:36 am
Contact:

Post 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.
2x xbox v1.0 gentoox home native
2x stock 10GB`s (both built for free :D )

Thanks 2 cheesyboofs, Steinar T & of course ShALLaX.

Falcon; jtag, xbr, 160gb hdd
cheesyboofs
Power user
Posts: 239
Joined: Wed Jan 26, 2005 1:32 pm
Location: Luton UK
Contact:

Post by cheesyboofs »

Could one hijack the Eject button to do the same?
Go fully native, it's the destiny of all Mk1 XboxesImage
The needs of the many out way the needs of the few or the one ...
clpalmer
Power user
Posts: 288
Joined: Sat Jan 29, 2005 6:38 pm

Post 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.
blighty
Adept
Posts: 56
Joined: Tue Apr 25, 2006 9:36 am
Contact:

Post by blighty »

can I get a deal on 2?

bLiGhTy.
2x xbox v1.0 gentoox home native
2x stock 10GB`s (both built for free :D )

Thanks 2 cheesyboofs, Steinar T & of course ShALLaX.

Falcon; jtag, xbr, 160gb hdd
orochi
Gentoox Guru!
Posts: 606
Joined: Sun Oct 24, 2004 8:11 am

Post 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
clpalmer
Power user
Posts: 288
Joined: Sat Jan 29, 2005 6:38 pm

Post 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?
clpalmer
Power user
Posts: 288
Joined: Sat Jan 29, 2005 6:38 pm

Post by clpalmer »

Or if there isn't down + up events, maybe a triple quick press or something.
orochi
Gentoox Guru!
Posts: 606
Joined: Sun Oct 24, 2004 8:11 am

Post by orochi »

Controller solution found on the forums here:

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