I am trying to get a Nitrokey 3 running on Manjaro Linux (Arch).
KeePassXC does not recognize the Nitrokey.
I have already looked for solutions on the internet.
In the troubleshooting chapter of Taikun’s manual it says that pcscd.service must be running.
The status output shows me that the service is running:
Submitted by Anonymous on 28. September 2023 - 10:42
I had the same Problem on Manjaro, pynitro and GPG worked, KeepassXC didn’t found it. The available udev rules was correctly installed. The solution for me was installing the package “ccid”, then it worked without any further configuration. On Mint, maybe it’s called “libccid”, I don’t know.
Thanks for the reply, but I am not sure what to do with the hint.
In the meantime I found out that with USER2 the Nitrokey is not reliably recognized by Keepass XC. Only after the second or third press of the search button the nitrokey is found. For user USER1, the nitrokey is only found if I have already inserted it before logging as USER1 in.
The command journalctl --since "2023-10-17" | grep Nitrokey shows me following output (as USER1):
Okt 17 15:56:11 my-pc kernel: usb 3-3.1: Product: Nitrokey 3
Okt 17 15:56:11 my-pc kernel: usb 3-3.1: Manufacturer: Nitrokey
Okt 17 15:56:12 my-pc kernel: hid-generic 0003:20A0:42B2.0008: hiddev99,hidraw7: USB HID v1.11 Device [Nitrokey Nitrokey 3] on usb-0000:0a:00.3-3.1/input1
Okt 17 16:02:39 my-pc pcscd[2116]: 00000002 eventhandler.c:336:EHStatusHandlerThread() Error communicating to: Nitrokey Nitrokey 3 [CCID/ICCD Interface] 00 00
Okt 17 16:09:27 my-pc kernel: usb 3-3.1: Product: Nitrokey 3
Okt 17 16:09:27 my-pc kernel: usb 3-3.1: Manufacturer: Nitrokey
Okt 17 16:09:28 my-pc kernel: hid-generic 0003:20A0:42B2.000E: hiddev99,hidraw7: USB HID v1.11 Device [Nitrokey Nitrokey 3] on usb-0000:0a:00.3-3.1/input1
For both users, the Nitrokey is recognized if the stick is already inserted before the user logs in.
I am not sure which of the two drivers/services (ccid or pcscd) are being used. Entries in the ~/.gnupg/scdaemon.conf file have no effect (my feeling).
The comand opensc-tool --reader 0 --name -v returns follwing output:
Connecting to card in reader Nitrokey Nitrokey 3 [CCID/ICCD Interface] 01 00...
Using card driver OpenPGP card.
Card name: OpenPGP card v3.4 (000F 85948C75)
When KeePassXC detect the the Nitrokey he shows me following text: (PCSC) Nitrokey 3 v4.11.0 ... Challenge ...
I think that I need PCSC. Following entry in the file ~/.gnupg/scdaemon.conf has no effect.
After a long search I came across the following article.
I can also confirm the behavior. The Nitrokey will only be found if it is plugged into the PC before KeePassXC starts.
I just tried keepassXC first time to replay the issue on Arch with exactly the same result. Starting/stopping pcscd does not seem to make a difference. The key is consistently recognised when plugged in before application start, but not when later.
Something I noticed is that the app-button does work when any other key is inserted before application start. I can plug in a NK Pro2, it shows “no hardware key detected”, switch the Pro for the NK3 and then the refresh works. This might indicate it’s actually a keepassxc bug. I saw 8307 and 8213. It might be useful to add to the latter bug that the error also shows outside flatpak. Another quirk I noticed is you can unplug a detected key, refresh to “no key detected”, re-plug and refresh and it continues to work.
edit to clarify:
The app-button I refer to above is the button in keepassxc to detect/re-detect a hardware key.
The NK Pro2 referred to in the test has not the needed capability. So it is expected that keepassxc does not detect it as a hw key. The point is that the configured NK3 is detected afterwards (refresh functionality works). I tested it as well with a YK not registered in keepassxc, same behaviour (no hw key detected, refresh works).
Switching between wayland/X11, gdm/sddm made no difference. For me it was not necessary to log out, inserting a key before start of keepassxc was necessary otherwise a refresh does not have an effect.