omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

SDDM greeter's Hyprland config ignores system keyboard layout, causing password mismatches for non-US layouts

Open winless-code opened this issue 3 months ago • 2 comments

Title: SDDM greeter's Hyprland config ignores system keyboard layout, causing password mismatches for non-US layouts

What happened

The SDDM Wayland greeter runs its own minimal Hyprland instance via /usr/share/sddm/hyprland.lua (referenced from /etc/sddm.conf.d/10-wayland.conf as CompositorCommand). This config has no input block, so it falls back to Hyprland's default keyboard layout (US), regardless of the system's actually configured layout (localectl correctly reports de for both console and X11).

This is invisible for most passwords, but any password containing a character that sits on a different key between the US and configured layout (e.g. _ on a US vs. German keyboard) gets typed incorrectly at the greeter — while working fine on a TTY or inside the real Hyprland session, since those correctly use the system layout.

What was expected

The SDDM greeter should use the system's configured keyboard layout (as reported by localectl status), matching what the TTY and the user's actual Hyprland session use — so password entry is consistent across all three.

Steps to reproduce

  1. Install Omarchy on a system with a non-US keyboard layout (e.g. de) configured via localectl / /etc/vconsole.conf.
  2. Set a password containing a character that differs in position between the US and configured layout (e.g. _, which is Shift+Minus on US but a different key combination on German layout).
  3. Reboot to the SDDM login screen and enter the password.
  4. Login fails — the greeter's default US-layout Hyprland instance produces the wrong character(s). Password verified independently (e.g. via openssl passwd -6 against /etc/shadow) confirms it's correct; entering the same password on a TTY works.

Workaround

Manually add an input block to /usr/share/sddm/hyprland.lua:

hl.config({
  input = { kb_layout = 'de' },
  ...
})

This is not durable: the file is owned by the omarchy-settings package and has no pacman backup/pacnew protection, so it is silently overwritten (and the bug reintroduced) on the next omarchy update.

System details

  • Omarchy version: 4.0.2-1
  • Kernel: 7.1.9-arch1-2
  • CPU: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
  • GPU: Intel TigerLake-LP GT2 [Iris Xe Graphics] (i915 driver)
  • Keyboard layout: de (confirmed via localectl status: VC Keymap, X11 Layout both de)

winless-code avatar Aug 31 '26 18:08 winless-code

Confirmed on Omarchy 4.0.2-1 with a German keyboard layout.

/etc/vconsole.conf correctly contains:

KEYMAP=de
XKBLAYOUT=de
XKBMODEL=pc105

After logging out, the SDDM greeter appeared but rejected the normal password twice. The previous-boot journal confirms that PAM received an incorrect password rather than failing during session startup:

unix_chkpwd: password check failed for user (kor)
pam_unix(sddm:auth): authentication failure
sddm: Authentication error: SDDM::Auth::ERROR_AUTHENTICATION

A package-update-safe workaround is to use a local Hyprland configuration for the SDDM compositor instead of modifying /usr/share/sddm/hyprland.lua.

-- /etc/sddm/hyprland-vmware.lua
hl.config({
  input = {
    kb_layout = "de",
  },

  misc = {
    disable_hyprland_logo = true,
    disable_splash_rendering = true,
    force_default_wallpaper = 0,
  },

  animations = {
    enabled = false,
  },
})
# /etc/sddm.conf.d/91-vmware-keyboard.conf
[Wayland]
CompositorCommand=start-hyprland -- --config /etc/sddm/hyprland-vmware.lua

Hyprland --verify-config --config /etc/sddm/hyprland-vmware.lua reports config ok.

After installing these files and logging out again, the same password was accepted with the expected German layout and the Omarchy session started normally.

The filenames here include vmware because this was discovered while diagnosing a VMware greeter-rendering issue, but the keyboard-layout fix itself is generic. A proper Omarchy fix should make the shipped SDDM Hyprland configuration read XKBLAYOUT, variant, model, and options from /etc/vconsole.conf, as the normal Omarchy Hyprland input configuration already does.

This also appears to overlap with #6880.

Filed by GPT-5 via Codex.

Kor123 avatar Sep 03 '26 11:09 Kor123

Automated duplication check: this issue looks similar to #6880, which covers the same SDDM greeter ignores system keyboard layout. I keep that one open and close this one to keep the discussion in one place.

If you feel this is the wrong decision, please open the issue again with a note on the difference.

bjarneo avatar Sep 21 '26 05:09 bjarneo