Power off button acting differently?

Michael D. Setzer II mikes at kuentos.guam.net
Sat Mar 17 00:15:40 UTC 2012


On 16 Mar 2012 at 6:20, Aaron Konstam wrote:

Subject:        	Re: Power off button acting differently?
From:           	Aaron Konstam <akonstam at sbcglobal.net>
To:             	users at lists.fedoraproject.org
Date sent:      	Fri, 16 Mar 2012 06:20:22 -0500
Send reply to:  	Community support for Fedora users 
<users at lists.fedoraproject.org>
	
<mailto:users-request at lists.fedoraproject.org?subject=unsubscrib
e>
	
<mailto:users-request at lists.fedoraproject.org?subject=subscribe
>

> On Thu, 2012-03-15 at 21:23 -0500, Mikkel L. Ellertson wrote: 
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > 
> > On 03/15/2012 04:05 PM, Aaron Konstam wrote:
> > > On Thu, 2012-03-15 at 10:13 -0500, Mikkel L. Ellertson wrote:
> > >> -----BEGIN PGP SIGNED MESSAGE-----
> > >> Hash: SHA1
> > >>
> > >> Pushing the power button, as opposed to holding it, is an ACPI
> > >> event that is trapped. The action is controlled by
> > >> /etc/acpi/events/powerconf. That defaults to running
> > >> /etc/acpi/actions/power.sh. That script checks to see if a power
> > >> manager is running. If so, the event is passed to the power
> > >> manager. Is not, the system runs the shutdown command.
> > >>
> > >> Now, depending on what desktop you are running, you set what you
> > >> want to happen by setting the action in the power manager setup.
> > >> (This is under System Settings -->Power in Gnome.)
> > >>
> > >> Mikkel
> > > ---
> > > I don't disagree with what you are saying but getting used to
> > shuting down an operating system
> > > using the power button is a bad practice. For example on my
> > > machine holding the power button shuts down the machine while
> > > pressing the button puts the machine to sleep. I agree this is
> > > configurable. But
> > that
> > > is in Fedora Linux, on other systems it is treated as a system
> > > error.
> > >
> > >
> > Well, the difference between pushing the power button, and holding
> > to long enough to bypass the OS and turn the system off is rather
> > pronounced in most systems. But that only applies to systems that
> > can be powered off by using software. There are still systems around
> > that use a rocker or push-on/push-off switch to turn them off.
> > 
> > But you do get Windows users that are also use the power button to
> > have the system shutdown. Exactly what a power button press does is
> > configurable in the power control panel on Windows as well - at
> > least in any version of Windows that is using ACPI. For that matter,
> > what happens when you close the lid on a laptop is also
> > configurable.
> > 
> > I usually have my laptop go to sleep when I close the lid. That
> > works best for the way I usually use the laptop. I have the power
> > button configured to make it hibernate. But on my desktop, I have
> > the power button do a shutdown. I do not use it often, but I have
> > managed to lock up the system a time or two when playing with new
> > hardware/software, and it was that, or ssh into the machine and do a
> > shutdown that way. (Who would have expected a specific video card
> > and TV tuner card to lock up the system when used together, but each
> > would work fine with other hardware...)
> > 
> > So there is no one answer to this. That is why it is configurable,
> > instead of being hard-coded. I think doing a shutdown is a
> > reasonable default when there is no power manager software running,
> > and passing it on the the power manager if it is running lets each
> > user set their preference.
> > 
> > The nice thing about Linux is that the user gets to decide how
> > things like this work. YMMV
> > 
> > Mikkel
> > - -- 
> Except in Gnome on F16 there is no gnome-power-manager. There is an
> rpm with that naqmwe but the rpm does not contain a program with that
> name. And none of the programs related to power allow you to program
> what happens when you press the power button. By the way
> gnome-power-manager when it exists does not provide you with that
> option.

I have found some more strange things. If I switch to a regular 
terminal window (Ctrl-Alt-F2) and press the power button it does a 
regular shutdown, but if either at the login screen or logged into 
gnome it seems to cause a suspend shutdown that doesn't work.

I have found a half-way solution? From this message.

==================================================
Unfortunately the files under /usr/share/polkit-1 will be overwritten 
by next upower package update.
A correct solution is to create a new config file under 
/etc/polkit-1/localauthority.
/etc/polkit-1/localauthority/50-local.d/50-disable-suspend.pkla

[Disable Suspend]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate;org.freedesktop.upower
.suspend
ResultAny=no
ResultInactive=no
ResultActive=no
==================================================

It doesn't fix the problem completely, but it makes the power 
button do nothing, and removes suspend options? So now 
clicking on the icon in the upper right give shutdown and restart 
only?  The power button does still work from a terminal screen.

Not a perfect solution, but better than what it is now doing.



> 
> -- 
> ======================================================================
> = Send your questions to ``ASK ZIPPY'', Box 40474, San Francisco, CA
> 94140, USA
> ======================================================================
> = Aaron Konstam telephone: (210) 656-0355 e-mail:
> akonstam at sbcglobal.net
> 
> -- 
> users mailing list
> users at lists.fedoraproject.org
> To unsubscribe or change subscription options:
> https://admin.fedoraproject.org/mailman/listinfo/users
> Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have
> a question? Ask away: http://ask.fedoraproject.org


+----------------------------------------------------------+
  Michael D. Setzer II -  Computer Science Instructor      
  Guam Community College  Computer Center                  
  mailto:mikes at kuentos.guam.net                            
  mailto:msetzerii at gmail.com
  http://www.guam.net/home/mikes
  Guam - Where America's Day Begins                        
  G4L Disk Imaging Project maintainer 
  http://sourceforge.net/projects/g4l/
+----------------------------------------------------------+

http://setiathome.berkeley.edu (Original)
Number of Seti Units Returned:  19,471
Processing time:  32 years, 290 days, 12 hours, 58 minutes
(Total Hours: 287,489)

BOINC at HOME CREDITS
SETI        11928879.182220   |   EINSTEIN     7497643.209852
ROSETTA      4312437.615217   |   ABC         11728108.836956



More information about the users mailing list