Bug 9106 - Xfce (with lightdm) - Shutdown and Restart buttons only logout me
Summary: Xfce (with lightdm) - Shutdown and Restart buttons only logout me
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-18 18:03 CET by Olivier Mondoloni
Modified: 2013-04-10 10:48 CEST (History)
2 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments
Root password to shutdown the computer (630.01 KB, image/png)
2013-04-02 17:48 CEST, Olivier Mondoloni
Details

Description Olivier Mondoloni 2013-02-18 18:03:34 CET
Description of problem:
When I am on my xfce desktop, it is impossible for me to directly shutdown or restart the computer using the right buttons.
When I try to shutdown or restart the computer from the xfce desktop, I am only logout.
However, it is possible to shutdown or restart at the login screen (lightdm login prompt).
The suspend and hibernate buttons works correctly.

Version-Release number of selected component (if applicable):
Xfce 4.10 with Mageia Cauldron

How reproducible:

every time I want to restart or shutdown the computer from the xfce desktop.

Steps to Reproduce:
1. Mageia 3 minimal install (only Configuration et console utils programs )
2. urpmi task-xfce from the command line
3.

Possible workaround :
Use lxdm (with the lxpolkit package) instead of lightdm fix the problem

From the command line with a fresh installation :
urpmi lxdm lxpolkit lightdm-gtk-greeter hunspell-fr lib64lapack3 gnome-packagekit-common task-xfce
Comment 1 Olivier Mondoloni 2013-02-18 18:11:00 CET
I am sorry because I forget to mention that i am using a Mageia 3 beta 2 media to do fresh installation.
Manuel Hiebel 2013-02-19 02:09:39 CET

CC: (none) => fundawang, jani.valimaa

Comment 2 Olivier Mondoloni 2013-03-07 15:53:05 CET
No more news ?
One question.
Is it possible to choose between lxdm and lightdm and don't see lightdm as suggest package ?
For the moment, I am obliged to use --no-suggests before urpmi task-xfce in order to avoid the installation of lightdm .
Comment 3 Jani Välimaa 2013-03-07 16:04:28 CET
Haven't had time to investigate this yet. I'll try to find some time before mga3 release. :)

