Fingerprint scanner compatibility with linux (ubuntu, fedora, etc)

@Reese_Borel @Brett_Kosinski Downloading the actual package source that you used on debian did the trick, the ubuntu repositories have some different one that I believe is a fork or something.

libfprint_1.90.7-2.debian.tar.xz

After that your instructions applied much more directly, except neither the original symbols file nor the one you provided worked for v1.94.1

dpkg-gensymbols: error: some new symbols appeared in the symbols file: see diff output below
dpkg-gensymbols: warning: debian/libfprint-2-2/DEBIAN/symbols doesn't match completely debian/libfprint-2-2.symbols

So I copied the contents of debian/libfprint-2-2/DEBIAN/symbols to debian/libfprint-2-2.symbols and then it worked like a charm!

2 Likes

Yeah that’s no surprise. The symbols change from version to version. Nice job getting it working!

Final Guide for v1.94.1 on Ubuntu/Pop!_OS

All credit to @Brett_Kosinski’s original guide.

libfprint 1.94.1

  1. To begin, create a working directory and download the Debian package source, the libfprint source, and associated build dependencies:
mkdir build_dir
cd build_dir
curl -O https://deb.debian.org/debian/pool/main/libf/libfprint/libfprint_1.90.7-2.debian.tar.xz
sudo apt build-dep libfprint
sudo apt-get install libgudev-1.0-dev
git clone https://github.com/freedesktop/libfprint.git 
  1. Now, we’ll jump into the libfprint repository, check out the 1.94.1 tag, and unpack the debian control files:
cd libfprint
git checkout v1.94.1
tar -xJvf ../libfprint_1.90.7-2.debian.tar.xz
  1. To begin, we need to make some changes to the ./debian/rules file. First, we’ll update the rules to only build the driver we need:
CONFIG_ARGS = \
    -Dudev_rules_dir=/lib/udev/rules.d \
    -Dgtk-examples=false \
    -Ddrivers=goodixmoc
  1. We’ll also need to comment out the lines for moving around the autosuspend files (as far as I can tell they’re only needed for the ELAN driver):
override_dh_install:
#	mv debian/tmp/lib/udev/rules.d/60-libfprint-2-autosuspend.rules \
#		debian/tmp/lib/udev/rules.d/60-libfprint-2.rules
  1. Next up, we need to modify ./debian/libfprint-2-2.install to install hwdb.d and not rules.d:
lib/udev/hwdb.d/
usr/lib/${DEB_HOST_MULTIARCH}/libfprint-*.so.*
  1. Next, we’ll update ./debian/changelog to add an entry for our version at the top of the file, you can add your own info:
libfprint (1:1.94.1-1) unstable; urgency=medium

  * custom build for use on my Framework laptop

 -- Brett Kosinski (brettk) <email>  Fri, 6 Sep 2021 20:05:00 -0700
  1. Build the package, it will fail:
sudo dpkg-buildpackage -b -uc -us
dpkg-gensymbols: error: some new symbols appeared in the symbols file: see diff output below
dpkg-gensymbols: warning: debian/libfprint-2-2/DEBIAN/symbols doesn't match completely debian/libfprint-2-2.symbols
  1. Fix this error by copying the symbols file it is comparing against:
cp ./debian/libfprint-2-2/DEBIAN/symbols ./debian/libfprint-2-2.symbols
  1. Build again and it should work this time, producing 4 .deb files in the parent directory:
sudo dpkg-buildpackage -b -uc -us
  1. Install these with dpkg:
