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

@junaruga Yes the fedora respin has libfprint >= 1.92.0 The fedora team has been very helpful with validating hardware and ensuring that libfprint was the correct version needed to support our hardware. Let us check with the Fedora team and see if we can find a link to download just the libfprint rpm for those who don’t want to use a respin.

4 Likes

Thank you! For normal Fedora 34, I just opened an issue ticket to ask to upgrade libfprint to 1.92.0 or newer, though I am not sure if it is possible because the Fedora 34 is stable version. I agree that distros tend to keep a major and minor version of a package to avoid a breaking change on a distro’s stable version, just upgrading a maintainer version or a release version of the package applying a patch. And it’s not the case on a development version like current Fedora 35.

If someone wants to see Ubuntu to support the fingerprint feature for Framework laptop on a future released version, you need to ask a Debian libfprint package maintainer to upgrade to the latest libfprint version. Because Debian is the upstream distro of Ubuntu. Maybe you can find a way to open the ticket somewhere in the Debian libfprint package tracker page. And same for other distros too!

For normal Fedora 34, I just opened an issue ticket to ask to upgrade libfprint to 1.92.0 or newer, …

Great news! I got an answer from the Fedora libfprint maintainer that the libfprint >= 1.90.7-3.fc34 on normal Fedora 34 should work for Framework laptop. Because they applied a patch file (update-goodix.patch) to fix the issue in the RPM spec (recipe) file libfprint.spec rather than upgrading to the upstream version.

As a reference here is the commit: Commit - rpms/libfprint - d660bfe29d97b29c7636cbc902e477c2884bebf8 - src.fedoraproject.org

Hopefully other Linux distros would refer this way.

10 Likes

I’ve seen references to upgrading libfprint to >=1.92 on Ubuntu, but must confess to inexperience in building/installing drivers from source (shows you how much more user-friendly linux has gotten!).

Looking at the libfprint repository (for 1.9.2 release v1.92.0 · libfprint / libfprint · GitLab) and the meson webpage (tutorial at Quickstart Guide) I get how it ought to compile, but if there are any gurus out there who know what to do with the compiled products - eg does the meson build automatically put the needed files in the right places or does something have to be moved into place? - would be grateful for guidance. Thanks!

1 Like

Has anyone gotten the fingerprint sensor working in arch yet? I have libfprint installed at the latest compatible version but gnome 40 still does not recognize the fingerprint. I would love to get this figured out and added to the arch linux thread.

1 Like

Turns out this is super easy on arch linux, just forgot a package :upside_down_face:

  • sudo pacman -S libfprint fprintd

  • Reboot

  • Enjoy fingerprint working out of the box on gnome install (and others if you install a fingerprint gui or they come with one)

9 Likes

I successfully compiled libfprint v1.92 on Ubuntu 21.04.

Dependencies:

  • 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

pip packages, install with “pip install ‘package’”

  • meson installed with “sudo pip install meson”
  • ninja
  • gobject
  • python-dbusmock

1. Start with installing dependices

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

sudo pip install meson

pip install ninja gobject python-dbusmock

2. Compile newest version of libfprint

git clone https://gitlab.freedesktop.org/libfprint/libfprint.git
cd libfprint

3. Edit meson_options.txt

To make things easier I specified the just the goodix device in “meson_options.txt”

nano meson_options.txt

For the drivers option use replace default with goodixmoc. This compiles libfprint just for this fingerprint sensor.

option('drivers',
       description: 'Drivers to integrate, "default" selects the default set, "all" selects all drivers',
       type: 'string',
       value: 'goodixmoc')

4. Then build, compile and install

meson builddir
ninja -C builddir

5. Now for the newest version of fprintd

git clone libfprint / fprintd · GitLab
cd fprintd
meson builddir
ninja -C builddir

6. Enroll your fingerprint

fprintd-enroll

I believe that is all the steps you need to do. If you have any problems let me know and I would be happy to help. This is the first time I have ever written instructions.

22 Likes

Thank you for this little guide. I am a application level developer but rarely have need to sudo anything and install packages etc. Don’t even have permissions to do so in my day job.

Apparently pip is not installed by default on Ubuntu. So the first command “sudo pip install meson” didn’t work for me.
So I did “sudo pip” which suggested installing pip by “sudo apt install python3-pip”
Tried that and got to a point where it wants to insert the Ubuntu 21.04 disc into the drive ‘/media/cdrom’

There is no cdrom on this device, so I assume it would be the installation media used.

Assuming I recreate the boot USB flash drive, will that work?

Are there any other traps to be found for the less system oriented among us?

Okay found that the cdrom line needed to be removed from the sources.lst file
‘sudo sed -i ‘/cdrom/d’ /etc/apt/sources.lst’