Currently we prefer lightdm with Xfce. That's why it's suggested. You can use urpmi with '--skip lightdm' if you don't want lightdm, but want other suggested pkgs.
Comment 4 Jani Välimaa 2013-03-09 14:41:10 CET
(In reply to Olivier Mondoloni from comment #2)
> No more news ?

I can reproduce this issue and seems like it's fixed in latest lightdm and/or lightdm-gtk-greeter release.

I've no time to hunt correct patches from upstream to lightdm and/or lightdm-gtk-greeter so I guess I'm going to update both to their latest versions, even they're tagged as unstable releases and we're pretty close to mga3 release. I've used latest versions locally without any issues so far and IMHO this nasty bug should be fixed.
Comment 5 Olivier Mondoloni 2013-03-09 20:10:45 CET
Thank you to have take time to look at this problem and to find a solution.
Comment 6 Jani Välimaa 2013-03-10 19:31:32 CET
Installed Xfce + lightdm today to one computer and all worked without any issues OOTB.

So I think this needs more digging and I will not update lightdm + greeter blindly to their latest versions, yet. If we can't find the real issue and the fix for it, we probably should add this issue to errata for mga3 and suggest to use another dm for workaround.
Comment 7 Olivier Mondoloni 2013-03-11 11:04:07 CET
What do you mean by OOTB ?
What the command line are you using to install xfce ?
I am ok for waiting and find what's wrong.
Comment 8 Jani Välimaa 2013-03-11 11:10:55 CET
OOTB = Out Of The Box.

Used latest x86_64 boot-nonfree.iso for Cauldron and graphical install. Selected task-xfce-minimal from individual package selection.
Comment 9 Jani Välimaa 2013-03-11 17:52:54 CET
Seems like reboot/shutdown isn't working if loginctl shows session for lightdm user after login. Dunno yet why session for lightdm user isn't always closed.

One can test this by looking if cmd 'loginctl' shows session for lightdm user. If yes, reboot/shutdown works only as logout. If there's no session, reboot/shutdown should work. One can also terminate session for lightdm user with cmd 'loginctl terminate-session <session id>' (session id can be found from loginctl cmd output) and after that reboot/shutdown should work as expected.
Comment 10 Jani Välimaa 2013-03-11 19:37:02 CET
(In reply to Jani Välimaa from comment #9)
> Seems like reboot/shutdown isn't working if loginctl shows session for
> lightdm user after login. Dunno yet why session for lightdm user isn't
> always closed.
> 

Noticed another weird thing. Lxpolkit should have asked authorization to reboot/shutdown as there's another session running. Cancelling this authorization acts like logout.
Comment 11 Olivier Mondoloni 2013-03-12 11:23:36 CET
I try loginctl terminate-session cmd and I have the same behaviour as yours.
When I terminate lightdm session, shutdown and reboot buttons works as expected.
I have also do a test with the couple lxpolkit with lightdm.
I also noticed the ask for an authorization to reboot/shutdown the computer.
Comment 12 Olivier Mondoloni 2013-03-27 22:27:45 CET
The last update of the lightdm package (1.4.1) doesn't fix the problem.
It's a pity !
Comment 13 Jani Välimaa 2013-04-01 18:49:03 CEST
I've narrowed down the problem a bit and seems like it's caused by the GTK3 version of lightdm-gtk-greeter. Dunno why, though. :(

I'll push later tonight lightdm-gtk-greeter with patches to build it with GTK2. Please test if it fixes your problem.
Comment 14 Olivier Mondoloni 2013-04-02 15:18:50 CEST
I made a test with the 1.3.1 version 6.mga3 revision of the lightdm-gtk-greeter package and now shutdown and rebooting from a xfce session works.
Thank you for your work.
Comment 15 Jani Välimaa 2013-04-02 15:33:02 CEST
Actually I've found the proper solution for this.

We need a patch [1] from upstream git to our systemd pkg. This patch adds session class option support to pam_systemd.so. After applying this patch we can pass class=greeter option to pam_systemd.so module in pam config of lightdm-greeter => greeter sessions are filtered out and it should be possible to reboot/shutdown the machine even if the session for lightdm user is there.

I've tested this locally for GTK2 and GTK3 greeter and it seems to be working. However, I'm not going to rebuild lightdm-gtk-greeter with GTK3 again for mga3. I'll add pkgs for both GTK2 and GTK3 greeter for mga4.

I've asked coling to apply the patch to our systemd.

[1] http://cgit.freedesktop.org/systemd/systemd/commit/?id=485507b8c031e0c75f43c4b4fce5a0082a812fbb
Comment 16 Olivier Mondoloni 2013-04-02 17:48:27 CEST
Created attachment 3682 [details]
Root password to shutdown the computer

Sorry to say that there is another problem.
The first time I relaunch my system no passwd has been asking to me to shutdown or reboot the computer but now I faced to this window.
This happend on a fresh Mageia 3 beta 4 Xfce install.
Comment 17 Jani Välimaa 2013-04-02 18:49:44 CEST
(In reply to Olivier Mondoloni from comment #16)
> Created attachment 3682 [details]
> Root password to shutdown the computer
> 
> Sorry to say that there is another problem.
> The first time I relaunch my system no passwd has been asking to me to
> shutdown or reboot the computer but now I faced to this window.
> This happend on a fresh Mageia 3 beta 4 Xfce install.

"Fixed" lightdm-gtk-greeter was pushed only after beta4 was released. So you need to update to get the "fixed" ligthdm-gtk-greeter.

However, when the patched systemd is available, I'll push lightdm with proper fix mentioned in comment 15. Just wait until this new lightdm is available.
Comment 18 Olivier Mondoloni 2013-04-03 15:23:35 CEST
Excuse-me, when I say a fresh Mageia 3 beta 4 install, I mean a fresh Mageia 3 beta 4 with an system update after.
Comment 19 Olivier Mondoloni 2013-04-10 01:54:21 CEST
Tonight, I update my XFCE Mageia 3 system and now all problems with shutdown and reboot are gone.
Thank you.
Comment 20 Jani Välimaa 2013-04-10 10:48:49 CEST
I'm closing this as FIXED then. Feel free to reopen if needed.

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.