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

@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.

Got it working again thanks

1 Like

I will see if I can package everything up into a single zip file somehow so that it’s a bit easier to get going. I’ll have to statically link everything somehow and you’ll have to trust whatever binaries I send… but that should at least make it better for anyone who needs a solution and doesn’t know how to install developer stuff.

1 Like

@CSab6482

I spent some more time on this, and I got together something that should be reasonably easy. I can’t guarantee it will work, and I provide this as-is with zero warranty - it has not been approved by Goodix, the manufacturer of the fingerprint device; I have just taken a guess at how their device works based on some code they left behind.

If you wish to verify this, I have signed the checksum file inside there with my GPG signature, FA6FB12588810A870C92609D3901327190847975 Devyn Cairns <devyn.cairns@gmail.com> - so check that checksum file and then the signature with gpg.

Download and extract, then open a terminal wherever you put the AppImage file (right click, open a terminal in GNOME), then run:

sudo ./fprint-clear-storage-0.0.1-x86_64.AppImage

If goes well, it should tell you the name of the device and that it cleared it (along with some other libusb and udev related errors you can ignore)

If it doesn’t work, please post the log output.

58 Likes


This is what I’m currently seeing, so it looks like it works! I will attempt to enroll my fingerprint and see how it goes.

Update - Thank you so much.

2 Likes

@Devyn_Cairns - Thank you!

I feel somewhat guilty having long abandoned my previous efforts to get fingerprint detection working in Fedora on my tri-boot system while others toil to get it working (while educating the rest of us).

Rest assured it’s appreciated. :slightly_smiling_face:

1 Like

No worries. It definitely seems like there’s something weird going on with the hardware. I don’t really understand how Windows gets its prints in, because they’re not normally visible to Linux, but then sometimes there can be side effects of that and it causes corruption to the data on the Linux side.

For now I’m just happy to have figured out how to reset the device, but long term someone will either have to make it easy to reset the device if the system detects weird behavior happening, or Goodix will have to sort things out and figure out how to stop the drivers from behaving badly with each other.

3 Likes

@Devyn_Cairns Thank you so much for the script!

I thought everything worked OK after using Ventoy to run Windows but after a shutdown and a cold boot, among the problems I found was that my fingerprint reader was no longer working.

I guess as soon as you install the Windows driver for the fingerprint reader this conflict occurs. I didn’t even register fingerprints in Windows.

But your script reset it right away, I re-enrolled all my fingerprints and it’s back to normal.

Thanks!

1 Like

@Devyn_Cairns

Thank you so much! I had reinstalled Xubuntu 21.10 and nothing I did would let me re-enroll my fingerprints. I was not a happy camper.

This solved my problem quickly and had me back up in running in minutes following the guide by @AndrewGurn.

This is a great community. I really appreciate everyone with this kind of knowledge helping noobs like me.

3 Likes

Hey everyone, I got my Framework laptop in today and am trying Linux for the first time. I installed Ubuntu. So suffice it to say, I’m VERY new to command line and the terminal. I’m trying to get the fingerprint scanner working. I scrolled through this whole thread trying a lot of the things people suggested starting with tutorial @Davis_Ladd posted. It seemed like I was able to install all of the dependencies in step one, but after that I kept getting stuck on all the subsequent steps. I kept getting error message in the terminal. Mainly syntax errors. Would anyone be willing to help a noob out? Thanks!

2 Likes

Post the commands you typed/copied and the error the system gave you. Like this:

mark@Sauron:~$ echo "hello world"
hello world
mark@Sauron:~$ ehho "hello world"

Command 'ehho' not found, did you mean:

  command 'echo' from deb coreutils (8.30-3ubuntu2)

Try: sudo apt install <deb name>

mark@Sauron:~$
1 Like

Thanks @Fraoch! I’ll run it again when I get home from work in a few hours. It may very well be user error, I was just copying all the code into the terminal. So I wouldn’t be surprised if I misunderstood and missed a step somewhere.

So I ran it again and for some reason compiling the newest version of libfprint. This is what displayed after running that part of the code:

Now I seem to be getting hung up on editing meson_options.txt. I tried running the code and got this:

I even tried entering the nano meson_options.txt which brought this up, but I couldn’t figure out if I could do anything with it.