[TRACKING] Fingerprint scanner compatibility with linux (ubuntu, fedora, etc)

Hmm not sure what happened. I had perfect finger print on multiple linux installs. Had to use python script to de-register some fingerprints. Then once windows was installed it has stopped working in linux.

This looks like an issue specifically with meson 0.60 exposing a bug in the fprintd meson build file.

Here’s another project hit by the same issue (see the last comment in the thread):

You might consider filing a bug with fprintd or checking if they fixed it in the mainline codebase.

Meanwhile you could probably apply the equivalent of their fix:

1 Like

Mark me down as another person with the windows/linux incompatibility. Installed Arch first, could register and use fingerprints without issue. After installing windows and registering fingerprint there (should’ve known better), fingerprint stopped working in Arch. Python script to delete fingerprint database (run with root in Arch) returns:

<me>% sudo python3 ~/.scripts/libfprint_delete_device_prints.py -d 
<__gi__.FpiDeviceGoodixMoc object at 0x7f312f9fdb00 (FpiDeviceGoodixMoc at 0x55b5458681e0)>
goodixmoc
UID714BC975_XXXX_MOC_B0
libusb: error [udev_hotplug_event] ignoring udev action change
libusb: error [udev_hotplug_event] ignoring udev action change
libusb: error [udev_hotplug_event] ignoring udev action change
libusb: error [udev_hotplug_event] ignoring udev action change

(process:2861): libfprint-ERROR **: 09:23:55.088: parse fingerlist error
zsh: trace trap  sudo python3 ~/.scripts/libfprint_delete_device_prints.py -d

Not the biggest issue in the world, but would love a method to completely eliminate windows from the fprint system and only use it with linux, if possible. I’ve tried uninstalling/reinstalling libfprint and fprintd, screwing with USB, to no avail.

3 Likes

Hi davis ladd, I followed your guide and it worked well except that I needed to change the “ninja -C builddir install” part to get it to actually install, otherwise I couldn’t proceed.

Once I got everything installed, though, and set up PAM, I rebooted to find it still didn’t work. I get timeouts of over 20 seconds any time I should enter my password. Turns out fprintd is not starting up. It seems there is a regression in libgusb?

FYI I am using Pop OS, but all of the actual packages are Ubuntu, etc., not overridden by Pop.

Yes Snee it sucks worked fine then load windows and bricked on the Linux end. I wish there was a way to erase the memory in the module don’t care if windows or linux at this point.

Thanks to @Davis_Ladd and @Ian_Cleary and everyone else in this thread for the info. I’m on Xubuntu 21.10 and had to do a few extra things to get the fingerprint reader working. I hope you don’t mind I post the full list of what I did (most of it is what you guys already posted with a few extras):

First thing: In addition to the other guides, I had to install libpam-fprintd for fprintd-enroll to work (it timed out without it)

sudo apt install gtk-doc-tools libfprint-2-dev libgirepository1.0-dev libgusb-dev libpam-wrapper libpam0g-dev libpamtest0-dev libpolkit-gobject-1-dev libxml2-utils python3-pip python3-pypamtest git gettext valgrind libpam-fprintd

Next few bits are standard for the other guides

sudo pip install meson
pip install ninja gobject python-dbusmock

git clone https://gitlab.freedesktop.org/libfprint/libfprint.git
cd libfprint && git fetch origin && git checkout v1.92.1

Then

nano meson_options.txt

…and change the drivers>value option from ‘default’ to ‘goodixmoc’

Next, I had to add the install option when building libfprint

meson builddir
ninja -C builddir install

Next bit for fprintd is the same but with the install option again when building

git clone https://gitlab.freedesktop.org/libfprint/fprintd.git
cd fprintd && git fetch origin && git checkout v1.92.0
meson builddir
ninja -C builddir install

Next, run

fprintd-enroll

…and follow the prompts. If you’re coming from a Thinkpad like I did, note that you place your finger on the reader… don’t swipe it. You’d think it’d be obvious, but I’m an idiot

Finally, run

sudo pam-auth-update

…and check on the fingerprint auth option.

Now I am prompted in XFCE on login and sudo prompts. Thanks everyone for the info!

6 Likes

How did you manage to get it working? This is the error I am seeing on Pop!_OS 21.04

Sadly, I don’t remember exactly.
The instructions I followed were at the top of this thread, and I had similar problems.
Maybe there are some hints in the original posts?

I did have to combine some things mentioned, like adding am install parameter to the build.

I’m having an issue where my fingerprint reader originally worked perfectly (yesterday, when I got the laptop) and suddenly, while I can enroll fingerprints just fine, I can’t seem to ever verify them - neither with fprintd-verify nor with any system login / PAM / sudo etc. It was working sporadically earlier today (though, somehow, not quite as well) but now it’s just not working at all.

I’m starting to wonder if this is a hardware issue maybe, because I do see that the USB device for the fingerprint reader gets reset every time fprintd starts doing something.

Could anybody who has fingerprints working properly tell me if they see this in their system logs every time a fingerprint action occurs?

Nov 04 02:23:14 geary kernel: usb 3-9: reset full-speed USB device number 2 using xhci_hcd
Nov 04 02:23:14 geary upowerd[925]: treating change event as add on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-9
Nov 04 02:23:14 geary upowerd[925]: treating change event as add on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-9

Edit: okay, I actually figured it out. There is something funky going on with fprintd or the goodixmoc driver inside of it.

I noticed that when I ran the fingerprint delete script, it always showed the fingerprint data for the previous time I ran the enrollment, rather than the most recent time. It was most obvious when I tried to use different fingers.

So, because of that, the data that was in the /var/lib/fprint/$USER/goodixmoc folder did not match what was on the fingerprint reader.

I found that I could trick the system by taking a backup of what was in that folder, running fingerprint enrolment again, discarding that new data, and overwriting the old data over it.

Basically,

sudo cp -r /var/lib/fprint/$USER/goodixmoc /tmp/mocbackup
sudo fprintd-enroll -f right-index-finger $USER
sudo rm -r /var/lib/fprint/$USER/goodixmoc
sudo cp -r /tmp/mocbackup /var/lib/fprint/$USER/goodixmoc
sudo rm -r /tmp/mocbackup

Once I did that, it started working fine again!

I’m going to try to figure out how to reproduce this and then write a bug for fprintd. But in the mean time, if anyone has this issue, this is apparently the way to solve it.

2 Likes

Replace both instances of

ninja -C builddir

With

ninja -C builddir install

That fixed that issue for me, albeit in a different distro


I’m facing this error, and I also cannot enroll any fingerprints. Does anyone know where I may have gone wrong?

@AndrewGurn Your instructions worked great on Xubuntu 20.10, except that for some reason I got an older version of Ninja. A quick internet search got me on the correct version for the guide, not a big deal. When I rebooted into Windows 11, my fingerprint no longer allowed me to sign in. I reset the biometrics for Windows, then I couldn’t use my fingerprint in Xubuntu. Any ideas?

@CSab6482 that’s the error that anybody who has used the fingerprint scanner with Windows is getting. Not sure how to fix it yet. I personally think it’s probably on the libfprint side, need to skip over unparseable entries.

1 Like

Looks like you got the same issue as the guy above you. I’m not dual booting Windows, so I got nothing.

Hi everyone,

I have submitted a patch to libfprint that might help a little bit with the dual boot situation. I am not sure how to get things reliably working with both Linux and Windows at the same time, but I think the patch I’ve submitted will at least make it possible to reset the device so it works again.

If anyone is interested in testing it I can put together a guide on how to compile it and make it work. And here’s a python script that will invoke the clear_storage() function (won’t work without this patch, though)

#! /usr/bin/python3

import gi
gi.require_version('FPrint', '2.0')
from gi.repository import FPrint

ctx = FPrint.Context()

for dev in ctx.get_devices():
    print(dev)
    print(dev.get_driver())
    print(dev.props.device_id);

    dev.open_sync()

    dev.clear_storage_sync()
    print("All prints deleted.")

    dev.close_sync()
11 Likes

Wow, that worked perfectly! (only tested on Linux, not Windows) You’re a lifesaver :slight_smile:

2 Likes

If anyone is interested in testing it I can put together a guide on how to compile it and make it work.

Would love to, thanks for putting in the work!

1 Like

@snee (and anyone else)

First of all, clone this repository:

git clone https://gitlab.freedesktop.org/devyn/libfprint.git --branch goodixmoc-clear-storage

To build, you will need several dependencies, but to start you’ll need meson and ninja as well as the usual gcc setup. Once you have that, run:

mkdir build
meson setup build

Meson will tell you if you have any missing dependencies. For each one, install it and then run meson setup build again until it succeeds. On Ubuntu/Debian, you will most likely need several -dev versions of packages; on Fedora, -devel.

Once you have all of the dependencies, go to build directory, and run ninja

cd build
ninja

If that builds successfully, save the script I posted above to a file (ideally just put it in the build directory) and then run it with:

sudo LD_LIBRARY_PATH=$PWD/libfprint G_MESSAGES_DEBUG=all python clear_storage.py

If the script doesn’t work, just post the log output here and I’ll take a look at it. If you have trouble with dependencies I’ll also try to help, but that’s a bit more tricky because different distros are different.

11 Likes

@Devyn_Cairns

The guide and the patch worked like a charm! Going to link to this guide in another thread that had questions. Thank you!

1 Like

Help. I’m a total newb and I have no idea how to do this.