Hello Paride,
Le 03/04/2020 à 13:20, Paride Legovini a écrit :
Hi,
I'm also hitting this issue, but after trying a few things I'm not
convinced it is strictly a "resume after suspend" problem. But
let's proceed with order.
I normally keep a OpenPGP smartcard in my laptop's smartcard reader and
I use it via scdaemon with disable-ccid. Sometimes when I suspend and
resume my laptop I lose access to the smartcard: gnupg/scdaemon can't
find it anymore. Restarting pcscd helps (systemctl restart pcscd) often
but *not always* helps.
I tried to collect logs running pcscd in foreground in a shell, but
guess what, it *never* happens if I run it like this. The problem seems
to happen only when pcscd is started by systemd, and I found out that I
can reproduce it by restarting pcscd several time with systemctl. So I
modified pcscd.service like this:
[Service]
Environment=LIBCCID_ifdLogLevel=0x000F
ExecStart=/usr/sbin/pcscd --foreground --debug --apdu
#ExecStart=/usr/sbin/pcscd --foreground --auto-exit
#ExecReload=/usr/sbin/pcscd --hotplug
in order to collect the relevant logs. Here they are.
Thanks a lot for your tests and logs.
When you write "trying to access the smartcard doesn't work." what happens
exactly?
Do you have an error from gpg or scdaemon?
I ask because I don't see any error reported by pcscd.
So maybe the problem is between pcscd and libpcsclite.
When it fails:
- is the socket /var/run/pcscd/pcscd.comm still present?
- what do you get when you run pcsc_scan? (from the pcsc-tools package)
Thanks
PS: maybe you should change your smart card password if it starts with "c".
--
Dr. Ludovic Rousseau