A libfprint driver for the Goodix HTK32 fingerprint sensor found in the Dell XPS 13 7390, the Dell XPS 15 9570 and possibly other laptops using the 27c6:5385 or 27c6:5395 USB device.
- Vendor ID:
0x27c6 - Product IDs:
0x5385,0x5395 - Sensor: 108 x 88 pixels, capacitive press-type
- Known devices: Dell XPS 13 7390 2-in-1, Dell XPS 15 9570
Check if you have this sensor:
lsusb | grep -E '27c6:(5385|5395)'
The sensor provides raw 12-bit capacitive images encrypted with a TLS-like protocol (GTLS). The driver:
- Initializes the sensor: PSK exchange, GTLS handshake, config upload, FDT calibration
- Detects finger placement via FDT (Finger Detection Threshold) events
- Captures and decrypts the fingerprint image
- Matches using SIGFM (SIFT-based fingerprint matching via OpenCV)
Fingerprint matching uses SIFT keypoints with CLAHE preprocessing, Lowe's ratio test, and pairwise geometric verification. This approach works well with the small 108x88 sensor where traditional minutiae-based methods struggle.
- libfprint source tree (tested with v1.94.10)
- OpenCV 4 (
opencv_core,opencv_features2d,opencv_flann,opencv_imgproc) - OpenSSL 3.0+
- Standard libfprint build dependencies (meson, ninja, glib, libgusb, etc.)
Arch Linux:
sudo pacman -S opencv
Fedora:
sudo dnf install opencv opencv-devel
Ubuntu/Debian:
sudo apt install libopencv-dev
The sensor exposes a CDC (Communications Device Class) descriptor that causes the Linux cdc_acm kernel driver to claim it as a modem device, blocking libfprint. You must install the included udev rule:
sudo cp 91-goodix-fingerprint.rules /etc/udev/rules.d/
sudo udevadm control --reload-rulesThis automatically unbinds cdc_acm when it tries to attach to this device. Without this rule, the driver will fail with "Resource busy" errors after every reboot.
yay -S libfprint-goodix53x5
sudo pacman -S fprintd
sudo systemctl restart fprintdThis builds a patched libfprint with the driver and udev rule included. No manual steps needed.
# Clone libfprint
git clone https://gitlab.freedesktop.org/libfprint/libfprint.git
cd libfprint
# Apply this driver (also installs the udev rule)
/path/to/goodix53x5-driver/install.sh .
# The install script will print manual meson.build edits needed.
# Apply those edits, then:
meson setup builddir
cd builddir
ninja
sudo ninja install
sudo systemctl restart fprintd- Copy
drivers/goodix53x5/intolibfprint/libfprint/drivers/goodix53x5/ - Copy
sigfm/intolibfprint/libfprint/sigfm/ - Edit
libfprint/libfprint/meson.build:- Add to the
driver_sourcesdictionary:'goodix53x5' : [ 'drivers/goodix53x5/goodix53x5.c', 'drivers/goodix53x5/goodix53x5-proto.c', 'drivers/goodix53x5/goodix53x5-crypto.c', 'drivers/goodix53x5/goodix53x5-device.c' ],
- Add SIGFM static library build (before
libfprint_drivers):opencv_inc = include_directories('/usr/include/opencv4') opencv_core = cc.find_library('opencv_core') opencv_features2d = cc.find_library('opencv_features2d') opencv_flann = cc.find_library('opencv_flann') opencv_imgproc = cc.find_library('opencv_imgproc') opencv_dep = declare_dependency( include_directories: opencv_inc, dependencies: [opencv_core, opencv_features2d, opencv_flann, opencv_imgproc], ) libsigfm = static_library('sigfm', 'sigfm/sigfm.cpp', dependencies: [opencv_dep], cpp_args: ['-std=c++17'], install: false)
- Add
libsigfmtolink_withfor bothlibfprint_driversand the mainlibfprintlibrary - Add
opencv_depto the main librarydependencies
- Add to the
- Edit root
meson.build:- Add
'goodix53x5'to the default drivers list - Add
'goodix53x5' : [ 'openssl' ]todriver_helpers
- Add
- Reconfigure and build
After installation, use your desktop environment's fingerprint settings (GNOME, KDE, etc.) or the command line:
# Enroll a finger (8 samples required)
fprintd-enroll
# Verify
fprintd-verify- SIGFM matching uses OpenCV SIFT features with CLAHE contrast enhancement. Score threshold is 5 (correct finger typically scores 28-24000+, wrong finger scores 0-4).
- 8 enrollment samples are stored as raw 108x88 grayscale images. During verification, SIFT features are extracted from each stored sample and compared with the live capture.
- Image preprocessing removes horizontal banding and vertical striping via row/column mean subtraction, then normalizes to 8-bit.
- Thermal throttling is disabled (
temp_hot_seconds = -1) since the small sensor generates negligible heat.
91-goodix-fingerprint.rules - udev rule to unbind cdc_acm from the sensor
drivers/goodix53x5/
goodix53x5.h - Header: defines, structs, function declarations
goodix53x5.c - Main driver: SSMs for open, enroll, verify, identify
goodix53x5-device.c - Device helpers: OTP, config, FDT, image processing
goodix53x5-proto.c - USB protocol: message building, reassembly, parsing
goodix53x5-crypto.c - Crypto: GTLS, AES, HMAC, PSK, GEA decryption
sigfm/
sigfm.hpp - SIGFM C API header
sigfm.cpp - SIFT feature extraction and matching (with CLAHE)
binary.hpp - Binary serialization for print storage
img-info.hpp - SigfmImgInfo struct (keypoints + descriptors)
- SIGFM matching library from goodix-fp-linux-dev/sigfm, by Matthieu Charette, Natasha England-Elbro, and Timur Mangliev
- Protocol reverse-engineering from goodix-fp-linux-dev
LGPL-2.1-or-later (same as libfprint)