This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 214760 - pcsc-lite library causes gdm-daemon to wake up 5+ times per second in the default install
pcsc-lite library causes gdm-daemon to wake up 5+ times per second in the def...
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: pcsc-lite (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bob Relyea
bzcl34nup
:
Depends On:
Blocks: wakeup 418441
  Show dependency treegraph
 
Reported: 2006-11-09 06:42 EST by Arjan van de Ven
Modified: 2009-07-14 13:16 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-14 13:16:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Arjan van de Ven 2006-11-09 06:42:43 EST
Description of problem:


the pcsc-lite library has a 200msec polling loop that gets called from
gdm-binary (which runs in the background when logged into a default install)
bumping PCSCLITE_STATUS_WAIT from 200msec to something like 5 seconds at least
mitigates the battery-slurping effect of this somewhat.
Comment 1 Ludovic Rousseau 2006-11-09 07:13:59 EST
Using a 5 seconds delay is not the correct way to solve the problem.
Comment 2 Arjan van de Ven 2006-11-09 07:15:41 EST
absolutely it is not.
However I take the 30 minutes extra battery today until this gets fixed for real...
Comment 3 Arjan van de Ven 2006-12-13 08:18:42 EST
ping?
Comment 4 Ludovic Rousseau 2006-12-13 08:32:59 EST
pong ?
Comment 5 Jeff Garzik 2006-12-19 16:30:54 EST
After testing, this behavior definitely reduces battery life here too.

Any progress, or even a suggested direction, from the developer?
Comment 6 Ludovic Rousseau 2006-12-21 09:29:17 EST
pcsc-lite uses 3 active polling loops:
(a) to dected a reader is connected/disconnected (daemon side: pcscd)
(b) to detect a card is inserted/removed (daemon side: pcscd)
(c) to detect a card change (client side: libpcsclite)

The problem you see is case (c).

I (upstream developper) am working on case (a) with the help of udev. It is
nearly finished.

case (b) will need a driver API change (add of a callback) and support from the
reader driver. It is in the TODO list.

case (c) will need a pcscd/libpcsclite communication protocol change. It is also
the most difficult change. It is in the TODO list.

The TODO list is at
http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/TODO?op=file&rev=0&sc=0

You can either implement the needed code and submit the patches or contract me.
Comment 7 Arjan van de Ven 2006-12-21 09:55:15 EST
is there any chance to at least set the poll intervals to 1 second?
And then round the poll code to the full second, I have template code for that
below:

void sleep_approx(int seconds)
{  
        struct timespec ts;
        struct timeval tv;
        gettimeofday(&tv, NULL);
        ts.tv_sec = seconds;
        ts.tv_nsec = -tv.tv_usec*1000;
        while (ts.tv_nsec < 0) {
                ts.tv_sec--;
                ts.tv_nsec += 1000000000;
        }
        nanosleep(&ts, NULL);
}  

This one second and round it is done by several daemons, so that they all wake
up around the same time, with the result that at least the cpu can sleep the
rest (95%) of the second in one go.
Comment 8 Ludovic Rousseau 2006-12-21 11:33:42 EST
You can change the value of PCSCLITE_STATUS_WAIT in
PCSC/src/PCSC/PCSC/pcsclite.h.in and then run ./configure ; make ; make install

The default value is 200000 (ms) or 1/5 s. Using 1000000 would wake gdm only
every 1 second.

The side effect is that you may wait up to 1 second before gdm detects a card is
inserted. And this will not solve the polling in cases (a) and (b).
Comment 9 Bug Zapper 2008-04-04 00:33:35 EDT
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.
http://fedoraproject.org/wiki/LifeCycle/EOL

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers
Comment 10 Ludovic Rousseau 2008-04-04 07:41:31 EDT
This is an upstream bug.

This bug should not be closed until the bug is corrected upstream and the new version is packaged by 
Red Hat.

I can't change the Status or Version myself.
Comment 11 Bug Zapper 2008-05-13 22:27:38 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 12 Bug Zapper 2009-06-09 18:20:39 EDT
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: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 13 Bug Zapper 2009-07-14 13:16:53 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.