File: [hsm/linux/automatic-screen-lock.rst] https://docs.nitrokey.com/hsm/linux/automatic-screen-lock.html
The udev rules will be firmware version related. (101 will be the FW version)
A much simpler solution is:
ACTION=="remove", SUBSYSTEM=="usb", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="42b2", RUN+="/usr/bin/loginctl lock-sessions"
Tested with the nitrokey 3 2C NFC under Fedora-38.
File: [hsm/linux/automatic-screen-lock.rst] https://docs.nitrokey.com/hsm/linux/automatic-screen-lock.html The udev rules will be firmware version related. (101 will be the FW version) A much simpler solution is: ACTION=="remove", SUBSYSTEM=="usb", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="42b2", RUN+="/usr/bin/loginctl lock-sessions" Tested with the nitrokey 3 2C NFC under Fedora-38.