Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 26th February 2008, 09:55 AM
iamasmith Offline
Registered User
 
Join Date: Feb 2008
Posts: 5
Power button ignoring gnome-power-manager on FC8

I have two brand new FC8 installs on different hardware and both work quite well and provide suspend as well as hibernate as long as you select that from the shutdown menu in Gnome.

Gnome power manager is set to ask what to do if the power button is pressed but if I do press it on either system the system just kicks straight into shutdown.

Very strange since I took a look at the /etc/acpi/actions/power.sh script and can see that it shouldn't be kicking in if gnome-power-manager is running and if I run this script directly it behaves as expected and doesn't shut down.

So, can anybody suggest what may be kicking in instead of this script when I press the power button?... or just generally a fix to let Gnome handle it properly?

Both machines were installed from i386 media btw.. one from an install DVD and the other from a live media disk since there were problems with the DVD on that machine.

Regards,

-Andy
Reply With Quote
  #2  
Old 26th February 2008, 10:38 AM
PhillyFloyd's Avatar
PhillyFloyd Offline
Registered User
 
Join Date: Jun 2007
Location: Washington DC
Posts: 338
Some trivial things to check before you start racking your brain:

- ensure that the button module is loaded and that acpi is installed/running (acpid)
- it sounds like you have configured the button press action to do what you want, that would be another thing to check, and as you noted the events are in /etc/acpi/events
__________________
"You're as useless as a jiffy in a tickless kernel."
Reply With Quote
  #3  
Old 26th February 2008, 10:46 AM
iamasmith Offline
Registered User
 
Join Date: Feb 2008
Posts: 5
Check and Check.. events in /etc/acpi/events are present too and acpid is still running.

Can't believe this isn't an FAQ atm since two radically different machines installed just now are doing the same thing.

(imho it isn't just me, I have fixed similar problems on other distros that had poor scripts... this looks all 'hunky dory' to me but it isn't behaving properly)
Reply With Quote
  #4  
Old 26th February 2008, 11:57 AM
PhillyFloyd's Avatar
PhillyFloyd Offline
Registered User
 
Join Date: Jun 2007
Location: Washington DC
Posts: 338
what kind of "machines" are they?
__________________
"You're as useless as a jiffy in a tickless kernel."
Reply With Quote
  #5  
Old 26th February 2008, 12:02 PM
iamasmith Offline
Registered User
 
Join Date: Feb 2008
Posts: 5
OK getting closer now..

Original /etc/acpi/actions/power.sh =

[root@imp actions]# more power.sh.original
#!/bin/sh

PATH=/sbin:/bin:/usr/bin

# Get the ID of the first active X11 session:
uid_session=$(
ck-list-sessions | \
awk '
/^Session[0-9]+:$/ { uid = active = x11 = "" ; next }
{ gsub(/'\''/, "", $3) }
$1 == "uid" { uid = $3 }
$1 == "active" { active = $3 }
$1 == "x11-display" { x11 = $3 }
active == "TRUE" && x11 != "" {
print uid
exit
}')

# Check that there is a power manager, otherwise shut down.
[ "$uid_session" ] &&
ps axo uid,cmd | \
awk '
$1 == '$uid_session' &&
($2 == "gnome-power-manager" || $2 == "kpowersave") \
{ found = 1; exit }
END { exit !found }
' ||
shutdown -h now

[root@imp actions]#

By replacing that shutdown -h with a list of commands echoing to /tmp/pm.log I found that ck-list-sessions isn't producing any output at all!

I haven't had a look at the source for ck-list-sessions yet but it isn't just a permission problem because I have just tried this again with ck-list-sessions with the sticky bit set.

Regards,

-Andy
Reply With Quote
  #6  
Old 26th February 2008, 12:12 PM
iamasmith Offline
Registered User
 
Join Date: Feb 2008
Posts: 5
Incidentally ck-list-sessions does produce output when run from a terminal and will pipe output to a file.

BTW the machines are HP DC7100 and a Packard Bell EasyNote XS (same as the Everex Cloubook but with 1Gb RAM).

Regards,

-Andy
Reply With Quote
  #7  
Old 26th February 2008, 12:29 PM
iamasmith Offline
Registered User
 
Join Date: Feb 2008
Posts: 5
Using username "andrews".
Authenticating with public key "andrews@voidwalker.local" from agent
Last login: Tue Feb 26 12:11:59 2008 from 172.16.250.75
[andrews@imp ~]$ rpm -q --whatprovides /usr/bin/ck-list-sessions
ConsoleKit-0.2.3-1.fc8

Just in case anyone has any info on this tool.
Reply With Quote
Reply

Tags
button, fc8, gnomepowermanager, ignoring, power

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
fc9: gnome-power-manager only shows logout-question when pressing power-button ProCole Using Fedora 4 24th May 2008 10:58 PM
F7 - Power Button Does Not Work Unless Logged In To Gnome ?? fcuser719 Using Fedora 1 31st August 2007 04:12 PM
gnome-power-manager and power button always shutdown exe Hardware & Laptops 3 27th January 2007 06:51 PM
gnome power manager chandan Using Fedora 0 30th October 2006 12:59 PM


Current GMT-time: 00:33 (Thursday, 20-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat