Thinkpad T480 fingerprint reader support

I have a Thinkpad T480 I’ve been using for a while and recently discovered the wonder that is Nix/NixOS. Unfortunately the built-in fingerprint reader (device ID 06cb:009a) did not have linux driver support until recently with the python-validity package. Looking around, it does not appear that there is currently any nixpkgs support for python-validity.

Does anyone know if there is actually support somewhere for python-validity (or a different driver for 06cb:009a although AFAIK python-validity is the only one) within the nix community? If one doesn’t exist, is it a reasonable approach to try to install python-validity by pulling the .deb file and installing it via something similar to this post? Should I instead just pull the code and have the derivation build from source instead?

I presume the services.fprintd.enable does’nt work on the t480.

It’s a shame , the thinkpad hardware use to be very linux compatible, but not so much these days with inevitable march to windows…

if python-validity is not in nixpkgs, then open a packaging request on github, maybe a kind soul will do it for you.

You may find a clue on how to do it here. It may be in the Nixos User Repository.

https://sourcegraph.com/github.com/kurnevsky/nixfiles/-/blob/modules/python-validity.nix

2 Likes

Yeah sadly the fingerprint reader in the T480 (06cb:009a) is not supported by fprint so if you just do services.fprintd.enable = true; and try to run fprint-enroll you just get “no devices available”. Python-validity solves this by providing an fprint driver for the device, however you also need a forked version of fprintd to make it work anyway.

Thanks for the links, they look very helpful I’ll have to take a look through them. I did not know about packing request issues on the github (although it makes perfect sense in retrospect). I might do that. Or maybe just submit a PR if I can get it working locally lol.

1 Like

Actually that repo by kurnevsky looks to be pretty much exactly what I’m looking for.

Thanks for much for the help, I feel kinda embarrassed now since apparently Google-foo isn’t up to par :sweat_smile:

Hey, nix/OS is a massive eco system, sometimes its just knowing where to look. I didn’t find nixos hardware repo for quite a long time myself…

If you get it working, then maybe get your first PR to nixpkgs, and maybe even update the https://github.com/NixOS/nixos-hardware/tree/master/lenovo/thinkpad/t480 with the fix.

1 Like

This may be of some use to you GitHub - ahbnr/nixos-06cb-009a-fingerprint-sensor: Nix flake for driving the 06cb:009a fingerprint sensor on NixOS

1 Like

This worked!

Here is the Flake I build to get this working (before using this, you have to follow the first setup based on open-fprintd and python-validity up to step 3 and register a fingerprint to check if it worked. If successful):

flake.nix

{
  description = "Fingerpint scanner flake build from github.com/ahbnr/nixos-06cb-009a-fingerprint-sensor";
  
  inputs = {
    nixos-06cb-009a-fingerprint-sensor = {
      url = "github:ahbnr/nixos-06cb-009a-fingerprint-sensor";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = {
    self,
    nixpkgs,
    nixos-06cb-009a-fingerprint-sensor,
    ...
  }
  @attrs:
  let
    lib = nixpkgs.lib;
  in {
    nixosConfigurations = {
      nixos = lib.nixosSystem {
        system = "x86_64-linux";
        specialArgs = attrs;
        modules = [
          ./configuration.nix
#          nixos-06cb-009a-fingerprint-sensor.nixosModules.open-fprintd
#          nixos-06cb-009a-fingerprint-sensor.nixosModules.python-validity
        ];
      };
    };
  };
}

And your configuration.nix:

{ config, pkgs, lib, nixos-06cb-009a-fingerprint-sensor, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
    ];

  # Bootloader.
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  # Flakes and experimental features
  nix.settings.experimental-features = [ "nix-command" "flakes" ];
 
# [...]

  services.fprintd = {
    enable = true;
    tod = {
      enable = true;
      driver = nixos-06cb-009a-fingerprint-sensor.lib.libfprint-2-tod1-vfs0090-bingch {
        calib-data-file = ./calib-data.bin;
      };
    };
  };

# [...]