[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#916398: marked as done (sddm: Wayland autologin sometimes fails - probable tty1 race)



Your message dated Sun, 23 Feb 2020 12:52:27 +0000
with message-id <E1j5qkF-0009UT-Az@fasolo.debian.org>
and subject line Bug#916398: fixed in sddm 0.18.1-1
has caused the Debian Bug report #916398,
regarding sddm: Wayland autologin sometimes fails - probable tty1 race
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
916398: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=916398
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: sddm
Version: 0.14.0-4+deb9u1
X-Debbugs-Cc: pkg-systemd-maintainers@lists.alioth.debian.org

With this /etc/sddm.conf:
[Autologin]
User=rnpalmer
Session=plasmawayland.desktop

autologin works only ~80% of the time; failures usually drop to a text login prompt (which works but leads to a text shell, not KDE), but occasionally to an sddm graphical login screen (which works).

The system log contains "Jumping to VT 2" on success and "Jumping to VT 1" on failure (plus "Failed to take control of the tty: Operation not permitted" on failure to graphical login screen), which suggests the problem is sddm trying to start a desktop and getty@tty1.service trying to start a text terminal on the same VT.

This implies the problem is Wayland-specific (sddm only switches VTs under Wayland, not X [0]) and also Debian-specific (as the upstream configuration disables getty@tty1.service and runs sddm itself on tty1 [1]), but I have *not* explicitly tested either of these.

Adding systemd-logind.service (like 0.18 has) and getty@tty1.service to After= of sddm.service does *not* fix this, probably because getty@tty1.service is Type=idle (immediately mark it as "done", but don't actually start it until the end of boot [2]) and TTYVTDisallocate=yes.

I hence believe the order of events on failure to be
- systemd "starts" getty@tty1.service
- systemd starts sddm.service
* sddm sees that tty1 is free, and opens it
- systemd really starts getty@tty1.service, and in doing so forcibly takes tty1 away from sddm - sddm tries to use "its" tty1, and hits an error because it no longer has it On success, * is instead reached after getty starts, sees that tty1 isn't free, and uses tty2 instead.

(systemd maintainers: does this imply that _anything_ that takes the first available VT during boot and expects to keep it will have a similar problem? I don't know of any other than sddm, but haven't looked)

Possible solutions (I have *not* tried them yet):
- Patch sddm (at [3]) to assume VT 1 is never free
- or, add a Conflicts=getty@tty1.service (and After= ?) to sddm.service

[0] https://sources.debian.org/src/sddm/0.14.0-4+deb9u1/src/daemon/Display.cpp/#L324 [1] https://sources.debian.org/src/sddm/0.14.0-4+deb9u1/services/sddm.service.in/
[2] man systemd.service
[3] https://sources.debian.org/src/sddm/0.18.0-1/src/daemon/VirtualTerminal.cpp/#L118 - would need to look at vtState.v_state instead of using VT_OPENQRY

success:

Dec  4 20:55:14 rnpalmer-laptop sddm[843]: Initializing...
Dec  4 20:55:14 rnpalmer-laptop sddm[843]: Starting...
Dec  4 20:55:14 rnpalmer-laptop sddm[843]: Adding new display on vt 7 ...
Dec  4 20:55:14 rnpalmer-laptop sddm[843]: Display server starting...
Dec 4 20:55:14 rnpalmer-laptop sddm[843]: Running: /usr/bin/X -nolisten tcp -auth /var/run/sddm/{e8af3b0e-d914-4859-8325-863b144b07f8} -background none -noreset -displayfd 18 vt7 Dec 4 20:55:17 rnpalmer-laptop sddm[843]: Running display setup script "/usr/share/sddm/scripts/Xsetup"
Dec  4 20:55:17 rnpalmer-laptop sddm[843]: Display server started.
Dec 4 20:55:17 rnpalmer-laptop sddm[843]: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop" Dec 4 20:55:17 rnpalmer-laptop sddm[843]: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop" Dec 4 20:55:17 rnpalmer-laptop sddm[843]: Session "/usr/share/wayland-sessions/plasmawayland.desktop" selected, command: "dbus-launch --exit-with-session /usr/bin/startplasmacompositor" Dec 4 20:55:17 rnpalmer-laptop sddm[843]: Adding cookie to "/var/run/sddm/{e8af3b0e-d914-4859-8325-863b144b07f8}"
Dec  4 20:55:17 rnpalmer-laptop sddm-helper[863]: [PAM] Starting...
Dec  4 20:55:17 rnpalmer-laptop sddm-helper[863]: [PAM] Authenticating...
Dec  4 20:55:17 rnpalmer-laptop sddm-helper[863]: [PAM] returning.
Dec  4 20:55:17 rnpalmer-laptop sddm[843]: Authenticated successfully
Dec  4 20:55:17 rnpalmer-laptop sddm[843]: Jumping to VT 2
Dec  4 20:55:17 rnpalmer-laptop sddm[843]: VT mode didn't need to be fixed
Dec 4 20:55:17 rnpalmer-laptop sddm-helper[863]: Starting: "/usr/share/sddm/scripts/wayland-session dbus-launch --exit-with-session /usr/bin/startplasmacompositor"
Dec  4 20:55:17 rnpalmer-laptop sddm[843]: Session started

fail to text prompt:

Dec  4 20:52:09 rnpalmer-laptop sddm[852]: Initializing...
Dec  4 20:52:10 rnpalmer-laptop sddm[852]: Starting...
Dec  4 20:52:10 rnpalmer-laptop sddm[852]: Adding new display on vt 7 ...
Dec  4 20:52:10 rnpalmer-laptop sddm[852]: Display server starting...
Dec 4 20:52:10 rnpalmer-laptop sddm[852]: Running: /usr/bin/X -nolisten tcp -auth /var/run/sddm/{55773eae-98a2-43a8-904c-acea6cf1be7e} -background none -noreset -displayfd 18 vt7 Dec 4 20:52:12 rnpalmer-laptop sddm[852]: Running display setup script "/usr/share/sddm/scripts/Xsetup"
Dec  4 20:52:12 rnpalmer-laptop sddm[852]: Display server started.
Dec 4 20:52:12 rnpalmer-laptop sddm[852]: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop" Dec 4 20:52:12 rnpalmer-laptop sddm[852]: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop" Dec 4 20:52:12 rnpalmer-laptop sddm[852]: Session "/usr/share/wayland-sessions/plasmawayland.desktop" selected, command: "dbus-launch --exit-with-session /usr/bin/startplasmacompositor" Dec 4 20:52:12 rnpalmer-laptop sddm[852]: Adding cookie to "/var/run/sddm/{55773eae-98a2-43a8-904c-acea6cf1be7e}"
Dec  4 20:52:13 rnpalmer-laptop sddm-helper[870]: [PAM] Starting...
Dec  4 20:52:13 rnpalmer-laptop sddm-helper[870]: [PAM] Authenticating...
Dec  4 20:52:13 rnpalmer-laptop sddm-helper[870]: [PAM] returning.
Dec  4 20:52:13 rnpalmer-laptop sddm[852]: Authenticated successfully
Dec  4 20:52:13 rnpalmer-laptop sddm[852]: Jumping to VT 1
Dec  4 20:52:13 rnpalmer-laptop sddm[852]: VT mode didn't need to be fixed
Dec 4 20:52:13 rnpalmer-laptop sddm-helper[870]: Starting: "/usr/share/sddm/scripts/wayland-session dbus-launch --exit-with-session /usr/bin/startplasmacompositor"
Dec  4 20:52:13 rnpalmer-laptop sddm[852]: Session started
Dec  4 20:52:14 rnpalmer-laptop sddm-helper[870]: [PAM] Closing session
Dec  4 20:52:14 rnpalmer-laptop sddm-helper[870]: [PAM] Ended.
Dec  4 20:52:14 rnpalmer-laptop sddm[852]: Auth: sddm-helper exited with 1
Dec  4 20:54:18 rnpalmer-laptop sddm[852]: Signal received: SIGTERM
Dec  4 20:54:18 rnpalmer-laptop sddm[852]: Display server stopping...

fail to graphical prompt:

Dec  8 20:36:36 rnpalmer-laptop sddm[753]: Initializing...
Dec  8 20:36:36 rnpalmer-laptop sddm[753]: Starting...
Dec  8 20:36:36 rnpalmer-laptop sddm[753]: Adding new display on vt 7 ...
Dec  8 20:36:36 rnpalmer-laptop sddm[753]: Display server starting...
Dec 8 20:36:36 rnpalmer-laptop sddm[753]: Running: /usr/bin/X -nolisten tcp -auth /var/run/sddm/{f98a6e44-c6db-4c0e-a513-96fc8f6c7562} -background none -noreset -displayfd 18 vt7 Dec 8 20:36:39 rnpalmer-laptop sddm[753]: Running display setup script "/usr/share/sddm/scripts/Xsetup"
Dec  8 20:36:39 rnpalmer-laptop sddm[753]: Display server started.
Dec 8 20:36:39 rnpalmer-laptop sddm[753]: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop" Dec 8 20:36:39 rnpalmer-laptop sddm[753]: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop" Dec 8 20:36:39 rnpalmer-laptop sddm[753]: Session "/usr/share/wayland-sessions/plasmawayland.desktop" selected, command: "dbus-launch --exit-with-session /usr/bin/startplasmacompositor" Dec 8 20:36:39 rnpalmer-laptop sddm[753]: Adding cookie to "/var/run/sddm/{f98a6e44-c6db-4c0e-a513-96fc8f6c7562}"
Dec  8 20:36:39 rnpalmer-laptop sddm-helper[872]: [PAM] Starting...
Dec  8 20:36:39 rnpalmer-laptop sddm-helper[872]: [PAM] Authenticating...
Dec  8 20:36:39 rnpalmer-laptop sddm-helper[872]: [PAM] returning.
Dec  8 20:36:39 rnpalmer-laptop sddm[753]: Authenticated successfully
Dec  8 20:36:39 rnpalmer-laptop sddm[753]: Jumping to VT 1
Dec  8 20:36:39 rnpalmer-laptop sddm[753]: VT mode didn't need to be fixed
Dec 8 20:36:40 rnpalmer-laptop sddm-helper[872]: Starting: "/usr/share/sddm/scripts/wayland-session dbus-launch --exit-with-session /usr/bin/startplasmacompositor" Dec 8 20:36:40 rnpalmer-laptop sddm-helper[878]: Failed to take control of the tty: Operation not permitted
Dec  8 20:36:40 rnpalmer-laptop sddm[753]: Session started
Dec  8 20:36:40 rnpalmer-laptop sddm-helper[872]: [PAM] Closing session
Dec  8 20:36:40 rnpalmer-laptop sddm-helper[872]: [PAM] Ended.
Dec  8 20:36:40 rnpalmer-laptop sddm[753]: Auth: sddm-helper exited with 3
Dec  8 20:36:40 rnpalmer-laptop sddm[753]: Display server stopping...
Dec  8 20:36:45 rnpalmer-laptop sddm[753]: Removing display ":0" ...
Dec  8 20:36:45 rnpalmer-laptop sddm[753]: Adding new display on vt 7 ...
Dec  8 20:36:45 rnpalmer-laptop sddm[753]: Display server starting...
Dec 8 20:36:45 rnpalmer-laptop sddm[753]: Running: /usr/bin/X -nolisten tcp -auth /var/run/sddm/{bdbe6563-8be5-418d-80a2-3a021af7deaf} -background none -noreset -displayfd 18 vt7 Dec 8 20:36:46 rnpalmer-laptop sddm[753]: Running display setup script "/usr/share/sddm/scripts/Xsetup"
Dec  8 20:36:46 rnpalmer-laptop sddm[753]: Display server started.
Dec  8 20:36:46 rnpalmer-laptop sddm[753]: Socket server starting...
Dec  8 20:36:46 rnpalmer-laptop sddm[753]: Socket server started.
Dec  8 20:36:46 rnpalmer-laptop sddm[753]: Greeter starting...
Dec 8 20:36:46 rnpalmer-laptop sddm[753]: Adding cookie to "/var/run/sddm/{bdbe6563-8be5-418d-80a2-3a021af7deaf}"
Dec  8 20:36:46 rnpalmer-laptop sddm[753]: Display server stopping...
Dec  8 20:36:46 rnpalmer-laptop sddm[753]: Display server stopped.
Dec 8 20:36:46 rnpalmer-laptop sddm[753]: Running display stop script "/usr/share/sddm/scripts/Xstop"
Dec  8 20:36:46 rnpalmer-laptop sddm-helper[984]: [PAM] Starting...
Dec  8 20:36:46 rnpalmer-laptop sddm-helper[984]: [PAM] Authenticating...
Dec  8 20:36:46 rnpalmer-laptop sddm-helper[984]: [PAM] returning.
Dec 8 20:36:46 rnpalmer-laptop systemd[1]: Created slice User Slice of sddm.
Dec  8 20:36:46 rnpalmer-laptop systemd[1]: Started Session 3 of user sddm.
Dec 8 20:36:46 rnpalmer-laptop sddm[753]: Greeter session started successfully Dec 8 20:36:46 rnpalmer-laptop sddm-greeter[991]: High-DPI autoscaling Not Enabled Dec 8 20:36:48 rnpalmer-laptop sddm-greeter[991]: Reading from "/usr/share/xsessions/plasma.desktop" Dec 8 20:36:48 rnpalmer-laptop sddm-greeter[991]: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop"
Dec  8 20:36:48 rnpalmer-laptop sddm-greeter[991]: Connected to the daemon.
Dec 8 20:36:48 rnpalmer-laptop sddm[753]: Message received from greeter: Connect Dec 8 20:36:49 rnpalmer-laptop sddm-greeter[991]: Loading file:///usr/share/sddm/themes/debian-theme/Main.qml... Dec 8 20:36:50 rnpalmer-laptop sddm-greeter[991]: Adding view for "LVDS-1" QRect(0,0 1366x768) Dec 8 20:36:50 rnpalmer-laptop sddm-greeter[991]: Message received from daemon: Capabilities Dec 8 20:36:50 rnpalmer-laptop sddm-greeter[991]: Message received from daemon: HostName Dec 8 20:37:20 rnpalmer-laptop sddm-greeter[991]: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop" Dec 8 20:37:20 rnpalmer-laptop sddm[753]: Message received from greeter: Login Dec 8 20:37:20 rnpalmer-laptop sddm[753]: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop" Dec 8 20:37:20 rnpalmer-laptop sddm[753]: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop" Dec 8 20:37:20 rnpalmer-laptop sddm[753]: Session "/usr/share/wayland-sessions/plasmawayland.desktop" selected, command: "dbus-launch --exit-with-session /usr/bin/startplasmacompositor"
Dec  8 20:37:20 rnpalmer-laptop sddm-helper[1006]: [PAM] Starting...
Dec  8 20:37:20 rnpalmer-laptop sddm-helper[1006]: [PAM] Authenticating...
Dec 8 20:37:20 rnpalmer-laptop sddm-helper[1006]: [PAM] Preparing to converse... Dec 8 20:37:20 rnpalmer-laptop sddm-helper[1006]: [PAM] Conversation with 1 messages
Dec  8 20:37:21 rnpalmer-laptop sddm-helper[1006]: [PAM] returning.
Dec  8 20:37:21 rnpalmer-laptop sddm[753]: Authenticated successfully
Dec  8 20:37:21 rnpalmer-laptop sddm[753]: Jumping to VT 2
Dec  8 20:37:21 rnpalmer-laptop sddm[753]: VT mode didn't need to be fixed
Dec 8 20:37:21 rnpalmer-laptop sddm-greeter[991]: Message received from daemon: LoginSucceeded Dec 8 20:37:21 rnpalmer-laptop sddm-helper[1006]: Starting: "/usr/share/sddm/scripts/wayland-session dbus-launch --exit-with-session /usr/bin/startplasmacompositor"
Dec  8 20:37:21 rnpalmer-laptop sddm[753]: Session started

--- End Message ---
--- Begin Message ---
Source: sddm
Source-Version: 0.18.1-1
Done: Pino Toscano <pino@debian.org>

We believe that the bug you reported is fixed in the latest version of
sddm, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 916398@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Pino Toscano <pino@debian.org> (supplier of updated sddm package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 23 Feb 2020 13:34:38 +0100
Source: sddm
Architecture: source
Version: 0.18.1-1
Distribution: unstable
Urgency: medium
Maintainer: Debian/Kubuntu Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Changed-By: Pino Toscano <pino@debian.org>
Closes: 901969 904698 915534 916398 929463 943206 950391
Changes:
 sddm (0.18.1-1) unstable; urgency=medium
 .
   * Team upload.
 .
   [ Maximiliano Curia ]
   * Add missing license paragraph
   * Add wayland-session as a conffile
   * Avoid sourcing /etc/profile with fish.
     Thanks to Alf Gaida for the report (Closes: 904698)
 .
   [ Pino Toscano ]
   * New upstream release.
   * Add the configuration for the CI on salsa.
   * Remove the unused debian/meta/ stuff.
   * Remove debian/not-installed, as we ship everything.
   * Switch from python-docutils to python3-docutils to get Python 3-based
     rst2man. (Closes: #943206)
   * Small changes to copyright.
   * Drop the upstart confirmation, as it is long gone
     - unregister it as conffile
   * Depend on xauth, as it is used for X sessions. (Closes: #929463)
   * Change sid to unstable in old changelog entries. (Closes: #901969)
   * Improve the Debian-provided sddm.service: (Closes: #916398, #950391)
     - remove old check of /etc/X11/default-display-manager
     - alias it as display-manager.service
     - add getty@tty1.service to Conflicts/After to avoid races
 .
   [ Lorenzo Puliti ]
   * Improve sysv init script: (Closes: #915534)
     - add dbus under 'Should Start'
     - remove  'S' and 'K' update-rc.d levels from postinst script,
       as setting the boot sequence that way is deprecated and no longer
       effective
Checksums-Sha1:
 245927ef0da5fab1e3841cf7ae3729a0d4088c69 2648 sddm_0.18.1-1.dsc
 61a0887e45109c85e65102d8ecd2a50c7aa3dfb3 3526726 sddm_0.18.1.orig.tar.gz
 0c0f50fb0be269012203f6d0133a4bf7584c082d 51968 sddm_0.18.1-1.debian.tar.xz
 50ebe48843a2a082fad4b211f5183e6e1fe21327 12735 sddm_0.18.1-1_source.buildinfo
Checksums-Sha256:
 dac859f77c77adf56c867446821472d0f290185ae924e0a3b9251582d6238ee3 2648 sddm_0.18.1-1.dsc
 07296fc747010a5dd58a45f16c3224b439997afad42566e4b043c841b1b71700 3526726 sddm_0.18.1.orig.tar.gz
 fd6ef0986f056201c04bf9f721b600e4316b416bc5a7a19f1dd57369ea683097 51968 sddm_0.18.1-1.debian.tar.xz
 896c112f044de35cfea74bdd005521fd8e8f14aec42ff24acea8e9e197522466 12735 sddm_0.18.1-1_source.buildinfo
Files:
 1d613959c7fd92143aea45b773a55fb9 2648 kde optional sddm_0.18.1-1.dsc
 1bc7dcf75ddc53c2030155607e42f6c6 3526726 kde optional sddm_0.18.1.orig.tar.gz
 13ef13c161abebc19fd2478e1d064ad8 51968 kde optional sddm_0.18.1-1.debian.tar.xz
 35def64b53dedd7fe0f0c7a61f07bd3d 12735 kde optional sddm_0.18.1-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEXyqfuC+mweEHcAcHLRkciEOxP00FAl5ScZ0ACgkQLRkciEOx
P02PCQ//fLOZN2JO78Q3LG4Qsk9BX4U/U9990juV9695FK164ez+ToE5nusgALCC
ZmWxHXTTiDXjPLi6/mc0eGKzp0JJy3DVMLPOCuIsGeC4Sx3uBuVuhORTBNNnfg+1
fsnDIlGChZzRNHu4h9UuvMZZtTIDZ+LjAgpC9nPxxiw+wQ3UH2nPPdo5yPMIe/7E
WYxZP6u9LNoY4+kUo6+dHuPLSQaYhUUVFSzVCybG9lLgJ6YhtDBj4dlA1QrWZcbc
KEGqOwsMvI5gNYKZ5z5dSFImNIDLcZtzGDYIGBKw53d+Mw77ZCRZkE/rx3pHOnZP
O21cjOJMzjPbwCRmV32Acg+JUBPqM+3T20CMulkp9rXdB8GxoBF3Z/EzAC4+J96u
6lpwqTjO8eMpySou1Ojk7Kje8+Sy0gwbw/E73+d9PgwMKwZbXv9TGrZTcRDAQBLG
9tKKpMIqYe4F+zge3s/MJMKv+7he2aSqmBlj7he/z1WwXDnqaBvb9do/dwo7vxtG
kWU4jZdism4v4J5d39VE+2lKzuq4pxsg8CMC7y09sPlhgyyDviAYfi5EWNHvYftZ
UF5xoi0MAjRGsNhv32cyrX4HJ8RBMkzYdvjWKjVz+zonTeOqgHOQpPNE/5IQxOWC
E1V+35T/CIaxzUOETuf7MsD4oe9IaLrMdw6ZV4h+jETpObcdGZE=
=2xyl
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: