Bug 302413 - Gnome power manager does not display suspend/hibernate
Summary: Gnome power manager does not display suspend/hibernate
Status: RESOLVED FIXED
: 304245 309723 (view as bug list)
Alias: None
Product: openSUSE 10.3
Classification: openSUSE
Component: GNOME (show other bugs)
Version: Beta 1
Hardware: i686 openSUSE 10.3
: P5 - None : Critical (vote)
Target Milestone: ---
Assignee: Rodrigo Moya
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-22 09:44 UTC by Samareanu Florin
Modified: 2007-09-12 17:22 UTC (History)
2 users (show)

See Also:
Found By: Beta-Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
polkit-list-actions 1>polkit-list-actions.stdout.log (3.87 KB, text/x-log)
2007-08-22 11:59 UTC, Samareanu Florin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samareanu Florin 2007-08-22 09:44:53 UTC
left clicking g-p-m only shows laptop battery levels and does not show suspend-hibernate. Also, clicking general-system settings gives an error about yast2 module power-management not existing (no such client module). This is a fresh install of beta1 upgraded to FACTORY with both oss and non-oss repositories active.

if i run pm-suspend or pm-hibernate the system suspends and resumes successfully every time.

florin-laptop:~ # lshal |grep can
  power_management.can_hibernate = true  (bool)
  power_management.can_standby = false  (bool)
  power_management.can_suspend = true  (bool)
  power_management.can_suspend_hybrid = false  (bool)
  power_management.can_suspend_to_disk = true  (bool)
  power_management.can_suspend_to_ram = true  (bool)

florin@florin-laptop:~> gconftool-2 -R /apps/gnome-power-manager |grep can
  can_hibernate = true
  can_suspend = true

Any other info i can provide?
Comment 1 Felix Möller 2007-08-22 11:20:32 UTC
Holger is this a duplicate of all the other "does not show suspend" bugs?
Comment 2 Holger Macht 2007-08-22 11:57:02 UTC
Hm, maybe, but I'm not aware about what gnome-power-manager is doing regarding PolicyKit. Maybe it has to be adjusted, too.

