This project provides an automated tool to configure and manage facial recognition unlock (Windows Hello-style face lock) on Arch Linux, specifically optimized for the Asus ProArt P16 (H7606WV) laptop.
It automates the installation of the modernized C++ and OpenCV-based face unlock framework (howdy-next), dynamically configures the system to use the correct persistent hardware path of the Asus IR camera, downloads the necessary ONNX models, and manages Pluggable Authentication Modules (PAM) safely.
- Automated Dependency Check and Installation: Detects and installs
howdy-nextfrom the Arch User Repository (AUR) usingyay. - Dynamic IR Camera Discovery: Scans sysfs to identify the
ASUS IR cameradevice, resolving it to a persistent device path under/dev/v4l/by-pathto avoid interface index swaps across reboots. - Optimal Hardware Tuning: Configures Howdy to match the ProArt P16 IR camera sensor capabilities (grayscale, 640x400 resolution, custom frame rates, and settings).
- Safe PAM Authentication Injection: Injects PAM lines selectively into targets like
sudo,sddm(display manager), andhyprlock(screen locker) instead of modifying global modules likesystem-auth. - Configuration Safeguards: Creates backups of all edited PAM files with a rollback command to restore system state in case of issues.
- Diagnostic Tools: Wraps CLI testing commands to preview the camera feed and diagnose hardware states.
The Asus ProArt P16 contains an FHD infrared (IR) camera alongside the main RGB camera. Under Linux, this device is listed as:
- Name:
ASUS FHD webcam: ASUS IR camera - Pixel Format: Grayscale (GREY / Y800)
- Supported Resolutions: 640x400 at 15 FPS
A common challenge on Asus ProArt and Vivobook laptops is that the IR LED emitter is gated by a hardware-based proximity/motion sensor for power-saving purposes. The IR LED will only pulse or activate when it detects motion or presence close to the display. If the camera captures a black or static frame, move your head slightly or wave your hand in front of the screen to activate the emitter.
- Arch Linux
- An AUR helper (
yaymust be installed) - Python 3
To run the manager, clone this repository and run the proart-face-lock script. The utility will automatically elevate itself to root privileges via sudo where necessary.
Run the install command to install dependencies, identify the camera, download models, and configure hardware settings:
python3 proart-face-lock installEnroll a face model for a specific user:
python3 proart-face-lock add <username>Test that the camera captures frames and is able to recognize your face:
python3 proart-face-lock testEnable face lock for specific modules. You can select one or more targets:
python3 proart-face-lock enable-pam <service>Supported services: sudo, sddm, hyprlock, gdm-password, lightdm, ly, swaylock, xscreensaver, i3lock, kde, system-local-login, login, polkit-1.
For example, to enable it for sudo and screen locking:
python3 proart-face-lock enable-pam sudo hyprlockVerify the status of the system integration, camera configuration, and enrolled models:
python3 proart-face-lock statusTemporarily or permanently disable PAM integrations without uninstalling the package:
python3 proart-face-lock disable-pam <service>Revert all PAM modifications, delete face models, and restore the original configurations:
python3 proart-face-lock uninstallUsage: proart-face-lock <command> [arguments]
Commands:
install Install dependencies, set up camera configs, download models.
uninstall Safely restore PAM files, remove models, and clean up.
status Show current status of camera, package, models, and PAM files.
test Run a camera test stream to verify facial detection.
add <user> Enroll a new face model for the specified user.
list <user> List all enrolled face models for the specified user.
remove <user> <id> Remove a specific face model by its ID.
enable-pam <services> Inject face lock into PAM files (e.g., sudo, sddm, gdm-password).
disable-pam <services> Remove face lock from PAM files.
Supported: sudo, sddm, hyprlock, gdm-password, lightdm, ly,
swaylock, xscreensaver, i3lock, kde, system-local-login, login, polkit-1
- Ensure the camera switch (if your laptop has a physical shutter or privacy switch) is open.
- The Asus IR camera requires presence/motion to trigger the IR light. Make sure you are sitting directly in front of the camera and move your head slightly.
- Verify that the correct camera path is configured in
/etc/howdy/config.ini. Runpython3 proart-face-lock statusto check the current device path.
If a PAM configuration error occurs and you are locked out, you can restore all modified PAM configurations by using your active root session to run the rollback script:
python3 proart-face-lock uninstallOr manually restore the backup files created under /etc/pam.d/*.bak.
If you captured a bad face scan (for example, you were not looking at the screen), you can list and remove the incorrect model before scanning again:
- List your current enrolled face models to find the ID:
python3 proart-face-lock list <username>- Remove the incorrect model using its ID (e.g.,
0):
python3 proart-face-lock remove <username> <id>- Look directly at the screen and scan your face again:
python3 proart-face-lock add <username>This project is licensed under the MIT License. See the LICENSE file for details.