Quantcast

Some weirdness with a Canon LiDE 220

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Some weirdness with a Canon LiDE 220

Scott Alfter
I've had this scanner working with prerelease code and the final 1.0.25
release for several months, but when I tried scanning something in the
other day, it refused to start up.  I normally use xsane to scan
documents; after hitting the "acquire preview" button, the scanner
carriage makes a short moving sound, and then a dialog pops up:

Failed to start scanner: Invalid argument

The only thing that's changed recently is the underlying hardware, of
which I've upgraded the processor, motherboard, and memory.  I've gone
from a Core 2 Quad Q6600 to a Core i5 4690K (which I haven't
overclocked).  The new motherboard supports USB 3.0 as well as 2.0; I've
tried both types and seen no difference in behavior.  Since I'm running
Gentoo Linux, I had it recompile the whole system for the new processor
(-march=core-avx2), but I've also tried rebuilding with the older config
(-march=core2), and that made no difference.

I wouldn't think a faster processor would break SANE.  I've tried
getting some more useful output from it to include, but scanimage -v
isn't any more verbose than scanimage without -v (or xsane) and only
produces this message:

scanimage: sane_start: Invalid argument

On a lark, I then checked to see if scanimage -vv might be more verbose:

$ scanimage -vvd genesys:libusb:003:007 --format pnm foo.pnm
scanimage: scanning image of size 636x878 pixels at 8 bits/pixel
scanimage: acquiring gray frame
scanimage: min/max graylevel value = 0/254
scanimage: read 558408 bytes in total
Closing device
Calling sane_exit
scanimage: finished

foo.pnm has valid PGM image data.  Including --resolution and --mode
options works as expected.

I then tried removing one v, and then the other, and different
resolution and bit-depth settings, and it still worked.  I then tried
going back to xsane...still won't work.  Back to the
command-line...scanimage still works.

I then fired up gscan2pdf (maybe I should remember to use this more
often).  With its default settings, it appears to work properly.

When I started writing this up, I was about to blame the sane-backends
package for breakage, but it's now looking more like the problem is with
xsane...but the only change within the past year with the xsane ebuild
is a keyword change on a different architecture.  Upstream source
doesn't appear to have changed since May 2013.  What would explain this
breakage?  Is it something that can be fixed or worked around, or should
I start looking for something else to scan photos?  (I probably
should've been using gscan2pdf for documents...need to familiarize
myself with that a bit better.)

--
Scott Alfter
[hidden email]


--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]

signature.asc (662 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some weirdness with a Canon LiDE 220

John Weber
I also have an LiDE220. I noticed a few weeks ago that xsane was giving me the same error. I had no problems with other front ends including xscanimage, scanimage, and simplescan. About 2 days ago I tried it again and xsane worked. I played around a little and it seemed that xsane worked if I acquired a preview first, but not otherwise. I don't remember if I had acquired a preview from a few weeks ago or not.

Ubuntu 15.10
xsane    0.998-6ubuntu1
libsane  1.0.26-git20151201-wily0  (rolfbensch ppa)

On Tue, Dec 15, 2015 at 2:29 PM, Scott Alfter <[hidden email]> wrote:
I've had this scanner working with prerelease code and the final 1.0.25
release for several months, but when I tried scanning something in the
other day, it refused to start up.  I normally use xsane to scan
documents; after hitting the "acquire preview" button, the scanner
carriage makes a short moving sound, and then a dialog pops up:

Failed to start scanner: Invalid argument

The only thing that's changed recently is the underlying hardware, of
which I've upgraded the processor, motherboard, and memory.  I've gone
from a Core 2 Quad Q6600 to a Core i5 4690K (which I haven't
overclocked).  The new motherboard supports USB 3.0 as well as 2.0; I've
tried both types and seen no difference in behavior.  Since I'm running
Gentoo Linux, I had it recompile the whole system for the new processor
(-march=core-avx2), but I've also tried rebuilding with the older config
(-march=core2), and that made no difference.

I wouldn't think a faster processor would break SANE.  I've tried
getting some more useful output from it to include, but scanimage -v
isn't any more verbose than scanimage without -v (or xsane) and only
produces this message:

scanimage: sane_start: Invalid argument

On a lark, I then checked to see if scanimage -vv might be more verbose:

$ scanimage -vvd genesys:libusb:003:007 --format pnm foo.pnm
scanimage: scanning image of size 636x878 pixels at 8 bits/pixel
scanimage: acquiring gray frame
scanimage: min/max graylevel value = 0/254
scanimage: read 558408 bytes in total
Closing device
Calling sane_exit
scanimage: finished

foo.pnm has valid PGM image data.  Including --resolution and --mode
options works as expected.

I then tried removing one v, and then the other, and different
resolution and bit-depth settings, and it still worked.  I then tried
going back to xsane...still won't work.  Back to the
command-line...scanimage still works.

I then fired up gscan2pdf (maybe I should remember to use this more
often).  With its default settings, it appears to work properly.

When I started writing this up, I was about to blame the sane-backends
package for breakage, but it's now looking more like the problem is with
xsane...but the only change within the past year with the xsane ebuild
is a keyword change on a different architecture.  Upstream source
doesn't appear to have changed since May 2013.  What would explain this
breakage?  Is it something that can be fixed or worked around, or should
I start looking for something else to scan photos?  (I probably
should've been using gscan2pdf for documents...need to familiarize
myself with that a bit better.)

--
Scott Alfter
[hidden email]


--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]



--
John Weber
[hidden email]

--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some weirdness with a Canon LiDE 220

Scott Alfter
On 2015-12-15 14:52, John S. Weber wrote:

> On Tue, Dec 15, 2015 at 2:29 PM, Scott Alfter <[hidden email]> wrote:
>> I've had this scanner working with prerelease code and the final
>> 1.0.25
>> release for several months, but when I tried scanning something in the
>> other day, it refused to start up.  I normally use xsane to scan
>> documents; after hitting the "acquire preview" button, the scanner
>> carriage makes a short moving sound, and then a dialog pops up:
>>
>> Failed to start scanner: Invalid argument
>
> I also have an LiDE220. I noticed a few weeks ago that xsane was giving
> me
> the same error. I had no problems with other front ends including
> xscanimage, scanimage, and simplescan. About 2 days ago I tried it
> again
> and xsane worked. I played around a little and it seemed that xsane
> worked
> if I acquired a preview first, but not otherwise. I don't remember if I
> had acquired a preview from a few weeks ago or not.

Tried again just now, and now nothing works: not xsane, not scanimage,
not gscan2pdf.  It started running the scanning head down the page in
xsane when I selected 16-bit bit depth, but it threw an "invalid
argument" dialog and the scanning head kept going until it hit the stop
down by the hinge (at which point I unplugged the cable).

It's looking more like the fault is with the backend driver (genesys, in
this case), not the applications.

--
Scott Alfter
[hidden email]


--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some weirdness with a Canon LiDE 220

John Weber
I just checked the behavior of my LiDE220. I plugged the scanner into USB3, started xsane and set it to full color at 300dpi and pushed the scan button. Up popped the "invalid argument" dialog. I then acquired a preview which worked and thereafter xsane works fine. I could not reproduce the error again by closing and restarting xsane or replugging the scanner (multiple times). All other front ends I tried worked. 

Your newest symptoms sound like the issues pre 1.0.25. Are you sure of the version you're running? Try renaming or deleting your ~/.sane directory.

On Tue, Dec 15, 2015 at 6:23 PM, Scott Alfter <[hidden email]> wrote:
On 2015-12-15 14:52, John S. Weber wrote:
On Tue, Dec 15, 2015 at 2:29 PM, Scott Alfter <[hidden email]> wrote:
I've had this scanner working with prerelease code and the final 1.0.25
release for several months, but when I tried scanning something in the
other day, it refused to start up.  I normally use xsane to scan
documents; after hitting the "acquire preview" button, the scanner
carriage makes a short moving sound, and then a dialog pops up:

Failed to start scanner: Invalid argument

I also have an LiDE220. I noticed a few weeks ago that xsane was giving me
the same error. I had no problems with other front ends including
xscanimage, scanimage, and simplescan. About 2 days ago I tried it again
and xsane worked. I played around a little and it seemed that xsane worked
if I acquired a preview first, but not otherwise. I don't remember if I
had acquired a preview from a few weeks ago or not.

Tried again just now, and now nothing works: not xsane, not scanimage, not gscan2pdf.  It started running the scanning head down the page in xsane when I selected 16-bit bit depth, but it threw an "invalid argument" dialog and the scanning head kept going until it hit the stop down by the hinge (at which point I unplugged the cable).

