SDDM and Autologin

@karlmistelberger I’ve tried what you proposed and added the files autologin.conf and 10-wayland.conf, but the behavior with regards to autologin is still the same: black screen with with movable mouse pointer. Same behavior on two different machines

So I tried to start sddm manually at that stage and I get the following logs

Apr 12 23:35:58 kiste sudo[1633]:     kusi : TTY=tty1 ; PWD=/home/kusi ; USER=root ; COMMAND=/usr/bin/systemctl start sddm
Apr 12 23:35:58 kiste sudo[1633]: pam_unix(sudo:session): session opened for user root(uid=0) by kusi(uid=1000)
Apr 12 23:35:58 kiste systemd[1]: Starting Simple Desktop Display Manager...
Apr 12 23:35:58 kiste systemd[1]: Started Simple Desktop Display Manager.
Apr 12 23:35:58 kiste sudo[1633]: pam_unix(sudo:session): session closed for user root
Apr 12 23:35:58 kiste sddm[1637]: Initializing...
Apr 12 23:35:58 kiste sddm[1637]: Starting...
Apr 12 23:35:58 kiste sddm[1637]: Logind interface found
Apr 12 23:35:58 kiste sddm[1637]: Adding new display on vt 7 ...
Apr 12 23:35:58 kiste sddm[1637]: Loading theme configuration from ""
Apr 12 23:35:58 kiste sddm[1637]: Display server starting...
Apr 12 23:35:58 kiste sddm[1637]: Running: /usr/bin/X -nolisten tcp -auth /run/sddm/{cee6e920-d49e-4ba9-a97b-0fa4c0e0a4ca} -background none -noreset -displayfd 17 -seat seat0 vt7
Apr 12 23:35:58 kiste sddm[1637]: Failed to read display number from pipe
Apr 12 23:35:58 kiste sddm[1637]: Attempt 1 starting the Display server on vt 7 failed

This does not look like wayland to me. Any more ideas? maybe some more params in this section?

[Wayland]
CompositorCommand=kwin_wayland .....

Moved from a previous old thread
https://forums.opensuse.org/t/plasmawayland-sddm-autologin-is-broken/152845/12
to attract the individual attention that it deserves.

1 Like

Related threads/bug reports that I’ve read have suggested that a race condition may be at play, whereby SDDM starts too fast some hardware environments. For example

As a quick test, if you hold down Ctrl+Alt+Backspace (following the black screen condition), are you able to restart the display manager, such that it then starts properly and loads the desktop session as expected?

Does Wayland work on your machine? On my machine default is X but I can select Wayland from the sddm greeter screen and it works without further ado:

3400G:~ # journalctl --since 10:52:30 -u display-manager.service 
Apr 13 10:52:41 3400G sddm[1056]: Message received from greeter: Login
Apr 13 10:52:41 3400G sddm[1056]: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop"
Apr 13 10:52:41 3400G sddm[1056]: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop"
Apr 13 10:52:41 3400G sddm[1056]: Session "/usr/share/wayland-sessions/plasmawayland.desktop" selected, command: "/usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland"
Apr 13 10:52:41 3400G sddm-helper[6365]: [PAM] Starting...
Apr 13 10:52:41 3400G sddm-helper[6365]: [PAM] Authenticating...
Apr 13 10:52:41 3400G sddm-helper[6365]: [PAM] Preparing to converse...
Apr 13 10:52:41 3400G sddm-helper[6365]: [PAM] Conversation with 1 messages
Apr 13 10:52:41 3400G sddm-helper[6365]: [PAM] returning.
Apr 13 10:52:41 3400G sddm[1056]: Authenticated successfully
Apr 13 10:52:41 3400G sddm[1056]: Auth: sddm-helper exited successfully
Apr 13 10:52:41 3400G sddm[1056]: Greeter stopped.
Apr 13 10:52:41 3400G sddm-helper[6365]: pam_unix(sddm:session): session opened for user karl(uid=1000) by (uid=0)
Apr 13 10:52:41 3400G sddm-helper[6365]: Starting: "/usr/share/sddm/scripts/wayland-session /usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland"
Apr 13 10:52:41 3400G sddm[1056]: Session started
3400G:~ # 

You may try and logout or kill your graphical session. From the greater login select Wayland and login. Show the output of SDDM as I did above.

Yes, wayland in general works quite smoothly. Only remaining issue for me is the autologin. When I logout from x11 and login with wayland, all is fine, smooth and stable. Doing so, my log looks similar as yours:

➜  ~ sudo journalctl --since=13:25:00 -u display-manager.service
Apr 13 13:25:17 nii sddm[1561]: Message received from greeter: Login
Apr 13 13:25:17 nii sddm[1561]: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop"
Apr 13 13:25:17 nii sddm[1561]: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop"
Apr 13 13:25:17 nii sddm[1561]: Session "/usr/share/wayland-sessions/plasmawayland.desktop" selected, command: "/usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland"
Apr 13 13:25:17 nii sddm-helper[16654]: [PAM] Starting...
Apr 13 13:25:17 nii sddm-helper[16654]: [PAM] Authenticating...
Apr 13 13:25:17 nii sddm-helper[16654]: pam_kwallet5(sddm:auth): pam_kwallet5: pam_sm_authenticate
Apr 13 13:25:17 nii sddm-helper[16654]: [PAM] Preparing to converse...
Apr 13 13:25:17 nii sddm-helper[16654]: pam_kwallet5(sddm:auth): pam_kwallet5: Couldn't get password (it is empty)
Apr 13 13:25:17 nii sddm-helper[16654]: [PAM] Conversation with 1 messages
Apr 13 13:25:17 nii sddm-helper[16654]: [PAM] returning.
Apr 13 13:25:17 nii sddm[1561]: Authenticated successfully
Apr 13 13:25:17 nii sddm-helper[16654]: pam_kwallet5(sddm:setcred): pam_kwallet5: pam_sm_setcred
Apr 13 13:25:17 nii sddm[1561]: Auth: sddm-helper exited successfully
Apr 13 13:25:17 nii sddm[1561]: Greeter stopped.
Apr 13 13:25:18 nii sddm-helper[16654]: pam_unix(sddm:session): session opened for user kusi(uid=1000) by (uid=0)
Apr 13 13:25:18 nii sddm-helper[16654]: pam_kwallet5(sddm:session): pam_kwallet5: pam_sm_open_session
Apr 13 13:25:18 nii sddm-helper[16654]: Starting: "/usr/share/sddm/scripts/wayland-session /usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland"
Apr 13 13:25:18 nii sddm[1561]: Session started

It’s just the autologin which is not working

Indeed, if I press ctrl+alt+backspace, I see again the login screen. So, it is possible that my issue (which is reproducible on two different machines) would be fixed with 0.20? In Tumbleweed, I only see 0.19. I’m a bit reluctant to install the latest and greatest Show home:Vogtinator:sddm-git / sddm - openSUSE Build Service and break my setup

So, I just tried it anyways and installed sddm+git. Still the black screen when using autologin.

The same problem here:

Apr 13 12:51:34 3400G sddm[1069]: Auth: sddm-helper exited with 1

However restarting display-manager.service succeeds.

BTW: Do you really need Wayland? Autologin with X works flawlessly.

What graphics hardware do you have?

inxi -Ga

Just speculating here (apologies if I’m on the wrong track with this)…is the video driver loaded early via initrd?

sudo lsinitrd|grep <driver>

*You will need to substitute “” for the actual driver being searched for.

Here’s another thread where this problematic behaviour was encountered
https://www.reddit.com/r/archlinux/comments/jtb1zb/sddm_failed_to_read_display_number_from_pipe/

you are right, you barely see a difference between X and wayland nowadays. There is one exception, which is relevant for me: I notice some tearing while watching movies in certain situations. For most part of the movie, though, I couldn’t tell if I am in wayland or X. I have to use xeyes to be sure which display manager is used.

Once a year, I give wayland a shot again. It’s close, but for me still a no-go for daily use due to this issue. I guess I’ll wait till 2024 to try it out again.

What graphics hardware do you have?

I have two machines, Intel Core i7 6700T with integrated graphics and an AMD Ryzen 5600G, as well with integrated graphics. I see the very same issue on both systems, therefore I don’t believe it’s related to specific graphics hardware. Either is a Tumbleweed issue or a bug in sddm. Looking at github sddm, it seems like there are not many active developers currently, and these problems are difficult to fix.

Well, use what works for you. There is nothing to stop you from trying another display manager.

I tested on QEMU VM with virgl and current TW (just updated today). When I set autologin session to Wayland in SDDM, it indeed results in black screen. Screen gets repainted when I move/click mouse. But KDE in Wayland mode is near to unusable both after autologin or logging from SDDM greeter. Response after clicking on any GUI element is shown with delay (not consistent, it could be faster sometimes). There is no delay in repainting e.g. terminal window (once terminal is opened, I can work normally in it).

KDE was certainly usable in Wayland last time I tried it (probably several months ago) so it sounds like regression. I settled on X11 because vdagent does not support KDE/Wayland so no copy/paste to/from host. X11 does not have any issues.

thanks for testing in a VM and confirming there is an issue with autologin. For me, if I manually login from SDDM, my Wayland session is very stable, I did not see an issue (apart from Chrome not yet using Wayland by default)

That was the spice-vdagent looping and consuming 100% CPU time. After stopping it Wayland session runs normally. Of course, it means no copy-paste :slight_smile:

I gave it a try in a VM with KDE Neon. They use the same old v0.19, and there autologin into a Wayland session works. To me this seems like it’s a TW specific issue