Two more questions.
pip install python-gobject is failing,
No matching distribution found …
Could not find a version that satisfies the requirement python-gobject.

The meson builddir line fails with Dependency “gusb” not found, tried pre-configured

So two failures at this stage.

2 Likes

Thanks for testing out my guide.
I added the missing dependencies to the instructions.

gobject is installed with

pip install gobject

and gusb is installed with

sudo apt install libgusb-dev

This shouild get your install working.
When I was putting this together I spent some time finding the dependencies and could have missed some.

Let me know of any other issues and I will append the insturctions

Thanks for the guide! Alas, it’s not quite working for me.

Maybe a stupid question:

After I build the latest libfprint, when I try to build the latest fprintd, it complains: “Dependency libfprint-2 found: NO found 1.90.7+git20210222+tod1 but need: ‘>=1.92.0’”
Where is it looking for libfprint? It’s not finding the one I just built.
Although I’ve never used it before, I feel like the “ninja -C builddir” step was supposed to put the new libfprint in the right place; however, when I try to do that step again, it simply says, “ninja: no work to do.” Seems like it believes it did it’s job without error.

4 Likes

@Davis_Ladd Thanks for the guide!

Is it safe to run git checkout to the current newest tag before running meson for reproductive steps, isn’t it? As the HEAD commit of the master branch is updated continuously, I am afraid your guide will be outdated after some time.

  1. Compile newest version of libfprint
cd libfprint
git checkout v1.92.1
  1. Now for the newest version of fprintd
cd fprintd
git checkout v1.92.0
1 Like

I am now getting the same error as @spotcatbug .

I attempted to use the git checkout commands as suggested, as well.

The is a clean install of Ubuntu 21.04 no weird things have been done to it.

1 Like

“Dependency libfprint-2 found: NO found 1.90.7+git20210222+tod1 but need: ‘>=1.92.0’”

Maybe you need to set LD_LIBRARY_PATH for the libfprint library’s path installed from the source, to prioritize the path than standard system lib path where system libfprint exists.

And to the Linux compile newbies, where would that be?
the directory where libfprint was compiled? or is it something that should be visible in the Ninja log?

1 Like

Maybe the directory is where the libfprint-2.so.* file compiled by you exists.

export LD_LIBRARY_PATH=<directory>

Edited: Maybe this is not a wrong solution for the compiler error, as the LD_LIBRARY_PATH is a library path searched in the run time, not build time. Sorry.

I thought of that, but immediately dismissed it as being kind of an odd solution. Surely, Davis_Ladd (op of the guide) would have mentioned having to do something like that - I’m guessing he didn’t have to.
What I did do, as a test, was temporarily replace the libfprint library in /usr/lib/x86[snip] with the newly-built one. After a reboot, I was able to go into settings and add my fingerprint (and then use my fingerprint to login.) However, I was still not able to build fprintd! Same complaint (found 1.90, need at least 1.92). So, the system sees the new libfprint 1.92, but meson doesn’t? I put the old libfprint back because I want a real solution to this.

Set the CC or CFLAGS before building fprintd like this? I haven’t tried it by myself.

export CC='gcc -L /path/to/libfprint_lib_directory -I /path/to/libfprint_include_header_directory'

or

export CFLAGS='-L /path/to/libfprint_lib_directory -I /path/to/libfprint_include_header_directory'

I don’t know what the “system” means. But maybe the meson in fprintd found the libfprint deb package installed to standard lib directory by apt-get install, but the fprinted couldn’t find another libfprint you installed by building from the source.

By “system” I simply meant, settings app, login screen, etc. I don’t know the proper way to describe the running ubuntu desktop system.

I searched the entire boot drive for “libfprint-2.so.2.0.0”. It found two files: the one I built from source and the one located in “/usr/lib/x86_64-linux-gnu”. That’s when I decided to try replacing the one in /usr/lib/x86_64-linux-gnu with the one I built. It worked… kinda. I could register my fingerprint in the settings app and then login with my fingerprint, but I still couldn’t build fprintd.

I feel like I’m just not getting something here. Is there more to libfprint than the resulting libfprint-2.so file? I’m going to try setting LD_LIBRARY_PATH (not sure why I didn’t try that before writing this.)

1 Like

By checking the meson build log (duh), I figured out why the build of fprintd is failing. It’s using “/usr/bin/pkg-config --modversion libfprint-2” to determine the version of libfprint that’s installed. So, basically, you can do whatever you want to the libfprint library, but meson is just going to look at which version was installed with apt-get.

I’m not sure how the build of fprintd could possibly work without some intermediate step that updates the libfprint package version information.

1 Like