It's looking more like the fault is with the backend driver (genesys, in this case), not the applications.

--
Scott Alfter
[hidden email]




--
John Weber
[hidden email]

--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some weirdness with a Canon LiDE 220

Scott Alfter
On 2015-12-15 18:28, John S. Weber wrote:
> I just checked the behavior of my LiDE220. I plugged the scanner into
> USB3,
> started xsane and set it to full color at 300dpi and pushed the scan
> button. Up popped the "invalid argument" dialog. I then acquired a
> preview
> which worked and thereafter xsane works fine. I could not reproduce the
> error again by closing and restarting xsane or replugging the scanner
> (multiple times). All other front ends I tried worked.

I tried that sequence of steps...it errored out on both attempts to scan
(scan and preview).

> Your newest symptoms sound like the issues pre 1.0.25. Are you sure of
> the
> version you're running? Try renaming or deleting your ~/.sane
> directory.

It's definitely 1.0.25:

salfter@janeway ~ $ emerge -pv sane-backends

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ~] media-gfx/sane-backends-1.0.25::gentoo  USE="ipv6 nls
usb v4l -avahi -doc -gphoto2 -snmp -systemd -threads -xinetd"
ABI_X86="32 (64) (-x32)" SANE_BACKENDS="genesys -abaton -agfafocus
-apple -artec -artec_eplus48u -as6e -avision -bh -canon -canon630u
-canon_dr -canon_pp -cardscan -coolscan -coolscan2 -coolscan3 -dc210
-dc240 -dc25 -dell1600n_net -dmc -epjitsu -epson -epson2 -fujitsu
-gt68xx -hp -hp3500 -hp3900 -hp4200 -hp5400 -hp5590 -hpljm1005 -hpsj5s
-hs2p -ibm -kodak -kodakaio -kvs1025 -kvs20xx -kvs40xx -leo -lexmark
-ma1509 -magicolor -matsushita -microtek -microtek2 -mustek -mustek_pp
-mustek_usb -mustek_usb2 -nec -net -niash -p5 -pie -pixma -plustek
-plustek_pp -pnm -qcam -ricoh -rts8891 -s9036 -sceptre -sharp -sm3600
-sm3840 -snapscan -sp15c -st400 -stv680 -tamarack -teco1 -teco2 -teco3
{-test} -u12 -umax -umax1220u -umax_pp -xerox_mfp" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

I tried nuking ~/.sane and rerunning the steps above...still no joy.

Next step might be to bring the scanner in to work and try it out with
my old computer that I took into the office.  There, it'd be running on
Gentoo Linux in a VirtualBox VM under Windows 7. I already have that box
working with an ancient LiDE 20 that Canon doesn't support under
anything newer than Windows XP and would just need to compile in the
genesys backend (the LiDE 20 uses the plustek backend).

--
Scott Alfter
[hidden email]


--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some weirdness with a Canon LiDE 220

Simon Matter
In reply to this post by John Weber
> I just checked the behavior of my LiDE220. I plugged the scanner into
> USB3,

The USB3 could be a problem here, check the list archives for more info on
this.

Regards,
Simon

> started xsane and set it to full color at 300dpi and pushed the scan
> button. Up popped the "invalid argument" dialog. I then acquired a preview
> which worked and thereafter xsane works fine. I could not reproduce the
> error again by closing and restarting xsane or replugging the scanner
> (multiple times). All other front ends I tried worked.
>
> Your newest symptoms sound like the issues pre 1.0.25. Are you sure of the
> version you're running? Try renaming or deleting your ~/.sane directory.
>
> On Tue, Dec 15, 2015 at 6:23 PM, Scott Alfter <[hidden email]> wrote:
>
>> On 2015-12-15 14:52, John S. Weber wrote:
>>
>>> On Tue, Dec 15, 2015 at 2:29 PM, Scott Alfter <[hidden email]> wrote:
>>>
>>>> I've had this scanner working with prerelease code and the final
>>>> 1.0.25
>>>> release for several months, but when I tried scanning something in the
>>>> other day, it refused to start up.  I normally use xsane to scan
>>>> documents; after hitting the "acquire preview" button, the scanner
>>>> carriage makes a short moving sound, and then a dialog pops up:
>>>>
>>>> Failed to start scanner: Invalid argument
>>>>
>>>
>>> I also have an LiDE220. I noticed a few weeks ago that xsane was giving
>>> me
>>> the same error. I had no problems with other front ends including
>>> xscanimage, scanimage, and simplescan. About 2 days ago I tried it
>>> again
>>> and xsane worked. I played around a little and it seemed that xsane
>>> worked
>>> if I acquired a preview first, but not otherwise. I don't remember if I
>>> had acquired a preview from a few weeks ago or not.
>>>
>>
>> Tried again just now, and now nothing works: not xsane, not scanimage,
>> not
>> gscan2pdf.  It started running the scanning head down the page in xsane
>> when I selected 16-bit bit depth, but it threw an "invalid argument"
>> dialog
>> and the scanning head kept going until it hit the stop down by the hinge
>> (at which point I unplugged the cable).
>>
>> It's looking more like the fault is with the backend driver (genesys, in
>> this case), not the applications.
>>
>> --
>> Scott Alfter
>> [hidden email]
>>
>>
>
>
> --
> John Weber
> [hidden email]
> --
> sane-devel mailing list: [hidden email]
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
> Unsubscribe: Send mail with subject "unsubscribe your_password"
>              to [hidden email]



