Bug 430947

Summary: Policykit prevents me from doing suspend, powermanagement etc.
Product: [openSUSE] openSUSE 11.0 Reporter: Christopher Hofmann <cwh>
Component: Mobile DevicesAssignee: E-mail List <kde-maintainers>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: lavrinenko_alex
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: power-management.policy

Description Christopher Hofmann 2008-09-30 15:26:25 UTC
I am not really sure what this problem caused. I appeared after an online update at about beginning of September.

I cannot suspend my Thinkpad via kpowersave any more nor can I do CPU thotteling etc. any more. Worked fine before that update.

Some output:
cwhlocal@thinkcwh:~> powersave -c
liblazy (liblazy_dbus_send_method_call:97): Received error reply: org.freedesktop.hal.power-management.cpufreq no <-- (action, result)
Could not get current CPUFreq policy.
cwhlocal@thinkcwh:~> powersave -u
User is not allowed for org.freedesktop.hal.power-management.suspend according to PolicyKit.
Comment 1 Danny Al-Gaaf 2008-09-30 16:51:23 UTC
Please check if ConsoleKit is running and if you have XDG_SESSION_COOKIE in your session environment.
Comment 2 Christopher Hofmann 2008-10-01 08:09:12 UTC
/usr/sbin/console-kit-daemon is running but there is no XDG_SESSION_COOKIE. 
Comment 3 Danny Al-Gaaf 2008-10-01 09:14:53 UTC
Looks like a KDE or ConsoleKit issue
Comment 4 Holger Macht 2008-10-01 10:09:12 UTC
Can you please attach /usr/share/PolicyKit/policy/org.freedesktop.hal.power-management.policy? Just to make sure that it's no configuration issue...thanks
Comment 5 Christopher Hofmann 2008-10-01 13:29:54 UTC
Created attachment 242820 [details]
power-management.policy
Comment 6 Holger Macht 2008-10-01 13:41:35 UTC
Looks fine.

I think KDM is responsible for setting XDG_SESSION_COOKIE, reassigning...
Comment 7 Dirk Mueller 2008-10-06 13:41:34 UTC
do you use kdm3, kdm4 or gdm to log in?

what is the output of "ck-list-sessions"?
Comment 8 Christopher Hofmann 2008-10-07 11:33:49 UTC
Using kdm3.
ck-list-sessions doesn't do any output.

I also have installed KDE4:UNSTABLE packages. Do they maybe influence kdm3 or share configuration or whatever?
Comment 9 Dirk Mueller 2008-10-07 11:43:03 UTC
it could be that you accidentally run kdm4 from UNSTABLE, which is missing the consolekit-support patch. 

ps -elf | grep kdm

please to be sure
Comment 10 Christopher Hofmann 2008-10-07 13:46:30 UTC
Gotcha1

thinkcwh:~ # ps -elf | grep kdm
5 S root ... /usr/bin/kdm

thinkcwh:~ # rpm -qf /usr/bin/kdm
kde4-kdm-4.1.68-5.2

Unfortunately it did not help to set
DISPLAYMANAGER="kdm3"
in /etc/sysconfig/displaymanager

What else could I do to solve that? Uninstalling kde4-kdm?
Comment 11 Holger Macht 2008-10-08 12:40:54 UTC
*** Bug 430215 has been marked as a duplicate of this bug. ***
Comment 12 Dirk Mueller 2008-10-09 12:54:23 UTC
setting kdm3 should work. did you try rcxdm stop/start and it starts the wrong one? that would be the bug then I guess. 

I can see about rediffing the patch for consolekit support, but UNSTABLE is frequently updated with upstream codedrops and it is already enough work just now. 
Comment 13 Lubos Lunak 2008-11-03 17:02:40 UTC
Setting DISPLAYMANAGER="kdm3" work fine here. Is this still a problem?
Comment 14 Christopher Hofmann 2008-11-07 10:47:45 UTC
Not really a problem any more. I removed kdm4 to solve that.
Comment 15 Dirk Mueller 2008-11-07 14:12:25 UTC
the consolekit-support patch is in UNSTABLE now as well, so it should be fixed even with kdm4.