Results 1 to 8 of 8

Thread: OpenSUSE 13.1 vs. CanoScan LiDE25 (usb scanner)

  1. #1

    Default OpenSUSE 13.1 vs. CanoScan LiDE25 (usb scanner)

    Hi all,

    I've just installed (and fully upgraded) OpenSUSE 13.1 x86_64.
    I got a Canon USB scanner, CanoScan LiDE25: it's quite old, but I didn't mind to change it possibly.
    This scanner works well (after a long search for the right drivers...) under Win7 32bit, and worked perfectly with OpenSUSE 11.4 and Fedora 17.
    Some problems begins to arise with Fedora 19: it's necessary to stop sane-backend rpm package upgrades to release 1.0.22.
    Now, under OpenSUSE 13.1 (and Fedora 20) it's still correctly recognized from the USB layer, but Sane does not handle it anymore.

    Looking around with google, there are at least three categories of problems on modern kernels with usb scanners:


    1. Some linux distributions does not prepare the folder /var/lock/sane, needed from the backend
    2. Some times SANE installation does not set the correct values for kernel modules (such as usbcore on kernels > 3.7) to selectively disable USB device suspension
    3. Some times "plustek" backend scanner connection protocol seems to start correctly but simply ends with a generic "I/O error".


    The observed behaviour for OpenSUSE and CanoScan Lide25 is of the third category.

    I've tried other linux distributions (all on VM machines) in their latest releases: Fedora, Mint, *ubuntu, OpenMandriva... The only one still able to correctly support this scanner is PCLinuxOS: it's still based on kernel 3.4.70 and sane-backend 1.0.22 (xsane 0.998).

    I've tried to compare the output of the following commands between OpenSUSE 13.1 and PCLinuxOS:
    export SANE_DEBUG_PLUSTEK=20

    scanimage -T -d plustek:libusb:003:002

    (USB numbers change at each cable insertion: 003:005, 003:006 and so on)

    but the result log is quite big and it's not simple to understand where the problem really arises.

    Following thread https://bbs.archlinux.org/viewtopic.php?pid=1288679
    I've changed the rule /usr/lib/udev/rules.d/69-libmtp.rules with this line:
    # Canon scanners that look like MTP devices (PID 0x22nn)
    ATTR{idVendor}=="04a9", ATTR{idProduct}=="22*", ATTR{power/autosuspend_delay_ms}="-1", ATTR{power/control}="on", GROUP="users", MODE="775", SYMLINK+="lide25", GOTO="libmtp_rules_end"

    ...the simbolic link /dev/lide25 has been created, but the result is always a wonderful I/O Error.

    Can someone help me to face this problem? On my humble opinion, it shouldn't be related to USB suspension, but to some kind of bug introduced in plustek 1.0.23 backend code... is it possible to install a previous version of this package avoiding problems with the package update service?

    thanks, and happy 2014 to all.



    Some more detailed system info/logs:

    sudo tail -f /var/log/scanner:
    2013-12-24T10:44:11.535604+01:00 erihome4g2 kernel: [ 1426.582330] usb 3-1: new full-speed USB device number 3 using xhci_hcd
    2013-12-24T10:44:11.576298+01:00 erihome4g2 kernel: [ 1426.623295] usb 3-1: New USB device found, idVendor=04a9, idProduct=2220
    2013-12-24T10:44:11.576328+01:00 erihome4g2 kernel: [ 1426.623307] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    2013-12-24T10:44:11.576331+01:00 erihome4g2 kernel: [ 1426.623314] usb 3-1: Product: CanoScan
    2013-12-24T10:44:11.576333+01:00 erihome4g2 kernel: [ 1426.623319] usb 3-1: Manufacturer: Canon

    sudo sane-find-scanner:
    (...)
    found USB scanner (vendor=0x04a9 [Canon], product=0x2220 [CanoScan]) at libusb:003:002
    (...)


    lsusb
    (...)
    Bus 003 Device 002: ID 04a9:2220 Canon, Inc. CanoScan LIDE 25
    (...)


    scanimage -L
    device `plustek:libusb:003:002' is a Canon CanoScan LiDE25 flatbed scanner
    (...and then shell sleeps for several minutes...)


    scanimage -T -d plustek:libusb:003:005
    scanimage: open of device plustek:libusb:003:002 failed: Error during device I/O

    export SANE_DEBUG_PLUSTEK=10
    scanimage -T -d plustek:libusb:003:002

    [sanei_debug] Setting debug level of plustek to 10.
    [plustek] Plustek backend V0.52-10, part of sane-backends 1.0.23
    [plustek] Retrieving all supported and conntected devices
    [plustek] Available and supported devices:
    [plustek] Device: >libusb:003:002< - 0x04a9x0x2220
    [plustek] ># Plustek-SANE Backend configuration file<
    [plustek] ># For use with LM9831/2/3 based USB scanners<
    [plustek] >#<
    [plustek] ><
    [plustek] ># each device needs at least two lines:<
    [plustek] ># - [usb] vendor-ID and product-ID<
    [plustek] ># - device devicename<
    [plustek] ># i.e. for Plustek (0x07B3) UT12/16/24 (0x0017)<
    [plustek] ># [usb] 0x07B3 0x0017<
    [plustek] ># device /dev/usbscanner<
    [plustek] ># or<
    [plustek] ># device libusb:bbb:ddd<
    [plustek] ># where bbb is the busnumber and ddd the device number<
    [plustek] ># make sure that your user has access to /proc/bus/usb/bbb/ddd<
    [plustek] >#<
    [plustek] ># additionally you can specify some options<
    [plustek] ># warmup, lOffOnEnd, lampOff<
    [plustek] >#<
    [plustek] ># For autodetection use<
    [plustek] ># [usb]<
    [plustek] ># device /dev/usbscanner<
    [plustek] >#<
    [plustek] ># or simply<
    [plustek] ># [usb]<
    [plustek] >#<
    [plustek] ># or if you want a specific device but you have no idea about the<
    [plustek] ># device node or you use libusb, simply set vendor- and product-ID<
    [plustek] ># [usb] 0x07B3 0x0017<
    [plustek] ># device auto<
    [plustek] >#<
    [plustek] ># NOTE: autodetection is safe, as it uses the info it got<
    [plustek] ># from the USB subsystem. If you're not using the<
    [plustek] ># autodetection, you MUST have attached that device<
    [plustek] ># at your USB-port, that you have specified...<
    [plustek] >#<
    [plustek] ><
    [plustek] >[usb] 0x04A9 0x2220<
    [plustek] next device is a USB device (0x04A9-0x2220)
    [plustek] ... next device
    [plustek] ><
    [plustek] >#<
    [plustek] ># options for the previous USB entry<
    [plustek] >#<
    [plustek] ># switch lamp off after xxx secs, 0 disables the feature<
    [plustek] ># (can also be set via frontend)<
    [plustek] >option lampOff 300<
    [plustek] Decoding option >lampOff<
    [plustek] ><
    [plustek] ># warmup period in seconds, 0 means no warmup, -1 means auto-warmup<
    [plustek] ># (can also be set via frontend)<
    [plustek] >option warmup -1<
    [plustek] Decoding option >warmup<
    [plustek] ><
    [plustek] ># 0 means leave lamp-status untouched, not 0 means switch off<
    [plustek] ># on sane_close<
    [plustek] ># (can also be set via frontend)<
    [plustek] >option lOffOnEnd 1<
    [plustek] Decoding option >lOffOnEnd<
    [plustek] ><
    [plustek] >#<
    [plustek] ># options to tweak the image start-position<
    [plustek] ># (WARNING: there's no internal range check!!!)<
    [plustek] >#<
    [plustek] ># for the normal scan area<
    [plustek] >#<
    [plustek] >option posOffX 0<
    [plustek] Decoding option >posOffX<
    [plustek] >option posOffY 0<
    [plustek] Decoding option >posOffY<
    [plustek] ><
    [plustek] ># for transparencies<
    [plustek] >option tpaOffX 0<
    [plustek] Decoding option >tpaOffX<
    [plustek] >option tpaOffY 0<
    [plustek] Decoding option >tpaOffY<
    [plustek] ><
    [plustek] ># for negatives<
    [plustek] >option negOffX 0<
    [plustek] Decoding option >negOffX<
    [plustek] >option negOffY 0<
    [plustek] Decoding option >negOffY<
    [plustek] ><
    [plustek] >#<
    [plustek] ># for setting the calibration strip position<
    [plustek] ># (WARNING: there's no internal range check!!!)<
    [plustek] ># -1 means use built in<
    [plustek] ># (can also be set via frontend)<
    [plustek] >option posShadingY -1<
    [plustek] Decoding option >posShadingY<
    [plustek] >option tpaShadingY -1<
    [plustek] Decoding option >tpaShadingY<
    [plustek] >option negShadingY -1<
    [plustek] Decoding option >negShadingY<
    [plustek] ><
    [plustek] >#<
    [plustek] ># to invert the negatives, 0 disables the feature<
    [plustek] >#<
    [plustek] >option invertNegatives 0<
    [plustek] Decoding option >invertNegatives<
    [plustek] ><
    [plustek] >#<
    [plustek] ># to disable the internal sensor speedup function,<
    [plustek] ># 1 disables the feature<
    [plustek] >#<
    [plustek] >option disableSpeedup 0<
    [plustek] Decoding option >disableSpeedup<
    [plustek] ><
    [plustek] >#<
    [plustek] ># to save/restore coarse calibration data<
    [plustek] ># (can also be set via frontend)<
    [plustek] >option cacheCalData 0<
    [plustek] Decoding option >cacheCalData<
    [plustek] ><
    [plustek] >#<
    [plustek] ># use alternate calibration routines<
    [plustek] >#<
    [plustek] >option altCalibration 0<
    [plustek] Decoding option >altCalibration<
    [plustek] ><
    [plustek] >#<
    [plustek] ># for skipping whole calibration step<
    [plustek] >#<
    [plustek] >option skipCalibration 0<
    [plustek] Decoding option >skipCalibration<
    [plustek] ><
    [plustek] >#<
    [plustek] ># for skipping entire fine calibration step<
    [plustek] ># coarse calibration is done<
    [plustek] >#<
    [plustek] >option skipFine 0<
    [plustek] Decoding option >skipFine<
    [plustek] ><
    [plustek] >#<
    [plustek] ># discard the result of the fine white calibration<
    [plustek] >#<
    [plustek] >option skipFineWhite 0<
    [plustek] Decoding option >skipFineWhite<
    [plustek] ><
    [plustek] >#<
    [plustek] ># some scanners have a dark calibration strip, in<
    [plustek] ># general this one should be used for calibration.<
    [plustek] ># As this could cause some trouble, this option<
    [plustek] ># overrides that and the dark calibration will be<
    [plustek] ># done by switching the lamp off<
    [plustek] >#<
    [plustek] >option skipDarkStrip 0<
    [plustek] Decoding option >skipDarkStrip<
    [plustek] ><
    [plustek] ># for replacing the gain values found during coarse<
    [plustek] ># calibration<
    [plustek] ># (can also be set via frontend)<
    [plustek] >option red_gain -1<
    [plustek] Decoding option >red_gain<
    [plustek] >option green_gain -1<
    [plustek] Decoding option >green_gain<
    [plustek] >option blue_gain -1<
    [plustek] Decoding option >blue_gain<
    [plustek] ><
    [plustek] ># for replacing the offset values found during coarse<
    [plustek] ># calibration<
    [plustek] ># (can also be set via frontend)<
    [plustek] >option red_offset -1<
    [plustek] Decoding option >red_offset<
    [plustek] >option green_offset -1<
    [plustek] Decoding option >green_offset<
    [plustek] >option blue_offset -1<
    [plustek] Decoding option >blue_offset<
    [plustek] ><
    [plustek] >#<
    [plustek] ># for replacing the default lampoff settings, this<
    [plustek] ># works only for CIS devices like CanoScan LiDE20<
    [plustek] ># (can also be set via frontend)<
    [plustek] >option red_lampoff -1<
    [plustek] Decoding option >red_lampoff<
    [plustek] >option green_lampoff -1<
    [plustek] Decoding option >green_lampoff<
    [plustek] >option blue_lampoff -1<
    [plustek] Decoding option >blue_lampoff<
    [plustek] ><
    [plustek] >#<
    [plustek] ># for adjusting the default gamma values<
    [plustek] ># (can also be set via frontend)<
    [plustek] >option redGamma 1.0<
    [plustek] Decoding option >redGamma<
    [plustek] >option greenGamma 1.0<
    [plustek] Decoding option >greenGamma<
    [plustek] >option blueGamma 1.0<
    [plustek] Decoding option >blueGamma<
    [plustek] >option grayGamma 1.0<
    [plustek] Decoding option >grayGamma<
    [plustek] ><
    [plustek] >#<
    [plustek] ># to enable TPA (EPSON or UMAX, if autodetection fails)<
    [plustek] ># 0 means default behaviour as specified in the internal tables<
    [plustek] ># 1 means enable (needed for UMAX 3450)<
    [plustek] >option enableTPA 0<
    [plustek] Decoding option >enableTPA<
    [plustek] ><
    [plustek] >#<
    [plustek] ># model override functionality, currently only available for<
    [plustek] ># Mustek devices, using NSCs' vendor ID: 0x0400 and<
    [plustek] ># also their product ID: 0x1000 (LM9831) 0x1001 (LM9832)<
    [plustek] >#<
    [plustek] ># mov/PID | 0x1000 | 0x1001<
    [plustek] ># ---------------------------------------<
    [plustek] ># 0 (default)| BearPaw1200 | BearPaw 2400<
    [plustek] ># 1 | ignored | BearPaw 1200<
    [plustek] >#<
    [plustek] >option mov 0<
    [plustek] Decoding option >mov<
    [plustek] ><
    [plustek] >#<
    [plustek] ># and of course the device-name<
    [plustek] >#<
    [plustek] ># device /dev/usbscanner<
    [plustek] >device auto<
    [plustek] Decoding device name >auto<
    [plustek] ><
    [plustek] >#<
    [plustek] ># to define a new device, start with a new section:<
    [plustek] ># [usb]<
    [plustek] >#<
    [plustek] attach (auto, 0x7fff7e770190, (nil))
    [plustek] Device configuration:
    [plustek] device name : >auto<
    [plustek] USB-ID : >0x04A9-0x2220<
    [plustek] model ovr. : 0
    [plustek] warmup : -1s
    [plustek] lampOff : 300
    [plustek] lampOffOnEnd : yes
    [plustek] cacheCalData : no
    [plustek] altCalibrate : no
    [plustek] skipCalibr. : no
    [plustek] skipFine : no
    [plustek] skipFineWhite: no
    [plustek] skipDarkStrip: no
    [plustek] incDarkTarget: yes
    [plustek] invertNegs. : no
    [plustek] dis.Speedup : no
    [plustek] pos_x : 0
    [plustek] pos_y : 0
    [plustek] pos_shading_y: -1
    [plustek] neg_x : 0
    [plustek] neg_y : 0
    [plustek] neg_shading_y: -1
    [plustek] tpa_x : 0
    [plustek] tpa_y : 0
    [plustek] tpa_shading_y: -1
    [plustek] red gain : -1
    [plustek] green gain : -1
    [plustek] blue gain : -1
    [plustek] red offset : -1
    [plustek] green offset : -1
    [plustek] blue offset : -1
    [plustek] red lampoff : -1
    [plustek] green lampoff: -1
    [plustek] blue lampoff : -1
    [plustek] red Gamma : 1.00
    [plustek] green Gamma : 1.00
    [plustek] blue Gamma : 1.00
    [plustek] gray Gamma : 1.00
    [plustek] ---------------------
    [plustek] usbDev_open(auto,0x04A9-0x2220) - 0x1beca30
    [plustek] Vendor ID=0x04A9, Product ID=0x2220
    [plustek] usbio_DetectLM983x
    [plustek] * could not read version register!
    [plustek] open failed: -1
    [plustek] sane_open - libusb:003:002
    [plustek] attach (libusb:003:002, 0x7fff7e7701c0, 0x7fff7e770128)
    [plustek] Device configuration:
    [plustek] device name : ><
    [plustek] USB-ID : ><
    [plustek] model ovr. : 0
    [plustek] warmup : 0s
    [plustek] lampOff : 0
    [plustek] lampOffOnEnd : no
    [plustek] cacheCalData : no
    [plustek] altCalibrate : no
    [plustek] skipCalibr. : no
    [plustek] skipFine : no
    [plustek] skipFineWhite: no
    [plustek] skipDarkStrip: no
    [plustek] incDarkTarget: no
    [plustek] invertNegs. : no
    [plustek] dis.Speedup : no
    [plustek] pos_x : 0
    [plustek] pos_y : 0
    [plustek] pos_shading_y: 0
    [plustek] neg_x : 0
    [plustek] neg_y : 0
    [plustek] neg_shading_y: 0
    [plustek] tpa_x : 0
    [plustek] tpa_y : 0
    [plustek] tpa_shading_y: 0
    [plustek] red gain : 0
    [plustek] green gain : 0
    [plustek] blue gain : 0
    [plustek] red offset : 0
    [plustek] green offset : 0
    [plustek] blue offset : 0
    [plustek] red lampoff : 0
    [plustek] green lampoff: 0
    [plustek] blue lampoff : 0
    [plustek] red Gamma : 0.00
    [plustek] green Gamma : 0.00
    [plustek] blue Gamma : 0.00
    [plustek] gray Gamma : 0.00
    [plustek] ---------------------
    [plustek] usbDev_open(libusb:003:002,) - 0x1beca30
    [plustek] No supported device found!
    [plustek] open failed: -1
    scanimage: open of device plustek:libusb:003:002 failed: Error during device I/O
    [plustek] sane_exit

  2. #2
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,710
    Blog Entries
    1

    Default Re: OpenSUSE 13.1 vs. CanoScan LiDE25 (usb scanner)

    A curious problem indeed. I don't think any additional udev rules should be required, (beyond what openSUSE already has that match for your device).

    I note that /etc/udev/rules.d/55-libsane.rules has an antry for your scanner
    Code:
    # Canon CanoScan LiDE25
    ATTR{idVendor}=="04a9", ATTR{idProduct}=="2220", MODE="0664", GROUP="lp", ENV{libsane_matched}="yes"
    and of course /usr/lib/udev/rules.d/69-libmtp.rules is designed to catch this chipset, so it gets ignored (as a MTP device)

    Code:
    ATTR{idVendor}=="04a9", ATTR{idProduct}=="22*", GOTO="libmtp_rules_end"
    I think this represents the crux of the issue though
    Code:
    scanimage -T -d plustek:libusb:003:005
    scanimage: open of device plustek:libusb:003:002 failed: Error during device I/O


    Code:
    [plustek] usbDev_open(libusb:003:002,) - 0x1beca30
    [plustek] No supported device found!
    [plustek] open failed: -1
    scanimage: open of device plustek:libusb:003:002 failed: Error during device I/O
    [plustek] sane_exit


    It does seem as if there is a regression with this backend. You have captured some good info here. I think you should report this as a bug.

    SANE - Reporting Bugs

  3. #3
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,710
    Blog Entries
    1

    Default Re: OpenSUSE 13.1 vs. CanoScan LiDE25 (usb scanner)

    Some other thoughts:

    1. Is the user a member of the 'lp' group (for usb-attached scanners)? If 'scanimage -T' works as root, then that is often the problem.

    2. It shouldn't be necessary, but might be worth a try to include your device chipset explicitly. Edit /etc/sane.d/plustek.conf with
    Code:
    [usb] 0x04a9 0x2220
    then try attaching the scanner again.

    BTW, I assume /etc/sane.d/dll.conf has the plustek backend uncommented?

  4. #4

    Default Re: OpenSUSE 13.1 vs. CanoScan LiDE25 (usb scanner)

    Hi!

    Quote Originally Posted by deano_ferrari View Post
    1. Is the user a member of the 'lp' group (for usb-attached scanners)? If 'scanimage -T' works as root, then that is often the problem.
    No, it wasn't... I've added my user to this group. Nothing changed anyway: backend "I/O Error" is the same from both root and user.

    2. It shouldn't be necessary, but might be worth a try to include your device chipset explicitly.
    Edit /etc/sane.d/plustek.conf with
    Code:
    [usb] 0x04a9 0x2220
    then try attaching the scanner again.
    I've done it, without results:

    Code:
     
    (...) 
    # For autodetection use 
    # [usb] 
    # device /dev/usbscanner 
    # or simply 
    # [usb] 
    # or if you want a specific device but you have no idea about the 
    # device node or you use libusb, simply set vendor- and product-ID 
    # [usb] 0x07B3 0x0017 
    # device auto 
    # 
    # NOTE: autodetection is safe, as it uses the info it got 
    #       from the USB subsystem. If you're not using the 
    #       autodetection, you MUST have attached that device 
    #       at your USB-port, that you have specified... 
    # [usb] 0x04A9 0x2220 (...)
    BTW, I assume /etc/sane.d/dll.conf has the plustek backend uncommented?
    Yes, it is! I've also disabled other backend too:

    Code:
     
    (...) 
    #pint 
    #pixma 
    plustek 
    #plustek_pp 
    #pnm 
    (...)
    Now I'm trying do compare the output of the following command:
    Code:
    strace scanimage -T -d plustek:libusb:003:002 > scanimage_log.txt 2>&1
    from a linux system not correctly handling this scanner (OpenSUSE 13.1) with the same command running on a working linux system
    (PCLinuxOS is the only one available in my current VM "library", but it shouldn't be a problem)...
    log traces are very long, about 50kB each

  5. #5
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,710
    Blog Entries
    1

    Default Re: OpenSUSE 13.1 vs. CanoScan LiDE25 (usb scanner)

    Now I'm trying do compare the output of the following command:
    Code:
    strace scanimage -T -d plustek:libusb:003:002 > scanimage_log.txt 2>&1
    from a linux system not correctly handling this scanner (OpenSUSE 13.1) with the same command running on a working linux system
    (PCLinuxOS is the only one available in my current VM "library", but it shouldn't be a problem)...
    log traces are very long, about 50kB each
    I wasn't too hopeful with the other suggestions - it was more just to cover all the bases. I think you'll need to submit a bug report for this.

  6. #6

    Default Re: OpenSUSE 13.1 vs. CanoScan LiDE25 (usb scanner)

    Ok, I've opened the bug report:

    https://alioth.debian.org/tracker/in...86&atid=410366

    I hope some sane-backend developer can find the problem!

    thanks,
    Emilio

  7. #7

    Default Re: OpenSUSE 13.1 vs. CanoScan LiDE25 (usb scanner)

    Hi

    Just to keep this community aligned...
    This kind of problems seems related to a kernel bug in USB 3.0 device handling; a first workaround is to connect the same scanner to an USB 2.0 ports: it works.
    A preliminary kernel patch exists, but it must still be released (at the moment).

    I think this thread can be closed now...

    thanks to all.

  8. #8
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,710
    Blog Entries
    1

    Default Re: OpenSUSE 13.1 vs. CanoScan LiDE25 (usb scanner)

    Quote Originally Posted by aviroilime View Post
    Hi

    Just to keep this community aligned...
    This kind of problems seems related to a kernel bug in USB 3.0 device handling; a first workaround is to connect the same scanner to an USB 2.0 ports: it works.
    A preliminary kernel patch exists, but it must still be released (at the moment).

    I think this thread can be closed now...

    thanks to all.
    Ah, good catch. Yes, USB 3 connectivity can be problematic sometimes. Thanks for the update.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •