plasmaWayland + sddm + autologin is broken

Hello, I just find out that if I switch to wayland and have autologin enabled via *Kde settings-startup and shutdown-login screen(SDDM)-behavior, *I would boot into a black screen, unless I have autologin off, or I use autologin with X session.

Can anyone confirm if it’s a known bug or just me? If it’s just me, any advice on diagnose the issue?

1 Like

A known issue…
https://bugzilla.opensuse.org/show_bug.cgi?id=1200436

…and has been an issue for a while now…
https://forums.opensuse.org/showthread.php/534351-Autologin-with-plasmawayland-desktop-leads-to-black-screen-with-cursor

1 Like

Thank you for the answer and sorry for the late reply.

I came across the old thread of the issue during my research but thought it’s a separate one since it’s so old.

As seen only in opensuse’s bug reports, is it only happening to opensuse, or the culprit is on sddm or wayland… I wonder…

Probably wayland since it has never really emerged from beta. At least with KDE.

Autologin with wayland works like a charm:

**6700k:~ #** journalctl -b -u display-manager.service  
Sep 29 15:42:09 6700k systemd[1]: Starting X Display Manager... 
Sep 29 15:42:09 6700k display-manager[1010]: /etc/vconsole.conf available 
Sep 29 15:42:09 6700k display-manager[1010]: KEYMAP: de-nodeadkeys 
Sep 29 15:42:09 6700k display-manager[1010]: Command: localectl set-keymap de-nodeadkeys 
Sep 29 15:42:09 6700k display-manager[1010]: I: Using systemd /usr/share/systemd/kbd-model-map mapping 
Sep 29 15:42:10 6700k sddm[1053]: Initializing...
Sep 29 15:42:10 6700k sddm[1053]: Starting...
Sep 29 15:42:10 6700k sddm[1053]: Logind interface found
Sep 29 15:42:10 6700k sddm[1053]: Adding new display on vt 7 ...
Sep 29 15:42:10 6700k sddm[1053]: Loading theme configuration from ""
Sep 29 15:42:10 6700k sddm[1053]: Display server starting...
Sep 29 15:42:10 6700k sddm[1053]: Running: /usr/bin/X -nolisten tcp -auth /run/sddm/{e4cb5b2e-08d8-47dd-9530-ec032cfe8514} -background none -noreset -displayfd 17 -seat seat0 vt7
Sep 29 15:42:10 6700k systemd[1]: Started X Display Manager. 
Sep 29 15:42:12 6700k sddm[1053]: Setting default cursor
Sep 29 15:42:12 6700k sddm[1053]: Running display setup script  "/usr/etc/X11/xdm/Xsetup"
Sep 29 15:42:12 6700k sddm[1053]: Display server started.
Sep 29 15:42:12 6700k sddm[1053]: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop"
Sep 29 15:42:12 6700k sddm[1053]: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop"
Sep 29 15:42:12 6700k sddm[1053]: Session "/usr/share/wayland-sessions/plasmawayland.desktop" selected, command: "/usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland"
Sep 29 15:42:12 6700k sddm-helper[1190]: [PAM] Starting...
Sep 29 15:42:12 6700k sddm-helper[1190]: [PAM] Authenticating...
Sep 29 15:42:12 6700k sddm-helper[1190]: [PAM] returning.
Sep 29 15:42:12 6700k sddm[1053]: Authenticated successfully
Sep 29 15:42:12 6700k sddm-helper[1190]: pam_unix(sddm-autologin:session): session opened for user karl(uid=1000) by (uid=0) 
Sep 29 15:42:12 6700k sddm-helper[1190]: Starting: "/usr/share/sddm/scripts/wayland-session /usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland" 
Sep 29 15:42:13 6700k sddm[1053]: Session started
**6700k:~ #**

I configured according to https://wiki.archlinux.org/title/SDDM:

6700k:~ # cat /etc/sddm.conf.d/autologin.conf
[Autologin]
User=karl
Session=plasmawayland
6700k:~ # 
6700k:~ # cat /etc/sddm.conf.d/10-wayland.conf
[Wayland]
CompositorCommand=kwin_wayland --no-lockscreen
6700k:~ # 
1 Like

Not for all graphics hardware it would seem (but good that it works for you).

1 Like

What does it mean? You switch to wayland what? You switch to wayland how?

and have autologin enabled via Kde settings-startup and shutdown-login screen(SDDM)-behavior,

