pcscd is supposed to run at startup, but sometimes it does, sometimes not, can't tell why. It started reliably in my last distro, crunchbang, based on ubuntu 9.04.

Bug #475821 reported by natsbar
This bug report is a duplicate of:  Bug #506908: pcscd no longer starts on Lucid. Edit Remove
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pcsc-lite (Ubuntu)
New
Undecided
Unassigned
Nominated for Lucid by Fabian Köster

Bug Description

Binary package hint: pcscd

- I am using UNR 9.10
- pcscd version 1.5.3-1ubuntu1
- I expect the daemon to start after startup
- It only starts up sometimes. I can't see under what conditions the daemon will start and when it won't.

ProblemType: Bug
Architecture: i386
Date: Thu Nov 5 15:36:20 2009
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu-Netbook-Remix 9.10 "Karmic Koala" - Release i386 (20091028.4)
Package: pcscd 1.5.3-1ubuntu1
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: pcsc-lite
Tags: ubuntu-unr
Uname: Linux 2.6.31-14-generic i686

Revision history for this message
natsbar (natsbar) wrote :
Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

Do you have some traces in a system log file?
Look for "pcscd" in /var/log/syslog for example.

Revision history for this message
natsbar (natsbar) wrote : Re: [Bug 475821] Re: pcscd is supposed to run at startup, but sometimes it does, sometimes not, can't tell why. It started reliably in my last distro, crunchbang, based on ubuntu 9.04.

Ok, I logged on today and pcscd didn't load at startup, so I looked at
/var/log/syslog for traces of pcscd at you instructed, and I limited myself
to November 6 to confirm that it recorded the error and not when pcscd was
working.

To be fair, on this one, the USB cardreader was unplugged during startup, so
I will do this again and send results when I catch the daemon down after
startup while the cardreader was plugged in.

Traces of pcscd on last startup (cardreader unplugged)

Nov 6 11:27:44 works pcscd:
hotplug_libhal.c:490:HPRegisterForHotplugEvents() Could not initialise
connection to hald.
Nov 6 11:27:44 works pcscd:
hotplug_libhal.c:491:HPRegisterForHotplugEvents() Normally this means the
HAL daemon (hald) is not running or not ready.
Nov 6 11:27:44 works pcscd: pcscdaemon.c:524:main() SVCServiceRunLoop
returned

Nathan.

On Fri, Nov 6, 2009 at 3:16 AM, Ludovic Rousseau <<email address hidden>
> wrote:

> Do you have some traces in a system log file?
> Look for "pcscd" in /var/log/syslog for example.
>
> --
> pcscd is supposed to run at startup, but sometimes it does, sometimes not,
> can't tell why. It started reliably in my last distro, crunchbang, based on
> ubuntu 9.04.
> https://bugs.launchpad.net/bugs/475821
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “pcsc-lite” package in Ubuntu: New
>
> Bug description:
> Binary package hint: pcscd
>
> - I am using UNR 9.10
> - pcscd version 1.5.3-1ubuntu1
> - I expect the daemon to start after startup
> - It only starts up sometimes. I can't see under what conditions the
> daemon will start and when it won't.
>
> ProblemType: Bug
> Architecture: i386
> Date: Thu Nov 5 15:36:20 2009
> DistroRelease: Ubuntu 9.10
> InstallationMedia: Ubuntu-Netbook-Remix 9.10 "Karmic Koala" - Release i386
> (20091028.4)
> Package: pcscd 1.5.3-1ubuntu1
> ProcEnviron:
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
> SourcePackage: pcsc-lite
> Tags: ubuntu-unr
> Uname: Linux 2.6.31-14-generic i686
>

Revision history for this message
natsbar (natsbar) wrote :

Caught the error after startup with the card reader plugged in and little
change in the syslog. I'll provide if you need more information. Traces of
pcscd on this startup.

Nov 6 21:48:59 works pcscd:
hotplug_libhal.c:490:HPRegisterForHotplugEvents() Could not initialise
connection to hald.
Nov 6 21:48:59 works pcscd:
hotplug_libhal.c:491:HPRegisterForHotplugEvents() Normally this means the
HAL daemon (hald) is not running or not ready.
Nov 6 21:48:59 works pcscd: pcscdaemon.c:524:main() SVCServiceRunLoop
returned

On Fri, Nov 6, 2009 at 12:52 PM, Nathaniel Sbar <email address hidden> wrote:

