You are not logged in.

#1 2008-10-30 06:01:11

mattfitz
Member
Registered: 2008-10-27
Posts: 27

gnome power manager doesn't give shutdown or suspend options

After studying the wiki and searching the forums I'm breaking down and asking for help. I'm new to Linux and even newer to Arch but I have managed to get most everything running on my laptop ok, however for some reason gnome-power-manager doesn't let me select anything other than "do nothing." On ac or battery, closing lid or battery running critically low, no option but "do nothing" (and sometimes blank screen) is presented. when pressing the power button my only option is "ask me," and when I do press the power button no dialog box comes up, but gnome-power-manager mysteriously terminates. I have pm-utils installed and I added myself to the "power" group, but the problem seems a bit bigger than that anyways. I'm pretty much lost as to what could be causing this, so any direction would be greatly appreciated.

Offline

#2 2008-10-31 08:42:41

mattfitz
Member
Registered: 2008-10-27
Posts: 27

Re: gnome power manager doesn't give shutdown or suspend options

Seeing as I use openbox and I don't really care if it's the gnome applet that controls my power, I decided to go straight to /etc/acpi/handler.sh. Even though I read on the forums that adding editing it thus:

                button/lid)
                #echo "LID switched!">/dev/tty5
                /usr/bin/pm-hibernate
                ;;

should cause my laptop to hibernate when the lid closes, it doesn't (and yes, pm-utils is indeed installed). I also realized that even without gnome-power-manager running, and even though it doesnt appear to be configured in /etc/acpi/handler.sh, my screen dims when ac is unplugged, and turns off when the lid is closed. So what then is controlling these events?

Offline

#3 2008-11-01 19:23:37

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: gnome power manager doesn't give shutdown or suspend options

*Bump*


Website - Blog - arch-home
Arch User since March 2005

Offline

#4 2008-11-03 01:27:13

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: gnome power manager doesn't give shutdown or suspend options

Have you added yourself to the "power" group?

Offline

#5 2008-11-03 01:53:18

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: gnome power manager doesn't give shutdown or suspend options

Yes I have my self in the power group, I had all these options prior to the upgrade (2.24)

Maybe this is a different issue than the OP? OP what version of gnome-power-manger are you running?


Website - Blog - arch-home
Arch User since March 2005

Offline

#6 2008-11-03 03:26:09

mattfitz
Member
Registered: 2008-10-27
Posts: 27

Re: gnome power manager doesn't give shutdown or suspend options

I'm running version 2.24.1, but I just installed Arch a week or so ago and I can't comment on how it was working before. For what it's worth, these functions were working in Ubuntu, just to rule out any strange linux-incompatibility issues (whether they would exist or not I wouldn't know). Nice to know I'm not having unique issues, at any rate.

Offline

#7 2008-11-03 12:41:54

print
Member
From: teh cloud
Registered: 2007-02-27
Posts: 173

Re: gnome power manager doesn't give shutdown or suspend options

same problem here.  any ideas?


% whereis whatis whence which whoami whois who

Offline

#8 2008-11-04 20:55:29

hoschi
Member
From: Ulm (Germany)
Registered: 2008-11-03
Posts: 358
Website

Re: gnome power manager doesn't give shutdown or suspend options

Same here, since gnome 2.24 - afaik we have to add the permission under policykit "gnome/system/preferences/authorizations", but the gran-button is always grayed out and it doesn't ask me for the root-password.

Why is Gnome not using simple POSIX-Standard? We have Groups for adding permissions since 30 years and it is simple&efficent&sophisticated.

Offline

#9 2008-11-11 07:17:15

mattfitz
Member
Registered: 2008-10-27
Posts: 27

Re: gnome power manager doesn't give shutdown or suspend options

I am having the same issue as hoschi, I why is it impossible to hit the grant button?

Offline

#10 2008-11-16 07:42:02

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,430
Website

Re: gnome power manager doesn't give shutdown or suspend options

Well, I'm going to give this tread a big old bump because I am trying to figure this out too...

Adding:

    <match action="org.freedesktop.hal.power-management.suspend">
        <return result="yes"/>
    </match>

    <match action="org.freedesktop.hal.power-management.hibernate">
        <return result="yes"/>
    </match>

to /etc/PolicyKit/PolicyKit.conf gets the options back in the g-p-m menus and that gets suspend to work if I click on the sys tray icon and click suspend.

Does not work when I shut my lid on my laptop yet but works fine if I set it to suspend when I press the power button...  Must be something else I need to add.

Edit:  Even stranger. g-p-m detects the lid close and open.  It is just not acting on it.

Edit2:  I'm an idiot...  there are options on the "On AC Power" and "On Battery Power" tabs for what to do when the lid is closed...

Offline

#11 2008-11-17 01:59:57

simao
Member
Registered: 2008-10-25
Posts: 9

Re: gnome power manager doesn't give shutdown or suspend options

I am having a similar problem.

The options are there, but they don't work.

Although I can suspend/hibernate when I click the gnome-power-manager icon and choose hibernate/suspend, when I close the lid it does not suspend/hibernate.

Anyone with the same issue? This was working a few weeks ago!

SM

Offline

#12 2008-11-30 22:16:23

lardon
Member
Registered: 2008-05-31
Posts: 254
Website

Re: gnome power manager doesn't give shutdown or suspend options

Allan comes in, drops a few lines of XML, and tada! Problem solved!

Allan Akbar!


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#13 2008-12-01 02:06:33

merlin
Member
From: Maine
Registered: 2008-10-06
Posts: 12

Re: gnome power manager doesn't give shutdown or suspend options

PolicyKit does seem to be the problem but I am not clear. Prior to today (11/30) I had policykit version 0.9-5 and g-p-m gave me options to suspend/hibernate (I use pm-utils) and all worked well. Today, many updates/upgrades occured: kernel, various gnome packages, etc. This included taking policykit to 0.9-7 and gnome-power-manager to 2.24.2-1. Suspend/hibernate choices disappeared from g-p-m (but still worked via command line). I tried modifing policykit.conf as in Allan's post to no avail. The only thing that worked was downgrading policykit back to 0.9-5.
Any other experiences before I file a bug???

Last edited by merlin (2008-12-01 02:06:56)

Offline

#14 2008-12-01 02:58:09

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,430
Website

Re: gnome power manager doesn't give shutdown or suspend options

Well, here is the differences in the PKGBUILDs:
http://repos.archlinux.org/viewvc.cgi/p … 7&r2=14740

This bit has gone...
install -m644 ${srcdir}/org.freedesktop.hal.power-management.policy ${pkgdir}/usr/share/PolicyKit/policy/

hal in [testing] now provides that file.

Offline

#15 2008-12-01 03:04:00

rcorder
Member
Registered: 2007-09-07
Posts: 17

Re: gnome power manager doesn't give shutdown or suspend options

Allan wrote:

Well, here is the differences in the PKGBUILDs:
http://repos.archlinux.org/viewvc.cgi/p … 7&r2=14740

This bit has gone...
install -m644 ${srcdir}/org.freedesktop.hal.power-management.policy ${pkgdir}/usr/share/PolicyKit/policy/

hal in [testing] now provides that file.

Why in the world was that removed in the first place?  My only way of suspending now is to do it with pm-suspend as root from a terminal or the console.  This is frustrating...

EDIT:  enh, nevermind.  Didn't catch that last bit of yours.  So the question now is, why was the new version of PolicyKit allowed to go out without hal (now with the needed file) being ready?

Last edited by rcorder (2008-12-01 03:08:08)

Offline

#16 2008-12-01 11:33:33

Berseker
Member
From: Near Lecco, Italy
Registered: 2008-04-24
Posts: 256

Re: gnome power manager doesn't give shutdown or suspend options

allan's tip doesn't work for me, in fact, i can't even reboot\turn off the pc in a "graphic way", i've to "sudo reboot" or "sudo halt" to do so. suspend\hibernation buttons don't appear in the "stop the system" window.

Last edited by Berseker (2008-12-01 11:33:51)

Offline

#17 2008-12-01 12:26:16

alessandro_ufms
Member
From: Campo Grande, MS - Brazil
Registered: 2008-06-25
Posts: 153

Re: gnome power manager doesn't give shutdown or suspend options

