[sane-devel] SANE; scanning with LIDE series works under Win, NOT under Lx

"Cedric Bhihe (毕生泰)" cedric.bhihe at gmail.com
Sun Jun 21 22:33:24 UTC 2015


Thanks a lot  Stijn and Allan ! I made "some" progress.

Here goes:
_Background_:
     sane and libsane version 1.0.23 on Ubuntu 14.04.2
     scanner Canon LIDE25 works under Windows  but not Linux
     scanimage functions perfectly with scanner in identical conditions 
under Lx.

It turns out that just like for this post 
<http://askubuntu.com/questions/599694/scanimage-works-but-xsane-or-any-other-ui-does-not> 
on askubuntu.com, I am running 'tlp' for power saving optimization. I 
applied the post's author's  solution by tweaking the 'tlp' config file, 
so that USB autodisable would not affect my LIDE25 (0x04a9:0x2220).
After applying the change to the tlp config file, I checked it from 
terminal:

$ cat -n /etc/default/tlp | egrep USB_BLACKLIST
    173    #USB_BLACKLIST="1111:2222 3333:4444"
    178    USB_BLACKLIST="04a9:2220"
    187    USB_BLACKLIST_WWAN=1

Result:
'simplescan' now works for the first time in 2 months or so (though it 
seems awfully slow to me).
'xsane' (the frontend I favor) gives me:
  "Error during CMS conversion: could not open scanner ICM profile."
The above error message appears when I launch 'xscan', when I try to 
change any setting and when the scan is over.
Trying to scan, the scanner goes through all the moves at a normal 
speed) but scan everything blank.

So I tried four things:

*1)* Following another post <cid:part2.06040302.04030204 at gmail.com>, I 
created the new rule:
$ sudo vi /etc/udev/rules.d/40-libsane.rules |
ATTRS{idVendor}== "04a9", ATTRS{idProduct}=="2220", 
ENV(libsane_matched)="yes"|||
$ sudo chmod 644 /etc/udev/rules.d/40-libsane.rules

'simplescan' 's behavior is unchanged. It scans in mode gray, color. All 
good.
Relaunching 'xsane' I did NOT get any more error messages. However, 
although 'xsane' launched and allows the scanner to do previews and 
scans without complaining, EVERY preview or scan comes out blank, even 
after reboot.


*2)* I set my debug log level to 80 (don't really know what level 
between 1 and 128 I should use here)
$ SANE_DEBUG_SANEI_USB=80
$ export SANE_DEBUG_SANEI_USB

However I know neither where log files are located, nor how I should 
post them for review.
Perhaps s.o. can help me with hints on that.

*3)* I edited the sane.d genesys.conf file to include a reference to 
Canon LiDE 25
& sudo vi /etc/sane.d/genesys.conf
# Canon LiDE 25
usb 0x04a9 0x2220*

4)* Following Allan's suggestion I checked whether my bios/kernel relies on

xhci_hcd

It does not, apparently. It seems to rely on 'ehci-pci' as seen from the 
command

$ dmsg | tail

ran upon plugging my LiDE 25 scanner onto the 7-1 usb port.

[18745.520785] [UFW ALLOW] IN= OUT=eth0 SRC=192.168.1.35 
DST=80.58.61.250 LEN=63 TOS=0x00 PREC=0x00 TTL=64 ID=46082 DF PROTO=UDP 
SPT=23968 DPT=53 LEN=43
[18746.216192] usb 2-3.1.2: reset full-speed USB device number 7 using 
ehci-pci
[18749.032184] usb 2-3.1.2: reset full-speed USB device number 7 using 
ehci-pci
[18750.932308] usb 7-1: USB disconnect, device number 11
[18752.104222] usb 2-3.1.2: reset full-speed USB device number 7 using 
ehci-pci
[18753.264146] usb 7-1: new full-speed USB device number 12 using uhci_hcd
[18753.433128] usb 7-1: New USB device found, idVendor=04a9, idProduct=2220
[18753.433140] usb 7-1: New USB device strings: Mfr=1, Product=2, 
SerialNumber=0
[18753.433148] usb 7-1: Product: CanoScan
[18753.433154] usb 7-1: Manufacturer: Canon

  I believe I do not have any USB3 issue. I simply do not have USB3 
ports, just two USB1.1 and two USB2 ports.

Nevertheless knowing that power management is also effected at kernel 
level, via the usbcore.autosupend parameter and  I did:|

$ modprobe usbcore autosuspend=-1

