Key changes: - bz3_threshold: 10 → 2 (better match rate on small swipe sensor frames) - ELAN_MIN_FRAMES: 4 → 1 (accept single-frame captures rather than discarding) - ELAN_SKIP_LAST_FRAMES: 2 → 0 (use all captured frames; tap mode has no trailing blurry frames) - ELAN_FINGER_TIMEOUT: 200 → 350ms (more time to re-detect finger between frames) - Poll delay on non-blocking devices: 50 → 10ms (faster finger detection response) - Dark frame: mark_failed → mark_completed (don't abort if a frame is below background) Together these bring verification match rate from ~50% to ~70% on the ASUS 04f3:0c6e sensor. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fprint-asus: libfprint patches for ASUS 04f3:0c6e fingerprint sensor
Patches for the Elan fingerprint sensor found in ASUS laptops (04f3:0c6e, FW 0x0161, 150x52 swipe sensor).
Problem
The device does not implement the blocking behavior of pre_scan_cmd (command 0x40 0x3f).
Instead of holding the USB response open until a finger is placed, it returns immediately with
a non-0x55 value when no finger is present. The upstream elan driver treats this as a fatal
protocol error (FP_DEVICE_ERROR_PROTO), causing every enrollment attempt to immediately fail
with enroll-disconnected.
Patches applied to libfprint/drivers/elan.c and elan.h
| Change | Reason |
|---|---|
CAPTURE_READ_DATA: retry instead of PROTO error |
Device returns immediately with non-0x55 when no finger; retry until 0x55 |
ELAN_CALIBRATION_ATTEMPTS: 10 → 30 |
Give device more time to recalibrate between swipe stages |
| Calibration poll delay: 50ms → 100ms | Device needs ~100ms per calibration cycle |
bz3_threshold: 24 → 10 |
Accommodate smaller single-press images |
ELAN_MIN_FRAMES: 7 → 4 |
Allow short press/tap captures |
Building and installing
# Dependencies (Rocky/RHEL 10)
sudo dnf install git meson ninja-build gcc gcc-c++ glib2-devel libgusb-devel nss-devel pixman-devel gobject-introspection-devel
# Clone upstream libfprint and apply patches
git clone --depth=1 https://gitlab.freedesktop.org/libfprint/libfprint.git
cp libfprint/drivers/elan.c libfprint/drivers/elan.h libfprint/libfprint/drivers/
cd libfprint
meson setup _build --prefix=/usr --buildtype=release
ninja -C _build
sudo systemctl stop fprintd
sudo ninja -C _build install
sudo systemctl start fprintd
Usage
fprintd-enroll # enroll a finger (slow press/swipe)
fprintd-verify $USER # test verification
Tested on Rocky Linux 10.1 with ASUS laptop.
Description
Languages
C
100%