“No such device” when non-root

My Nitrokey Pro suddenly stopped working when I am not root. I am getting this error message:

$ gpg --card-status
gpg: selecting card failed: No such device
gpg: OpenPGP card not available: No such device

scdaemon, which is running under my unprivileged user, writes this to stdout when I run the above command:

ccid open error: skip
pcsc_establish_context failed: no service (0x8010001d)

The nitrokey app also doesn’t detect the key unless I am running as root. It outputs this to stdout:

[Sat Aug 15 16:53:37 2020][DEBUG_L2]	run
[Sat Aug 15 16:53:37 2020][DEBUG_L1]	Throw: Device not initialized
[Sat Aug 15 16:53:37 2020][DEBUG_L2]	run
[Sat Aug 15 16:53:37 2020][DEBUG_L1]	Throw: Device not initialized

I rebooted and it started working again. That’s odd considering I was having the above problem just after rebooting.

Hi!

This looks like some Udev issue. Perhaps system update has introduced this? In case it would happen again please let us know your environment details (e.g. Linux distribution, kernel etc.). Helpful would be dmesg for the device insertion event and lsusb output as well.