Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 345585 - sys-auth/consolekit-0.4.2-r4 not working with powerdevil unless it has been restarted
Summary: sys-auth/consolekit-0.4.2-r4 not working with powerdevil unless it has been r...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-15 09:57 UTC by Morgan Langley
Modified: 2010-12-23 22:38 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Morgan Langley 2010-11-15 09:57:46 UTC
Consolekit does not work correctly with KDE powerdevil unless it has been restarted before logging in to KDE/starting X with KDE.

I have consolekit, HAL daemon and dbus started in the default runlevel.

Reproducible: Always

Steps to Reproduce:
1. boot up and log in
2. startx (with KDE)
3. try to suspend via KDE menu

Actual Results:  
nothing happens

Expected Results:  
The screensaver is run and the machine is suspended

Other people in Gentoo forums noted that they observe the same behaviour when using a display manager.

I tried sending the suspend event manually to powerdevil via dbus but it did nothing either.

However, when I log in to console, then restart consolekit and start X with KDE afterwards, suspending is working correctly. Unfortunately I do not know how to debug this since it does not seem to print anything to any log.

Please advise me if you need more information and you have instructions for me how to get logs etc. from consolekit.
Comment 1 LiuCougar 2010-11-22 23:22:21 UTC
I am having the exact same issue, and I here is some more info:

trying to restart consolekit from locale.start does not help. in addition, before startx, restart consolekit in one tty, then switch to another tty (alt+F2) and startx, powerdevil still does not work

it looks like it's tty related... but I don't know how to debug this further (could not find any logs anywhere regarding this issue)
Comment 2 Samuli Suominen gentoo-dev 2010-11-25 18:04:07 UTC
(In reply to comment #0)
> 2. startx (with KDE)

"with KDE" is 'exec ck-launch-session startkde' or what?
btw, try consolekit-0.4.3
Comment 3 Morgan Langley 2010-11-25 19:12:20 UTC
"with KDE" means using the system's default xsession, which is "exec /usr/bin/startkde". I actually made a modification to it and used "exec ssh-agent startkde". However, the situation does not change, whether I add/remove ssh-agent or add/remove ck-launch session. I tried all combinations with no success.

I have just synced and consolekit-0.4.3 is not in portage.
Comment 4 Olivier Huber 2010-12-01 10:56:24 UTC
I can confirm this bug w/ consolekit-0.4.3. I'm also starting kde with
startx.
It seems that this isn't gentoo specific (cf Debian bug #598150).

I commented out 
session                optional        pam_ck_connector.so nox11
in /etc/pam.d/system-login. Thus I have no ck session, and now
suspend is working again.

If I try to start the kde session with "/usr/bin/ck-launch-session /usr/bin/startkde", I end up with an inactive session :
$ ck-list-sessions
Session1:
	unix-user = '1000'
	realname = '(null)'
	seat = 'Seat2'
	session-type = ''
	active = FALSE
	x11-display = ':0'
	x11-display-device = '/dev/tty7'
	display-device = '/dev/tty1'
	remote-host-name = ''
	is-local = FALSE
	on-since = '2010-12-01T10:40:43.923889Z'
	login-session-id = '10'
and suspend w/ Powerdevil isn't working again.
Comment 5 Samuli Suominen gentoo-dev 2010-12-18 22:41:30 UTC
It's propably up to removing the "nox11" parameter from /etc/pam.d/system-login's pam_ck_connector.so line, then ck-list-sessions should print 'active'
That would be bug 342345
At least that's what the "restarting consolekit helps" info provided here tells me.

*** This bug has been marked as a duplicate of bug 342345 ***
Comment 6 Morgan Langley 2010-12-22 17:30:12 UTC
Removing the nox11 parameter did not help:

Session4:
        unix-user = '501'
        realname = '(null)'
        seat = 'Seat2'
        session-type = ''
        active = FALSE
        x11-display = ':0'
        x11-display-device = '/dev/tty7'
        display-device = '/dev/tty1'
        remote-host-name = ''
        is-local = FALSE
        on-since = '2010-12-22T17:27:39.881045Z'
        login-session-id = ''
Comment 7 Markos Chandras (RETIRED) gentoo-dev 2010-12-23 00:12:24 UTC
I am having similar problems when I start my session using startx & ck-launch-session

Maybe this bug is similar to 

https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/483130

I haven't tried this modified version of 90consolekit yet

Is there a workaround to make startx aware of the ck session?
Comment 8 Markos Chandras (RETIRED) gentoo-dev 2010-12-23 01:54:07 UTC
Ignore me. Seems like I am a victim of bug #342291
Comment 9 Morgan Langley 2010-12-23 22:38:59 UTC
After investigating all the bugs in this report, I finally fixed the issue. It was a combination of bugs 342245 and 342291.