no consolekit session created when logind session available

Bug #1246770 reported by Yves-Alexis Perez
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Light Display Manager
Triaged
Medium
Unassigned
lightdm (Debian)
Fix Released
Unknown

Bug Description

Hi,

I recently uploaded lightdm 1.8 to Debian unstable, and have had a user report that he can't suspend/shutdown/reboot/hibernate anymore in GNOME. Downgrading to 1.6 fixes the problem.

I suspect a consolekit or systemd/logind problem, but I'm not familiar with GNOME setups. In any case, it looks like a regression since downgrading fixes the problem.

Changed in lightdm (Debian):
status: Unknown → Confirmed
Revision history for this message
Yves-Alexis Perez (corsac) wrote :

Fwiw, it's not only GNOME-related, it apparently happens also with Xfce (although I can't reproduce right now).

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Things that might help debugging:
- Looking at /var/log/lightdm/x-0-greeter.log and seeing if the greeter is reporting an error
- Checking logind/ConsoleKit using d-feet and checking if it the d-bus calls allow suspend/reboot/hibernate
- Checking PolicyKit policies for these

Revision history for this message
Joachim Breitner (nomeata) wrote :

I’ll provide some of that when I find the time to install the broken versions and do various tests, but let me note that
 * The greeter should not be relevant, as the problem exists in autologin sessions as well.
 * The problem reliably occurs when upgrading _only_ lightdm, so the policies of ConsoleKit should not differ at all.

Revision history for this message
Yves-Alexis Perez (corsac) wrote :

Fwiw, I've tried with lightdm 1.8 and with and without init=/bin/systemd and it works just fine here, so I'm really puzzled.

In case that helps:

dpkg -l |egrep 'consolekit|policykit|systemd|lightdm'
ii consolekit 0.4.6-3+b1 amd64 framework for defining and tracking users, sessions and seats
ii liblightdm-gobject-1-0 1.8.3-1 amd64 simple display manager (gobject library)
ii liblightdm-gobject-dev 1.8.3-1 amd64 simple display manager (gobject development files)
ii libsystemd-daemon0:amd64 204-5 amd64 systemd utility library
ii libsystemd-journal0:amd64 204-5 amd64 systemd journal utility library
ii libsystemd-login0:amd64 204-5 amd64 systemd login utility library
ii lightdm 1.8.3-1 amd64 simple display manager
ii lightdm-gtk-greeter 1.6.1-3 amd64 simple display manager (GTK+ greeter)
ii policykit-1 0.105-4 amd64 framework for managing administrative policies and privileges
ii policykit-1-gnome 0.105-2 amd64 GNOME authentication agent for PolicyKit-1
ii systemd 204-5 amd64 system and service manager

Revision history for this message
Joachim Breitner (nomeata) wrote : Re: [Bug 1246770] Re: no more suspend/reboot/hibernate in GNOME since 1.8
Download full text (3.9 KiB)

Hi,

Am Samstag, den 02.11.2013, 14:54 +0000 schrieb Yves-Alexis Perez:
> Fwiw, I've tried with lightdm 1.8 and with and without init=/bin/systemd
> and it works just fine here, so I'm really puzzled.
>
> In case that helps:
>
> dpkg -l |egrep 'consolekit|policykit|systemd|lightdm'
> ii consolekit 0.4.6-3+b1 amd64 framework for defining and tracking users, sessions and seats
> ii liblightdm-gobject-1-0 1.8.3-1 amd64 simple display manager (gobject library)
> ii liblightdm-gobject-dev 1.8.3-1 amd64 simple display manager (gobject development files)
> ii libsystemd-daemon0:amd64 204-5 amd64 systemd utility library
> ii libsystemd-journal0:amd64 204-5 amd64 systemd journal utility library
> ii libsystemd-login0:amd64 204-5 amd64 systemd login utility library
> ii lightdm 1.8.3-1 amd64 simple display manager
> ii lightdm-gtk-greeter 1.6.1-3 amd64 simple display manager (GTK+ greeter)
> ii policykit-1 0.105-4 amd64 framework for managing administrative policies and privileges
> ii policykit-1-gnome 0.105-2 amd64 GNOME authentication agent for PolicyKit-1
> ii systemd 204-5 amd64 system and service manager

I have (with the downgraded lightdm package):

