Bug 1929643 - logout after switch returns the user to console instead of sddm
Summary: logout after switch returns the user to console instead of sddm
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: sddm
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Martin Bříza
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedBlocker
Depends On:
Blocks: F34FinalBlocker, FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2021-02-17 11:16 UTC by Kamil Páral
Modified: 2021-04-09 18:05 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)
Scenario 1 video (2.92 MB, video/webm)
2021-02-17 11:18 UTC, Kamil Páral
no flags Details
Scenario 1 journal (312.92 KB, text/plain)
2021-02-17 11:19 UTC, Kamil Páral
no flags Details
Scenario 1 journal - priority notice and higher (53.91 KB, text/plain)
2021-02-17 11:23 UTC, Kamil Páral
no flags Details
Scenario 2 video (4.66 MB, video/webm)
2021-02-17 11:24 UTC, Kamil Páral
no flags Details
Scenario 2 journal (376.34 KB, text/plain)
2021-02-17 11:25 UTC, Kamil Páral
no flags Details
Scenario 2 journal - priority notice and higher (87.39 KB, text/plain)
2021-02-17 11:25 UTC, Kamil Páral
no flags Details
Scenario 3 video (4.60 MB, video/webm)
2021-02-17 11:26 UTC, Kamil Páral
no flags Details
Scenario 3 journal (406.27 KB, text/plain)
2021-02-17 11:26 UTC, Kamil Páral
no flags Details
Scenario 3 journal - priority notice and higher (100.39 KB, text/plain)
2021-02-17 11:27 UTC, Kamil Páral
no flags Details
rpm -qa (58.66 KB, text/plain)
2021-02-17 11:28 UTC, Kamil Páral
no flags Details
rpm -qa from today (74.33 KB, text/plain)
2021-03-29 18:33 UTC, Geraldo Simião
no flags Details
coredumpctl from plasma wayland attempt (2.00 KB, text/plain)
2021-03-29 19:29 UTC, Geraldo Simião
no flags Details
drkonki kcrash report (1.40 KB, text/plain)
2021-03-29 19:33 UTC, Geraldo Simião
no flags Details


Links
System ID Private Priority Status Summary Last Updated
KDE Software Compilation 435389 0 NOR UNCONFIRMED switch user fails 2021-04-05 17:28:09 UTC

Description Kamil Páral 2021-02-17 11:16:53 UTC
Description of problem:
On F34 KDE, I found a problem with logging out, after the "user switch" option has been used (even when no user has been actually switched). The outcome is that the user is switched to console - either to tty2 with a working text login prompt, or to tty1 where only a blinking cursor appears (no login prompt). In all cases, if the user is no power user, they'll have no idea what to do or how to even reboot the system safely.

I found several different scenarios how to cause the problem, but I decided to report all of them into this single bug, because I believe the root cause is probably the same for all of them, it's just triggered differently.

The first scenario can easily occur when you misclick a button (choose Switch User instead of Log Out). The second and third scenario can easily occur when user1 lets user2 to use the computer for a short while (like checking her email).

Please see below the attached videos, reproduction steps, and logs.

In all those scenarios, I see a suspicious error in the journal:

> sddm[858]: Failed to read display number from pipe
> sddm[858]: Could not start Display server on vt 2


Version-Release number of selected component (if applicable):
Fedora-KDE-Live-x86_64-34-20210215.n.0.iso
sddm-0.19.0-7.fc34.x86_64
plasma-workspace-5.21.0-1.fc34.x86_64
kf5-plasma-5.79.0-2.fc34.x86_64
dbus-1.12.20-3.fc34.x86_64
dbus-broker-26-2.fc34.x86_64
systemd-247.3-1.fc34.x86_64
kernel-5.11.0-0.rc7.149.fc34.x86_64

How reproducible:
always

Steps to Reproduce:
will be provided for each use case individually, see comments below

Comment 1 Kamil Páral 2021-02-17 11:18:48 UTC
Created attachment 1757527 [details]
Scenario 1 video

Scenario 1) A single user switch and logout

1. Log in using user1
2. KDE menu -> Leave -> Switch User
3. Log in back to the user1 session (don't switch the user)
4. KDE menu -> Leave -> Log Out -> OK
5. You'll end up on tty2 with a text login prompt. On tty3-tty6 there are also text login prompts. On tty1 there is only a blinking cursor. Sddm is nowhere to be found.

See the attached video in this comment, and logs below.

Comment 2 Kamil Páral 2021-02-17 11:19:39 UTC
Created attachment 1757528 [details]
Scenario 1 journal

Comment 3 Kamil Páral 2021-02-17 11:23:28 UTC
Created attachment 1757529 [details]
Scenario 1 journal - priority notice and higher

Comment 4 Kamil Páral 2021-02-17 11:24:19 UTC
Created attachment 1757530 [details]
Scenario 2 video

Scenario 2) Two users switch, the first logout fails

1. Log in using user1
2. KDE menu -> Leave -> Switch User
3. Switch User
4. Log in using user2
5. KDE menu -> Leave -> Log Out -> OK
# there seems to be a race which will determine whether Scenario 2) or 3) will happen
6. You'll end up on some tty (perhaps tty4) with just a text blinking cursor. If you're a power user and know how to use Ctrl+Alt+Fn, you might be able to find a running sddm on a different tty. 

See the attached video in this comment, and logs below.

Comment 5 Kamil Páral 2021-02-17 11:25:17 UTC
Created attachment 1757531 [details]
Scenario 2 journal

Comment 6 Kamil Páral 2021-02-17 11:25:36 UTC
Created attachment 1757532 [details]
Scenario 2 journal - priority notice and higher

Comment 7 Kamil Páral 2021-02-17 11:26:24 UTC
Created attachment 1757533 [details]
Scenario 3 video

Scenario 3) Two users switch, the second logout fails

1. Log in using user1
2. KDE menu -> Leave -> Switch User
3. Switch User
4. Log in using user2
5. KDE menu -> Leave -> Log Out -> OK
# there seems to be a race which will determine whether Scenario 2) or 3) will happen
6. Return into the existing session of user1
7. KDE menu -> Leave -> Log Out -> OK
8. You'll end up on tty2 with a text login prompt. On tty3-tty6 there are also text login prompts. On tty1 there is only a blinking cursor. Sddm is nowhere to be found. (Alternatively, I've also seen ending up on just a black screen, with no login prompt, and VT switching not working).

See the attached video in this comment, and logs below.

Comment 8 Kamil Páral 2021-02-17 11:26:52 UTC
Created attachment 1757534 [details]
Scenario 3 journal

Comment 9 Kamil Páral 2021-02-17 11:27:13 UTC
Created attachment 1757535 [details]
Scenario 3 journal - priority notice and higher

Comment 10 Kamil Páral 2021-02-17 11:28:16 UTC
Created attachment 1757536 [details]
rpm -qa

Comment 11 Kamil Páral 2021-02-19 14:57:52 UTC
I nominate this to be a F34 Final blocker. It is somewhere in between these two criteria:
"Shutting down, rebooting, logging in and logging out must work using standard console commands and the mechanisms offered (if any) by all release-blocking desktops. "
https://fedoraproject.org/wiki/Fedora_34_Beta_Release_Criteria#Shutdown.2C_reboot.2C_login.2C_logout
"User switching must work using the mechanisms offered (if any) by all release-blocking desktops in their default configuration. "
https://fedoraproject.org/wiki/Fedora_34_Final_Release_Criteria#User_switching

Login/logout works, as long as you don't attempt to switch. Switching works, as long as you don't attempt to log out... :-)

Comment 12 Geoffrey Marr 2021-02-22 20:16:48 UTC
Discussed during the 2021-02-22 blocker review meeting: [0]

The decision to classify this bug as an "AcceptedBlocker (Final)" was made as it violates the following criteria:

"Shutting down, rebooting, logging in and logging out must work..." and "User switching must work using the mechanisms offered...". It seems reasonable to expect both to work together.

[0] https://meetbot.fedoraproject.org/fedora-blocker-review/2021-02-22/f34-blocker-review.2021-02-22-17.07.txt

Comment 13 Adam Williamson 2021-03-27 00:59:58 UTC
Martin, Rex - where are we with this? This is an accepted F34 Final blocker, and Final freeze is coming up April 6. I'd like us to be out in front of accepted blockers at this point. Thanks!

Comment 14 Geraldo Simião 2021-03-29 18:29:01 UTC
I just tried to reproduce this bug here on my F34kde and it all worked fine, no bug. Will attach my output of rpm -qa to this ticket. Tried only in X11 sessions so far, will test on wayland later.

Tested the scenarios with two users, firts is mine default user (adm) and second I created as regular user.

Fedora 34 (KDE Plasma Prerelease) x86_64 / Kernel: 5.11.10-300.fc34.x86_64 / Plasma 5.21.3 / Qt: 5.15.2 / Frameworks: 5.80.0

sddm-0.19.0-8.fc34.x86_64 / sddm-breeze-5.21.3-1.fc34.noarch / sddm-kcm-5.21.3-1.fc34.x86_64

I'm ready to send more info if needed.

:)

Comment 15 Geraldo Simião 2021-03-29 18:33:02 UTC
Created attachment 1767441 [details]
rpm -qa from today

Comment 16 Geraldo Simião 2021-03-29 19:24:49 UTC
Tried on plasma wayland sessions... first and second time I log in and log out worked fine, but when I tried to switch users it didn't. SDDM freezed so badly that my only way out was a restart.
then I tried several more times (6 to be honest) and it worked on 4 and had problems on 2 of them, but without the terrible freeze I experienced before.
So, it apears this bug show itself when we use plasma wayland sessions.

Comment 17 Geraldo Simião 2021-03-29 19:29:46 UTC
Created attachment 1767460 [details]
coredumpctl from plasma wayland attempt

Comment 18 Geraldo Simião 2021-03-29 19:33:12 UTC
Created attachment 1767462 [details]
drkonki kcrash report

Comment 19 Geraldo Simião 2021-03-29 19:46:37 UTC
Forgot to say: I tested with two monitors (laptop and second monitor)

Comment 20 Rex Dieter 2021-04-05 17:28:12 UTC
bug filed upstream,
https://bugs.kde.org/show_bug.cgi?id=435389

Comment 21 Rex Dieter 2021-04-08 14:57:40 UTC
Plasma upstream confirmed issue.

The switch to systemd user sessions (and wayland) improvied some things (lingering processes on logout in particular), but seems we still have some steps to go.

As upstream has documented this now as a known unresolved issue,
https://community.kde.org/Plasma/Wayland_Showstoppers#Session_management
I think there's not much we can do but live with it for now.

Comment 22 Ben Cotton 2021-04-09 18:05:00 UTC
In chat, Nate Graham said they hope to have a fix by early next week. As a backup plan, we could consider disabling user switching in our sddm package until this is fixed.


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