[Pcsclite-muscle] need to restart pcscd for USB after boot

Johannes Berg johannes at sipsolutions.net
Wed Aug 16 07:43:57 PDT 2023


Hi,

Sorry, I messed up the list settings and didn't get your emails
directly, so am breaking the thread for the replies.

@Lew:
> This reminds me of a rinetd problem with systemd that I encountered on
> openSUSE Leap.  One of our guys fixed the issue, rinetd was starting too
> soon in the boot sequence.  But I'm not systemd fluent and don't remember
> how it was fixed.  We haven't had any issues with pcscd and smartcards
> on openSUSE.

I would've thought something similar, but it's not actually 100%? There
are some times where it actually works. Well, at least there used to be,
now it generally doesn't, I'd have to check. But yeah, it's possible,
but without even a USB device plugged in yet at boot, what could pcscd
depend on?


@Ludovic:
> Without logs it is hard to know what is happening.
> Have a look into /var/log/syslog or other files in /var/log/

Right, but there aren't really any logs.

# journalctl --system -b | grep pcscd
Aug 16 08:25:02 machine systemd[1]: Listening on pcscd.socket - PC/SC Smart Card Daemon Activation Socket.
Aug 16 08:25:10 machine systemd[1]: Started pcscd.service - PC/SC Smart Card Daemon.
Aug 16 08:25:10 machine audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=pcscd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Aug 16 08:56:37 machine systemd[1]: Stopping pcscd.service - PC/SC Smart Card Daemon...
Aug 16 08:56:37 machine systemd[1]: pcscd.service: Deactivated successfully.
Aug 16 08:56:37 machine systemd[1]: Stopped pcscd.service - PC/SC Smart Card Daemon.
Aug 16 08:56:37 machine audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=pcscd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Aug 16 08:56:37 machine systemd[1]: pcscd.service: Consumed 2.715s CPU time.
Aug 16 08:56:37 machine systemd[1]: Started pcscd.service - PC/SC Smart Card Daemon.
Aug 16 08:56:37 machine audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=pcscd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Aug 16 08:56:51 machine pcscd[6563]: 00000000 winscard.c:286:SCardConnect() Error Reader Exclusive
Aug 16 08:56:51 machine pcscd[6563]: 00015974 winscard.c:286:SCardConnect() Error Reader Exclusive
Aug 16 08:56:51 machine pcscd[6563]: 00017059 winscard.c:286:SCardConnect() Error Reader Exclusive

That last error message repeats, but it continues working anyway. No
messages between the start and stop.

Which is kind of why I was wondering about how to enable the logging if
I cannot run the --foreground listed on the website; maybe just add
similar command line options to the systemd unit so it starts like that
on boot?


> Also read "GnuPG and PC/SC conflicts"
> https://blog.apdu.fr/posts/2019/06/gnupg-and-pcsc-conflicts/

I'll try that too, thanks.

Thanks,
johannes



More information about the pcsclite-muscle mailing list