--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some weirdness with a Canon LiDE 220

Johannes Meixner
In reply to this post by Scott Alfter

On Dec 15 13:29 Scott Alfter wrote (excerpt):
> The new motherboard supports USB 3.0 as well as 2.0

Really pure traditional USB 2 hardware?

In general when your scanner is connected via USB:

There are currently issues with USB ports where the kernel
module "xhci" is used as kernel driver.

When "lsusb -t" shows "Driver=xhci_hcd" for the USB bus and
port where the USB scanner is connected (see "lsusb" where
the scanner is connected), then there could be issues
depending on the computer hardware and firmware.

In this case see
https://bugzilla.opensuse.org/show_bug.cgi?id=856794

In particular see
https://bugzilla.opensuse.org/show_bug.cgi?id=856794#c24
that reads (excerpt):
-----------------------------------------------------------------
My machine has 4 USB ports, two labeled with
the "super speed" USB logo (a.k.a. USB 3) and
two labeled with the normal USB logo (a.k.a. USB 2)
but for all 4 ports xhci is used and it fails on all 4 ports.
-----------------------------------------------------------------
and see
https://bugzilla.opensuse.org/show_bug.cgi?id=856794#c40

When your scanner is not connected at a USB port where the
kernel module xhci_hcd is used as kernel driver (e.g. when
your scanner is connected at a USB port where the kernel
module uhci_hcd or ehci_hcd is used as kernel driver),
then have a look at "Trouble-Shooting (Debugging)" in
https://en.opensuse.org/SDB:Configuring_Scanners

For example to get USB debugging information
you could use comands (as root) like
-----------------------------------------------------------------
export SANE_DEBUG_SANEI_USB=128
scanimage -L
unset SANE_DEBUG_SANEI_USB
-----------------------------------------------------------------


Kind Regards
Johannes Meixner
--
SUSE LINUX GmbH - GF: Felix Imendoerffer, Jane Smithard,
Graham Norton - HRB 21284 (AG Nuernberg)


--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some weirdness with a Canon LiDE 220

Scott Alfter
On 12/16/2015 2:42 AM, Johannes Meixner wrote:

> On Dec 15 13:29 Scott Alfter wrote (excerpt):
>> The new motherboard supports USB 3.0 as well as 2.0
>
> Really pure traditional USB 2 hardware?
>
> In general when your scanner is connected via USB:
>
> There are currently issues with USB ports where the kernel
> module "xhci" is used as kernel driver.
>
> When "lsusb -t" shows "Driver=xhci_hcd" for the USB bus and
> port where the USB scanner is connected (see "lsusb" where
> the scanner is connected), then there could be issues
> depending on the computer hardware and firmware.
I brought my scanner in to work to test it with an older machine that
only provides USB 2.0. As I suspected (though not on account of possible
USB issues), it ran like a champ here, even though it was running in a
VM, not on the metal. (As an aside, VirtualBox's support for passing USB
devices through to guests really appears to have improved with v5.0.)

Since it's at work, I can't test it at home, but lsusb -t shows the
following for the home system:

