Skip to content

feat(hw): add IR emitter quirk for Lenovo ThinkPad P14s Gen 4 (Syntek 174f:11a8) - #102

Open
jeffshee wants to merge 1 commit into
sovren-software:mainfrom
jeffshee:hw/174f-11a8-emitter-quirk
Open

feat(hw): add IR emitter quirk for Lenovo ThinkPad P14s Gen 4 (Syntek 174f:11a8)#102
jeffshee wants to merge 1 commit into
sovren-software:mainfrom
jeffshee:hw/174f-11a8-emitter-quirk

Conversation

@jeffshee

Copy link
Copy Markdown

What problem does this solve?

On the Lenovo ThinkPad P14s Gen 4 (Syntek 174f:11a8, uvcvideo) the IR emitter is off by
firmware default. The IR node streams normally, so visage discover and visage test look
healthy, but only ambient infrared reaches the sensor and every verify ends in
no face detected in any captured frame. There was no quirk for this camera.

Type

  • Hardware quirk (contrib/hw/*.toml)

What this changes

Adds contrib/hw/174f-11a8.toml and registers it. UVC XU unit 14, selector 6,
[1, 3, 3, 0, 0, 0, 0, 0, 0] — the same control as the 04f2-b6d0 and 30c9-0120 entries.
The firmware rejects an all-zero off payload with ERANGE, so off_bytes carries the device
default [1, 3, 1, …]. The control persists across fd close, so reset_on_close is not set.
One row in the compatibility table.

Testing

$ visage discover
/dev/video2  driver=uvcvideo  VID=0x174f PID=0x11a8  quirk: Lenovo ThinkPad P14s Gen 4 IR Camera (Syntek 174f:11a8) ✓
  • Fedora 44, kernel 7.2, Visage 0.4.0-rc.1 built from this branch: visage onboard, D-Bus
    verify, PAM sudo and GDM lock-screen unlock all succeed; verifies match at 0.83–0.95
    similarity.
  • Negative control: with the control at its default the same frames fall back to ambient level
    and detection fails again. No other emitter tool is installed as a service on the host.
  • linux-enable-ir-emitter configure independently found the same control (byte 2 = 2,
    which behaves identically to 3).
  • cargo test -p visage-hw quirks:: passes.

Checklist

  • cargo fmt --all -- --check passes
  • cargo clippy --workspace -- -D warnings passes
  • cargo test --workspace passes
  • Commits are signed off (git commit -s) per the DCO
  • I have read CONTRIBUTING.md

… 174f:11a8)

The emitter on this module is off by firmware default, so without a quirk
every verify is "no face detected in any captured frame".

UVC XU unit 14, selector 6, [1, 3, 3, ...] — the same control as the
04f2-b6d0 and 30c9-0120 entries. The firmware rejects an all-zero off
payload with ERANGE, so off_bytes carries the default [1, 3, 1, ...]. The
control persists across fd close. Independently found by
linux-enable-ir-emitter (byte 2 = 2, which behaves identically).

Verified on Fedora 44: enroll, verify, PAM sudo and GDM unlock; negative
control by restoring the default returns the frames to ambient level.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Jeff Shee <jeffshee8969@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant