Solved Possible bug in ConsoleKit?

I was debugging why x11/swaylock was not able to lock my screen anymore after a few minutes of inactivity and I found some interesting lines in my messages file:

Code:
Mar 16 12:07:14 tu45b-freebsd dbus-daemon[2025]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.4" (uid=1001 pid=2292 comm="swayidle -w timeout 300 swaylock -f -k -l -i ~/Pic") interface="org.freedesktop.ConsoleKit.Manager" member="GetSession" error name="(unset)" requested_reply="0" destination="org.freedesktop.ConsoleKit" (uid=0 pid=2179 comm="/usr/local/sbin/console-kit-daemon --no-daemon")

To me it looks like sysutils/consolekit2 is messaging devel/dbus through the interface "org.freedesktop.ConsoleKit.Manager" using member "GetSession" but if I look into /usr/local/etc/dbus-1/system.d/ConsoleKit.conf there's no "GetSession" member anywhere to be found.

However, there are two instances of "GetSessions", one of which is actually under "org.freedesktop.ConsoleKit.Manager":

Code:
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="GetSessions"/>

In short, I added to that file:

Code:
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="GetSession"/>

and terminated my labwc session and started another and no logs are present anymore (and, of course, my laptop idles and suspends as expected).

Anyone else? This looks too weird to be true...
 
I think that it was swaylock trying to contact ConsoleKit via dbus, based on sender and destination fields in that log message.
 
I think that it was swaylock trying to contact ConsoleKit via dbus, based on sender and destination fields in that log message.
That's a nice idea and you're really close IMHO. I tried to "string" swaylock and I got this:
Code:
[19:03][fmc000@tu45b-freebsd ~] $ strings `which swaylock`|grep -i session
ext_session_lock_v1
[%s:%d] Failed to lock session -- is another lockscreen running?
[%s:%d] Missing ext-session-lock-v1
ext_session_lock_surface_v1
ext_session_lock_manager_v1
[19:03][fmc000@tu45b-freebsd ~]
but when I tried to "string" swayidle I found something interesting:
Code:
[19:03][fmc000@tu45b-freebsd ~] $ strings `which swayidle`|grep -i session
[Line %d] Failed to find session
[Line %d] GetSessionByPID failed: %s
org.freedesktop.ConsoleKit.Session
[Line %d] Failed to read session name
[Line %d] GetSession failed: %s
GetSession
[Line %d] Using session: %s
GetSessionByPID
[19:03][fmc000@tu45b-freebsd ~] $

So it seems that swayidle is the culprit?
 
Back
Top