Bug 473683 - SDDM Mixes seats in multi-seat setup (Failed to create session: TTY tty1 is virtual console but seat seat1 is not seat0)
Summary: SDDM Mixes seats in multi-seat setup (Failed to create session: TTY tty1 is v...
Status: RESOLVED UPSTREAM
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-23 13:20 UTC by dimanne
Modified: 2023-08-23 16:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dimanne 2023-08-23 13:20:24 UTC
# SUMMARY

It looks like login session from a second seat does get initialised properly.

### This is what I observe:

Only one session is reported by loginctl:

Only one session is detected

```
loginctl list-sessions
SESSION  UID USER    SEAT  TTY
      4 1000 dimanne seat0 tty2

1 sessions listed.
```

Directory `/run/user/1001` is not created.

`DBUS_SESSION_BUS_ADDRESS` of the second user is empty.

systemctl --user list-units prints:
```
Failed to connect to bus: No medium found
```

Finally, `loginctl session-status` says:

```
Could not get properties: Unknown object 'org/freedesktop/login1/session/auto'
```

### Why it happens

I think this happens because sddm failed to properly initialise login session.

This is how sddm logs look for "good" login:

```
Aug 20 09:52:17 impedance sddm[8212]: Authentication for user  "dimanne"  successful
Aug 20 09:52:17 impedance sddm-greeter[8590]: Message received from daemon: LoginSucceeded
Aug 20 09:52:17 impedance sddm-helper[9033]: pam_kwallet5(sddm:setcred): pam_kwallet5: pam_sm_setcred
Aug 20 09:52:17 impedance sddm-helper[9033]: pam_limits(sddm:session): Could not set limit for 'nofile' to soft=16777216, hard=16777216: Operation not permitted; uid=0,euid=0
Aug 20 09:52:17 impedance sddm-helper[9033]: pam_unix(sddm:session): session opened for user dimanne(uid=1000) by (uid=0)
Aug 20 09:52:17 impedance sddm-helper[8362]: [PAM] Closing session
Aug 20 09:52:17 impedance sddm-helper[8362]: pam_unix(sddm-greeter:session): session closed for user sddm
Aug 20 09:52:17 impedance sddm-helper[8362]: [PAM] Ended.
Aug 20 09:52:17 impedance sddm[8212]: Auth: sddm-helper exited successfully
Aug 20 09:52:17 impedance sddm[8212]: Greeter stopped. SDDM::Auth::HELPER_SUCCESS
Aug 20 09:52:17 impedance sddm-helper[9033]: pam_kwallet5(sddm:session): pam_kwallet5: pam_sm_open_session
Aug 20 09:52:17 impedance sddm-helper[9078]: pam_kwallet5: final socket path: /run/user/1000/kwallet5.socket
Aug 20 09:52:17 impedance sddm-helper[9033]: pam_env(sddm:session): deprecated reading of user environment enabled
Aug 20 09:52:17 impedance sddm-helper[9033]: Writing cookie to "/tmp/xauth_vDhCDz"
Aug 20 09:52:17 impedance sddm-helper[9033]: Starting X11 session: "" "/etc/sddm/Xsession \"/usr/bin/startplasma-x11\""
Aug 20 09:52:17 impedance sddm[8212]: Session started true
Aug 20 12:27:05 impedance sddm-greeter[8534]: Reading from "/usr/share/xsessions/plasma.desktop"
```


And this is how they look for 2nd seat

```
Aug 20 12:27:05 impedance sddm[8212]: Authentication for user  "yulia"  successful
Aug 20 12:27:05 impedance sddm-greeter[8534]: Message received from daemon: LoginSucceeded
Aug 20 12:27:05 impedance sddm-helper[56829]: pam_kwallet5(sddm:setcred): pam_kwallet5: pam_sm_setcred
Aug 20 12:27:05 impedance sddm-helper[56829]: pam_limits(sddm:session): Could not set limit for 'nofile' to soft=16777216, hard=16777216: Operation not permitted; uid=0,euid=0
Aug 20 12:27:05 impedance sddm-helper[56829]: pam_unix(sddm:session): session opened for user yulia(uid=1001) by (uid=0)
Aug 20 12:27:05 impedance sddm-helper[56829]: pam_systemd(sddm:session): Failed to create session: TTY tty1 is virtual console but seat seat1 is not seat0
Aug 20 12:27:05 impedance sddm-helper[56829]: pam_kwallet5(sddm:session): pam_kwallet5: pam_sm_open_session
Aug 20 12:27:05 impedance sddm-helper[56832]: pam_kwallet5: final socket path: /tmp/kwallet5_yulia.socket
Aug 20 12:27:05 impedance sddm-helper[56829]: pam_env(sddm:session): deprecated reading of user environment enabled
Aug 20 12:27:05 impedance sddm-helper[56829]: Writing cookie to "/tmp/xauth_MzDsqA"
Aug 20 12:27:05 impedance sddm-helper[56829]: Starting X11 session: "" "/etc/sddm/Xsession \"/usr/bin/startplasma-x11\""
Aug 20 12:27:05 impedance sddm[8212]: Session started true
Aug 20 12:27:05 impedance sddm-helper[8399]: [PAM] Closing session
Aug 20 12:27:05 impedance sddm-helper[8399]: pam_unix(sddm-greeter:session): session closed for user sddm
Aug 20 12:27:05 impedance sddm-helper[8399]: [PAM] Ended.
Aug 20 12:27:05 impedance sddm[8212]: Auth: sddm-helper exited successfully
Aug 20 12:27:05 impedance sddm[8212]: Greeter stopped. SDDM::Auth::HELPER_SUCCESS
```


STEPS TO REPRODUCE
1. Create two seats
2. Login 1st seat.
3. Login 2nd seat.

OBSERVED RESULT

See above in the section "What I observe".





SOFTWARE/OS VERSIONS
Operating System: Kubuntu 23.10
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10
Kernel Version: 6.3.0-7-generic (64-bit)
Graphics Platform: X11
Comment 1 Nate Graham 2023-08-23 16:00:20 UTC
Is this not an SDDM issue?
Comment 2 dimanne 2023-08-23 16:01:29 UTC
Sorry, yes, it is SDDM issue.
I guess it does not have anything to do with KDE...
Comment 3 Nate Graham 2023-08-23 16:15:54 UTC
Indeed... at least not yet!

Regardless, please report it at https://github.com/sddm/sddm/issues. Thanks!
Comment 4 dimanne 2023-08-23 16:18:58 UTC
It has been reported 4 times so far:

* Jul 14: https://github.com/sddm/sddm/issues/1762 (SDDM 0.20.0 fails to create session in multi-seat configuration)
* Jul 23: https://github.com/sddm/sddm/issues/1769 (SDDM doesn't seem to handle starting Wayland sessions on seats without VTs well)
* Aug 3: https://github.com/sddm/sddm/issues/1778 (Wayland multiseat)
* today by me: https://github.com/sddm/sddm/issues/1786