I have same issue. The suspend button disappears  for my stop the system window. sad

Edit:
The allan's tip works for me. cool

Last edited by alessandro_ufms (2008-12-01 17:29:13)

Offline

#18 2008-12-01 12:46:57

alexmatos
Member
From: Rio de Janeiro, Brasil
Registered: 2007-08-06
Posts: 124

Re: gnome power manager doesn't give shutdown or suspend options

alessandro_ufms wrote:

I have same issue. The suspend button disappears  for my stop the system window. sad

The same here, but the hibernate button is missing too.

EDIT:
Allan's workaround did the trick for me. For anyone who may have the same doubt I did, the xml provided by Allan goes inside the config tag.

Last edited by alexmatos (2008-12-01 12:50:13)

Offline

#19 2008-12-01 16:29:06

Berseker
Member
From: Near Lecco, Italy
Registered: 2008-04-24
Posts: 256

Re: gnome power manager doesn't give shutdown or suspend options

alexmatos wrote:
alessandro_ufms wrote:

I have same issue. The suspend button disappears  for my stop the system window. sad

The same here, but the hibernate button is missing too.

EDIT:
Allan's workaround did the trick for me. For anyone who may have the same doubt I did, the xml provided by Allan goes inside the config tag.

thank you.
it was my fault, I simply pasted the xml settings just under that section. Now everything works.

Offline

#20 2008-12-01 20:06:39

merlin
Member
From: Maine
Registered: 2008-10-06
Posts: 12

Re: gnome power manager doesn't give shutdown or suspend options

Now I feel like an idiot. I knew that the code Allan suggested went before the </config> but put it after. It does indeed fix things after upgrading policykit to 0.9-7. So where is the bug here: is it in policykit? or in hal?

Offline

#21 2008-12-02 04:20:25

rcorder
Member
Registered: 2007-09-07
Posts: 17

Re: gnome power manager doesn't give shutdown or suspend options

merlin wrote:

Now I feel like an idiot. I knew that the code Allan suggested went before the </config> but put it after. It does indeed fix things after upgrading policykit to 0.9-7. So where is the bug here: is it in policykit? or in hal?

Neither, technically.  It's just that the needed file has moved from one package to the another.  The package that it was removed from (policykit, in this case) was released before the package it moved to (hal) was.  Ideally, this should have been caught and the release of policykit held-up until hal 0.9-7 is ready.

Offline

#22 2008-12-02 18:00:22

ss2
Member
From: Glasgow
Registered: 2007-10-05
Posts: 69

Re: gnome power manager doesn't give shutdown or suspend options

The lines from Allan work fine for me. But I didn't find the policy in any of those packages, or I just didn't look right.


Live is too short to resolve dependencies.

Offline

#23 2008-12-02 22:20:58

tomekzet
Member
From: Poland
Registered: 2008-08-06
Posts: 5

Re: gnome power manager doesn't give shutdown or suspend options

Allan's XML works for me smile

Consider adding also this code (for example to shut down laptop when battery is critically low):

<match action="org.freedesktop.hal.power-management.shutdown">
        <return result="yes"/>
</match>

Offline

#24 2008-12-04 22:25:37

kesara10
Member
Registered: 2008-06-11
Posts: 13

Re: gnome power manager doesn't give shutdown or suspend options

How about coping the missing file ? cool
Copy paste following to a file called /usr/share/PolicyKit/policy/org.freedesktop.hal.power-management.policy

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
 "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">

<policyconfig>

  <action id="org.freedesktop.hal.power-management.suspend">
    <description>Suspend the system</description>
    <message>System policy prevents suspending the system</message>
    <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>

  <action id="org.freedesktop.hal.power-management.hibernate">
    <description>Hibernate the system</description>
    <message>System policy prevents hibernating the system</message>
    <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>


</policyconfig>

Offline

#25 2008-12-05 06:37:37

kgas
Member
From: Qatar
Registered: 2008-11-08
Posts: 718

Re: gnome power manager doesn't give shutdown or suspend options

Thanks kesara10. your solution worked in my case. Why such polices are not implemented by default, just a clarification :-)

Offline

Board footer

Powered by FluxBB