Skip to content

feat(lockscreen,polkit): face authentication via Gaze#3532

Draft
bennypowers wants to merge 1 commit into
noctalia-dev:mainfrom
bennypowers:feat/gaze-face-auth
Draft

feat(lockscreen,polkit): face authentication via Gaze#3532
bennypowers wants to merge 1 commit into
noctalia-dev:mainfrom
bennypowers:feat/gaze-face-auth

Conversation

@bennypowers

Copy link
Copy Markdown

Summary

  • Add face unlock to the lockscreen using GunduLabs/gaze facial authentication daemon via D-Bus (com.gundulabs.Gaze)
  • Add polkit auto-response for GAZE_CONFIRMATION_REQUEST from pam_gaze.so, enabling face auth through the polkit PAM stack
  • Add face-auth config toggle and settings UI entry under Security > Lock Screen

Details

FaceAuthenticator mirrors the existing FingerprintAuthenticator pattern:

  • Pre-checks HasEnrolledFaces and IsCameraAvailable before claiming
  • Async Claim/Release session lifecycle with VerifyStart/VerifyStop
  • Subscribes to FaceStatus (capture quality feedback) and VerifyStatus (match result) signals
  • Retries up to 3 times on verify-no-match with 500ms delay
  • Handles sleep/wake via PrepareForSleep with deferred proxy reclaim for stale claims
  • Runs concurrently with fingerprint auth; whichever succeeds first unlocks

When Gaze is not installed or no face is enrolled, face auth silently bails with no errors.

For polkit, when pam_gaze.so is in the polkit PAM stack and sends a GAZE_CONFIRMATION_REQUEST prompt on successful face match, noctalia auto-responds with CONFIRM.

Test plan

  • Build and install with Gaze not installed: lockscreen and polkit work normally, no errors in log
  • Build with Gaze installed, face enrolled: lockscreen shows "Look at the camera", unlocks on face match
  • Verify face auth retries on no-match, stops after 3 failures
  • Verify face auth stops when user starts typing password, restarts after failed password attempt
  • Verify sleep/wake: face auth restarts after resume
  • Verify settings toggle disables face auth
  • Verify polkit face auth with pam_gaze.so in /etc/pam.d/polkit-1
  • Verify concurrent fingerprint + face auth both work, first to succeed unlocks

Closes #3000

@bennypowers

Copy link
Copy Markdown
Author

Currently, when the lockscreen comes up, a gaze session starts immediately, runs the CPU until timeout, then cancels, and subsequently falls back to password authentication. Not ideal. I'd like to get some feedback on this for a better workflow.

@bennypowers
bennypowers marked this pull request as draft July 20, 2026 15:44
Add face unlock support using GunduLabs/gaze facial authentication
daemon. FaceAuthenticator talks to com.gundulabs.Gaze on the system
D-Bus, mirroring the existing FingerprintAuthenticator pattern.

Lockscreen: face auth runs concurrently with fingerprint and password.
Pre-checks enrolled faces and camera availability, claims a Gaze
session, subscribes to FaceStatus/VerifyStatus signals, retries up
to 3 times on no-match, and handles sleep/wake with deferred proxy
reclaim for stale claims.

Polkit: auto-responds to GAZE_CONFIRMATION_REQUEST prompts from
pam_gaze.so with CONFIRM, enabling seamless face auth through the
polkit PAM stack.

Closes noctalia-dev#3000

Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bennypowers
bennypowers force-pushed the feat/gaze-face-auth branch from 7598a50 to 47179cc Compare July 22, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] howdy face login support on lockscreen

1 participant