omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

SDDM authenticates empty username ("") after interrupted/resumed install — "User not known to the underlying authentication module"

Open gtech-pedrol opened this issue 3 months ago • 5 comments

System details

  • Laptop: Lenovo Ideapad 330-15IKB (81FE) - CPU: Intel Core i7-8550U - GPU: NVIDIA GeForce MX150 - Omarchy version: 4.0 (Quattro) - Install method: Official ISO, full disk + LUKS - Note: Installation was interrupted multiple times during hardware phase and resumed via arch-chroot + omarchy-apply-system

What's wrong?

After completing a resumed installation (due to earlier failures in hardware scripts), the system boots correctly and unlocks the LUKS disk with the correct password.

However, the graphical SDDM login screen always fails with:

pam_unix(sddm:auth): check pass; user unknown
Authentication error: SDDM::Auth::ERROR_AUTHENTICATION "User not known to the underlying authentication module"
Authentication for user "" failed

Key points:

  • The user account myusername exists and works perfectly on TTY (Ctrl+Alt+F2).
  • Password is correct (confirmed via passwd and TTY login).
  • SDDM is trying to authenticate an empty username ("") instead of myusername.
  • Adding DefaultUser=myusername in /etc/sddm.conf.d/ did not help.
  • The Omarchy theme is active (Current=omarchy).

Workaround that worked: Enabled autologin temporarily:

[Autologin]
User=myusername
Session=hyprland

Expected behavior: SDDM should correctly detect and use the existing user myusername (especially on a single-user install), even after a resumed/interrupted installation.

gtech-pedrol avatar Aug 23 '26 19:08 gtech-pedrol

Omarchy's theme reads currentUser straight from the userModel.lastUser, which SDDM only populates from state.conf. Since your install was install interrupted before the first login it never writes that file, so lastUser seems to be empty. I think my fix should resolve this.

ErikMelton avatar Aug 24 '26 19:08 ErikMelton

Thanks @ErikMelton! That makes perfect sense.

The install was interrupted several times during the hardware phase (psmouse, vulkan, nvidia scripts, etc.), so it never reached a successful first login. That matches exactly what you described with state.conf / lastUser never being written.

Looking forward to the fix in #8069. Happy to test it on this machine once it lands.

gtech-pedrol avatar Aug 25 '26 12:08 gtech-pedrol

I can reproduce this on a current Omarchy Quattro installation after the installation was resumed.

The SDDM greeter starts normally and loads the Omarchy theme. The same account and password work from a TTY, but the first graphical authentication fails with:

pam_systemd_home(sddm:auth): User name not set.
pam_unix(sddm:auth): check pass; user unknown
pam_unix(sddm:auth): authentication failure
Authentication for user "" failed

The current quattro source still has this path in default/sddm/omarchy/Main.qml:

property string currentUser: userModel.lastUser
...
sddm.login(root.currentUser, password.text, root.sessionIndex)

This confirms that the failure happens before password validation: on the first login, lastUser can be empty because SDDM has not written its previous-user state yet. The fix should resolve the active account from the current user model without hardcoding a username, while also avoiding stale or empty selections.

This provides a hardware reproduction for #7949. I am happy to test the revised fallback from #8069 on the affected machine.

ramirleite1987-bot avatar Sep 04 '26 23:09 ramirleite1987-bot

Another trigger for this, outside the ISO and with no interrupted install: installing Omarchy on top of an existing Arch-based distro, then switching the display manager to SDDM. SDDM had simply never had a successful first login, so state.conf never existed.

On quattro, only two code paths write /var/lib/sddm/state.conf: omarchy-provision-owner (the ISO's first-boot setup, which also writes autologin) and omarchy-upgrade-to-quattro. A package install onto EndeavourOS runs neither, and with no autologin configured the greeter is actually shown — so the first boot on SDDM is a guaranteed lockout.

Same signature on all 10 attempts:

pam_unix(sddm:auth): check pass; user unknown
pam_unix(sddm:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
[PAM] authenticate: User not known to the underlying authentication module

Worth knowing for anyone else who hits it: it reads like a keyboard-layout problem. The theme has no username field and no layout indicator, so a greeter that silently rejects everything looks like wrong input. The greeter's input:kb_layout was us the whole time.

#8069 fixes it — verified against real SDDM, not a mock

I ran #8069's resolve-current-user.js (PR head 0b2dda23) inside a small probe theme under sddm-greeter-qt6 --test-mode. In test mode state.conf isn't readable by the user, so lastUser comes back empty — the exact bug condition:

PROBE rowCount=1
PROBE lastUser=[]
PROBE row0 UserRole+1=[duduphudu] DisplayRole=[undefined]
PROBE resolveCurrentUser=[duduphudu]

So on the real UserModel the name is at Qt.UserRole + 1, Qt.DisplayRole returns undefined as the PR's comment says, and the single-account fallback resolves the right user. The PR's test uses a mock model, so this covers the one assumption it couldn't check. (Note the greeter sends console.log to the journal, not stdout, if anyone repeats this.)

Workaround until it lands

Seed the state SDDM would have written after a first login. User= is what matters; this theme picks its session by name regardless of Session=.

# /var/lib/sddm/state.conf   (owner sddm:sddm, mode 600)
[Last]
User=<your username>

Confirmed here: the next boot logged in through SDDM on the first attempt.

System: Intel Core Ultra 7 155H, Intel Arc + NVIDIA RTX 4070 Mobile · Omarchy 4.0.3 (omarchy-settings 4.0.3-1) · sddm 0.21.0-7 · EndeavourOS base · kernel 7.2.4 · no disk encryption

ReidenXerx avatar Sep 11 '26 01:09 ReidenXerx

Closing, as a policy call from the maintainer. When an install is interrupted part way, some setup steps may never have finished, and SDDM's missing first-login state is only one sign of that; patching a broken install piece by piece isn't safe or reasonable, so the fix is to reinstall from the ISO. Installing Omarchy on top of another Arch-based distribution, the other way to reach this, isn't supported. The proposed greeter fallback in #8069 is closed for the same reason. Thank you all for the detailed reports.

omarchybot avatar Oct 03 '26 12:10 omarchybot