Bug 356945

Summary: Selecting "new session" from kickoff menu has no effect
Product: [Unmaintained] ksmserver Reporter: Fabian Köster <koesterreich>
Component: generalAssignee: Lubos Lunak <l.lunak>
Status: RESOLVED FIXED    
Severity: normal CC: kde, tkedwards, wbauer1
Priority: NOR    
Version: 5.5.1   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In: 5.5.5
Sentry Crash Report:

Description Fabian Köster 2015-12-20 11:54:18 UTC
When I try to launch a new session via the KDE menu ("kickoff" or what is it called nowadays?) the dialog "Switch user" appears with two buttons "New session" and "Cancel". When selecting "New session" the dialog disappears, but nothing else happens.

Starting new sessions (and switching between existing ones) via the user-switcher-plasmoid works perfectly fine btw.

Reproducible: Always

Steps to Reproduce:
1. Open KDE menu
2. Select tab "Leave"
3. Choose "Session" -> "New Session"
4. In the opened dialog choose "New Session"

Actual Results:  
Nothing happens

Expected Results:  
The SDDM screen for creating a new session should appear.
Comment 1 Wolfgang Bauer 2016-02-22 11:25:39 UTC
This seems to be related to the screen locker.

Can you confirm that it works if you disable it?
That "fixes" the problem here.
Comment 2 Fabian Köster 2016-02-22 11:45:50 UTC
(In reply to Wolfgang Bauer from comment #1)
> This seems to be related to the screen locker.
> 
> Can you confirm that it works if you disable it?
> That "fixes" the problem here.

No, disabling the screen locker does not change anything here. New session still has no effect.
Comment 3 Wolfgang Bauer 2016-02-22 12:16:08 UTC
(In reply to Fabian Köster from comment #2)
> No, disabling the screen locker does not change anything here. New session
> still has no effect.

Hm, this does work here.
But you might have to logout/login first.

Another workaround would be to lock the screen (e.g. via Ctrl+Alt+L) and click on "New Session" there.
This works for me regardless whether the screen locker is turned on or off.
Comment 4 Kai Uwe Broulik 2016-02-22 19:05:50 UTC
Ok I found the reason. When you have lock screen enabled it first asks whether the screen is already locked, this happens async but by the time the reply arrives, the switcher is already destroyed and the slot is never invoked.

I was unable to reproduce the crashes mentioned, however.
Comment 5 Wolfgang Bauer 2016-02-22 22:09:13 UTC
(In reply to Kai Uwe Broulik from comment #4)
> I was unable to reproduce the crashes mentioned, however.

It reliably happens here when opening the user switching dialog a second time, regardless whether the screen locker is turned on or off.
Bug#357413 has a backtrace if it helps...
Comment 6 Fabian Köster 2016-02-23 07:03:55 UTC
(In reply to Wolfgang Bauer from comment #5)
> (In reply to Kai Uwe Broulik from comment #4)
> > I was unable to reproduce the crashes mentioned, however.

I am sorry, but which crashes? My original bug report does not mention any crashes.

> It reliably happens here when opening the user switching dialog a second
> time, regardless whether the screen locker is turned on or off.
> Bug#357413 has a backtrace if it helps...

Does not happen to me, so probably a differnt bug than this one.
Comment 7 Wolfgang Bauer 2016-02-23 09:19:21 UTC
(In reply to Fabian Köster from comment #6)
> (In reply to Wolfgang Bauer from comment #5)
> > (In reply to Kai Uwe Broulik from comment #4)
> > > I was unable to reproduce the crashes mentioned, however.
> 
> I am sorry, but which crashes? My original bug report does not mention any
> crashes.

The crashes reported as bug#357413.

Kai Uwe Broulik probably referred to the discussion in this openSUSE bug report, where both problems were reported at once:
http://bugzilla.opensuse.org/show_bug.cgi?id=967538

> > It reliably happens here when opening the user switching dialog a second
> > time, regardless whether the screen locker is turned on or off.
> > Bug#357413 has a backtrace if it helps...
> 
> Does not happen to me, so probably a differnt bug than this one.

Yes, bug#357413 as mentioned.
Comment 8 Fabian Köster 2016-02-23 10:51:10 UTC
(In reply to Wolfgang Bauer from comment #7)
> (In reply to Fabian Köster from comment #6)
> > (In reply to Wolfgang Bauer from comment #5)
> > > (In reply to Kai Uwe Broulik from comment #4)
> > > > I was unable to reproduce the crashes mentioned, however.
> > 
> > I am sorry, but which crashes? My original bug report does not mention any
> > crashes.
> 
> The crashes reported as bug#357413.
> 
> Kai Uwe Broulik probably referred to the discussion in this openSUSE bug
> report, where both problems were reported at once:
> http://bugzilla.opensuse.org/show_bug.cgi?id=967538
> 
> > > It reliably happens here when opening the user switching dialog a second
> > > time, regardless whether the screen locker is turned on or off.
> > > Bug#357413 has a backtrace if it helps...
> > 
> > Does not happen to me, so probably a differnt bug than this one.
> 
> Yes, bug#357413 as mentioned.

I see, thanks for explaining :-)
Comment 9 Kai Uwe Broulik 2016-02-23 16:57:19 UTC
*** Bug 358341 has been marked as a duplicate of this bug. ***
Comment 10 Kai Uwe Broulik 2016-02-24 14:06:55 UTC
Please give a try to https://phabricator.kde.org/D1020
Comment 11 Wolfgang Bauer 2016-02-24 23:07:25 UTC
(In reply to Kai Uwe Broulik from comment #10)
> Please give a try to https://phabricator.kde.org/D1020
Yes, this fixes it for me.

The crashes still remain though, but let's keep them out here, I'd say.
Comment 12 Kai Uwe Broulik 2016-02-25 21:17:12 UTC
Git commit 7a0096ba99d7a71ae9f45d7c0011d0ebb1eae23d by Kai Uwe Broulik.
Committed on 25/02/2016 at 21:16.
Pushed by broulik into branch 'Plasma/5.5'.

[User Switcher] Fix session switching when automatic screen locking is enabled

When automatic screen locking is enabled, we want to ensure the screen is fully locked
before we switch sessions or go to the login screen to avoid brief exposure of the desktop
when we return.

This check happens asynchronously and because the User Switcher dialog closes immediately
after issuing the switch request, the SessionsModel is already destroyed and the reply is never
actually processed.
FIXED-IN: 5.5.5

Differential Revision: https://phabricator.kde.org/D1020

M  +6    -0    components/sessionsprivate/sessionsmodel.cpp
M  +3    -1    components/sessionsprivate/sessionsmodel.h
M  +5    -2    lookandfeel/contents/userswitcher/UserSwitcher.qml

http://commits.kde.org/plasma-workspace/7a0096ba99d7a71ae9f45d7c0011d0ebb1eae23d