> Ok, I logged on today and pcscd didn't load at startup, so I looked at
> /var/log/syslog for traces of pcscd at you instructed, and I limited myself
> to November 6 to confirm that it recorded the error and not when pcscd was
> working.
>
> To be fair, on this one, the USB cardreader was unplugged during startup,
> so I will do this again and send results when I catch the daemon down after
> startup while the cardreader was plugged in.
>
> Traces of pcscd on last startup (cardreader unplugged)
>
> Nov 6 11:27:44 works pcscd:
> hotplug_libhal.c:490:HPRegisterForHotplugEvents() Could not initialise
> connection to hald.
> Nov 6 11:27:44 works pcscd:
> hotplug_libhal.c:491:HPRegisterForHotplugEvents() Normally this means the
> HAL daemon (hald) is not running or not ready.
> Nov 6 11:27:44 works pcscd: pcscdaemon.c:524:main() SVCServiceRunLoop
> returned
>
> Nathan.
>
>
>
> On Fri, Nov 6, 2009 at 3:16 AM, Ludovic Rousseau <
> <email address hidden>> wrote:
>
>> Do you have some traces in a system log file?
>> Look for "pcscd" in /var/log/syslog for example.
>>
>> --
>> pcscd is supposed to run at startup, but sometimes it does, sometimes not,
>> can't tell why. It started reliably in my last distro, crunchbang, based on
>> ubuntu 9.04.
>> https://bugs.launchpad.net/bugs/475821
>> You received this bug notification because you are a direct subscriber
>> of the bug.
>>
>> Status in “pcsc-lite” package in Ubuntu: New
>>
>> Bug description:
>> Binary package hint: pcscd
>>
>> - I am using UNR 9.10
>> - pcscd version 1.5.3-1ubuntu1
>> - I expect the daemon to start after startup
>> - It only starts up sometimes. I can't see under what conditions the
>> daemon will start and when it won't.
>>
>> ProblemType: Bug
>> Architecture: i386
>> Date: Thu Nov 5 15:36:20 2009
>> DistroRelease: Ubuntu 9.10
>> InstallationMedia: Ubuntu-Netbook-Remix 9.10 "Karmic Koala" - Release i386
>> (20091028.4)
>> Package: pcscd 1.5.3-1ubuntu1
>> ProcEnviron:
>> LANG=en_US.UTF-8
>> SHELL=/bin/bash
>> ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
>> SourcePackage: pcsc-lite
>> Tags: ubuntu-unr
>> Uname: Linux 2.6.31-14-generic i686
>>
>
>

Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

pcscd needs to be started _after_ hal.

Please patch the /etc/init.d/pcscd file using the attached patch and retry.

Revision history for this message
natsbar (natsbar) wrote :

Thanks. The patch seems to be working. I'll report if there are any
problems later.

On Sat, Nov 7, 2009 at 3:53 AM, Ludovic Rousseau <<email address hidden>
> wrote:

> pcscd needs to be started _after_ hal.
>
> Please patch the /etc/init.d/pcscd file using the attached patch and
> retry.
>
> ** Attachment added: "patch.txt"
> http://launchpadlibrarian.net/35297707/patch.txt
>
> --
> pcscd is supposed to run at startup, but sometimes it does, sometimes not,
> can't tell why. It started reliably in my last distro, crunchbang, based on
> ubuntu 9.04.
> https://bugs.launchpad.net/bugs/475821
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “pcsc-lite” package in Ubuntu: New
>
> Bug description:
> Binary package hint: pcscd
>
> - I am using UNR 9.10
> - pcscd version 1.5.3-1ubuntu1
> - I expect the daemon to start after startup
> - It only starts up sometimes. I can't see under what conditions the
> daemon will start and when it won't.
>
> ProblemType: Bug
> Architecture: i386
> Date: Thu Nov 5 15:36:20 2009
> DistroRelease: Ubuntu 9.10
> InstallationMedia: Ubuntu-Netbook-Remix 9.10 "Karmic Koala" - Release i386
> (20091028.4)
> Package: pcscd 1.5.3-1ubuntu1
> ProcEnviron:
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
> SourcePackage: pcsc-lite
> Tags: ubuntu-unr
> Uname: Linux 2.6.31-14-generic i686
>

Revision history for this message
natsbar (natsbar) wrote :

Sorry to be a pest, but it seems some problems continue, but slightly
different symptoms. At startup syslog displays the same error:

Nov 8 07:04:46 works pcscd:
hotplug_libhal.c:490:HPRegisterForHotplugEvents() Could not initialise
connection to hald.
Nov 8 07:04:46 works pcscd:
hotplug_libhal.c:491:HPRegisterForHotplugEvents() Normally this means the
HAL daemon (hald) is not running or not ready.
Nov 8 07:04:46 works pcscd: pcscdaemon.c:524:main() SVCServiceRunLoop
returned

I checked /etc/init.d/pcscd to see if the patch reverted and it was fine.
Still, I patched the file manually (this newbie doesn't know how to do
otherwise) and the error might now be located between my fingers and the
keyboard. Here's how /etc/init.d/pcscd looks after I applied the patch so
that you can check my work:

