Bug 431817 - KDE4 + gdm = Logout only (no Shutdown, Restart)
KDE4 + gdm = Logout only (no Shutdown, Restart)
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: kdebase-workspace (Show other bugs)
rawhide
All Linux
low Severity urgent
: ---
: ---
Assigned To: Kevin Kofler
Fedora Extras Quality Assurance
http://forums.fedoraforum.org/showthr...
:
: 431815 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-06 22:11 EST by Jags FL
Modified: 2008-03-31 09:08 EDT (History)
9 users (show)

See Also:
Fixed In Version: 4.0.3-3.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-31 09:08:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Switch user screenshot (21.49 KB, image/png)
2008-03-27 10:43 EDT, Adrian "Adi1981" P.
no flags Details

  None (edit)
Description Jags FL 2008-02-06 22:11:13 EST
Description of problem:

In Fedora 9 Alpha - KDE 4, when I click > Leave > Shutdown > the screen turns
blue to black and stays at "Logout" or "Cancel"

Also there's NO shutdown option in GNOME. Under "System" I can ONLY "Log Out" no
option to shut down / restart. 

The only way I can shutdown is > Terminal > poweroff ( in GNOME / KDE 4)



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Kevin Kofler 2008-02-06 22:17:28 EST
Hmmm, wait a minute: are you using KDM or GDM? (If you installed from the DVD 
and didn't explicitly set DISPLAYMANAGER="KDE" in /etc/sysconfig/desktop, 
you're using GDM.) If it's GDM, I'll reassign to them. Fedora 9 alpha ships a 
rewritten GDM which is still missing lots of things.
Comment 2 Kevin Kofler 2008-02-06 23:06:13 EST
*** Bug 431815 has been marked as a duplicate of this bug. ***
Comment 3 Jason Farrell 2008-03-25 18:56:16 EDT
This is also the case in F9-beta.
"Leave > System > Restart|Shutdown" only allows you the option to "Logout". You
can't actually reboot from KDE in one step anymore; have to restart/shutdown
from GDM after logging out.
Comment 4 Kevin Kofler 2008-03-25 19:17:00 EDT
That's undoubtedly due to the new GDM. Jon McCann: anything we can/should do to 
make this work?
Comment 5 Rex Dieter 2008-03-25 20:16:56 EDT
fwiw, works with kdm/kde4
Comment 6 Adrian "Adi1981" P. 2008-03-27 10:42:35 EDT
I'm not sure if it's really gdm fault - when earlier I was using F9 rawhide, i
didn't have gdm at all (was using only kdm), and I didn't have reboot/shutdown
option when leaving KDE also. But i thought that i've something messed up with
my system. Now when i've done clean install of F9b, i still have only logout
option in KDE. In gnome everything works fine. Also second thing when trying to
switch users. When i'll choose "Switch user" from K menu, it throws me to
krunner with "SESSIONS" and "no available sessions" → see attached screenshot.
Comment 7 Adrian "Adi1981" P. 2008-03-27 10:43:32 EDT
Created attachment 299334 [details]
Switch user screenshot
Comment 8 Rex Dieter 2008-03-27 12:26:02 EDT
Please, separate bugs for separate issues (switch users...)

FWIW, shutdown/restart with kde4/kdm worksforme (updated to rawhide as of 03/26).

I'll try gdm here in a sec...
Comment 9 Rex Dieter 2008-03-27 12:41:11 EDT
Confirmed, kde(4) + gdm is limited to logout only (rats, broken, again).
Comment 10 Rex Dieter 2008-03-27 12:47:20 EDT
grepping kdebase-workspace src... it would appear gdm is no longer using any of:
/var/run/gdm_socket
/tmp/.gdm_socket

gdm gurus, how is a DE to communicate w/gdm now?
Comment 11 Adrian "Adi1981" P. 2008-03-27 21:36:34 EDT
Well i wrote about switch user here, because i supposed that problems can be
related. Today i have removed gdm, and probably this solved both problems -
shutdown/reboot and switch user. Strange is, that before F9b i had daily rawhide
without gdm installed (or at least i'm almost sure about it), and situation was
similiar. Anyway removing gdm solves temporary both problems.
Comment 12 Kevin Kofler 2008-03-27 23:37:16 EDT
As far as I can tell, system stop/restart is now supposed to be requested from 
ConsoleKit, not GDM.

See how GDM itself does this:
http://svn.gnome.org/viewvc/gdm/trunk/gui/simple-greeter/gdm-greeter-login-window.c?revision=6076&view=markup
(try_system_stop, try_system_restart).

To the GDM maintainers (and the maintainers of any other piece of system 
infrastructure which affects KDE): it would be nice if I wouldn't have to 
figure out this sort of changes by looking at your source code...
Comment 13 Kevin Kofler 2008-03-27 23:54:32 EDT
Hmmm, is it safe to ask ConsoleKit for a halt or restart from within a session? 
As far as I can tell, it just runs /sbin/shutdown as root (after checking with 
PolicyKit if the user requesting it is allowed to do that), with no attempts to 
close running sessions properly at all.

Here's the interface in any case:
<node name="/org/freedesktop/ConsoleKit/Manager">
  <interface name="org.freedesktop.ConsoleKit.Manager">
    <method name="Restart">
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
    </method>
    <method name="Stop">
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
    </method>
Comment 14 Matthias Clasen 2008-03-28 00:44:50 EDT
The way this is done on the gnome side is that the panel asks the session
manager to save the session, before asking ck to shut down
Comment 15 Kevin Kofler 2008-03-29 02:04:45 EDT
Reassigning to kdebase-workspace and confirming. I'm going to take a look at 
this, if I start getting something done, I'll set it to ON_DEV.
Comment 16 Kevin Kofler 2008-03-29 02:25:12 EDT
This is how GNOME does it (yes, a Fedora-specific patch):
http://cvs.fedoraproject.org/viewcvs/rpms/gnome-panel/devel/gnome-panel-2.22.0-ck-shutdown.patch?rev=1.1&view=markup
Comment 17 Kevin Kofler 2008-03-29 03:22:47 EDT
As far as I can tell, KDE asks the KSMServer to shutdown, which saves and kills 
the session and only then asks the DM to shutdown. So it's safe to just ask 
ConsoleKit to shutdown instead if no valid DM is found (we don't have to add 
session saving like the GNOME patch does because KDE already does that anyway). 
I'll implement exactly that.
Comment 18 Kevin Kofler 2008-03-29 04:26:57 EDT
Should be fixed in kdebase-workspace-4.0.3-3.fc9. Please test!
http://koji.fedoraproject.org/koji/buildinfo?buildID=44225

For developers, here's the patch I'm using:
http://cvs.fedoraproject.org/viewcvs/rpms/kdebase-workspace/devel/kdebase-workspace-4.0.3-ck-shutdown.patch?rev=1.1&view=markup
This is not perfect (e.g. no PolicyKit integration, i.e. no support for 
authenticating if PolicyKit requires it), but for the most common use case 
(only one user logged in at a time, default ConsoleKit policy), it should work.

The change should not affect KDM users at all because my patch will still 
prefer shutting down the traditional way (through a DM) where possible. It will 
only try using ConsoleKit under the new GDM or with no DM at all (e.g. startx).

Note that this fix is for shutdown and restart only, switch user is still not 
supported and I'm not sure the new GDM supports switching users the KDE way at 
all. (GDM does fast user switching differently, the old version could be coaxed 
to work the KDE way, the new one probably can't.)
Comment 19 Ngo Than 2008-03-31 05:59:46 EDT
This issue is happend in all KDE version. I have taken a look at this patch, 
it should fix the problem.
Comment 20 Kevin Kofler 2008-03-31 06:05:30 EDT
> This issue is happend in all KDE version.

Of course, KDE 3 can't shutdown/restart with GDM 2.22 either, but who wants to 
use KDE 3 with GDM 2.22? F8 only has GDM 2.20, F9 only has KDE 4.
Comment 21 Rex Dieter 2008-03-31 09:07:09 EDT
confirmed, kdebase-workspace-4.0.3-3.fc9 works as advertised.
Comment 22 Kevin Kofler 2008-03-31 09:08:01 EDT
Thanks Rex!

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