Repository navigation
Lock Screens
Note
NixOS users should see NixOS for declarative PAM setup.
Warning
Incorrect PAM configuration can lock you out. Keep a root shell or TTY recovery path available while testing a lock screen, and always keep password authentication enabled.
Lock screens fall into two PAM patterns:
- PAM-first / concurrent: Invoke PAM before or while reading a password. These can use the normal shared stack in PAM Integration.
-
Password-first: Collect input before starting PAM. Use a service-specific PAM file with
pam_unix.sobeforepam_howdy.so, and do not includeauth include system-auth. Noworkaround=option is needed because a PAM authentication token already exists when Howdy runs (seeman pam_howdy).
Edit /etc/pam.d/waylock with password first, then Howdy, then fingerprint fallback:
auth required pam_faillock.so preauth
-auth [success=5 default=ignore] pam_systemd_home.so
auth [success=4 default=ignore] pam_unix.so try_first_pass nullok
auth [success=3 default=ignore] pam_howdy.so
auth [success=2 default=bad] pam_fprintd.so max-tries=1
auth [default=die] pam_faillock.so authfail
auth optional pam_permit.so
auth required pam_env.so
auth required pam_faillock.so authsucc
Notes:
- Keep the existing
account,password, andsessionrules required by your system, withoutauth include system-auth. - If fingerprint fallback causes long delays after password and Howdy fail, keep
max-tries=1or remove thepam_fprintd.soline (and adjust the[success=N]counts above it).
Omarchy's lock screen (Quickshell, Omarchy 4.5; based on issue #31) authenticates through its own PAM service and only starts PAM after a non-empty password is submitted.
Edit /etc/pam.d/omarchy-lock-password:
#%PAM-1.0
auth required pam_faillock.so preauth silent deny=10 unlock_time=120
-auth [success=3 default=ignore] pam_systemd_home.so
auth [success=2 default=ignore] pam_unix.so try_first_pass nullok
auth [success=1 default=bad] pam_howdy.so
auth [default=die] pam_faillock.so authfail deny=10 unlock_time=120
auth optional pam_permit.so
auth required pam_env.so
auth required pam_faillock.so authsucc
account include system-local-login
This keeps Omarchy's stock rules and inserts only pam_howdy.so, with adjusted success= jumps
above it.
Notes:
- To unlock with your face, type any character and press Enter. Empty submissions are ignored, so unlocking is not hands-free.
- A valid password unlocks immediately without using the camera. Any other non-empty text runs Howdy; when it matches, unlock succeeds without the failed-password delay.
- If both fail, that counts as one attempt toward Omarchy's
pam_faillocklimit (10 tries, 120 s lockout). - No
workaround=option is needed, and Omarchy's separate fingerprint service (omarchy-lock-fingerprint) is unaffected.
Most PAM clients (sudo, su, polkit helper, GDM worker) spawn a fresh process per authentication
and pick up an updated pam_howdy.so immediately. A lock screen that was already running across
the upgrade keeps its old PAM handle, which only works with the helper version installed alongside
it; face authentication falls back to your password until you restart the lock screen or reboot. A
reboot also clears legacy /run/howdy runtime copies from older versions.
- PAM Integration
- Troubleshooting
- NixOS
man pam_howdy