On my Linux machine (Arch Linux, up to date as of this post) I am having trouble using both the OpenSC PKCS11 module and GnuPG.

It seems like while an app using the PKCS11 module is started (in my case it's Firefox) it takes exclusive control of the smartcard and no other apps can use it. If I try to access the card via GnuPG I get a cryptic error:

rjevski@workstation ~ % gpg2 --card-status
gpg: selecting openpgp failed: No such device
gpg: OpenPGP card not available: No such device

By making scdaemon more verbose I am able to get more info on the issue :

scdaemon[8725] pcsc_connect failed: sharing violation (0x8010000b)

Obviously this breaks not only command-line GPG but any app relying on it - I can't for example sign/encrypt e-mails in Evolution while my browser is running.

A workaround would be to unload the PKCS11 module from Firefox but given that I actively use it it's a less than desirable solution. Does anyone know of a better one?

  • yubico's yubioauth kills something after it exits, for the same reason otherwise you can't use gpg on yubikey. in this schenario it's one at a time gpg or yubioauth. not too sure of a solution but a sneeky way in debian would be to use schroot for one app i think this would work... maybe... too lazy to test, why it's a comment and not an answer... Dec 7, 2016 at 22:55
  • 1
    I'm having this issue as well on macOS. So far unable to figure out any great way to find what it is that's locking the card. Jan 11, 2018 at 5:17
  • 3
    I have the same issue on Fedora with Enigmail and Thunderbird. My workaround is sudo systemctl restart pcscd but this is definitely a bug somewhere. Jun 9, 2018 at 13:04
  • Update to my problem from over a year ago -- killing the com.apple.ctkpcscd process unlocked the card. Apr 15, 2019 at 19:42


You must log in to answer this question.

Browse other questions tagged .