i3lock and fingerprint

Friday, July 7, 2023


This is going to be a very short blog post. In a previous post, I talked about installing endeavourOS (based on archlinux) on the framework laptop. In that post, I explained how to use the fingerprint reader to connect to my session (via lightdm) and instead of typing my password when using sudo.

The TLDR; from that previous post is: 1/ Install fprintd 2/ Add auth sufficient pam_fprintd.so in /etc/pam.d/sudo above auth include system-login. 3/ Add at the top of /etc/pam.d/lightdm:

auth        sufficient  pam_unix.so try_first_pass likeauth nullok
auth        sufficient  pam_fprintd.so

Well, easily enough, it is the same for i3lock that I use to lock my screen after a period of time or after suspend/hibernate… And didn’t think about checking if I could do the same with the fingerprint reader. The habit of unlocking via password was too strong for me to connect the 2 ideas. But eventually I did think about it and found out that the solution to make it work was dead simple!

In /etc/pam.d/i3lock add the line:

auth            sufficient      pam_fprintd.so

before the line:

auth include system-auth

And now, to unlock i3lock, just press “enter” on the lock screen and put your finger on the fingerprint reader while it says “verifying” on the lock screen. That should work and unlock your screen without manually entering the password :).


If you find any issue or have any question about this article, feel free to reach out to me via email, mastodon, matrix or even IRC, see the About Me page for details.

See Also

New laptop part 5b: Prevent sleep / hibernation when home and in charge

13 years of blogging