NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.42k stars 13.63k forks source link

fprintd-enroll can't use fprintd.conf #49872

Closed Vskilet closed 5 years ago

Vskilet commented 5 years ago

Issue description

Hi, I try to use my fingerprint reader on a Thinkpad T440p under Nixos 18.09 but there is a problem with the fprintd.conf

fprintd[15259]: Could not open fprintd.conf: No such file or directory
user 'victor' claiming the device: 0
now monitoring fd 15
device 0 claim status 0
start enrollment device 0 finger 7
enroll_stage_cb: result 3
enroll_stage_cb: result 3

We can see that fprintd.conf isn't create or usable by fprintd-enroll in this case.

Steps to reproduce

  1. Use fprintd service :

    services.fprintd.enable = true;
    security.pam.services.login.fprintAuth = true;
    security.pam.services.xscreensaver.fprintAuth = true; 
  2. fprintd-enroll

  3. Pass 3 times your finger on the fingerprint reader

  4. Check if your fingerprint is save : fprintd-list

Technical details

lheckemann commented 5 years ago

The missing config shouldn't be a problem — it's only necessary for specifying alternative storage types, and if missing it will use the default settings. Do you have any problems other than this warning showing up?

zimbatm commented 5 years ago

I think the issue is that the service dies. @Vskilet can you share the output of systemctl status fprintd?

Vskilet commented 5 years ago

Ho ! @zimbatm you're right !

--> systemctl status fprintd.service        
● fprintd.service - Fingerprint Authentication Daemon
   Loaded: loaded (/nix/store/a6p2nf7d891iip6qbya8im4zhdqi9sp4-unit-fprintd.service/fprintd.service; linked; vendor preset: enabled)
   Active: inactive (dead)

nov. 08 17:53:13 systemd[1]: Starting Fingerprint Authentication Daemon...
nov. 08 17:53:13 systemd[1]: Started Fingerprint Authentication Daemon.
nov. 08 17:53:13 fprintd[1773]: Could not open fprintd.conf: No such file or directory
nov. 08 18:33:27 systemd[1]: Starting Fingerprint Authentication Daemon...
nov. 08 18:33:27 systemd[1]: Started Fingerprint Authentication Daemon.
nov. 08 18:33:27 fprintd[3935]: Could not open fprintd.conf: No such file or directory
nov. 08 19:35:52 systemd[1]: Starting Fingerprint Authentication Daemon...
nov. 08 19:35:52 systemd[1]: Started Fingerprint Authentication Daemon.
nov. 08 19:35:52 fprintd[5943]: Could not open fprintd.conf: No such file or directory

But I try to start it and enroll fingerprint but it the same :

found 1 devices
Device at /net/reactivated/Fprint/Device/0
Using device /net/reactivated/Fprint/Device/0
User vskilet has no fingers enrolled for Validity VFS5011.
zimbatm commented 5 years ago

@Vskilet the next thing to do is search other distros like Arch Linux to see if they have encountered the same issue. I suspect that the behaviour might have changed after a package upgrade and nobody noticed.

lheckemann commented 5 years ago

I suspect that systemd might be stopping it automatically and starting it on-demand, since it's a Type=dbus service.

Vskilet commented 5 years ago

Maybe an update ? https://gitlab.freedesktop.org/libfprint/fprintd/commit/9e32cd525724f21eebf2336a06b13a39c6616ab0

Vskilet commented 5 years ago

Update is not the solution but use the arch documentation is : https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/fprintd

I suggest the pr #50478

Thanks @nyanloutre for help.