/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
|__ Port 3: Dev 2, If 0, Class=Wireless, Driver=, 12M
|__ Port 3: Dev 2, If 1, Class=Wireless, Driver=, 12M
|__ Port 4: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 12M
|__ Port 5: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 9: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 13: Dev 6, If 0, Class=Video, Driver=, 480M
|__ Port 13: Dev 6, If 1, Class=Video, Driver=, 480M
|__ Port 13: Dev 6, If 2, Class=Audio, Driver=snd-usb-audio, 480M
|__ Port 13: Dev 6, If 3, Class=Audio, Driver=snd-usb-audio, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M

At this time, it has a keyboard, mouse, webcam, Bluetooth dongle, and
ANT+ dongle plugged in. I filled the "USB 2.0" (black) ports up before I
started plugging things into USB 3.0 (blue) ports, yet it looks like
everything's going through the xhci_hcd driver.

Looks like a separate USB 2.0 interface is in order...a minor annoyance,
but at least it's a cheap fix.

--
Scott Alfter
[hidden email]


--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]

signature.asc (662 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some weirdness with a Canon LiDE 220

m. allan noah-3
On Wed, Dec 16, 2015 at 3:45 PM, Scott Alfter <[hidden email]> wrote:

> On 12/16/2015 2:42 AM, Johannes Meixner wrote:
>> On Dec 15 13:29 Scott Alfter wrote (excerpt):
>>> The new motherboard supports USB 3.0 as well as 2.0
>>
>> Really pure traditional USB 2 hardware?
>>
>> In general when your scanner is connected via USB:
>>
>> There are currently issues with USB ports where the kernel
>> module "xhci" is used as kernel driver.
>>
>> When "lsusb -t" shows "Driver=xhci_hcd" for the USB bus and
>> port where the USB scanner is connected (see "lsusb" where
>> the scanner is connected), then there could be issues
>> depending on the computer hardware and firmware.
>
> I brought my scanner in to work to test it with an older machine that
> only provides USB 2.0. As I suspected (though not on account of possible
> USB issues), it ran like a champ here, even though it was running in a
> VM, not on the metal. (As an aside, VirtualBox's support for passing USB
> devices through to guests really appears to have improved with v5.0.)
>
> Since it's at work, I can't test it at home, but lsusb -t shows the
> following for the home system:
>
> /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
> /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
> |__ Port 3: Dev 2, If 0, Class=Wireless, Driver=, 12M
> |__ Port 3: Dev 2, If 1, Class=Wireless, Driver=, 12M
> |__ Port 4: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 12M
> |__ Port 5: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
> |__ Port 9: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
> |__ Port 13: Dev 6, If 0, Class=Video, Driver=, 480M
> |__ Port 13: Dev 6, If 1, Class=Video, Driver=, 480M
> |__ Port 13: Dev 6, If 2, Class=Audio, Driver=snd-usb-audio, 480M
> |__ Port 13: Dev 6, If 3, Class=Audio, Driver=snd-usb-audio, 480M
> /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
> |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
> /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
> |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
>
> At this time, it has a keyboard, mouse, webcam, Bluetooth dongle, and
> ANT+ dongle plugged in. I filled the "USB 2.0" (black) ports up before I
> started plugging things into USB 3.0 (blue) ports, yet it looks like
> everything's going through the xhci_hcd driver.
>
> Looks like a separate USB 2.0 interface is in order...a minor annoyance,
> but at least it's a cheap fix.
>

if you are able to build sane-backends from source, we could try
disabling a workaround I added for Linux USB3 problems. That might
help.

allan
--
"well, I stand up next to a mountain- and I chop it down with the edge
of my hand"

--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some weirdness with a Canon LiDE 220

Scott Alfter
On 12/16/2015 12:52 PM, m. allan noah wrote:
> if you are able to build sane-backends from source, we could try
> disabling a workaround I added for Linux USB3 problems. That might
> help.

I could give that a shot while I'm waiting for the USB 2.0 controller to
arrive.  Gentoo allows user-supplied patches to be applied to the source
tree, so a patch that reverts this change would do the job.

I'm going through the git log to see if I can find it...would it be
commit 014b45d920f1?

sanei_usb: Linux USB3/xhci workarounds

I'll try reversing this patch and see if it helps.

(If it makes a difference, I'm running Gentoo's latest stable kernel,
which is based on 4.1.12.  Kernel versions up to 4.3.3 are available
under gentoo-sources.)

--
Scott Alfter
[hidden email]


--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]

