Page 1 of 1

pcscd not running after reboot

PostPosted: Jun 11th, '18, 11:00
by hviaene
I've never had this before. On one machine the pcscd daemon does not run after reboot. In MCC it is marked as to start after boot. In journalctl I see it as being started as any other service, but finally it isn't. Starting it afterwarts with systemctl is OK, and it remains running. No other indications in journalctl.
Where do I start to search for this???

Re: pcscd not running after reboot

PostPosted: Jun 11th, '18, 17:17
by AstorBG
Hi,
Did you try as root:
Code: Select all
systemctl enable pcscd
?

Cheers

Re: pcscd not running after reboot

PostPosted: Jun 11th, '18, 19:24
by doktor5000
Before you do that, please post the output as root of
Code: Select all
systemctl status pcscd -al -n150
systemctl is-enabled pcscd
journalctl -ab|grep -i pcscd

Re: pcscd not running after reboot

PostPosted: Jun 12th, '18, 09:10
by hviaene
Copying manually from teamviewer:
systemctl status pcscd -al -n150
loaded .......; indirect; vendor preset: enabled
systemctl is-enabled pcscd
indirect
journalctl -ab|grep -i pcscd
no output

Re: pcscd not running after reboot

PostPosted: Jun 12th, '18, 18:07
by doktor5000
Have no system to check against, but the "indirect" status looks strange. From the documentation:
man systemctl wrote:"indirect" The unit file itself is not enabled, but it has a non-empty Also= setting in the "[Install]" unit file section, listing other unit files that might be enabled, or it has an alias under a different name through a symlink that is not specified in Also=. For template unit file, an instance different than the one specified in DefaultInstance= is enabled.


Could also be that it is normal behavior and instead of pcscd.service the socket unit pcscd.socket is enabled.

What is the output of
Code: Select all
systemctl list-units --all|grep -i pcscd

Re: pcscd not running after reboot

PostPosted: Jun 13th, '18, 08:34
by hviaene
Same commands on my own PC where the daemon runs correctly at startup:
Code: Select all
# systemctl status pcscd -al -n150
● pcscd.service - PC/SC Smart Card Daemon
   Loaded: loaded (/usr/lib/systemd/system/pcscd.service; indirect; vendor preset: enabled)
   Active: active (running) since Wed 2018-06-13 08:28:16 CEST; 2min 35s ago
 Main PID: 4998 (pcscd)
   CGroup: /system.slice/pcscd.service
           └─4998 /usr/sbin/pcscd --foreground --auto-exit

Jun 13 08:28:16 mach1.hviaene.thuis systemd[1]: Started PC/SC Smart Card Daemon.
[root@mach1 ~]# systemctl is-enabled pcscd
indirect
[root@mach1 ~]# journalctl -ab|grep -i pcscd
[root@mach1 ~]#
Trying to get access to the problem PC today.

Re: pcscd not running after reboot

PostPosted: Jun 13th, '18, 14:11
by hviaene
on the problem machine:
Code: Select all
# systemctl list-units --all|grep -i pcscd
#

thus no feedback

Re: pcscd not running after reboot

PostPosted: Jun 13th, '18, 14:30
by hviaene
On my properly working PC:
Code: Select all
# systemctl list-units --all|grep -i pcscd
  pcscd.service                                                                             loaded    active   running   PC/SC Smart Card Daemon
  pcscd.socket                                                                              loaded    active   running   PC/SC Smart Card Daemon Activation Socket


To make clear: on the "failing PC" the smart card reader works OK once I manually start pcscd. But that is not an acceptable situation.

Re: pcscd not running after reboot

PostPosted: Jun 13th, '18, 19:34
by doktor5000
Please use code tags next time ...


Acceptable situation or not, you still need to find out why it fails to start, as it fails on your box, and unless you provide sufficient information for others to help with that, there's only so much that others can do, please keep that in mind.

Back on topic, quoting my previous mention again:
doktor5000 wrote:Have no system to check against, but the "indirect" status looks strange. From the documentation:
man systemctl wrote:"indirect" The unit file itself is not enabled, but it has a non-empty Also= setting in the "[Install]" unit file section, listing other unit files that might be enabled, or it has an alias under a different name through a symlink that is not specified in Also=. For template unit file, an instance different than the one specified in DefaultInstance= is enabled.


Could also be that it is normal behavior and instead of pcscd.service the socket unit pcscd.socket is enabled.


So you would need to take a look at the status of pcscd.socket. Also via journalctl best also grep for "PC/SC" as that is what seems to be in the log.

Re: pcscd not running after reboot

PostPosted: Jun 19th, '18, 10:25
by hviaene
Answers on failing PC:
journalctl best also grep for "PC/SC" : finds nothing
status of pcscd.socket : frankly I do not know for sure how to do that. Googling brings me : # ss -a | grep pcsc , which returns nothing.

Re: pcscd not running after reboot

PostPosted: Jun 19th, '18, 17:52
by doktor5000
hviaene wrote:status of pcscd.socket : frankly I do not know for sure how to do that.


Same as you did for pcscd.service previously:

Code: Select all
systemctl status pcscd.socket -al -n150

Re: pcscd not running after reboot

PostPosted: Jun 20th, '18, 10:07
by hviaene
Code: Select all
● pcscd.socket - PC/SC Smart Card Daemon Activation Socket
   Loaded: loaded (/usr/lib/systemd/system/pcscd.socket; disabled; vendor preset: enabled)
   Active: inactive (dead)
   Listen: /run/pcscd.comm (Stream)