(In reply to comment #0 from Samareanu Florin)
> suspend-hibernate. Also, clicking general-system settings gives an error about
> yast2 module power-management not existing (no such client module). This is a
> fresh install of beta1 upgraded to FACTORY with both oss and non-oss
> repositories active.

Rodrigo, the YaST2 power management module got dropped. Can you please remove the referring patch from gpm?

> Any other info i can provide?

Can you please attach the output of polkit-list-actions as user, thanks. 

Comment 3 Samareanu Florin 2007-08-22 11:59:11 UTC
Created attachment 159029 [details]
polkit-list-actions 1>polkit-list-actions.stdout.log
Comment 4 Samareanu Florin 2007-08-22 12:00:34 UTC
i`m sorry for the off-bug question, but yast power management module is now replaced by ... what? should only g-p-m be used on a laptop machine? also, the requested log file is now attached to this bug.
Comment 5 Holger Macht 2007-08-22 12:03:50 UTC
Thanks, for the log. It seems healthy.

The YaST2 module didn't have any noticeable functionality which can't be controlled from within the desktop. You can use kpowersave, gnome-power-manager or any other desktop applet popping up in the future. A fallback for servers is still /etc/powersave and the powersave daemon.
Comment 6 Samareanu Florin 2007-08-22 13:31:02 UTC
aditional info:


Aug 22 16:18:11 florin-laptop gnome-power-manager: (florin) Hibernating computer because System idle
Aug 22 16:18:11 florin-laptop gnome-power-manager: (florin) cannot hibernate as not allowed from policy
Aug 22 16:18:11 florin-laptop gnome-power-manager: (florin) hibernate failed
Aug 22 16:18:11 florin-laptop gnome-power-manager: (florin) cannot suspend as not allowed from policy
Aug 22 16:18:11 florin-laptop gnome-power-manager: (florin) suspend failed


Comment 7 Samareanu Florin 2007-08-23 11:16:31 UTC
any news on this?
Comment 8 Holger Macht 2007-08-23 11:19:12 UTC
This bug makes the GNOME desktop unusable on Laptops. Raising severity...
Comment 9 Magnus Boman 2007-08-24 11:32:53 UTC
*** Bug 304245 has been marked as a duplicate of this bug. ***
Comment 10 Samareanu Florin 2007-08-29 16:46:12 UTC
ping?
Comment 11 Holger Macht 2007-08-29 16:50:11 UTC
Still with Beta2?
Comment 12 Samareanu Florin 2007-08-29 16:53:34 UTC
yes with the last update from sunday. i`ll try to upgrade the system to the current factory, but since i`m on a very poor connection, this could take a while.

Will try to report in the morning.
Thanks.
Comment 13 Holger Macht 2007-08-29 16:58:36 UTC
Hm, gnome-power-manager didn't change since Beta1 at least. So if is a g-p-m issue, it's not fixed.
Comment 14 Samareanu Florin 2007-09-01 07:03:46 UTC
after today`s updates, g-p-m does not even start, complaining about an incorrect schema installed. the problem persists with a new user created after the update.
Manually trying to launch g-p-m gives the following in a terminal:

florin@florin-laptop:~> gnome-power-manager --debug all
*** ERROR ***
[main] gpm-main.c:217 (10:02:19):        Could not daemonize: No such device
Saving to syslog: Could not daemonize: No such deviceflorin@florin-laptop:~> 
florin@florin-laptop:~> 
Comment 15 Samareanu Florin 2007-09-02 11:25:53 UTC
after importing the schemas (see bug 307013), g-p-m runs again, but the suspend/hibernate options are still not shown. Any ideeas?
Comment 16 Samareanu Florin 2007-09-03 12:36:23 UTC
still here after the 10.3 beta3 upgrade (as reported by /etc/SuSE-release).
Comment 17 Petr Baudis 2007-09-09 01:03:13 UTC
Yes, still broken in beta3. I didn't find a way to suspend my laptop from outside of commandline, so I think this should be a critical bug.

By the way, where can I configure that closing the notebook lid should suspend to RAM? I think this is what was configured in the yast module before, although I'm not sure. In gnome-power-preferences I can select only between 'do nothing' and 'blank screen' for the 'when laptop lid is closed' action - maybe 'suspend' should be listed there too and it's related to the gnome-power-manager breakage?
Comment 18 Samareanu Florin 2007-09-09 12:11:03 UTC
did you do a fresh install of beta3 or upgraded a previous release?
since i cannot reinstall the system (since it is the system i currently work on), it would be interesting to see if the bug is still here on a clean install.
Comment 19 Petr Baudis 2007-09-09 13:35:13 UTC
I did a fresh install.
Comment 21 Samareanu Florin 2007-09-10 11:34:39 UTC
[hal_device_condition_cb] gpm-button.c:390 (14:32:33):   condition=ButtonPressed, details=sleep
[emit_button_pressed] gpm-button.c:334 (14:32:33):       emitting button-pressed : sleep
[button_pressed_cb] gpm-manager.c:928 (14:32:33):        Button press event type=sleep
[manager_policy_do] gpm-manager.c:428 (14:32:33):        policy: /apps/gnome-power-manager/buttons/suspend
Saving to syslog: Suspending computer because the suspend button has been pressed[gpm_info_event_log] gpm-info.c:591 (14:32:33):         Adding 5 to the event log
*** WARNING ***
[gpm_polkit_is_user_privileged] gpm-polkit.c:73 (14:32:33):      not connected
Saving to syslog: cannot suspend as not allowed from policySaving to syslog: suspend failed*** WARNING ***
[gpm_notify_create] gpm-notify.c:125 (14:32:33):         libnotify: Power Manager : Your computer failed to suspend.
Check the help file for common problems.
[gpm_info_event_log] gpm-info.c:591 (14:32:33):  Adding 10 to the event log
[button_pressed_cb] gpm-srv-screensaver.c:167 (14:32:33):        Button press event type=sleep
[button_pressed_cb] gpm-backlight.c:512 (14:32:33):      Button press event type=sleep
[button_pressed_cb] gpm-info.c:695 (14:32:33):   Button press event type=sleep

this is the debug output from g-p-m
Comment 22 JP Rosevear 2007-09-10 12:35:35 UTC
My initial guess is that this:

[gpm_polkit_is_user_privileged] gpm-polkit.c:73 (14:32:33):      not connected
Saving to syslog: cannot suspend as not allowed from policySaving to syslog:
suspend failed*** WARNING ***

is the problem.
Comment 23 Samareanu Florin 2007-09-10 12:52:39 UTC
i`m fresh out of ideeas . i checked and double checked polkit and the gconf values and still no joy. Any other things i can test?
Comment 24 Rodrigo Moya 2007-09-10 15:37:59 UTC
> Rodrigo, the YaST2 power management module got dropped. Can you please remove
> the referring patch from gpm?
>
gnome-power-manager-yast-settings.patch removed
Comment 25 Holger Macht 2007-09-10 22:26:32 UTC
I think we already know what the problem is. The first sentence from comment #2. PolicyKit got updated, so gpm has to be adjusted AFAIK.
Comment 26 Rodrigo Moya 2007-09-11 08:41:48 UTC
What exactly needs to be updated?
Comment 27 Holger Macht 2007-09-11 11:40:20 UTC
I'm not that familiar with gpm code, but AFAICS, everything which is in gpm-polkit.c. The PolicyKit desing changed, so for example, calling "IsUserPrivileged" on a now nonexistant PolicyKit daemon doesn't work anymore ;-)
Comment 28 JP Rosevear 2007-09-12 01:26:40 UTC
Fedora also has a newer policykit, they are explicitly turning off policy kit support --disable-policykit.  The gpm support seems to be tied to the last official release i can find, 0.3.

However it looks like all we really need to do is to link to libpolkit-grant and use the API there to query privileges.
Comment 29 JP Rosevear 2007-09-12 01:55:09 UTC
*** Bug 309723 has been marked as a duplicate of this bug. ***
Comment 30 Kay Sievers 2007-09-12 15:04:13 UTC
Seems g-p-m is not ported to the current policykit, so we might just want to disable it too.
Comment 31 Rodrigo Moya 2007-09-12 15:48:13 UTC
Yes, that's what upstream suggested for now, so policykit disabled now in the package
Comment 32 Danny Al-Gaaf 2007-09-12 17:22:14 UTC
(In reply to comment #28 from JP Rosevear)
> Fedora also has a newer policykit, they are explicitly turning off policy kit
> support --disable-policykit.  The gpm support seems to be tied to the last
> official release i can find, 0.3.
> 
> However it looks like all we really need to do is to link to libpolkit-grant
> and use the API there to query privileges.

It should be easier to use simply libhal to query the policies via:  libhal_device_is_caller_privileged(...). This function handle also all the ConsoleKit/session handling. This was what we did for example in KPowersave.