signature.asc (662 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some weirdness with a Canon LiDE 220

m. allan noah-3
You found the patch. If removing that fixes the issue, then our
workaround is causing problems with current linux kernels. I suppose
we will have to make the workaround controlled by an environment
variable in that case.

allan

On Wed, Dec 16, 2015 at 6:08 PM, Scott Alfter <[hidden email]> wrote:

> On 12/16/2015 12:52 PM, m. allan noah wrote:
>> if you are able to build sane-backends from source, we could try
>> disabling a workaround I added for Linux USB3 problems. That might
>> help.
>
> I could give that a shot while I'm waiting for the USB 2.0 controller to
> arrive.  Gentoo allows user-supplied patches to be applied to the source
> tree, so a patch that reverts this change would do the job.
>
> I'm going through the git log to see if I can find it...would it be
> commit 014b45d920f1?
>
> sanei_usb: Linux USB3/xhci workarounds
>
> I'll try reversing this patch and see if it helps.
>
> (If it makes a difference, I'm running Gentoo's latest stable kernel,
> which is based on 4.1.12.  Kernel versions up to 4.3.3 are available
> under gentoo-sources.)
>
> --
> Scott Alfter
> [hidden email]
>



--
"well, I stand up next to a mountain- and I chop it down with the edge
of my hand"

--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some weirdness with a Canon LiDE 220

Scott Alfter
On 2015-12-16 19:18, m. allan noah wrote:
> You found the patch. If removing that fixes the issue, then our
> workaround is causing problems with current linux kernels. I suppose
> we will have to make the workaround controlled by an environment
> variable in that case.

It didn't fix it when using gentoo-sources (kernel) 4.1.12, but in
combination with gentoo-sources 4.3.3, I have only had one failure to
scan, and that was when I told it to try scanning at 4800 dpi.  At
normal settings (600 dpi and below), I suspect it'll scan all day.  It
even completed a scan at 2400 dpi after a bit of a delay.

I then put the patch back in (or, more precisely, didn't patch it out),
recompiled, and tried again under the newer kernel.  It seems to be
running about the same with the workaround as without: an "invalid
argument" error at 4800 dpi, but it works at 2400 dpi and below.

The patch doesn't appear to be making much of a difference one way or
the other.  Instead, it would appear the kernel developers may have
fixed whatever was broken with USB 3.0 support somewhere between 4.1.12
and 4.3.3.

--
Scott Alfter
[hidden email]


--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some weirdness with a Canon LiDE 220

stef-22
On 17/12/2015 04:41, Scott Alfter wrote:

> On 2015-12-16 19:18, m. allan noah wrote:
>> You found the patch. If removing that fixes the issue, then our
>> workaround is causing problems with current linux kernels. I suppose
>> we will have to make the workaround controlled by an environment
>> variable in that case.
>
> It didn't fix it when using gentoo-sources (kernel) 4.1.12, but in
> combination with gentoo-sources 4.3.3, I have only had one failure to
> scan, and that was when I told it to try scanning at 4800 dpi. At
> normal settings (600 dpi and below), I suspect it'll scan all day.  It
> even completed a scan at 2400 dpi after a bit of a delay.
>
> I then put the patch back in (or, more precisely, didn't patch it
> out), recompiled, and tried again under the newer kernel.  It seems to
> be running about the same with the workaround as without: an "invalid
> argument" error at 4800 dpi, but it works at 2400 dpi and below.
>
> The patch doesn't appear to be making much of a difference one way or
> the other.  Instead, it would appear the kernel developers may have
> fixed whatever was broken with USB 3.0 support somewhere between
> 4.1.12 and 4.3.3.
>
     Hello,

     before scanning, the scanner calibrates itself. The higher the
resolution, the longer the calibration takes. The calibration data is
then cached , and subsequent scans are faster. That explains the delay
you saw at 2400 dpi.
     For the 4800 dpi scan, what is the scan area used (width, height) ?

Regards,
     Stef


--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some weirdness with a Canon LiDE 220

Johannes Meixner
In reply to this post by Scott Alfter

Hello,

On Dec 16 12:45 Scott Alfter wrote (excerpt):

> ... lsusb -t shows the following for the home system:
>
> /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
> /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
> |__ Port 3: Dev 2, If 0, Class=Wireless, Driver=, 12M
> |__ Port 3: Dev 2, If 1, Class=Wireless, Driver=, 12M
> |__ Port 4: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 12M
> |__ Port 5: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
> |__ Port 9: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
> |__ Port 13: Dev 6, If 0, Class=Video, Driver=, 480M
> |__ Port 13: Dev 6, If 1, Class=Video, Driver=, 480M
> |__ Port 13: Dev 6, If 2, Class=Audio, Driver=snd-usb-audio, 480M
> |__ Port 13: Dev 6, If 3, Class=Audio, Driver=snd-usb-audio, 480M
> /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
> |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
> /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
> |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
>
> At this time, it has a keyboard, mouse, webcam, Bluetooth dongle, and
> ANT+ dongle plugged in. I filled the "USB 2.0" (black) ports up before I
> started plugging things into USB 3.0 (blue) ports, yet it looks like
> everything's going through the xhci_hcd driver.

All the following devices (each with one or more interfaces)
are going through the xhci_hcd driver:

  /: Bus 03
  |__ Port 3: Dev 2
  |__ Port 4: Dev 3
  |__ Port 5: Dev 4
  |__ Port 9: Dev 5
  |__ Port 13: Dev 6

You did not tell what of those devices the scanner is.

I guess it is

  /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
  ...
  |__ Port 4: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 12M

Scanners usually belong to the generic "Vendor Specific Class"
because there is no specific USB device class "scanner".


Regarding "USB 2.0 (black) and USB 3.0 (blue)":

Neither the color nor what the port is labeled on the computer
is reliable regarding what kernel driver is used for the port.

Only the "lsusb -t" output shows what kernel driver is used.

For example all USB ports on my testing machine have same dark color.
Also the "super speed" (USB 3) labeled ports are basically black.
Their exact color is "very dark" but not "100% black"
and neither blue (USB 3.0) nor teal blue (USB 3.1), cf.
https://en.wikipedia.org/wiki/USB#Colors

On my testing machine xhci_hcd is used for all USB ports
where I can connect devices (i.e. all external USB ports).


Kind Regards
Johannes Meixner
--
SUSE LINUX GmbH - GF: Felix Imendoerffer, Jane Smithard,
Graham Norton - HRB 21284 (AG Nuernberg)


--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some weirdness with a Canon LiDE 220

Scott Alfter
On 12/17/2015 12:35 AM, Johannes Meixner wrote:
> On Dec 16 12:45 Scott Alfter wrote (excerpt):
>> ... lsusb -t shows the following for the home system:
>>
>> [snipped]
>
> You did not tell what of those devices the scanner is.

At the time I ran it, none of them were the scanner, as I had brought it
in to work with me.  Now that it's back home, it's listed as follows:

/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
[snipped]
    |__ Port 14: Dev 7, If 0, Class=Vendor Specific Class, Driver=, 480M

In any case, upgrading the kernel from 4.1.12 to 4.3.3 seems to have
fixed most of the problems I was having.

(Just got word back from eBay this morning that the order I put in
yesterday for a USB 2.0 controller had been canceled because the vendor
was out of stock.  It's just as well at this point, as it looks like it
would've been unnecessary.)

--
Scott Alfter
[hidden email]


--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]

signature.asc (662 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Some weirdness with a Canon LiDE 220

Scott Alfter
In reply to this post by stef-22
On 12/16/2015 9:20 PM, Stef wrote:

> On 17/12/2015 04:41, Scott Alfter wrote:
>> I then put the patch back in (or, more precisely, didn't patch it
>> out), recompiled, and tried again under the newer kernel.  It seems to
>> be running about the same with the workaround as without: an "invalid
>> argument" error at 4800 dpi, but it works at 2400 dpi and below.
>
>     before scanning, the scanner calibrates itself. The higher the
> resolution, the longer the calibration takes. The calibration data is
> then cached , and subsequent scans are faster. That explains the delay
> you saw at 2400 dpi.
>
>     For the 4800 dpi scan, what is the scan area used (width, height) ?
The first time, I think I tried a full-page scan (8.5x11").  I then cut
it back to 1x1" and still got an error.

This morning, I tried again with a smaller scan area.  It still errored
out at 0.1x0.1", but it worked at 0.05x0.05".  I then tried going back
to 0.1x0.1", but got an error again.

--
Scott Alfter
[hidden email]


--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]

signature.asc (662 bytes) Download Attachment
Loading...