sudo dpkg -i ../*.deb
  1. You can remove all the files now and uninstall the build dependencies if desired.

frpintd 1.94.0

  1. While getting libfprint built was a bit of a pain, fprintd is much simpler. The first essential steps are the same (starting in some build directory):
mkdir build_dir
cd build_dir
apt source --download-only fprintd
sudo apt build-dep fprintd
git clone https://github.com/freedesktop/libfprint-fprintd.git 
cd libfprint-fprintd
git checkout v1.94.0
tar -xJvf ../fprintd_1.90.9-1.debian.tar.xz
  1. Edit ./debian/rules to overide a check for dependency information. Add these lines to the end and make sure a tab is used rather than spaces for the spacing on the last line:
    override_dh_shlibdeps:
    	dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
  1. Edit ./debian/changelog to create a new entry for our version, you can add your own info:
fprintd (1:1.94.0-1) unstable; urgency=medium

  * custom build for use on my Framework laptop

 -- Brett Kosinski (brettk) <email>  Fri, 6 Sep 2021 20:05:00 -0700
  1. Then build the package!
sudo dpkg-buildpackage -b -uc -us
  1. Install the created .deb files:
sudo dpkg -i ../*.deb
  1. Enable and start the service:
sudo systemctl enable fprintd.service
sudo systemctl start fprintd.service
  1. Activate the PAM module.
sudo pam-auth-update --enable fprintd
  1. You can remove all the files now and uninstall the build dependencies if desired.

Enrolling Fingerprints

Setting up fingerprints

At this point, if all went well, assuming you’re using Gnome you can enroll a new set of fingerprints:

  1. Hit the Windows key, type “Users”, and open the settings panel
  2. Select “Fingerprint login”
  3. Enroll fingerprints

Voila! At this point all of the hardware on your laptop should be functioning.

It’s really not a hard process, but here’s a dumb script that should get the job done. It’s not smart enough to edit the files, so it just deletes them and pulls edited copies from my webserver. This is very unsafe so if you can’t read and understand this script (also verify any files it downloads) you should NOT be running it!

ubuntu_libfprint_v1.94.1_install.sh

bash ubuntu_libfprint_v1.94.1_install.sh

(Tested on Pop!_OS, but i think it should work fine on Ubuntu)

14 Likes

So this is my first time using linux. Im using PopOS and was relived to see this guide was specifically for it but after installing some of the packages I noticed that I have to go in and edit files.

My terminal commands knowledge especially on Linux is very basic and Im not willing to go down a stack overflow rabbit hole just to get the fingerprint scanner to work. So I tried the script and that didn’t work either.

Somebody please tell me there is an easier way to get this damn thing to work. Im willing to install some shit using the terminal and that’s about as far as Im willing to go to get this to work.

Maybe theres another distro that this just works out of the box?

My experience with the Fedora 34 respin is that it just works out of the box.

1 Like

If you’re only willing to install packages then you won’t get the fingerprint sensor working, as from the Ubuntu 21.04 thread:

Ubuntu 21.10 may have libfprint >1.92.0 but I’m unable to check. Otherwise Fedora 34 Respin or Fedora 35 (When it releases later this month) will work fine.

@Water261 ok thanks for clarifying. The scanner not working isn’t a deal breaker for me right now, Im sure someone will eventually figure out how to make it easier in the next few weeks/months. Im not even sure if Im set on using Linux anyway and might just end up going back to Windows.

So question, following a earlier guide I got it to work but it only works for log on, reported I could also use the scanner for sudo authentication as well? How do I enable this if possible?

@dkc I can send you my generated .deb files if you want them, so you just need to install them (I just followed the guides and corrected a few minor problems along hte way).

Of course that means you’re trusting an stranger on the internet :slight_smile: But if you’re willing to do that (not that we check everything we download anyway), it can save you some headache.

Note though that generally speaking - brand new hardware + linux always means some tinkering required if you want everything to work well. But I’m sure you know that already.

@Carlos_Fernandez_San Yeah that would be very helpful, thank you!

Here’s a script that just downloads the deb files and installs them, honestly idk why I didn’t do that in the first place:
libfprint_v1.94.1_install_v2.sh

Run with:
bash ./libfprint_v1.94.1_install_v2.sh

As before, this is very insecure and you shouldn’t trust random strangers on the internet. So if you want to do it yourself, all the steps are in this post above.

7 Likes

@dkc Here you go

4 Likes

@Henry_Luengas Thanks so much for the guide! I am using Linux Mint 20.2 with Cinnamon. A couple of notes for anyone else doing the same:

sudo apt build-dep doesn’t work, but the build process will tell you which dependencies are missing. Manually install them with sudo apt install. debhelper-compat does not exist because it is provided by debhelper. After you’ve installed all the other dependencies, as well as making the other necessary modifications in the guide, append -d to the build command to force it to ignore the lack of debhelper-compat.

apt-source --download-only fprintd fails to locate a source package. Use curl -O http://ftp.debian.org/debian/pool/main/f/fprintd/fprintd_1.90.9-1.debian.tar.xz instead.

The Cinnamon user configuration doesn’t have fingerprint configuration in the GUI, but you can configure it from the CLI.
fprintd-enroll -f right-thumb (or right/left index,middle,ring,little finger). Note that it will take many passes to complete, so don’t worry when you see a lot of remove-and-retry messages.
Then
sudo pam-auth-update and ensure that the Fingerprint option is selected.

3 Likes

No, @Alfonso_Lopez I don’t recall having to do anything extra to get fingerprint login working for sudo or for 1Password. I believe I downloaded directly from 1password.com: Best Password Manager for Linux | 1Password

I’m also having the “can’t enroll in Linux anymore after doing the ‘windows fix’” issue.

These were the steps I took:

  1. Installed Manjaro and enrolled right-index
  2. Reinstalled Manjaro and wasn’t able to enroll right-index again, but other fingers worked
  3. Installed Win10 and removed the WinBioDatabase (via Fingerprint enrollment)
  4. Installed dual boot Manjaro and started getting the errors noted above when trying to enroll for any finger

I’ve reinstalled windows all on it’s own and fingerprint enrollment/use works just fine. I’ve reinstalled just Manjaro and the errors persist. I’ve run the python script and gotten the errors mentioned above. I’ve pulled the script apart and tried various other methods on the FPrint device. I’ve tried from a live USB.

I’m at the point where I’ve been trying to find a datasheet for the Goodix fingerprint scanner to see if I can take it apart and wipe it’s memory somehow. Unfortunately, something I read somewhere implied that the firmware is stored in the same place… so that might just brick the chip.

It seems pretty likely that this is a gap in libfprint/fprintd since Win10 continues to function fine. Unfortunately I don’t have the time to dig into that code and figure out how it differs from the Win driver.

1 Like

@DylanCM Ditto. I’ve given up on this and just waiting for a major update to libfprint that hopefully fixes this issue. I’m also considering buying a new fingerprint reader once the Framework marketplace opens.

1 Like

Sorry to hear you guys can’t get your fingerprint readers working. In case anybody else comes here wondering what python script you are refering to, it deletes fingerprints held in the device’s memory but that weren’t registered on the current OS.

Here is a version I modified to require root privaleges, and only list the fingerprints if not given a -d flag:
libfprint_delete_device_prints.py

To list the prints run:
sudo python3 libfprint_delete_device_prints.py

To delete them all run:
sudo python3 libfprint_delete_device_prints.py -d

20 Likes

Thank you! This helped me! It seemed to also delete a fingerprint that I had registered in my current OS installation, but I was able to re-register my right index finger fingerprint after running sudo libfprint_delete_device_prints.py -d, which I hadn’t been able to do before running your script. Thank you again.

1 Like

I can’t get this to run. It is complaining about not being able to find stuff

/home/committed88/Downloads/libfprint_delete_device_prints.py: 3: from: not found
/home/committed88/Downloads/libfprint_delete_device_prints.py: 6: from: not found
/home/committed88/Downloads/libfprint_delete_device_prints.py: 7: from: not found
/home/committed88/Downloads/libfprint_delete_device_prints.py: 10: Syntax error: word unexpected (expecting ")")

Thoughts?

Looks like it’s missing the

#!/usr/bin/python3

at the top of the file.

Try running it directly with python

$> python3 libfprint_delete_device_prints.py