buster_dylan 2934ca2b6e Revert experimental params to factory defaults
Remove threshold, enrollment stages, frame count, and timing
experiments — none produced reliable security on the 04f3:0c6e
power-button sensor due to bz3's inability to distinguish adjacent
fingers on small dark images from this form factor.

Retained fixes:
- ELAN_CALIBRATION_MAX_DELTA=65535: skip unreliable recalibration loop
- Polling fallback in CAPTURE_READ_DATA: prevent sensor overheating
- Dark frame → fpi_ssm_mark_completed: graceful end-of-swipe

All other values restored to upstream v1.94.10 defaults.
2026-04-15 19:43:49 +10:00

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
No description provided
Readme 73 KiB
Languages
C 100%