|That did not have any benefical effect and I reversed the action:
|
$ modprobe usbcore autosuspend=2|

Can somebody further suggest something ?
Also I need help with the debug log files. Where are they located and 
how do I post them ?
Thanks.

*Cédric*
/GMT+1/
------------------------------------------------------------------------

On 21/06/15 02:38, sane-devel-request at lists.alioth.debian.org wrote:
> Send sane-devel mailing list submissions to
> 	sane-devel at lists.alioth.debian.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
> or, via email, send a message with subject or body 'help' to
> 	sane-devel-request at lists.alioth.debian.org
>
> You can reach the person managing the list at
> 	sane-devel-owner at lists.alioth.debian.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of sane-devel digest..."
>
>
> Today's Topics:
>
>     1. Re: SANE; scanning with LIDE series works under Win, NOT
>        under Lx (Stijn Verholen)
>     2. Re: SANE; scanning with LIDE series works under Win, NOT
>        under Lx (m. allan noah)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 21 Jun 2015 00:49:53 +0200
> From: Stijn Verholen<sverholen at gmail.com>
> To:sane-devel at lists.alioth.debian.org
> Subject: Re: [sane-devel] SANE; scanning with LIDE series works under
> 	Win, NOT under Lx
> Message-ID:<5585EE11.3050102 at gmail.com>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> Dear Cedric,
>
> Please take into consideration that I am not a SANE expert, nor a Canon
> LIDE expert.
>
> SANE is a modular structure. The dirty under-the-hood work that scanner
> drivers do to get a scanner working, is abstracted away to "SANE
> drivers" (i.e. backends).
> Everything else is built on top of those sane backends, through a very
> simple API layer.
>
> If scanimage from a terminal works for your scanner, then your scanner
> works with SANE.
> Your problem is not scanner related.
>
> Google is your friend.
> Have you tried these:
> http://askubuntu.com/questions/599694/scanimage-works-but-xsane-or-any-other-ui-does-not
> Or the more commented:
> http://unix.stackexchange.com/questions/191777/scanimage-works-but-xsane-or-any-other-ui-does-not
>
> Both refer to a problem with the way linux handles USB. This has indeed
> changed a few times over the years, causing un-linux like situations
> where something works one time, and then stops working (e.g. after an
> update).
>
> The reason you are not getting a response from this list, is probably
> that your problem is not SANE-related.
> You may not be a techie now, but you'll get sucked into it sooner or
> later. Use Google.
>
>
> Best regards,
>
> Stijn
>
>
>
> On 20-06-15 21:00, "Cedric Bhihe (???)" wrote:
>> A good day to everybody.
>>
>> I keep reading about flatbed scanners from Canon (in particular of the
>> LIDE
>> series) not working when USB-plugged in under Linux but working fine under
>> Windows. I have exactly the same problem with a LIDE 25 and an HP 4400c
>> scanner.
>>
>> Yes, both scanners are old but they are in excellent condition, (very low
>> mileage + many years forgotten somewhere in their original packing).?
>> Both
>> work flawlessly under legacy Windows XP as well as under Win 7 on
>> different
>> machines, including one that runs a dual Lx/Win boot.
>>
>> As far as 'sane' front-ends go, I downloaded and installed two from
>> the Ubuntu
>> Software Center and tried them repeatedly.
>> - simple scan 3.12.1
>> - xsane 0.998 whose author I even contacted, Oliver Rauch, hoping for
>> pointers.
>> Unfortunately I got no answer.
>>
>> Nothing seems to work under Linux with a 'sane' based gui for those
>> two scanners,
>> BUT:
>> -1- it was not always the case. Up until about 8-10 weeks ago, xsane
>> used to work
>> flawlessly for me. Nothing in my system (hard and soft) changed since
>> then,
>> apart from regular stable and security related updates as provided by
>> Canonical.
>> -2- I can scan w/o an itch from my Ubuntu terminal using 'scanimage'.
>> I do that
>> on a daily basis with no errors.
>>
>> I already wrote about that here, about 40 days ago, and got a
>> resounding silence
>> ? for an answer. No idea why.
>>
>> Anyway I believe this is completely unrelated to the USB3 issue that
>> is now widely
>> publicized. This probably has to do with some change in the kernel AND
>> the way
>> the two afore mentionned 'sane' based gui packages handle
>> communication with
>> the scanner or the daemon that handles USB comm. or some' else.
>> Something happened about 8 to 10 weeks go and I don't know what it is.
>>
>> Since I am no techie, I am stuck, but at least 'scanimage' on terminal
>> works.
>> The downside with scanimage is despite all available options
>> - no preview is available (pre-processing),
>> - no collating batch (multi-page) scans (post-processing) is possible,
>> - there is no saving scans directly as pdf (post-processing).
>>
>> -ced
>>
>> Ubuntu 14.04.2 v3.16.0-41-generic x86_64
>> on Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz
>> Motherboard 30C5 Version KBC v.71.36 by HP
>> BIOS HP version: 68MVD Ver. F.15 (2008.02.12)
>>
>> ?
>> ------------------------------------------------------------------------
>>
>> On 20/06/15 14:00,sane-devel-request at lists.alioth.debian.org  wrote:
>>> Send sane-devel mailing list submissions to
>>> 	sane-devel at lists.alioth.debian.org
>>>
>>> To subscribe or unsubscribe via the World Wide Web, visit
>>> 	http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
>>> or, via email, send a message with subject or body 'help' to
>>> 	sane-devel-request at lists.alioth.debian.org
>>>
>>> You can reach the person managing the list at
>>> 	sane-devel-owner at lists.alioth.debian.org
>>>
>>> When replying, please edit your Subject line so it is more specific
>>> than "Re: Contents of sane-devel digest..."
>>>
>>>
>>> Today's Topics:
>>>
>>>      1. Re: Canon LIDE 110 + USB3 (Marc Cousin)
>>>
>>>
>>> ----------------------------------------------------------------------
>>>
>>> Message: 1
>>> Date: Fri, 19 Jun 2015 15:57:03 +0200
>>> From: Marc Cousin<cousinmarc at gmail.com>
>>> To: Heinz Wiesinger<HMWiesinger at liwjatan.at>
>>> Cc:sane-devel at lists.alioth.debian.org
>>> Subject: Re: [sane-devel] Canon LIDE 110 + USB3
>>> Message-ID: <478249274.zdL7Kf9XdV at marco>
>>> Content-Type: text/plain; charset="utf-8"
>>>
>>> On Thursday 30 April 2015 13:15:17 Marc Cousin wrote:
>>>> On 18/04/2015 18:46, Marc Cousin wrote:
>>>>> On 18/04/2015 18:27, Marc Cousin wrote:
>>>>>> On 18/04/2015 12:35, Heinz Wiesinger wrote:
>>>>>>> On Saturday 18 April 2015 10:58:31 Marc Cousin wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I've got a brand new computer with USB3 all over the place, and cannot
>>>>>>>> use my "old" LIDE 110 with it, even with a git version. The scanner is
>>>>>>>> still working, as it works when connecter to my older laptop, through
>>>>>>>> USB2. It doesn't work with a git checkout from a few minutes ago.
>>>>>>>>
>>>>>>>> I see that some drivers have received some patches to work around
>>>>>>>> problems with USB 3. Is there something to be done to the genesys
>>>>>>>> driver
>>>>>>>> too ? What can I provide to help solving this ?
>>>>>>> Hi,
>>>>>>>
>>>>>>> I have the same problem with the LIDE 210. In a message from last
>>>>>>> month, Stef
>>>>>>> asked for usbpcap log from windows (see
>>>>>>> http://lists.alioth.debian.org/pipermail/sane-devel/2015-March/033202.ht
>>>>>>> ml
>>>>>>>
>>>>>>>     for details). Unfortunately I don't have access to a Windows
>>>>>>>
>>>>>>> computer having
>>>>>>> USB3 ports. So if you have and you could provide those logs, it might
>>>>>>> help in
>>>>>>> figuring out what's going wrong.
>>>>>>>
>>>>>>> Grs,
>>>>>>> Heinz
>>>>>> I have no windows installed. I have one in a KVM box, should I give it a
>>>>>> try ?
>>>>> I gave it a try, in the KVM windows, scanning works. It is seen as USB2
>>>>> from windows though, I don't know if this is of any importance.
>>>> So,
>>>>
>>>> Is this dump (from a virtulized windows seeing USB2) interesting ?
>>>>
>>>> Regards
>>> Hi,
>>>
>>> I'm back on this, after a while away from home. Is there anything I can
>>> provide ?
>>>
>>> To sum up:
>>>
>>> - The LIDE110 doesn't work from SANE (git checkout from 10 minutes ago) +
>>> Linux (4.0.5): I only have problem with the scanner. Any other periphal I
>>> plugged in worked ok (mouse, usb card reader, usb disk drive, keyboard)?
>>> - It works in Win7, virtualized in KVM, using the exact same USB3 port (seen
>>> as USB2 from Windows)
>>> - It almost works when all debug traces are activated in SANE (it fails much
>>> later)
>>>
>>> I am willing to capture anything you want, just tell me (and give me pointers
>>> to how to do the requested captures). I could even (but as a last resort, as I
>>> don't have space for it right now) install a Win7 on this machine.
>>>
>>> Regards
>>>
>>>
>>>
>>> ------------------------------
>>>
>>> Subject: Digest Footer
>>>
>>> _______________________________________________
>>> sane-devel mailing list
>>> sane-devel at lists.alioth.debian.org
>>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
>>>
>>> ------------------------------
>>>
>>> End of sane-devel Digest, Vol 120, Issue 20
>>> *******************************************
>>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:<http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20150621/76edaa5e/attachment-0001.html>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 20 Jun 2015 20:38:45 -0400
> From: "m. allan noah"<kitno455 at gmail.com>
> To: Cedric Bhihe (???)<cedric.bhihe at gmail.com>
> Cc: sane-devel<sane-devel at lists.alioth.debian.org>
> Subject: Re: [sane-devel] SANE; scanning with LIDE series works under
> 	Win, NOT under Lx
> Message-ID:
> 	<CAKO8m0Ay+zLannn01rXjw8aOS=1W6LKMWd+b0_gh+bu0fkqndw at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> Cedric- I'm sorry you did not receive a reply earlier, the SANE
> project is somewhat short handed. In this case, you need to
> investigate what changed in your system around the time the scanner
> stopped working. Figure out what packages were updated by the OS, and
> see if you can downgrade temporarily.
>
> Another thing to investigate is if your system is using the xhci_hcd
> module to control your USB ports. If not, we can probably rule out USB
> problems.
>
> After that, we would need to get logs of debugging info from the sane
> backend, when it is called by scanimage and when called by xsane.
> Perhaps we will be able to see some difference.
>
> allan
>
> On Sat, Jun 20, 2015 at 3:00 PM, "Cedric Bhihe (???)"
> <cedric.bhihe at gmail.com>  wrote:
>> A good day to everybody.
>>
>> I keep reading about flatbed scanners from Canon (in particular of the LIDE
>> series) not working when USB-plugged in under Linux but working fine under
>> Windows. I have exactly the same problem with a LIDE 25 and an HP 4400c
>> scanner.
>>
>> Yes, both scanners are old but they are in excellent condition, (very low
>> mileage + many years forgotten somewhere in their original packing).?  Both
>> work flawlessly under legacy Windows XP as well as under Win 7 on different
>> machines, including one that runs a dual Lx/Win boot.
>>
>> As far as 'sane' front-ends go, I downloaded and installed two from the
>> Ubuntu
>> Software Center and tried them repeatedly.
>> - simple scan 3.12.1
>> - xsane 0.998 whose author I even contacted, Oliver Rauch, hoping for
>> pointers.
>> Unfortunately I got no answer.
>>
>> Nothing seems to work under Linux with a 'sane' based gui for those two
>> scanners,
>> BUT:
>> -1- it was not always the case. Up until about 8-10 weeks ago, xsane used to
>> work
>> flawlessly for me. Nothing in my system (hard and soft) changed since then,
>> apart from regular stable and security related updates as provided by
>> Canonical.
>> -2- I can scan w/o an itch from my Ubuntu terminal using 'scanimage'. I do
>> that
>> on a daily basis with no errors.
>>
>> I already wrote about that here, about 40 days ago, and got a resounding
>> silence
>> ? for an answer. No idea why.
>>
>> Anyway I believe this is completely unrelated to the USB3 issue that is now
>> widely
>> publicized. This probably has to do with some change in the kernel AND the
>> way
>> the two afore mentionned 'sane' based gui packages handle communication with
>> the scanner or the daemon that handles USB comm. or some' else.
>> Something happened about 8 to 10 weeks go and I don't know what it is.
>>
>> Since I am no techie, I am stuck, but at least 'scanimage' on terminal
>> works.
>> The downside with scanimage is despite all available options
>> - no preview is available (pre-processing),
>> - no collating batch (multi-page) scans (post-processing) is possible,
>> - there is no saving scans directly as pdf (post-processing).
>>
>> -ced
>>
>> Ubuntu 14.04.2 v3.16.0-41-generic x86_64
>> on Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz
>> Motherboard 30C5 Version KBC v.71.36 by HP
>> BIOS HP version: 68MVD Ver. F.15 (2008.02.12)
>>
>> ?
>> ________________________________
>>
>> On 20/06/15 14:00,sane-devel-request at lists.alioth.debian.org  wrote:
>>
>> Send sane-devel mailing list submissions to
>> 	sane-devel at lists.alioth.debian.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> 	http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
>> or, via email, send a message with subject or body 'help' to
>> 	sane-devel-request at lists.alioth.debian.org
>>
>> You can reach the person managing the list at
>> 	sane-devel-owner at lists.alioth.debian.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of sane-devel digest..."
>>
>>
>> Today's Topics:
>>
>>     1. Re: Canon LIDE 110 + USB3 (Marc Cousin)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Fri, 19 Jun 2015 15:57:03 +0200
>> From: Marc Cousin<cousinmarc at gmail.com>
>> To: Heinz Wiesinger<HMWiesinger at liwjatan.at>
>> Cc:sane-devel at lists.alioth.debian.org
>> Subject: Re: [sane-devel] Canon LIDE 110 + USB3
>> Message-ID: <478249274.zdL7Kf9XdV at marco>
>> Content-Type: text/plain; charset="utf-8"
>>
>> On Thursday 30 April 2015 13:15:17 Marc Cousin wrote:
>>
>> On 18/04/2015 18:46, Marc Cousin wrote:
>>
>> On 18/04/2015 18:27, Marc Cousin wrote:
>>
>> On 18/04/2015 12:35, Heinz Wiesinger wrote:
>>
>> On Saturday 18 April 2015 10:58:31 Marc Cousin wrote:
>>
>> Hi,
>>
>> I've got a brand new computer with USB3 all over the place, and cannot
>> use my "old" LIDE 110 with it, even with a git version. The scanner is
>> still working, as it works when connecter to my older laptop, through
>> USB2. It doesn't work with a git checkout from a few minutes ago.
>>
>> I see that some drivers have received some patches to work around
>> problems with USB 3. Is there something to be done to the genesys
>> driver
>> too ? What can I provide to help solving this ?
>>
>> Hi,
>>
>> I have the same problem with the LIDE 210. In a message from last
>> month, Stef
>> asked for usbpcap log from windows (see
>> http://lists.alioth.debian.org/pipermail/sane-devel/2015-March/033202.ht
>> ml
>>
>>    for details). Unfortunately I don't have access to a Windows
>>
>> computer having
>> USB3 ports. So if you have and you could provide those logs, it might
>> help in
>> figuring out what's going wrong.
>>
>> Grs,
>> Heinz
>>
>> I have no windows installed. I have one in a KVM box, should I give it a
>> try ?
>>
>> I gave it a try, in the KVM windows, scanning works. It is seen as USB2
>> from windows though, I don't know if this is of any importance.
>>
>> So,
>>
>> Is this dump (from a virtulized windows seeing USB2) interesting ?
>>
>> Regards
>>
>> Hi,
>>
>> I'm back on this, after a while away from home. Is there anything I can
>> provide ?
>>
>> To sum up:
>>
>> - The LIDE110 doesn't work from SANE (git checkout from 10 minutes ago) +
>> Linux (4.0.5): I only have problem with the scanner. Any other periphal I
>> plugged in worked ok (mouse, usb card reader, usb disk drive, keyboard)?
>> - It works in Win7, virtualized in KVM, using the exact same USB3 port (seen
>> as USB2 from Windows)
>> - It almost works when all debug traces are activated in SANE (it fails much
>> later)
>>
>> I am willing to capture anything you want, just tell me (and give me
>> pointers
>> to how to do the requested captures). I could even (but as a last resort, as
>> I
>> don't have space for it right now) install a Win7 on this machine.
>>
>> Regards
>>
>>
>>
>> ------------------------------
>>
>> Subject: Digest Footer
>>
>> _______________________________________________
>> sane-devel mailing list
>> sane-devel at lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
>>
>> ------------------------------
>>
>> End of sane-devel Digest, Vol 120, Issue 20
>> *******************************************
>>
>>
>>
>> --
>> sane-devel mailing list:sane-devel at lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
>> Unsubscribe: Send mail with subject "unsubscribe your_password"
>>               tosane-devel-request at lists.alioth.debian.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20150622/539ff4de/attachment-0001.html>


More information about the sane-devel mailing list