[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 » Wed Jan 10, 2007 3:56 am

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 » Mon Feb 26, 2007 6:57 am

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 » Tue Feb 27, 2007 1:35 am

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 » Thu Mar 01, 2007 12:43 pm

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.

User avatar
ShALLaX
Site Admin
Posts: 1973
Joined: Sun Aug 10, 2003 9:25 pm
Location: England
Contact:

Post by ShALLaX » Fri Mar 02, 2007 10:36 pm

It's not possible, you cant hijack the power button.
The original Xbox adaptation of Gentoo

User avatar
blighty
Adept
Posts: 56
Joined: Tue Apr 25, 2006 9:36 am
Contact:

Post by blighty » Thu May 10, 2007 11:46 am

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

User avatar
ShALLaX
Site Admin
Posts: 1973
Joined: Sun Aug 10, 2003 9:25 pm
Location: England
Contact:

Post by ShALLaX » Thu May 10, 2007 3:54 pm

It's not wired directly to the PSU at all ;p
The original Xbox adaptation of Gentoo

User avatar
blighty
Adept
Posts: 56
Joined: Tue Apr 25, 2006 9:36 am
Contact:

Post by blighty » Thu Jun 14, 2007 6:28 am

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

User avatar
cheesyboofs
Power user
Posts: 239
Joined: Wed Jan 26, 2005 1:32 pm
Location: Luton UK
Contact:

Post by cheesyboofs » Fri Jun 15, 2007 10:29 am

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 ...

User avatar
clpalmer
Power user
Posts: 288
Joined: Sat Jan 29, 2005 6:38 pm

Post by clpalmer » Fri Jun 15, 2007 3:14 pm

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.

User avatar
blighty
Adept
Posts: 56
Joined: Tue Apr 25, 2006 9:36 am
Contact:

Post by blighty » Mon Jul 16, 2007 8:58 pm

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 » Tue Jul 17, 2007 3:43 am

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

User avatar
clpalmer
Power user
Posts: 288
Joined: Sat Jan 29, 2005 6:38 pm

Post by clpalmer » Tue Jul 17, 2007 3:52 pm

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?

User avatar
clpalmer
Power user
Posts: 288
Joined: Sat Jan 29, 2005 6:38 pm

Post by clpalmer » Tue Jul 17, 2007 3:53 pm

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 » Wed Jul 18, 2007 7:05 am

Controller solution found on the forums here:

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest