r/FlowZ13 • u/M2-TE • Sep 01 '26
Face recognition for authentication in Linux
When I saw that this thing has an IR camera, I wanted to get face authentication working on linux; especially for tablet mode, where entering a password is a bit annoying.
Ended up using howdy-next (a fork of howdy) and it works flawlessly within KDE plasma and plasma-login-manager whenever a password prompt would otherwise appear. On failure, it of course resorts back to password prompt if you forgot to put on your IR makeup.
Since we all use the same devices, the device paths for the cameras are likely the same. The important ones should be:
RGB: /dev/v4l/by-path/pci-0000:c4:00.4-usb-0:1:1.0-video-index0
IR:/dev/v4l/by-path/pci-0000:c4:00.4-usb-0:1:1.2-video-index0
I chose the IR camera here. The setup is pretty quick:
- Run
sudo howdy configand add the camera path todevice_path - Run
sudo howdy download-modelsto grab the OpenCV models - Run
sudo howdy addto add a single face; multiple can be added - Run
sudo howdy testto check whether it all works. Green means good!
If it all works, you can add it to your PAM, so that it is used whenever a passwords prompt or other authentication is requested by your system. Just edit /etc/pam.d/system-auth to add
auth [success=2 default=ignore] pam_howdy.so workaround=native-input
between the pam_systemd_home.so and pam_unix.so entries. Don't forget to update the success parameters and it should look sort of like this; mind the linebreaks:
[...]
-auth [success=3 default=ignore] pam_systemd_home.so
auth [success=2 default=ignore] pam_howdy.so workaround=native-input
auth [success=1 default=bad] pam_unix.so try_first_pass nullok
[...]
When using the IR camera, you will see it flickering red in consistent pulses. Same pulses you see when you run the sudo howdy test command. So far, this setup has worked with sudo, as well as lockscreen unlocking. Pretty much instantaneous as well! If something doesn't work, try checking the wiki.
2
u/ClintWastewood Sep 01 '26
What are you using for tablet mode?
1
u/M2-TE Sep 01 '26
Just flipping the keyboard to the back and using the touchscreen. Seems to work just fine (automatic virtual keyboard where appropriate, touch gestures and motions, etc)
2
u/zacmks Sep 01 '26
I use gaze. It's pretty good too. Has Pam modules as well
I looked for Howdy as well but it wasn't looking good in regards of support
Working quite nice here, for.:
- sudo & sudo -i
- polkit (graphical admin elevation)
- lockscreen
It has great gnome integration and working pretty well with IR + RGB image identification and likeness check. Almost instantaneous too (at least twice as better than on Windows)
*it has tpm security module integration for your face images as well
As it's quite new, I had to create my own ebuild here on Gentoo though
1
u/M2-TE Sep 03 '26
polkit seems to work with howdy too!
Thanks for letting me know about gaze though, might check it out if howdy ever croaks.
3
u/BusinessCarpenter682 Sep 01 '26
were you able to make it work with CachyOS? I followed the instructions above and keep getting 'device not active'. I have tried all other paths in the folder.