buster_dylan 1ce6db6e2c Skip active recalibration for unreliable devices
ELAN_CALIBRATION_MAX_DELTA raised to 65535 to prevent the
recalibration state machine from running on devices like 04f3:0c6e
where the 0x01→0x03 status transition is intermittently absent,
causing frequent 'Calibration failed!' session errors. The background
image is still re-captured fresh on each activation — we just skip
the active recalibration handshake.

Also bumps ELAN_CALIBRATION_ATTEMPTS to 100 as a safety net for
devices that do support the full calibration sequence.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 00:15:28 +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%