It takes 8-9 secs until pinentry asks for the PIN of the OpenPGP card

NIIBE Yutaka gniibe at
Fri May 17 06:39:55 CEST 2024


Matthias Apitz <guru at> wrote:
> This isn't that easy. The pcscd is running (when needed) as:
> purism at pureos:~$ ps ax | grep pcscd
>    2151 ?        Ssl    0:00 /usr/sbin/pcscd --foreground --auto-exit
> it is launched by a system service:

I see.  IIUC, PureOS is Debian based.  There should be a file for systemd
as /lib/systemd/system/pcscd.service. Its content is something like:
Description=PC/SC Smart Card Daemon

ExecStart=/usr/sbin/pcscd --foreground --auto-exit $PCSCD_ARGS
ExecReload=/usr/sbin/pcscd --hotplug


Then, to debug PC/SC service, you can have a file /etc/default/pcscd with:

Kill pcscd by systemctl, if any.

Kill the scdaemon by:

    $ gpgconf --kill scdaemon

And then, when you try to access OpenPGP card by SSH or GnuPG, gpg-agent
invokes scdaemon, scdaemon tries to access PC/SC service, pcscd is
invoked by socket activation with systemd.  You can see the debug log
by journalctl.

More information about the Gnupg-users mailing list