Debian: USB scanner does not work anymore

I wanted to scan some images with my old and rusty CanoScan Lide 30 USB scanner, so I plugged it in and ran simple-scan. It found no scanners :(

Step 1 in debugging was running sane-find-scanner which did find it:

could not open USB device 0x058f/0xd102 at 001:002: Access denied (insufficient permissions)
found USB scanner (vendor=0x04a9 [Canon], product=0x220e [CanoScan]) at libusb:001:013
could not open USB device 0x1d6b/0x0002 at 001:001: Access denied (insufficient permissions)
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

At first I misinterpreted the "Access denied" as being part of the CanoScan line, but it wasn't. The USB device file has the right permissions:

$ ls -la /dev/bus/usb/001/013
crw-rw-r--+ 1 root root 189, 12 11. Nov 22:17 /dev/bus/usb/001/013
$ getfacl /dev/bus/usb/001/013
getfacl: Entferne führende '/' von absoluten Pfadnamen
# file: dev/bus/usb/001/013
# owner: root
# group: root
user::rw-
user:cweiske:rw-
group::rw-
group:scanner:rw-
mask::rw-
other::r--

The main problem was now that scanimage -L did not find the scanner:

$ scanimage -L
 
No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

I did read Debian's Scanner wiki page and the Sane FAQ.

Then I was ready to give up and described my problem in the Sane IRC channel.

While waiting for an answer, I searched the bug list for canoscan and found Canon LIDE25 does not work anymore (did work before).

The bug did describe my exact problem, and somewhere in the comments was the workaround to create a lock directory:

$ mkdir -m777 /var/lock/sane

After I did this, scanimage did find the scanner, and simple-scan worked:

$ scanimage -L
device `plustek:libusb:001:013' is a Canon CanoScan N1240U/LiDE30 flatbed scanner

This had been fixed one week ago in #973490: libsane: plustek fails to detect scanner, prints sanei_access_lock failed: 11 in sane-backends (1.0.31-3) (which I have - I just updated my system today), but the patch apparently did not help.

Written by Christian Weiske.

Comments? Please send an e-mail.