LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 10-12-2008, 01:16 AM   #1
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,442

Rep: Reputation: 70
APM: Change Power Button (etc) function?


Is there a way I can change APM's default action executed when the power button is pressed? On my computer it puts it in standby, but I would rather that it shut down instead.

I know ACPI can do this, but the computer concerned is old and APM works more reliably on it.

Thank you in advance for any help.
 
Old 10-13-2008, 12:56 AM   #2
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 49
Hi,

BTW, usually, if it (power sw) set (in bios) to "standby" then, if you were to hold the button depressed for longer than four seconds this is what turns it off.

If you want it off via your power switch, have you tried holding it depressed for, say, 6 or more seconds?

(such behavior usually can be changed in the bios ie "not to standby but [another setting choice] quickly to off" so that it does not have to be held in for longer than 4 seconds to turn the box off).

How the power button behaves is in the bios.

Or, usually, there are settings/behavior changes for the power button in the bios.

Must be an ATX (soft power off capability) motherboard. (Not the old old [circa near 1996] AT which had mechanical switch on/off).

--
Alan.
 
Old 10-13-2008, 02:21 AM   #3
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,442

Original Poster
Rep: Reputation: 70
Quote:
Originally Posted by acummings View Post
Hi,

BTW, usually, if it (power sw) set (in bios) to "standby" then, if you were to hold the button depressed for longer than four seconds this is what turns it off.

If you want it off via your power switch, have you tried holding it depressed for, say, 6 or more seconds?

(such behavior usually can be changed in the bios ie "not to standby but [another setting choice] quickly to off" so that it does not have to be held in for longer than 4 seconds to turn the box off).

How the power button behaves is in the bios.

Or, usually, there are settings/behavior changes for the power button in the bios.

Must be an ATX (soft power off capability) motherboard. (Not the old old [circa near 1996] AT which had mechanical switch on/off).

--
Alan.
Thanks for the response. Yeah it's an ATX mainboard, but the BIOS does not have any options for changing the power button's function (Sorry, I should have mentioned this previously). And while holding the power button does turn off the computer (as everyone who has ever had a computer freeze on them knows), it does not shut it down nicely.

Any other ideas? I figure APM can't do what I am looking for without hacking the source code, but maybe it can. Are there any other tools/ways to accomplish what I am looking for (a soft shutdown activated by the power button)?
 
Old 10-13-2008, 02:51 AM   #4
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 49
Unaware of any other to do what you want.

Quote:
And while holding the power button does turn off the computer (as everyone who has ever had a computer freeze on them knows), it does not shut it down nicely.
I was unaware that acpi could (shut it down nicely).

Also unaware that O.S. feature could get control over power button behavior.

Likely then has similarity to irq assignments whereby "if not plug and play O.S." (irq's are assigned by bios -- but "if yes, it is a plug and play O.S." (irq's are assigned by the O.S.)

BTW you hadn't specified whether or not as to nice shutdown.

I did not used to know the distinction between why one quick punch of power button would (not nicely) turn off some computers while on others it would put them into standby whereby the "standby equipped" boxes required a 4 plus seconds depress to (not nicely) turn off (quick/immediate off the moment the button is depressed versus 4 plus seconds depressed so as to achieve off).

But those boxes were circa 1999 (Intel BX chipset motherboards) (APM) and they also (I later discovered) did have the power button behavior optiions in the bios. And the settings did work because I changed a couple so that I could standby them via the power button then wake them later on.
 
Old 10-13-2008, 12:00 PM   #5
forum1793
Member
 
Registered: May 2008
Posts: 312

Rep: Reputation: 34
Quote:
I was unaware that acpi could (shut it down nicely).
It does on my gigabyte (780g) board. I just touch the power button once and it appears to execute a HALT command. This is much better than holding it for four seconds because, at a minimum, it does not check the hd upon next boot.

I do not remember what I allowed in bios but don't think I did anything special. I did compile newer kernel and am using acpi. Have not tried anything with apm.
 
Old 10-14-2008, 12:02 AM   #6
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,442

Original Poster
Rep: Reputation: 70
Quote:
Originally Posted by forum1793 View Post
It does on my gigabyte (780g) board. I just touch the power button once and it appears to execute a HALT command. This is much better than holding it for four seconds because, at a minimum, it does not check the hd upon next boot.

I do not remember what I allowed in bios but don't think I did anything special. I did compile newer kernel and am using acpi. Have not tried anything with apm.
Yea, with ACPI you can make the machine do whatever you want when a power button event (or any power event) is detected. Unfortunately ACPI's standby borks this system in Linux. It a main board from 2000, and like my 1999 laptop APM seems to behave better- it just has less flexibility.


@acummings,

you made a good suggestion about Plug n play. I had recently turned it off to make my Nvidia driver work properly with APM. I'll play around with it.

As a side note, I have Windows XP installed on this machine as well and it uses ACPI. When I press the power button in XP is shuts down cleanly.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
power consumption: acpi vs apm ---> apm is the winner by far for suspend mode bmpro Linux - Laptop and Netbook 2 10-01-2008 10:16 PM
change the function of the mouse wheel button alex1986 Slackware 8 07-31-2006 11:34 PM
disable lid button, apm laurentwahl Linux - Laptop and Netbook 3 05-30-2005 04:23 PM
Power off problem with apm Rajahuroman Linux - Hardware 1 11-03-2004 10:29 AM
APM ACPI and power down donavan01 Linux - Laptop and Netbook 5 08-09-2004 02:03 PM


All times are GMT -5. The time now is 10:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration