Bug 446311

Summary: Kicked back tty right after login on Wayland
Product: [Plasma] plasmashell Reporter: Colin Gauvin <colin>
Component: Startup processAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: kde, nate, plasma-bugs-null
Priority: NOR Keywords: wayland-only
Version First Reported In: 5.23.3   
Target Milestone: 1.0   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Colin Gauvin 2021-12-01 06:34:30 UTC
SUMMARY
I apologize if this isn't a KWin bug, at the moment, I'm not totally sure if it belongs to KWin, SDDM, or the kernel. 


***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Boot to desktop with SDDM defaulting to Wayland


OBSERVED RESULT
Plasma loads for 5-10 seconds. Applets load, mouse cursor can move. Any auto starting windows appear. Then all of Plasma disappears and the screen just shows a default tty. Logging into the tty and running `sudo systemctl sddm start` starts SDDM and goes to the login screen, at which point things work normally. X11 doesn't have this issue at all. 

EXPECTED RESULT
Desktop should not disappear/crash

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma:  openSUSE with 5.15.5-1-default (64-bit) + Wayland
(available in About System)
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Running an AMD 6900 XT, 2x monitors each 1440p, no scaling applied. Journal message is "The Wayland connection broke. Did the Wayland compositor die?" for all open apps (from what I can tell). Switching to lightdm solves the issue, so I'm not sure if it's an SDDM issue, or KWin.
Comment 1 Nate Graham 2021-12-01 20:33:10 UTC
Sounds like KWin crashed. Can you get a backtrace of kwin_wayland? the `coredumpctl` command-line utility might help. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl
Comment 2 Colin Gauvin 2021-12-14 21:18:03 UTC
Sorry for the delay - I just had my first child last week so it's been rather hectic. 

`coredumpctl` says `No coredumps found` (regardless of running as user or root). Checking through the journal entries and trying to figure out what's relevant here, it looks like it might just be closing the session? 


```sddm-helper[1694] [PAM] Closing session
ksmserver[1934] The X11 connection broke (error 1). Did the X11 server die?
kdeinit5[1921] kdeinit5: Fatal IO error: client killed
kdeinit5[1921] kdeinit5: sending SIGHUP to children.
sddm-helper[1694] pam_unix(sddm-autologin:session): session closed for user colin
sddm-helper[1694] [PAM] Ended.
kdeinit5[1921] kdeinit5: sending SIGTERM to children.
kdeinit5[1921] kdeinit5: Exit.
sddm[1474] Auth: sddm-helper exited with 1
systemd-logind[1149] Session 1 logged out. Waiting for processes to exit.
startplasma-way[1858] "kdeinit5_shutdown" () exited with code 255
systemd[1] systemd-rfkill.service: Deactivated successfully.
kded5[1931] plasma-nm: Network connectivity limited, scheduling notification
kded5[1931] The Wayland connection broke. Did the Wayland compositor die?
[...] (bluetooth stuff, akonadi stuff)
systemd[1] Reached target Multi-User System.
systemd[1] Reached target Graphical Interface.```

I'm not sure what exactly I'm looking at here. Is this the init process terminating, and that's what all the exiting is in the journal, or is this my actual user session crashing/closing?
Comment 3 Nate Graham 2021-12-14 22:32:49 UTC
Congratulations! The two best pieces of parenting advice I can offer are:
1. Be patient
2. Don't listen to anyone's parenting advice as it's specific to them and their kids, and you and your kids are different

Yes, these are contradictory. Welcome to parenting. :) 

As for the bug here, it sounds like kwin_wayland is quitting, not crashing. That's odd. Seems like something in the session code is making everything quit.
Comment 4 Colin Gauvin 2021-12-14 22:45:45 UTC
(In reply to Nate Graham from comment #3)
> Congratulations! The two best pieces of parenting advice I can offer are:
> 1. Be patient
> 2. Don't listen to anyone's parenting advice as it's specific to them and
> their kids, and you and your kids are different
> 
> Yes, these are contradictory. Welcome to parenting. :) 
> 
Haha, thanks!

> As for the bug here, it sounds like kwin_wayland is quitting, not crashing.
> That's odd. Seems like something in the session code is making everything
> quit.
Should I open this in openSUSE bug reports them? It's weird to me that lightdm doesn't have this issue.
Comment 5 Nate Graham 2021-12-15 15:54:54 UTC
Could be SDDM then, or it could be in how ksmserver is interacting with it. I don't have enough expertise to debug any further. Hopefully a developer can help.
Comment 6 Nate Graham 2022-05-25 17:34:46 UTC
Can you try again with the Plasma 5.25 beta or the 5.25 final release in a month? Thanks!
Comment 7 Colin Gauvin 2022-05-29 20:34:30 UTC
I will check again when 5.25 gets pushed to Tumbleweed.
Comment 8 Bug Janitor Service 2022-06-13 04:35:19 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Colin Gauvin 2022-06-15 02:40:37 UTC
Still happening on openSUSE Tumbleweed 20220613 with Plasma 5.25.0, Frameworks 5.94.0, Kernel 5.18.2-1-default (64 bit) and Wayland. 

I did discover that disabling auto-login for SDDM and instead letting it boot to the login screen, and then manually entering my password, does not boot me back to tty.
Comment 10 Colin Gauvin 2023-03-18 21:52:16 UTC
This has stopped happening. Not sure when because I was on X11 for a while, but on Plasma 5.27.2, Frameworks 5.104.0, Qt 5.15.8, Kernel 6.2.1-1-default (64 bit) Wayland, openSUSE Tumbleweed 20230316, this bug has vanished!

Well done to whomever fixed it.