$ dpkg -l |egrep 'consolekit|policykit|systemd|lightdm'
ii consolekit 0.4.6-3+b1 amd64 framework for defining and tracking users, sessions and seats
ii liblightdm-gobject-1-0 1.8.2-1 amd64 simple display manager (gobject library)
ii libpam-systemd:amd64 204-5 amd64 system and service manager - PAM module
ii libsystemd-daemon0:amd64 204-5 amd64 systemd utility library
ii libsystemd-journal0:amd64 204-5 amd64 systemd journal utility library
ii libsystemd-login0:amd64 204-5 amd64 systemd login utility library
ii libsystemd-login0:i386 204-5 i386 systemd login utility library
ii lightdm 1.6.3-1 amd64 simple display manager
ii lightdm-gtk-greeter 1.6.1-2 amd64 simple display manager (GTK+ greeter)
ii policykit-1 0.105-4 amd64 framework for managing administrative policies and privileges
ii pol...

Read more...

Revision history for this message
Yves-Alexis Perez (corsac) wrote : Re: [Pkg-xfce-devel] Bug#728342: lightdm greeter hang and xfce4 polkit failure

[adding launchpad bug number on CC:]

On Sun, 2013-11-03 at 08:15 +0800, Ben Caradoc-Davies wrote:
> Nov 3 08:08:52 ripley dbus[2264]: [system] Failed to activate service
> 'org.freedesktop.ConsoleKit': timed out
> Nov 3 08:08:52 ripley dbus[2264]: [system] Activating service
> name='org.freedesktop.ConsoleKit' (using servicehelper)
> Nov 3 08:08:52 ripley dbus[2264]: [system] Successfully activated
> service 'org.freedesktop.ConsoleKit'
> Nov 3 08:08:52 ripley console-kit-daemon[2709]: WARNING: Failed to
> acquire org.freedesktop.ConsoleKit
> Nov 3 08:08:52 ripley console-kit-daemon[2709]: WARNING: Could not
> acquire name; bailing out

That looks weird indeed, I don't have the ConsoleKit errors. What's
surprising is that it succeeds at one point, but still considers an
error. And everything on the same second, also.

Could it be that ConsoleKit is already running *before* lightDM is
launched and that the dbus activation somehow fails?

Regards,
--
Yves-Alexis

summary: - no more suspend/reboot/hibernate in GNOME since 1.8
+ no more suspend/reboot/hibernate in GNOME/Xfce since 1.8
Revision history for this message
Yves-Alexis Perez (corsac) wrote : Re: no more suspend/reboot/hibernate in GNOME/Xfce since 1.8

Ok, seems that a Debian user managed to pinpoint the issue.

It seems that, when libpam-systemd is installed, it adds an entry to the common-session pam file with:

session optional pam_systemd.so

and that entry seems to break lightdm 1.8 (it was working fine with 1.6).

Revision history for this message
Yves-Alexis Perez (corsac) wrote :

According to latest updates on the Debian bug, it might be because, when libpam-systemd is installed, a logind session is run, in which case lightdm doesn't create a consolekit session, which in turn breaks the various DE (which I guess don't use logind).

As said on the Debian but, I'm pretty much lost on every of this. I'd really like everything to settle down so we actually know what to do, but right now I have no idea if/when it'll happen.

Revision history for this message
Yves-Alexis Perez (corsac) wrote :

Ok, so looking at the code, indeed, when a logind session is available (created when libpam-systemd is installed) lightdm won't create a consolekit session, breaking software relying on it.

Until things have settled down (depending on consolekit was already painful for a lot of people, depending on logind might not be doable for everyone, especially if that means depending on PID1=systemd), would it be a good idea to have *both* a logind and a consolekit session, or is it considered bad?

Revision history for this message
Yves-Alexis Perez (corsac) wrote :

Robert (or anyone else), can you comment on this?

Revision history for this message
Yves-Alexis Perez (corsac) wrote :

Ok, here's a patched provided at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=728361#224

Can someone take a look at it and comment? Does anybody actually care?

Changed in lightdm:
assignee: nobody → Robert Ancell (robert-ancell)
summary: - no more suspend/reboot/hibernate in GNOME/Xfce since 1.8
+ no consolekit session created when logind session available
Revision history for this message
Robert Ancell (robert-ancell) wrote :

I'm not an expert but I *think* at some point you could get logind to run a ConsoleKit interface for backwards compatibility. I don't know if there's any side effects running both at once.

I think you'll need to check with the logind developers what the recommended behaviour is.

The patch makes sense to me if this is allowed.

Changed in lightdm:
status: New → Triaged
importance: Undecided → Medium
Changed in lightdm (Debian):
status: Confirmed → Fix Released
Changed in lightdm (Debian):
status: Fix Released → Confirmed
Changed in lightdm (Debian):
status: Confirmed → Fix Released
Changed in lightdm (Debian):
status: Fix Released → Confirmed
Changed in lightdm (Debian):
status: Confirmed → Fix Released
Changed in lightdm:
assignee: Robert Ancell (robert-ancell) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.