Red Hat Bugzilla – Bug 205182
pcsc daemon wakes up once per second for NO REASON
Last modified: 2009-07-14 14:28:25 EDT
Description of problem:
The pcsc daemon wakes up once per second for no reason at all.
It has a 1 second select loop time out, but all it does on timeout is loop again.
Might as well use a much longer timeout, or infinite!
This mechanism is used to scan new USB devices and hotplug them.
A better way whould be to use udev to send a signal to pcscd or something similar. It is already possible
to send a signal to pcscd so that it rescan its configuration for serial devices. This should be extended to
USB devices as well. I note it in the TODO file for pcsc-lite. Thanks
are you sure?
Can you look at the codepaths again; the ones that happen when the select times
out. As far as I can see the only thing that happens is just that the select
loop gets entered again...
We are both right in fact :-)
Two threads use a 1 second timeout:
- one SYS_Sleep(1) in hotplug_libusb.c to detect USB changes.
- one 1 second timeout select() in winscard_msg_srv.c
I think the select timeout can be removed since it is used to detect a Ctrl-C
but this signal already interrupt the select() syscall. I changed the code in
subversion. This change will be available in the next pcsc-lite version.
Bob Relyea: would it be possible to pull this one fix into rawhide?
The patch is in
I have no idea when I will release a new version of pcsc-lite.
pcsc-lite-1.3.2-1 still wakes up once per second....
Does it still wakes up if you have NO reader driver installed?
The CCID driver has been improved to use udev instead of a polling in pcscd. You
have to configure the CCID driver (libccid version 1.2.0 or later) using
If you have a driver without the IFD_GENERATE_HOTPLUG feature (all drivers
except libccid AFAIK) then pcsd will poll the USB bus every 1 second.
I have no smartcard hardware whatsoever.. this is just standard fedora install...
What is the output of "find /usr/lib/pcsc/"?
# find /usr/lib64/pcsc/
The egate driver is installed and does not support IFD_GENERATE_HOTPLUG
The CCID driver 1.1.0 is too old and does not support IFD_GENERATE_HOTPLUG
-> remove the egate driver
-> install libccid 1.2.0 or later
So 2 things need to happen on my part:
1) pick up ccid 1.2
2) add IFD_GENERATE_HOTPLUG to ifd-egate
I'll get on the first right away.
These changes where included in F-7.
Fedora9 Alpha with kernel-2.6.24-2.fc9,
I do not find the issue again.
You will have wake ups again in two cases:
- you connect a smart card reader supported by the CCID driver (wake up every 400ms to check a card
- you use a PC/SC application calling SCardGetStatusChange() (like pcsc_scan from pcsc-tools http://ludovic.rousseau.free.fr/softwares/pcsc-tools/index.html)
The first problem will be solved with libusb 1.0.
The second problem is on my TODO list.
Note: the latest pcsc-lite upstream version is 1.4.99
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
According to the pcsc-lite changelog this has been fixed in pcsc-lite-1.4.100:
- add libhal support to avoid polling the USB bus. libusb is still
supported but libhal is now the default
- add support of TAG_IFD_POLLING_THREAD to use an asynchronous card
movements detection instead of an active polling. The reader driver
need to support TAG_IFD_POLLING_THREAD to use this feature
Can anyone with the necessary hardware verify if thats the case?
Thanks & regards, Phil
(In reply to comment #18)
> According to the pcsc-lite changelog this has been fixed in pcsc-lite-1.4.100:
> - add libhal support to avoid polling the USB bus. libusb is still
> supported but libhal is now the default
> - add support of TAG_IFD_POLLING_THREAD to use an asynchronous card
> movements detection instead of an active polling. The reader driver
> need to support TAG_IFD_POLLING_THREAD to use this feature
> Can anyone with the necessary hardware verify if thats the case?
You do not need any hardware to check the first point.
The second point is more problematic. The only driver that supports TAG_IFD_POLLING_THREAD is my CCID driver and this feature is not active by default. You have to configure the driver using --enable-usb-interrupt. And you also need to use a CCID reader that can support that.
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '9'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 9's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 9 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version.
Thank you for reporting this bug and we are sorry it could not be fixed.