Bug 1215962 - sddm fails when starting as a wayland client
Summary: sddm fails when starting as a wayland client
Status: CONFIRMED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: KDE Workspace (Plasma) (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: E-Mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-04 23:08 UTC by Shawn Dunn
Modified: 2024-03-17 21:17 UTC (History)
7 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Output of Journal, for failure condition (3.29 KB, text/plain)
2023-10-04 23:08 UTC, Shawn Dunn
Details
Full journaloutput for `rcxdm restart` (165.16 KB, text/plain)
2023-10-05 15:48 UTC, Shawn Dunn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shawn Dunn 2023-10-04 23:08:35 UTC
Created attachment 869927 [details]
Output of Journal, for failure condition

Setting an override in /etc/sddm.conf.d/10-wayland.conf for:

[General]
DisplayManager=wayland

I would expect to get sddm running as a wayland client, but it crashes with an SDDM::Auth::Helper_AUTH_ERROR

Please see attached log from the journal.
Comment 1 Fabian Vogt 2023-10-05 06:32:15 UTC
> Jumping to VT 1

That's a bit weird, VT 1 is usually a getty. If this was the issue then kwin would fail even earlier though.

Does it work if you rcxdm restart?
Comment 2 Shawn Dunn 2023-10-05 15:48:45 UTC
Created attachment 869942 [details]
Full journaloutput for `rcxdm restart`
Comment 3 Shawn Dunn 2023-10-05 15:49:37 UTC
running `rcxdm restart` results in a black screen, with a cursor in the upper left corner blinking.

I've attached the full journal output for that particular boot.
Comment 4 Neal Gompa 2024-01-24 00:56:12 UTC
Shawn tagged me into this and I did some digging. I suspect that this might be fallout from the utmp removal in Tumbleweed.

The only places where this error occur in the codebase are around its utmp code: https://github.com/sddm/sddm/blob/501129294be1487f753482c29949fc1c19ef340e/src/helper/HelperApp.cpp#L140-L165

I don't think we should be doing utmp logins/logouts when we're perfectly capable of using login1 when it's available...
Comment 5 Fabian Vogt 2024-01-24 07:53:35 UTC
(In reply to Neal Gompa from comment #4)
> Shawn tagged me into this and I did some digging. I suspect that this might
> be fallout from the utmp removal in Tumbleweed.
> 
> The only places where this error occur in the codebase are around its utmp
> code:
> https://github.com/sddm/sddm/blob/501129294be1487f753482c29949fc1c19ef340e/
> src/helper/HelperApp.cpp#L140-L165
> 
> I don't think we should be doing utmp logins/logouts when we're perfectly
> capable of using login1 when it's available...

On Tumbleweed yes, but pretty much everywhere else [buw]tmp still exists and gets read (wall etc.).

It also won't cause the helper to fail, it's only used to log failed and successful login attempts. Errors are logged but ignored.
Comment 6 Dmitry Kobelev 2024-01-27 17:04:53 UTC
Can reproduce bug. Some info from SDDM github: https://github.com/sddm/sddm/issues/1844
Comment 7 Thomas Rother 2024-03-16 13:16:15 UTC
Maybe this observation is related to this bug:

When you configure autologin on a current tumbleweed and select "wayland" for the user session in sddm, sddm will crash upon restart of the machine. I have this reproducible on three tumbleweed machines. 

The only way to go into a user session with wayland is with disabled autologin and a manual login from the user login screen.
Comment 8 Shawn Dunn 2024-03-16 15:20:30 UTC
(In reply to Thomas Rother from comment #7)
> Maybe this observation is related to this bug:
> 
> When you configure autologin on a current tumbleweed and select "wayland"
> for the user session in sddm, sddm will crash upon restart of the machine. I
> have this reproducible on three tumbleweed machines. 
> 
> The only way to go into a user session with wayland is with disabled
> autologin and a manual login from the user login screen.

No auto login here, never touch the stuff
Comment 9 Thomas Rother 2024-03-16 15:30:33 UTC
?? If you mean "security": the described machines are encrypted laptops. The equivalent for the "user login" is the LUKS password. In this usecase the kde autologin should be supported in kde6/qt6/wayland as it was before with kde5/qt5/xll. If not, this would be a regression, at least from the user perspective.
Comment 10 Fabian Vogt 2024-03-16 20:30:32 UTC
I guess bug 1221507 is the same as this
Comment 11 Shawn Dunn 2024-03-17 21:17:48 UTC
With the latest sddm-qt6 version 0.21.0, it appears to just be ignoring the configuration file in /etc/sddm.conf.d, when trying to set a wayland session, and defaulting to an X11 session.

Looking at the logs, it doesn't even appear to be trying to start a wayland session for sddm, with DisplayManager=wayland set.

Mar 17 14:10:38 mustang sddm[1480]: Initializing...
Mar 17 14:10:38 mustang sddm[1480]: Starting...
Mar 17 14:10:38 mustang sddm[1480]: Logind interface found
Mar 17 14:10:38 mustang sddm[1480]: Adding new display...
Mar 17 14:10:38 mustang sddm[1480]: Loaded empty theme configuration
Mar 17 14:10:38 mustang sddm[1480]: Xauthority path: "/run/sddm/xauth_TPeelf"
Mar 17 14:10:38 mustang sddm[1480]: Using VT 2
Mar 17 14:10:38 mustang sddm[1480]: Display server starting...
Mar 17 14:10:38 mustang sddm[1480]: Writing cookie to "/run/sddm/xauth_TPeelf"
Mar 17 14:10:38 mustang sddm[1480]: Running: /usr/bin/X -nolisten tcp -background none -seat seat0 vt2 -auth /run/sddm/xauth_TPeelf -noreset -displayfd 16
Mar 17 14:10:39 mustang sddm[1480]: Setting default cursor
Mar 17 14:10:39 mustang sddm[1480]: Running display setup script  "/usr/etc/X11/xdm/Xsetup"
Mar 17 14:10:39 mustang sddm[1480]: Display server started.
Mar 17 14:10:39 mustang sddm[1480]: Socket server starting...
Mar 17 14:10:39 mustang sddm[1480]: Socket server started.
Mar 17 14:10:39 mustang sddm[1480]: Loading theme configuration from "/usr/share/sddm/themes/breeze/theme.conf"
Mar 17 14:10:39 mustang sddm[1480]: Greeter starting...
Mar 17 14:10:39 mustang sddm-helper[1510]: [PAM] Starting...
Mar 17 14:10:39 mustang sddm-helper[1510]: [PAM] Authenticating...
Mar 17 14:10:39 mustang sddm-helper[1510]: [PAM] returning.
Mar 17 14:10:39 mustang systemd-logind[1156]: New session 1 of user sddm.
Mar 17 14:10:39 mustang (systemd)[1513]: pam_unix(systemd-user:session): session opened for user sddm(uid=471) by sddm(uid=0)
Mar 17 14:10:39 mustang systemd[1]: Started Session 1 of User sddm.
Mar 17 14:10:39 mustang sddm-helper[1510]: pam_unix(sddm-greeter:session): session opened for user sddm(uid=471) by sddm(uid=0)
Mar 17 14:10:39 mustang sddm-helper[1510]: pam_kwallet5(sddm-greeter:session): pam_kwallet5: pam_sm_open_session
Mar 17 14:10:39 mustang sddm-helper[1510]: pam_kwallet5(sddm-greeter:session): pam_kwallet5: open_session called without kwallet5_key
Mar 17 14:10:39 mustang sddm-helper[1510]: Writing cookie to "/tmp/xauth_RhbaQU"
Mar 17 14:10:39 mustang sddm-helper[1510]: Starting X11 session: "" "/usr/bin/sddm-greeter-qt6 --socket /tmp/sddm-:0-oScEPt --theme /usr/share/sddm/themes/breeze"
Mar 17 14:10:39 mustang sddm[1480]: Greeter session started successfully
Mar 17 14:10:39 mustang sddm-greeter-qt6[1533]: High-DPI autoscaling Enabled
Mar 17 14:10:39 mustang sddm-greeter-qt6[1533]: Reading from "/usr/local/share/wayland-sessions/plasmawayland.desktop"
Mar 17 14:10:39 mustang sddm-greeter-qt6[1533]: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop"
Mar 17 14:10:39 mustang sddm-greeter-qt6[1533]: Reading from "/usr/local/share/wayland-sessions/weston.desktop"
Mar 17 14:10:39 mustang sddm-greeter-qt6[1533]: Reading from "/usr/share/wayland-sessions/weston.desktop"
Mar 17 14:10:39 mustang sddm-greeter-qt6[1533]: Loading theme configuration from "/usr/share/sddm/themes/breeze/theme.conf"
Mar 17 14:10:39 mustang sddm-greeter-qt6[1533]: Connected to the daemon.
Mar 17 14:10:39 mustang sddm[1480]: Message received from greeter: Connect
Mar 17 14:10:39 mustang sddm-greeter-qt6[1533]: Loading file:///usr/share/sddm/themes/breeze/Main.qml...
Mar 17 14:10:39 mustang sddm-greeter-qt6[1533]: QObject: Cannot create children for a parent that is in a different thread.
Mar 17 14:10:39 mustang sddm-greeter-qt6[1533]: QObject: Cannot create children for a parent that is in a different thread.
Mar 17 14:10:39 mustang sddm-greeter-qt6[1533]: QObject: Cannot create children for a parent that is in a different thread.
Mar 17 14:10:39 mustang sddm-greeter-qt6[1533]: QObject: Cannot create children for a parent that is in a different thread.
Mar 17 14:10:39 mustang sddm-greeter-qt6[1533]: QObject: Cannot create children for a parent that is in a different thread.
Mar 17 14:10:39 mustang sddm-greeter-qt6[1533]: QObject: Cannot create children for a parent that is in a different thread.
Mar 17 14:10:40 mustang dbus-daemon[1148]: [system] Activating via systemd: service name='org.freedesktop.UDisks2' unit='udisks2.service' requested by ':1.19' (uid=471 pid=1533 comm="/usr/bin/sddm-greeter-qt6 --socket /tmp/sddm-:0-oS" label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
Mar 17 14:10:40 mustang dbus-daemon[1148]: [system] Activating via systemd: service name='org.freedesktop.UPower' unit='upower.service' requested by ':1.19' (uid=471 pid=1533 comm="/usr/bin/sddm-greeter-qt6 --socket /tmp/sddm-:0-oS" label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
Mar 17 14:10:40 mustang dbus-daemon[1540]: [session uid=471 pid=1540] Activating via systemd: service name='org.freedesktop.portal.Desktop' unit='xdg-desktop-portal.service' requested by ':1.0' (uid=471 pid=1533 comm="/usr/bin/sddm-greeter-qt6 --socket /tmp/sddm-:0-oS" label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
Mar 17 14:10:40 mustang sddm-greeter-qt6[1533]: Adding view for "eDP-1" QRect(0,0 1920x1200)
Mar 17 14:10:40 mustang sddm-greeter-qt6[1533]: QDBusConnection: name 'org.freedesktop.UDisks2' had owner '' but we thought it was ':1.20'
Mar 17 14:10:40 mustang sddm-greeter-qt6[1533]: QDBusConnection: name 'org.freedesktop.UPower' had owner '' but we thought it was ':1.21'
Mar 17 14:10:40 mustang sddm-greeter-qt6[1533]: Message received from daemon: Capabilities
Mar 17 14:10:40 mustang sddm-greeter-qt6[1533]: Message received from daemon: HostName
Mar 17 14:10:59 mustang sddm-greeter-qt6[1533]: file:///usr/share/sddm/themes/breeze/Main.qml:241:17 Parameter "username" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
Mar 17 14:10:59 mustang sddm-greeter-qt6[1533]: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop"
Mar 17 14:10:59 mustang sddm[1480]: Message received from greeter: Login
Mar 17 14:10:59 mustang sddm[1480]: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop"
Mar 17 14:10:59 mustang sddm[1480]: Session "/usr/share/wayland-sessions/plasmawayland.desktop" selected, command: "/usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland" for VT 3
Mar 17 14:10:59 mustang sddm-helper[1621]: [PAM] Starting...
Mar 17 14:10:59 mustang sddm-helper[1621]: [PAM] Authenticating...
Mar 17 14:10:59 mustang sddm-helper[1621]: pam_kwallet5(sddm:auth): pam_kwallet5: pam_sm_authenticate
Mar 17 14:10:59 mustang sddm-helper[1621]: [PAM] Preparing to converse...
Mar 17 14:10:59 mustang sddm-helper[1621]: pam_kwallet5(sddm:auth): pam_kwallet5: Couldn't get password (it is empty)
Mar 17 14:10:59 mustang sddm-helper[1621]: [PAM] Conversation with 1 messages
Mar 17 14:10:59 mustang sddm-helper[1621]: [PAM] returning.
Mar 17 14:10:59 mustang sddm[1480]: Authentication for user  "sfalken"  successful
Mar 17 14:10:59 mustang sddm-helper[1621]: pam_kwallet5(sddm:setcred): pam_kwallet5: pam_sm_setcred
Mar 17 14:10:59 mustang sddm-greeter-qt6[1533]: Message received from daemon: LoginSucceeded
Mar 17 14:10:59 mustang sddm-helper[1510]: [PAM] Closing session
Mar 17 14:10:59 mustang sddm-helper[1510]: pam_unix(sddm-greeter:session): session closed for user sddm
Mar 17 14:10:59 mustang sddm-helper[1510]: pam_kwallet5(sddm-greeter:session): pam_kwallet5: pam_sm_close_session
Mar 17 14:10:59 mustang sddm-helper[1510]: [PAM] Ended.
Mar 17 14:10:59 mustang sddm[1480]: Auth: sddm-helper exited successfully
Mar 17 14:10:59 mustang sddm[1480]: Greeter stopped. SDDM::Auth::HELPER_SUCCESS
Mar 17 14:10:59 mustang sddm-helper[1621]: pam_unix(sddm:session): session opened for user sfalken(uid=1000) by sfalken(uid=0)
Mar 17 14:10:59 mustang sddm-helper[1621]: pam_kwallet5(sddm:session): pam_kwallet5: pam_sm_open_session
Mar 17 14:10:59 mustang sddm-helper[1654]: pam_kwallet5: final socket path: /run/user/1000/kwallet5.socket
Mar 17 14:10:59 mustang sddm-helper[1621]: pam_wtmpdb(sddm:session): open_database_rw: Cannot create/open database (/var/lib/wtmpdb/wtmp.db): unable to open database file
Mar 17 14:10:59 mustang sddm-helper[1621]: Starting Wayland user session: "/usr/share/sddm/scripts/wayland-session" "/usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland"
Mar 17 14:10:59 mustang sddm-helper[1656]: Jumping to VT 3
Mar 17 14:10:59 mustang sddm-helper[1656]: VT mode didn't need to be fixed
Mar 17 14:11:00 mustang sddm[1480]: Session started true
Mar 17 14:11:00 mustang sddm-helper[1621]: Failed to write utmpx:  No such file or directory