I have set up the smartcard functionality of my Nitrokey 3A NFC to use UIF requests for decryption and signing.
Some time already I have issues that GnuPG asks for the card
backup key passphrase on decryption when it just should use the
key from the smartcard itself. I suspected my USB hub, but today
I could reproduce the issue with the NK3 plugged into a USB port
of the host itself.
It goes like this (commented journal extract):
# touch the NK3 to respond to a UIF request => smart card looses contact?
[ 4167.936460] kernel usb 3-3: USB disconnect, device number 12
[ 4167.954067] systemd[2120] Stopped target smartcard.target - Smart Card.
[ 4167.955970] systemd[1] Stopped target smartcard.target - Smart Card.
# wiggle NK3 in USB port => smart card regains contact?
[ 4192.320427] kernel usb 3-3: new full-speed USB device number 13 using xhci_hcd
[ 4192.520113] kernel usb 3-3: New USB device found, idVendor=20a0, idProduct=42b2, bcdDevice= 1.08
[ 4192.520749] kernel usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4192.521375] kernel usb 3-3: Product: Nitrokey 3
[ 4192.521816] kernel usb 3-3: Manufacturer: Nitrokey
[ 4192.528120] kernel hid-generic 0003:20A0:42B2.000D: hiddev1,hidraw6: USB HID v1.11 Device [Nitrokey Nitrokey 3] on usb-0000:00:14.0-3/input1
[ 4192.533987] mtp-probe[16480] checking bus 3, device 13: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3"
[ 4192.534655] mtp-probe[16480] bus: 3, device: 13 was not an MTP device
[ 4192.538658] systemd[1] Reached target smartcard.target - Smart Card.
[ 4192.539149] systemd[2120] Reached target smartcard.target - Smart Card.
[ 4192.555961] mtp-probe[16483] checking bus 3, device 13: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3"
[ 4192.556420] mtp-probe[16483] bus: 3, device: 13 was not an MTP device
Now what? Open that thing and bake it in the oven?