#! /bin/sh
### BEGIN INIT INFO
# Provides: pcscd
# Required-Start: $local_fs $remote_fs $syslog hal
# Required-Stop: $local_fs $remote_fs $syslog hal
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Daemon to access a smart card using PC/SC
# Description: The PC/SC daemon is used to dynamically
# allocate/deallocate reader drivers at runtime and
manage
# connections to the readers.

...and nothing below was changed.

Nathan.

On Sat, Nov 7, 2009 at 8:06 AM, Nathaniel Sbar <email address hidden> wrote:

> Thanks. The patch seems to be working. I'll report if there are any
> problems later.
>
> On Sat, Nov 7, 2009 at 3:53 AM, Ludovic Rousseau <
> <email address hidden>> wrote:
>
>> pcscd needs to be started _after_ hal.
>>
>> Please patch the /etc/init.d/pcscd file using the attached patch and
>> retry.
>>
>> ** Attachment added: "patch.txt"
>> http://launchpadlibrarian.net/35297707/patch.txt
>>
>> --
>> pcscd is supposed to run at startup, but sometimes it does, sometimes not,
>> can't tell why. It started reliably in my last distro, crunchbang, based on
>> ubuntu 9.04.
>> https://bugs.launchpad.net/bugs/475821
>> You received this bug notification because you are a direct subscriber
>> of the bug.
>>
>> Status in “pcsc-lite” package in Ubuntu: New
>>
>> Bug description:
>> Binary package hint: pcscd
>>
>> - I am using UNR 9.10
>> - pcscd version 1.5.3-1ubuntu1
>> - I expect the daemon to start after startup
>> - It only starts up sometimes. I can't see under what conditions the
>> daemon will start and when it won't.
>>
>> ProblemType: Bug
>> Architecture: i386
>> Date: Thu Nov 5 15:36:20 2009
>> DistroRelease: Ubuntu 9.10
>> InstallationMedia: Ubuntu-Netbook-Remix 9.10 "Karmic Koala" - Release i386
>> (20091028.4)
>> Package: pcscd 1.5.3-1ubuntu1
>> ProcEnviron:
>> LANG=en_US.UTF-8
>> SHELL=/bin/bash
>> ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
>> SourcePackage: pcsc-lite
>> Tags: ubuntu-unr
>> Uname: Linux 2.6.31-14-generic i686
>>
>
>

Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

I don't know how to use startup dependencies on Ubuntu. I think we need help from a (real) Ubuntu maintainer here.

Revision history for this message
Harry Stojan (softis) wrote :

I have a similar problem. On my old desktop I use Ubuntu 9.10 (Gnome 2.28.1, kernel 2.6.31-16-generic) and pcscd doesn't start at startup at all. I tried many tricks but I wasn't able to make it start at startup. Finally, I added an additional startup program named PC/SC Daemon with this command line:
 gksudo /etc/init.d/pcscd start
Unfortunately, it is not convenient enough because at startup, I am asked to enter my password.
However, on my Dell mini 9 with Ubuntu 9.10 Netbook remix, pcscd runs normally at startup and I didn't have any problem with it. On both PCs I use Omnikey CardMan 3021.

Revision history for this message
Fabian Köster (maestro-alubia) wrote :

I tripped into the same problem today. Usually pcscd starts fine, but at least today it did not.

We should really ask a "real" Ubuntu developer to get this right!

Upstart-job scripts are replacing the old init-scripts and HAL was replaced (at least partially) by DeviceKit in Karmic, so maybe there are more changes needed to get this working correctly in upcoming releases.

I am not an init- or upstart-expert, so we should call-in someone who is. Is there some special place for asking this kind of questions?

Revision history for this message
Farley Lai (farleylai) wrote :

Version: ubuntu 9.10, installed the default pcscd and its related packages using apt-get.

I suffer the similar problem, too.
After trials, I found that pcscd fails to work properly after waking up from the system suspension and it's of no use to just restart pcscd. The only way to recover is to restart the computer. It's a little bit annoying.

Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

> After trials, I found that pcscd fails to work properly after waking up from the system suspension and it's of no use to just restart pcscd. The only way to recover is to restart the computer. It's a little bit annoying.

That is quiet interesting. Can you run pcscd in debug mode and send me a trace of what happens when you suspend your system and wake it up?

Follow http://pcsclite.alioth.debian.org/ccid.html#support to generete the log trace.

Revision history for this message
Larry Hartman (larryhartman50) wrote :

This is what one user on the forums did to fix it:

http://ubuntuforums.org/archive/index.php/t-1323111.html

Revision history for this message
Dominik (domfi) wrote :

Adding a sleep to the script is just a workaround, but this can't be an acceptable soltution.
A better workaround is to disable hal support in the package. For Lucid there's a release for that. See #506908

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.