hardware actions disabled after first logout
Bug #1264838 reported by
Yves-Alexis Perez
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
LightDM GTK Greeter |
Fix Released
|
Undecided
|
Simon Steinbeiß | ||
lightdm-gtk-greeter (Debian) |
Confirmed
|
Unknown
|
Bug Description
Hi,
a Debian user reported a glitch in lightdm-gtk-greeter running on systemd/logind systems. It seems that a race condition happens when an user logs out, and that when the (second) lightdm-gtk-greeter starts and builds the hardware action menu, a logind session is still present for the old lightdm, and the various actions are marked as disabled.
Rebuilding the menu later seems to fix the problem. At tentative patch is present in the downstream bug report at http://
Changed in lightdm-gtk-greeter (Debian): | |
status: | Unknown → Confirmed |
Changed in lightdm-gtk-greeter: | |
status: | In Progress → Fix Released |
To post a comment you must log in.
Salut Yves-Alexis, cgit.freedeskto p.org/systemd/ systemd/ commit/ src/login/ org.freedesktop .login1. policy. in?id=299404a19 f26aa4f203042d8 285ee0b7afa5bf4 0. FWIW, hibernate is still affected, because it is seemingly more "evil" than those other actions: https:/ /bugs.freedeskt op.org/ show_bug. cgi?id= 70237 I'm not sure how I lose more data when hibernating then when rebooting a running session...)
I read through the long debian bugreport now. We know that the logind-policies are what is at fault partly (we contacted the systemd maintainers upstream and they changed the one related to reboot: http://
I read the patch and I understand what it's trying to do, but I currently see an issues here:
We never know when the user-session actually exits (finally), giving way to some of the power-actions (especially the multi-user ones, as set in the logind-policy). Could take 1sec, 5secs or up to 30secs (at least what I have heard of user reports). So even if the power-menu would check each time it gets clicked whether it is allowed to show some action, it might be that a few seconds later, more actions are available.
Anyway, with logind-policies changed to how they're now, ppl should be able to suspend/reboot or whatever from the greeter by default. So I think it is ok to only check the can_restart etc. stuff from lightdm once when the greeter is launched. What I plan to do though is to run a check once the shutdown/reboot dialogs are shown to see whether there is >=1 user logged in, and show a warning message that shutting down now may cause those users to lose data.
I do agree with the reporter of the upstream bug against the hibernate-policy of logind: why would you disallow hibernate (or restart or shutdown) on a computer where ppl have physical access when they can always pull the power-plug or hold down the power-button for >10secs (or even just press it once, in case logind's settings allow it to handle the power-button), etc...