Just enabling autologin without explicitly setting suitable session will always start X11 session due to SUSE-specific patch. Have you verified that you actually start Wayland session? What is in /var/lib/sddm/state.conf? Provide screenshot of setting window and/or resulting sddm.conf.

When I reset this part of SUSE patch to default by using

[Autologin]
Session=

I get last session for the user and if it was Wayland it starts correctly. Autologin itself is enabled via /etc/sysconfig/displaymanager, not via sddm.conf. So it is not universally broken.

  1. I was in X11-autolgoin
  2. I disabled autologin and logout, switched session to wayland and login again.
  3. I reboot and confirmed I was in wayland.
  4. I created the two files under sddm.conf.d and filled in the content.
  5. I reboot, finding myself not auto logged in as expected, but when I continued to login, I was in wayland.
  6. Then I went to yast2-system editor to put my username in the autologin entry and reboot. I got into the same old black screen with command line login prompt as expected (by me).

My way of confirming that I’m in a wayland session is to check KDE settings - About this system, it shows “Graphic platform: Wayland” (otherwise it shows “X11”). I also have several other hints that tell I’m in wayland due to the wayland exclusive bug I encounter in the session.
You have not mentioned how you turn on autologin and wayland.

ps. BTW a few weeks ago I tried wayland+autologin on my laptop running OSS 15.3, it’s the same syndrome, not working.

Actions performed:

  • At installation configure X11/Autologin for user karl. This worked reliably for two years.
  • Provide files /etc/sddm.conf.d/autologin.conf and /etc/sddm.conf.d/10-wayland.conf as shown in post #5
  • Reboot. Wayland/Autologin succeeds for user karl

Verification:

**6700K:~ #** **ps ax|grep X11** 
 5044 pts/1    S+     0:00 grep --color=auto **X11**
**6700K:~ #** **ps ax|grep wayland** 
 1184 ?        S      0:00 /usr/libexec/sddm/sddm-helper --socket /tmp/sddm-auth52550d09-5dbf-4f83-a295-79673be003cd --id 1 --start /usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-**wayland** --user karl --autologin 
 1195 tty2     Ssl+   0:00 /usr/bin/startplasma-**wayland**
 1225 ?        Ssl    0:00 /usr/bin/kwin_**wayland**_wrapper --x**wayland**
 1227 ?        Sl     0:38 /usr/bin/kwin_**wayland** --**wayland**-fd 7 --socket **wayland**-0 --x**wayland**-fd 8 --x**wayland**-fd 9 --x**wayland**-display :1 --x**wayland**-xauthority /run/user/1000/xauth_QxcydH --x**wayland**
 1299 ?        Sl     0:00 /usr/bin/X**wayland** :1 -auth /run/user/1000/xauth_QxcydH -listen 47 -listen 48 -displayfd 39 -rootless -wm 42 
 5048 pts/1    S+     0:00 grep --color=auto **wayland**
**6700K:~ #** 

As I said I did it in /etc/sysconfig/displaymanager (strictly speaking by using YaST to enable autologin) which is standard on (open)SUSE and all supported display managers use this setting.

and wayland.

OK, it was not step by step.

I get last session for the user and if it was Wayland it starts correctly.
and last session was selected explicitly at SDDM login screen (logout, make sure to select Plasma Wayland, login then reboot).

I created the two files under sddm.conf.d and filled in the content.

You forgot to show the full content and names of these files (I also wonder, why two flies).

I reboot, finding myself not auto logged in as expected, but when I continued to login, I was in wayland.

This implies that the content you added did not actually enable autologin.

Then I went to yast2-system editor to put my username in the autologin entry and reboot.

So you edited /etc/sysconfig/displaymanager (via YaST) and you also have some additional SDDM settings. May be they conflict.

Capture full “journalctl -b” output after reboot into X11 autologin session and reboot into Wayland autologin session. It may offer some hints where the difference is.

While post #9 was quick&dirty a canonical solution is copy&edit as follows:

**6700K:~ #** diff /usr/lib/sddm/sddm.conf.d/00-general.conf /etc/sddm.conf.d/00-general.conf 
11a12,14 
>  
> [Autologin] 
> Session=plasmawayland 
**6700K:~ #**

Upon reboot the autogin will use wayland. To my experience nothing is broken.

1 Like

A post was split to a new topic: SDDM and Autologin