How do I deactivate chipcardd4 scanning every 10s for new hardware devices?

Asked by Paul Sladen

On default Ubuntu installs a daemon named 'chipcard64' is run, which sits in the background and polls every 10 seconds by attempting to 'accept()' a socket:

  $ sudo strace -r -p 3328
     0.000000 select(6, [5], NULL, NULL, {9, 682247}) = 0 (Timeout)
     9.683726 accept(5, 0xa06f8a8, [110]) = -1 EAGAIN (Resource temporarily unavailable)
     0.000226 select(6, [5], NULL, NULL, {10, 0}) = 0 (Timeout)
    10.010503 accept(5, 0xa06f8a8, [110]) = -1 EAGAIN (Resource temporarily unavailable)
     0.000152 select(6, [5], NULL, NULL, {10, 0}) = 0 (Timeout)
    10.010469 accept(5, 0xa06f8a8, [110]) = -1 EAGAIN (Resource temporarily unavailable)
     0.000153 select(6, [5], NULL, NULL, {10, 0}) = 0 (Timeout)
     ...

Ideally chipcard64 should be switched internally to an asynchronous model in order to avoid waking up every 10 seconds in order to poll. In additional, the startup mechanism should ideally be altered to be load the daemon dynamically via udev when suitable interrupt sources and events are available and to unload it again upon reader or device removal.

The daemon should definitely *not* be running if there is no suitable card reader installed on the machine in question.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu libchipcard Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Micha Lenk (micha) said :
#1

Hi Paul,

Unfortunately you didn't specify any versioning information. What
version of package libchipcard-tools is installed on your system?

Regards
  Micha

Revision history for this message
Paul Sladen (sladen) said :
#2

None anymore; according to:

  Log time: 2009-09-18 21:47:47.206251
  ...
  Investigating libchipcardc2
  Package libchipcardc2 has broken dep on libchipcard-data
    Considering libchipcard-data 10003 as a solution to libchipcardc2 3
    Removing libchipcardc2 rather than change libchipcard-data
  Investigating libchipcard-libgwenhywfar47-plugins
  Package libchipcard-libgwenhywfar47-plugins has broken dep on libchipcardc2
    Considering libchipcardc2 3 as a solution to libchipcard-libgwenhywfar47-plugins 0
    Removing libchipcard-libgwenhywfar47-plugins rather than change libchipcardc2
  Investigating libchipcard-tools
  Package libchipcard-tools has broken dep on libchipcardc2
    Considering libchipcardc2 3 as a solution to libchipcard-tools 0
    Removing libchipcard-tools rather than change libchipcardc2
  Investigating libchipcard-ctapi0
  Package libchipcard-ctapi0 has broken dep on libchipcard-data
    Considering libchipcard-data 10003 as a solution to libchipcard-ctapi0 0
    Removing libchipcard-ctapi0 rather than change libchipcard-data

Revision history for this message
Paul Sladen (sladen) said :
#3

However, prior to that:

  $ dpkg -l | grep libchipcard | awk '{print $1,$2,$3}'
  rc libchipcard-ctapi0 4.2.8-1ubuntu1
  rc libchipcard-data 4.2.8-1ubuntu1
  rc libchipcard-tools 4.2.8-1ubuntu1
  rc libchipcardc2 4.2.8-1ubuntu1
  rc libchipcardd0 4.1.3-2ubuntu1

Revision history for this message
Micha Lenk (micha) said :
#4

Are you still interested in fixing the bug?

This version of libchipcard should do event-based hardware device detection by default. If it doesn't, probably your configuration hasn't been updated to do so, when upgrading from libchipcard-data 4.1.3-2ubuntu1 to libchipcard-data 4.2.8-1ubuntu1.

Can you please submit the contents of the file /etc/chipcard/server/chipcardd.conf on your system?
Especially the value of the variable hardwareScanInterval in section DeviceManager is of interest. You can safely set it to zero with the libchipcard 4.2.8.

Revision history for this message
Micha Lenk (micha) said :
#5

I consider this a configuration issue and hence will close the bug.

Revision history for this message
Micha Lenk (micha) said :
#6

Answer:
You can disable polling of libchipcardd by editing the file etc/chipcard/server/chipcardd.conf and setting hardwareScanInterval to zero. The next time you start the chipcard daemon it should stop scanning for hardware by polling.

Revision history for this message
Micha Lenk (micha) said :
#7

You can disable polling of libchipcardd by editing the file etc/chipcard/server/chipcardd.conf and setting hardwareScanInterval to zero. The next time you start the chipcard daemon it should stop scanning for hardware by polling.

This is the default for new installations.

Can you help with this problem?

Provide an answer of your own, or ask Paul Sladen for more information if necessary.

To post a message you must log in.