Subject: SDDM Auth Error, VT Collision, Hardcoded Binary

From: Andrew Wong <[email-masked]>
Date: Sun, 29 Dec 2024 04:04:21 -0500

Hello Guix,

It appears that Guix' SDDM service has several issues, diagnosable from
its /var/log/sddm.log[3]. First of all, the program seeks to use
/gnu/store/...sddm/bin/sddm-greeter as a component. However, the default
'sddm' package instead has 'bin/sddm-greeter-qt6' instead, making the
service broken by default, as it won't work unless sddm-qt5 is specified
to be used instead.

Secondly, when using Wayland as the display server, SDDM appears to
"fail to take control of" TTY 1. Discussion on IRC suggested that it
couldn't log in because mingetty had set up a terminal there.
Documentation on SDDM's repository [1] shows that the default TTY is
configured by the SDDM_INITIAL_VT CMake variable defaulting to 1. This
should be changed to 7, maybe. The 'MinimumVT' option also no longer
works since SDDM v0.20 [2].

Finally, there is the "Auth Error". It appears that the service
struggles with PAM authenticating itself; maybe that's really what's
keeping it away from tty1? This is the most fuzzy error, it seems
similar to other errors on the SDDM repo.

[1] https://github.com/sddm/sddm?tab=readme-ov-file#virtual-terminals
[2] https://man.archlinux.org/man/sddm.conf.5
[3] Below is a snippet of my log. It repeats several times each second:
[02:36:50.366] (II) DAEMON: Socket server stopping...
[02:36:50.366] (II) DAEMON: Socket server stopped.
[02:36:50.366] (II) DAEMON: Removing display SDDM::Display(0x3e9946c0) ...
[02:36:50.366] (II) DAEMON: Adding new display...
[02:36:50.366] (II) DAEMON: Loaded empty theme configuration
[02:36:50.366] (II) DAEMON: Using VT 1
[02:36:50.366] (II) DAEMON: Display server started.
[02:36:50.366] (II) DAEMON: Socket server starting...
[02:36:50.367] (II) DAEMON: Socket server started.
[02:36:50.367] (II) DAEMON: Loading theme configuration from 
"/run/current-system/profile/share/sddm/themes/maldives/theme.conf"
[02:36:50.367] (II) DAEMON: Greeter starting...
[02:36:50.372] (II) HELPER: [PAM] Starting...
[02:36:50.372] (II) HELPER: [PAM] Authenticating...
[02:36:50.372] (II) HELPER: [PAM] returning.
[02:36:50.417] (EE) HELPER: Failed to take control of "/dev/tty1" 
("root"): Operation not permitted
[02:36:50.418] (II) DAEMON: Greeter session started successfully
[02:36:50.418] (II) HELPER: [PAM] Closing session
[02:36:50.418] (II) HELPER: [PAM] Ended.
[02:36:50.419] (WW) DAEMON: Auth: sddm-helper exited with 5
[02:36:50.419] (II) DAEMON: Greeter stopped. SDDM::Auth::HELPER_TTY_ERROR
[02:36:50.419] (II) DAEMON: Jumping to VT 1
[02:36:50.482] (II) DAEMON: VT mode didn't need to be fixed
[02:36:50.482] (II) DAEMON: Socket server stopping...
[02:36:50.482] (II) DAEMON: Socket server stopped.
[02:36:50.482] (II) DAEMON: Removing display SDDM::Display(0x3e998d40) ...
[02:36:50.483] (II) DAEMON: Adding new display...
[02:36:50.483] (II) DAEMON: Loaded empty theme configuration
[02:36:50.483] (II) DAEMON: Using VT 1
[02:36:50.483] (II) DAEMON: Display server started.
[02:36:50.483] (II) DAEMON: Socket server starting...
[02:36:50.483] (II) DAEMON: Socket server started.
[02:36:50.483] (II) DAEMON: Loading theme configuration from 
"/run/current-system/profile/share/sddm/themes/maldives/theme.conf"
[02:36:50.483] (II) DAEMON: Greeter starting...
[02:36:50.488] (II) HELPER: [PAM] Starting...
[02:36:50.488] (II) HELPER: [PAM] Authenticating...
[02:36:50.488] (II) HELPER: [PAM] returning.
[02:36:50.525] (EE) HELPER: Failed to take control of "/dev/tty1" 
("root"): Operation not permitted
[02:36:50.525] (II) DAEMON: Greeter session started successfully
[02:36:50.526] (II) HELPER: [PAM] Closing session
[02:36:50.526] (II) HELPER: [PAM] Ended.
[02:36:50.527] (WW) DAEMON: Auth: sddm-helper exited with 5
[02:36:50.527] (II) DAEMON: Greeter stopped. SDDM::Auth::HELPER_TTY_ERROR
[02:36:50.527] (II) DAEMON: Jumping to VT 1
[02:36:50.582] (II) DAEMON: VT mode didn't need to be fixed
[02:36:50.582] (II) DAEMON: Socket server stopping...
[02:36:50.582] (II) DAEMON: Socket server stopped.
[02:36:50.582] (II) DAEMON: Removing display SDDM::Display(0x3e9941e0) ...
[02:36:50.582] (II) DAEMON: Adding new display...
[02:36:50.582] (II) DAEMON: Loaded empty theme configuration
[02:36:50.583] (II) DAEMON: Using VT 1
[02:36:50.583] (II) DAEMON: Display server started.
[02:36:50.583] (II) DAEMON: Socket server starting...
[02:36:50.583] (II) DAEMON: Socket server started.
[02:36:50.583] (II) DAEMON: Loading theme configuration from 
"/run/current-system/profile/share/sddm/themes/maldives/theme.conf"
[02:36:50.583] (II) DAEMON: Greeter starting...
[02:36:50.588] (II) HELPER: [PAM] Starting...
[02:36:50.588] (II) HELPER: [PAM] Authenticating...
[02:36:50.588] (II) HELPER: [PAM] returning.
[02:36:50.621] (EE) HELPER: Failed to take control of "/dev/tty1" 
("root"): Operation not permitted
[02:36:50.621] (II) DAEMON: Greeter session started successfully
[02:36:50.622] (II) HELPER: [PAM] Closing session
[02:36:50.622] (II) HELPER: [PAM] Ended.
[02:36:50.623] (WW) DAEMON: Auth: sddm-helper exited with 5
[02:36:50.623] (II) DAEMON: Greeter stopped. SDDM::Auth::HELPER_TTY_ERROR
[02:36:50.623] (II) DAEMON: Jumping to VT 1
[02:36:50.682] (II) DAEMON: VT mode didn't need to be fixed
[02:36:50.682] (II) DAEMON: Socket server stopping...
[02:36:50.682] (II) DAEMON: Socket server stopped.
[02:36:50.682] (II) DAEMON: Removing display SDDM::Display(0x3e998d40) ...
[02:36:50.682] (II) DAEMON: Adding new display...
[02:36:50.682] (II) DAEMON: Loaded empty theme configuration
[02:36:50.683] (II) DAEMON: Using VT 1
[02:36:50.683] (II) DAEMON: Display server started.
[02:36:50.683] (II) DAEMON: Socket server starting...
[02:36:50.683] (II) DAEMON: Socket server started.
[02:36:50.683] (II) DAEMON: Loading theme configuration from 
"/run/current-system/profile/share/sddm/themes/maldives/theme.conf"
[02:36:50.683] (II) DAEMON: Greeter starting...
[02:36:50.688] (II) HELPER: [PAM] Starting...
[02:36:50.688] (II) HELPER: [PAM] Authenticating...
[02:36:50.688] (II) HELPER: [PAM] returning.
[02:36:50.725] (EE) HELPER: Failed to take control of "/dev/tty1" 
("root"): Operation not permitted
[02:36:50.726] (II) DAEMON: Greeter session started successfully
[02:36:50.726] (II) HELPER: [PAM] Closing session
[02:36:50.726] (II) HELPER: [PAM] Ended.
[02:36:50.727] (WW) DAEMON: Auth: sddm-helper exited with 5
[02:36:50.727] (II) DAEMON: Greeter stopped. SDDM::Auth::HELPER_TTY_ERROR
[02:36:50.727] (II) DAEMON: Jumping to VT 1
[02:36:50.782] (II) DAEMON: VT mode didn't need to be fixed
[02:36:50.782] (II) DAEMON: Socket server stopping...
[02:36:50.782] (II) DAEMON: Socket server stopped.
[02:36:50.783] (II) DAEMON: Removing display SDDM::Display(0x3e9941e0) ...
[02:36:50.783] (II) DAEMON: Adding new display...
[02:36:50.783] (II) DAEMON: Loaded empty theme configuration
[02:36:50.783] (II) DAEMON: Using VT 1
[02:36:50.783] (II) DAEMON: Display server started.
[02:36:50.783] (II) DAEMON: Socket server starting...
[02:36:50.783] (II) DAEMON: Socket server started.
[02:36:50.783] (II) DAEMON: Loading theme configuration from 
"/run/current-system/profile/share/sddm/themes/maldives/theme.conf"
[02:36:50.783] (II) DAEMON: Greeter starting...
[02:36:50.788] (II) HELPER: [PAM] Starting...
[02:36:50.788] (II) HELPER: [PAM] Authenticating...
[02:36:50.789] (II) HELPER: [PAM] returning.
[02:36:50.821] (EE) HELPER: Failed to take control of "/dev/tty1" 
("root"): Operation not permitted
[02:36:50.821] (II) DAEMON: Greeter session started successfully
[02:36:50.821] (II) HELPER: [PAM] Closing session
[02:36:50.822] (II) HELPER: [PAM] Ended.
[02:36:50.822] (WW) DAEMON: Auth: sddm-helper exited with 5
[02:36:50.822] (II) DAEMON: Greeter stopped. SDDM::Auth::HELPER_TTY_ERROR
[02:36:50.822] (II) DAEMON: Jumping to VT 1
[02:36:50.898] (II) DAEMON: VT mode didn't need to be fixed
[02:36:50.898] (II) DAEMON: Socket server stopping...
[02:36:50.898] (II) DAEMON: Socket server stopped.
[02:36:50.899] (II) DAEMON: Removing display SDDM::Display(0x3e998d40) ...
[02:36:50.899] (II) DAEMON: Adding new display...
[02:36:50.899] (II) DAEMON: Loaded empty theme configuration
[02:36:50.899] (II) DAEMON: Using VT 1
[02:36:50.899] (II) DAEMON: Display server started.
[02:36:50.899] (II) DAEMON: Socket server starting...
[02:36:50.899] (II) DAEMON: Socket server started.
[02:36:50.899] (II) DAEMON: Loading theme configuration from 
"/run/current-system/profile/share/sddm/themes/maldives/theme.conf"
[02:36:50.899] (II) DAEMON: Greeter starting...
[02:36:50.899] (II) DAEMON: Socket server stopping...
[02:36:50.899] (II) DAEMON: Socket server stopped.
[02:36:50.900] (WW) DAEMON: Auth: sddm-helper (--socket 
/tmp/sddm-auth-ec4d9f68-621a-4e10-8481-dd625e39d088 --id 14 --start 
/gnu/store/xyhpks9x9zb2kmhg3g8f1v2afdpmqls9-sddm-qt5-0.21.0/bin/sddm-greeter 
--socket /tmp/sddm--IDmhON --theme 
/run/current-system/profile/share/sddm/themes/maldives --user sddm 
--display-server weston --shell=kiosk --greeter) crashed (exit code 1)
[02:36:50.900] (WW) DAEMON: Auth: sddm-helper exited with 15