GnuPG doesn't see available Yubikey

jman gnupg-users at city17.xyz
Tue Jul 21 12:21:34 CEST 2026


Hello,

I have a recurrent problem when my laptop resumes from sleep: the Yubikey (NFC 5) is available but 
GnuPG doesn't "see" it.

$ gpg --debug ipc --card-status
gpg: reading options from '$HOME/.local/share/gnupg/gpg.conf'
gpg: reading options from '[cmdline]'
gpg: enabled debug flags: ipc
gpg: enabled compatibility flags:
gpg: DBG: chan_3 <- OK Pleased to meet you, process 3813
gpg: DBG: connection to the gpg-agent established
gpg: DBG: chan_3 -> RESET
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> OPTION ttyname=/dev/pts/2
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> OPTION ttytype=xterm-kitty
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> OPTION putenv=WAYLAND_DISPLAY=wayland-1
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> OPTION putenv=XDG_SESSION_TYPE=wayland
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> OPTION putenv=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> OPTION pinentry-user-data=gnome3
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> OPTION lc-ctype=en_US.UTF-8
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> OPTION lc-messages=en_US.UTF-8
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> GETINFO version
gpg: DBG: chan_3 <- D 2.4.9
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> OPTION allow-pinentry-notify
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> OPTION agent-awareness=2.1.0
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> SCD GETINFO version
gpg: DBG: chan_3 <- D 2.4.9
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> SCD SERIALNO
gpg: DBG: chan_3 <- ERR 100663297 General error <SCD>
gpg: selecting card failed: General error
gpg: OpenPGP card not available: General error
gpg: secmem usage: 0/65536 bytes in 0 blocks

$ lsusb -v
...
Bus 003 Device 046: ID 1050:0407 Yubico.com Yubikey 4/5 OTP+U2F+CCID
Negotiated speed: Full Speed (12Mbps)
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 [unknown]
  bDeviceSubClass         0 [unknown]
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x1050 Yubico.com
  idProduct          0x0407 Yubikey 4/5 OTP+U2F+CCID
  bcdDevice            5.74
  iManufacturer           1 Yubico
  iProduct                2 YubiKey OTP+FIDO+CCID


Using Debian/testing (forky):
$ dpkg -l | grep "gnupg\|scdaemon"
ii  gnupg                                 2.4.9-7
ii  gnupg-agent                           2.4.9-7
ii  gnupg-l10n                            2.4.9-7
ii  gnupg-utils                           2.4.9-7
ii  scdaemon                              2.4.9-7

I asked a similar question years ago:
https://lists.gnupg.org/pipermail/gnupg-users/2020-December/064520.html

but these tricks (send SCD commands, restart the scdaemon, ... ) don't seem to work 
reliably. Sometimes even re-inserting the Yubikey does not work and I have to logout.

Why is the Yubikey not "seen" by GnuPG? What is /exactly/ the problem and how can I solve it once 
and for all?

Thanks



More information about the Gnupg-users mailing list