noctalia-shell icon indicating copy to clipboard operation
noctalia-shell copied to clipboard

[BUG] Lock screen fingerprint fails silently — Claim() requests `enroll` permission instead of `verify`

Open DinoRexHub opened this issue 4 months ago • 2 comments

Submission checklist

  • [x] I have searched existing issues and confirmed this is not a duplicate.
  • [x] I am using the latest available version of Noctalia.

Bug description

Fingerprint unlock is enabled in Settings, and fprintd itself works fine everywhere else on the system (login manager, sudo). But on the Noctalia lock screen, touching the sensor does nothing at all (no error shown, no unlock, no visible feedback.)

Steps to reproduce

  1. Enroll a fingerprint with fprintd and confirm it works for login/sudo.
  2. Enable fingerprint unlock in Noctalia Settings.
  3. Lock the session.
  4. Touch the fingerprint sensor.

Expected behavior

Lock screen should only need net.reactivated.fprint.device.verify to check a fingerprint, same as any other fprintd client doing verification (not enrollment). Shouldn't require a custom polkit rule to unlock with a finger that already works everywhere else on the system.

Actual behavior

Every lock attempt fails at Claim() with a PermissionDenied error for the enroll action instead of verify (see logs below). Since Claim() never succeeds, it never reaches VerifyStart, so nothing visibly happens when touching the sensor — no error surfaced in the UI at all.

Confirmed this is the cause: adding a polkit rule that explicitly grants both enroll and verify to my active session fixes it immediately:

polkit.addRule(function(action, subject) { if ((action.id == "net.reactivated.fprint.device.enroll" || action.id == "net.reactivated.fprint.device.verify") && subject.user == "myuser" && subject.active) { return polkit.Result.YES; } });

Logs / error output

<details>
<summary>noctalia.log excerpt</summary>

[INF] [fingerprint] using fingerprint device /net/reactivated/Fprint/Device/0
[INF] [fingerprint] could not claim fingerprint device: [net.reactivated.Fprint.Error.PermissionDenied] Not Authorized: net.reactivated.fprint.device.enroll

</details>

Noctalia version

5.0.0_beta.4-2

Compositor

Niri

Distribution

Arch-based

Environment information

Distro: Artix (Dinit)
Installation method: AUR source build
CPU: Intel Core Ultra 7 258V (Lunar Lake Ultra 7)
GPU: Intel Arc 140V (Integrated)
Laptop Model: Thinkpad X1 Carbon, Generation 13

Additional context

Fingerprint auth via fprintd works fine for console login and sudo on this system, this appears specific to how Noctalia's own D-Bus client claims the device for lock screen verification.

DinoRexHub avatar Jul 24 '26 03:07 DinoRexHub

I have just got same issue on Framework with NixOS running Niri and Noctalia v5 beta 3. According to my troubleshooting:

Noctalia's lock screen requests the wrong polkit action when it claims the fingerprint device. It asks for net.reactivated.fprint.device.enroll instead of net.reactivated.fprint.device.verify. Enroll requires admin authentication by default, so polkit denies it:

[INF] [fingerprint] using fingerprint device /net/reactivated/Fprint/Device/0 [INF] [fingerprint] could not claim fingerprint device: [net.reactivated.Fprint.Error.PermissionDenied] Not Authorized: net.reactivated.fprint.device.enroll

benicd avatar Jul 26 '26 17:07 benicd

I'm seeing an intermittent variant on NixOS + Niri, Noctalia v5.0.0-beta.9, with a Goodix MOC fingerprint sensor. Fingerprint authentication reliably works for sudo, but Noctalia sometimes silently stops accepting fingerprints after waking.

The journal suggests a session-activation race, rather than necessarily requesting the wrong permission:

Sep 05 18:15:03.036 noctalia: using fingerprint device /net/reactivated/Fprint/Device/0
Sep 05 18:15:03.120 niri: pausing session
Sep 05 18:15:03.375 noctalia: could not claim fingerprint device:
  [net.reactivated.Fprint.Error.PermissionDenied]
  Not Authorized: net.reactivated.fprint.device.enroll
Sep 05 18:15:04.276 niri: resuming session

Another wake failed at VerifyStart, explicitly for verify permission:

Sep 08 11:05:57.977 niri: pausing session
Sep 08 11:05:58.086 noctalia: system resumed; rechecking night light and auto theme schedules
Sep 08 11:05:58.224 noctalia: could not start fingerprint verification:
  [net.reactivated.Fprint.Error.PermissionDenied]
  Not Authorized: net.reactivated.fprint.device.verify
Sep 08 11:05:58.746 niri: resuming session

The installed fprintd polkit policy allows verification for active sessions but denies it for inactive sessions. In both examples, Noctalia's request fails during the brief inactive interval after resume. No automatic retry appears before password unlock in the second example.

Looking at the beta.9 implementation:

  • PrepareForSleep(false) immediately calls startVerify(false).
  • A failed Claim is logged without scheduling a retry.
  • VerifyStart only retries ClaimDevice, not PermissionDenied; otherwise it clears the status message.

This seems to explain the silent failure for my case. Could fingerprint authentication re-arm when the session becomes active again, or use bounded retries for transient authorization failures after resume? Ideally this would preserve the failed-match limit and avoid granting additional enrollment permissions.

samuela avatar Sep 10 '26 02:09 samuela