[Pkg-xfce-devel] Bug#732623: possible explanation and patch proposal

Yves-Alexis Perez corsac at debian.org
Sun Dec 29 14:03:05 UTC 2013


control: reassign -1 lightdm-gtk-greeter
control: retitle -1 no hardware actions after first logout on systemd/logind systems
On Sat, Dec 28, 2013 at 03:45:45PM +0100, Pascal Dormeau wrote:
> Hi Yves-Alexis,
> 
> Please find hereafter an explanation of the problem based on my personal
> interpretation. Vincent has been very much involved in debugging so I
> CC him too.
> 
>  * What is going on :
> This happens when logind is running.
> Before logout, we have at least one logind user session and one
> logind lightdm session (implies that libpam-systemd is installed).
> At logout, lightdm immediately starts a new session (and runs a new
> lightdm-gtk-greeter process), then the former lightdm session is
> removed, and only then the user session is removed.
> So when the new lightdm-gtk-greeter process is launched, more than one
> logind session exists.
> lightdm-gtk-greeter checks if suspend, hibernate, restart, shutdown
> are allowed using the
> lightdm_get_can_suspend/hibernate/restart/shutdown() functions.
> If one of those actions is not allowed, it is hidden from the power
> menu, from beginning to end of the lightdm-gtk-greeter process.
> If logind is running, power actions are allowed according
> to /usr/share/polkit-1/actions/org.freedesktop.login1.policy.
> For multiple-sessions, restart and hibernate are
> allow_active "auth_admin_keep".
> So at logout we have temporary a multi-sessions configuration implying
> that hibernate and restart are not allowed. Because the power menu is
> static inside a given lightdm-gtk-greeter process, hibernate and
> restart remain forbidden even after only one lightdm session remains.
> The bug could be in the way the different logind sessions are removed
> and created at logout, but still, lightdm-gtk-greeter is unable to
> track session changes (for instance, if someone else logs into a
> VT).
> 
> * proposal
> The proposal is to check whether hibernate, restart, shutdown
> are allowed, only when the power menu is opened.
> The patch in attachment is doing this.
> But BIG WARNING:
> I spend only a couple of days digging into the GTK documentation
> available on the web, it's all new for me. It might be dirty.
> Check needed. Help also welcome for improvement (I guess there is a
> smarter way to avoid those 5 new GtkWidget objects).
> I run lightdm and lightdm-gtk-greteer with it, so far they behave as
> expected (in particular, if I log in a VT resulting into a multiple
> session situation, I can see the change in the menu).

Ok so in the end it's more like a race condition in the GTK+ greeter
(which might happen in other greeters though).

I'm reassigning to the correct package and will forward upstream.

Thanks for the investigation.

Regards,
-- 
Yves-Alexis Perez
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-xfce-devel/attachments/20131229/4e93ee57/attachment.sig>


More information about the Pkg-xfce-devel mailing list