Monday, April 25, 2016

Validity Sensors 138a:0050 - Swipe it Like a Pro

Validity Sensors, Inc. Swipe Fingerprint Sensor (VendorID:ProductID = 138a:0050) is available on some new laptop models such as the HP Envy 15t. If you plan on installing Ubuntu Linux on such a machine, and wish to experience the luxury of just swiping your finger to log in and do sudo stuff, you would need to get the fingerprint sensor drivers installed properly.

Unfortunately, the default fingerprint driver library libfprint does not (yet) support our sensor. Even fingerprint-gui, the de-facto choice of fingerprint sensor configuration for Ubuntu, fails to detect the device under its default configuration.

Fortunately, someone patched libfprint to include support for several other devices, including our own (138a:0050). You can get the patch from here (courtesy of this AskUbuntu question) to get started.

Before the build, ensure that you have fingerprint-gui installed, following this guide.

The codebase contains an autogen.sh script that would build it for you. However, before building, you will have to have the following packages as build prerequisites (as per Ubuntu 16.04; the versions may vary):

xorg-server-source
autoconf
automake
libtool
libusb-1.0-0-dev
libnss3-dev
libglib2.0-dev
libpixman-1-dev

For building, you can either use ./autogen.sh or the following command sequence:

autoreconf --install --force
autoconf
./configure
make
sudo make install

If the last command installs the libraries at /usr/local/lib/ (the location is usually displayed towards the end of the build output), you would have to manually symlink /usr/lib/libfprint.so.0 (currently linked to the existing library in /usr/lib/) to /usr/local/lib/libfprint.so:

sudo ln -sf /usr/local/lib/libfprint.so /usr/lib/libfprint.so.0

Now fire up fingerprint-gui and verify that the fingerprint device is detected properly and you can configure and test it. You will also be able to set up fingerprint-based login via Ubuntu's user account settings (might require a system restart).

If you have trouble running fingerprint-gui as a regular user but no problems in superuser mode, you may need to make the corresponding USB device entry accessible for the relevant user/group, or make it universally readable and writable:

sudo chmod 666 /dev/bus/usb/BusID/DeviceID

Please post your tips/issues/concerns regarding the 138a:0050 fingerprint sensor here, for the benefit of those who already have it, as well as everyone destined to get hold of one in the near future!

5 comments:

  1. I made the fingerprint-gui work, thanks to your HOWTO, but it crashes quite often, so it's sadly still unusable... Ubuntu 16.04.

    ReplyDelete
    Replies
    1. Congratz! Unfortunately I am also experiencing frequent crashes; please post here if you find a workaround (and so will I) :)

      Delete
  2. Did you face any other problems during setting up of libfprint (like unexpected errors/warnings)?
    Does fingerprint-gui display the device when run as root (sudo fingerprint-gui)?

    Also, now that I think about it, I had been doing all this stuff on 16.04-beta2 release; they may possibly not work the same on the stable 16.04 release.

    ReplyDelete
  3. Thanks Janaka! I was able to get my validity sensor vsf491 (0138a 003d) recognized by compiling libfprint and using your guide... but unfortunately fingerprint-gui now crashes when I try to enroll.... almost there.

    ReplyDelete
    Replies
    1. Hi there, did you manage to get things working? If you managed to run fingerprint-gui in superuser mode (sudo fingerprint-gui) without problems, you might need to modify the permissions of the underlying USB device for the fingerprint reader, as I had mentioned in the post.

      Delete

Thanks for commenting! But if you sound spammy, I will hunt you down, kill you, and dance on your grave!