Scanner not accessible: udev/hal

Bug #211708 reported by KT
6
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
Fix Released
Undecided
Martin Pitt
sane-backends (Ubuntu)
Invalid
Undecided
Martin Pitt

Bug Description

Follow on to https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/180794 . The scanner is not accessible by a normal user but is accessible by root.

Output of 'lsusb':

Bus 003 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
Bus 003 Device 001: ID 0000:0000
Bus 004 Device 002: ID 044e:300d Alps Electric Co., Ltd
Bus 004 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 002: ID 04a9:220d Canon, Inc. CanoScan N670U/N676U/LiDE 20
Bus 001 Device 001: ID 0000:0000
Bus 005 Device 006: ID 054c:02d5 Sony Corp.
Bus 005 Device 001: ID 0000:0000

Output of 'sane-find-scanner':

found USB scanner (vendor=0x0483 [STMicroelectronics], product=0x2016 [Biometric Coprocessor]) at libusb:003:002
found USB scanner (vendor=0x04a9, product=0x220d, chip=LM983x?) at libusb:001:002

Output of 'sudo sane-find-scanner':

found USB scanner (vendor=0x0483 [STMicroelectronics], product=0x2016 [Biometric Coprocessor]) at libusb:003:002
found USB scanner (vendor=0x04a9 [Canon], product=0x220d [CanoScan], chip=LM9832/3) at libusb:001:002

Output of 'dpkg -l | grep "\( libsane \| sane\-utils \| xsane \| xsane\-common \| udev \| hal \)"':

ii hal 0.5.11~rc2-1ubuntu5 Hardware Abstraction Layer
ii libsane 1.0.19-1ubuntu3 API library for scanners
ii sane-utils 1.0.19-1ubuntu3 API library for scanners -- utilities
ii udev 117-4ubuntu2 rule-based device node and kernel event manager
ii xsane 0.995-1ubuntu1 featureful graphical frontend for SANE (Scanner Access Now Easy)
ii xsane-common 0.995-1ubuntu1 featureful graphical frontend for SANE (Scanner Access Now Easy)

Revision history for this message
Martin Pitt (pitti) wrote :

Hm, this scanner does exist in /usr/share/hal/fdi/preprobe/10osvendor/20-libsane.fdi already, so that part should be alright.

Can you please plugin the scanner, and do

  lshal > hal.txt

and attach hal.txt here? Thanks!

Changed in sane-backends:
status: New → Incomplete
Revision history for this message
KT (cjktan) wrote :

Output of 'lshal' attached.

Revision history for this message
KT (cjktan) wrote :

Problem still exists.

Output of `dpkg -l | grep "\( libsane \| sane\-utils \| xsane \| xsane\-common \| udev \| hal \)"`

ii hal 0.5.11~rc2-1ubuntu6 Hardware Abstraction Layer
ii libsane 1.0.19-1ubuntu3 API library for scanners
ii sane-utils 1.0.19-1ubuntu3 API library for scanners -- utilities
ii udev 117-8 rule-based device node and kernel event manager
ii xsane 0.995-1ubuntu1 featureful graphical frontend for SANE (Scanner Access Now Easy)
ii xsane-common 0.995-1ubuntu1 featureful graphical frontend for SANE (Scanner Access Now Easy)

Changed in hal:
assignee: nobody → pitti
Changed in sane-backends:
assignee: nobody → martin-pitt
Revision history for this message
Martin Pitt (pitti) wrote :

Closing sane-backends task, I believe this is a hal bug.

However, I have no idea ATM why this happens; the scanner entry in hal does not even get the 'scanner' argument (as it should get due to /usr/share/hal/fdi/preprobe/10osvendor/20-libsane.fdi), so it's even before trying to fiddle with ACLs. Can you please do the hal debugging procedure as described on https://wiki.ubuntu.com/DebuggingHal and attach the log? Maybe that will reveal an error. Thank you!

Changed in sane-backends:
assignee: martin-pitt → pitti
status: New → Invalid
Revision history for this message
KT (cjktan) wrote :

debugging hal

Revision history for this message
KT (cjktan) wrote :

debugging hal

Revision history for this message
KT (cjktan) wrote :

debugging hal

Revision history for this message
Martin Pitt (pitti) wrote :

OK, so it seems it somehow gets the FDI files wrong. Can you please copy&paste the output of

  stat /var/cache/hald/fdi-cache

and then try

  sudo /etc/init.d/hal stop
  sudo mv /var/cache/hald/fdi-cache /var/cache/hald/fdi-cache.old

and then start hal in debugging mode again? Please attach the hal.log from this run. When you plugged in your scanner, can you please check if it works correctly then? Can you please generate a new lshal.log before stopping the debugging hal?

Thanks a lot!

Revision history for this message
FriedChicken (domlyons) wrote :

$ stat /var/cache/hald/fdi-cache
  File: „/var/cache/hald/fdi-cache“
  Size: 932212 Blocks: 1825 IO Block: 4096 reguläre Datei
Device: 813h/2067d Inode: 199260 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2008-04-27 21:45:03.000000000 +0200
Modify: 2008-04-22 16:57:30.000000000 +0200
Change: 2008-04-22 16:57:30.000000000 +0200

I don't know how to start hal in debugging mode or how to generate a new lshal.log but scanning works again.

Revision history for this message
FriedChicken (domlyons) wrote :

After moving fdi-cache.old back again, I recognized that scanning still worked. I found out that my problem already was fixed with bug #180794

Sorry for disturbing this bug.

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, thank you FriedChicken!

Revision history for this message
FriedChicken (domlyons) wrote :

No, I don't think this is a duplicate because you asked KT to open a new bug.

I've only subscribed the wrong bug searching for my problem.

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, indeed, unduplicating. KT, please do the debugging steps in comment 8. Thank you!

Revision history for this message
KT (cjktan) wrote :

Output of 'stat /var/cache/hald/fdi-cache':

  File: `/var/cache/hald/fdi-cache'
  Size: 742548 Blocks: 1464 IO Block: 4096 regular file
Device: 806h/2054d Inode: 46357 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2028-02-29 02:26:31.000000000 +0000
Modify: 2028-02-29 02:26:33.000000000 +0000
Change: 2028-02-29 02:26:33.000000000 +0000

Revision history for this message
KT (cjktan) wrote :
Revision history for this message
KT (cjktan) wrote :

hal.log

Revision history for this message
KT (cjktan) wrote :

lshal.txt

Revision history for this message
Martin Pitt (pitti) wrote :

KT, according to your recently attached logs, your scanner should work again. Did you remove /var/cache/hald/fdi-cache? If you moved it to a different name/place, does it break again if you rename it back and reboot your system?

Revision history for this message
KT (cjktan) wrote :

Problem appear to have been solved now.

Thanks a lot!

Revision history for this message
Martin Pitt (pitti) wrote :

OK, thanks for confirming.

Changed in hal:
status: Incomplete → Fix Released
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.