Scanner not detected

I have a Canon N676U scanner that I can’t get to work. Skanlite says sorry no devices found. XSane says no devices available. I ran sane-find-scanner and it says “found USB scanner (vendor=0x04a9 [Canon], product=0x220d [CanoScan]) at libusb:003:009”. When I go into setup scanner in YaST it has two entries:


Driver          Scanner
Not Configured: Canon CanoScan USB scanner (vendor=0x04a9 [Canon], product=0x220d [CanoScan]) at libusb:003:009
plustek         No scanner recognized by this driver

The plustek driver is uncommented in the dll.conf file. I edited the plustek.conf file and added


[usb] 0x04a9 0x220d
device libusb:003:009

I also tried in the plustek.conf file


[usb] 0x04a9 0x220d
device auto

I went through all the steps in YaST scanner section but can’t configure the scanner. Anything else I can try?

Some more debug information would be useful.

  1. Run
dmesg --follow

then plug in the scanner and capture the output.

  1. Run
SANE_DEBUG_PLUSTEK=128 SANE_DEBUG_DLL=128 SANE_DEBUG_USB=128 scanimage -L

*The output may be lengthy, so consider uploading this to https://paste.opensuse.org/ and post the URL that it provides here for others to review.

Output from dmesg:


[143035.691299] usb 3-13: new full-speed USB device number 11 using xhci_hcd
[143035.899458] usb 3-13: string descriptor 0 read error: -22
[143035.899461] usb 3-13: New USB device found, idVendor=04a9, idProduct=220d
[143035.899461] usb 3-13: New USB device strings: Mfr=64, Product=77, SerialNumber=0

Link to output from scanimage: https://paste.opensuse.org/83079534

I’m not familiar with this model, and I assuming that it’s old based on the fact that it reports itself as a ‘full speed’ (USB 1.0?) device. In Linux at least old scanner hardware seems to have compatibility issues with XHCI (USB 3.0) controllers. This may well be the cause of your problem here. Does your machine also have USB 2.0 ports available to test with?

Let’s take a look at the USB controller details…

/sbin/lspci -nnk |awk '/USB/' RS="

"

BTW, there was a recent thread about a scanner issue (albeit different make/model) where it was found that the host controller was impacting. There are steps described there (for Intel host controller hardware at least) that can be taken to configure a given port to fall back to USB 2.0 (EHCI host controller).

It is indeed very old, probably around 15 years. I’ve never gotten it to work with this computer, and when I tried it before I think something indicated that it might be a USB problem. I think the blue USB ports are 3.0 and the black are 2.0. I plugged it into a black one. Here’s the output from lspci:


00:00.0 Host bridge [0600]: Intel Corporation 4th Gen Core Processor DRAM Controller [8086:0c00] (rev 06)
        Subsystem: ASRock Incorporation Device [1849:0c00]
        Kernel driver in use: hsw_uncore
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller [8086:0c01] (rev 06)
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06)
        Subsystem: ASRock Incorporation Device [1849:0412]
        Kernel driver in use: i915
        Kernel modules: i915
00:03.0 Audio device [0403]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06)
        Subsystem: ASRock Incorporation Device [1849:0c0c]
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
00:14.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB xHCI Controller [8086:8cb1]
        Subsystem: ASRock Incorporation Device [1849:8cb1]
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci
00:16.0 Communication controller [0780]: Intel Corporation 9 Series Chipset Family ME Interface #1 [8086:8cba]
        Subsystem: ASRock Incorporation Device [1849:8cba]
        Kernel driver in use: mei_me
        Kernel modules: mei_me
00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I218-V [8086:15a1]
        Subsystem: ASRock Incorporation Device [1849:15a1]
        Kernel driver in use: e1000e
        Kernel modules: e1000e
00:1a.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2 [8086:8cad]
        Subsystem: ASRock Incorporation Device [1849:8cad]
        Kernel driver in use: ehci-pci
        Kernel modules: ehci_pci
00:1b.0 Audio device [0403]: Intel Corporation 9 Series Chipset Family HD Audio Controller [8086:8ca0]
        Subsystem: ASRock Incorporation Device [1849:1151]
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
00:1c.0 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 1 [8086:8c90] (rev d0)
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:1c.2 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 3 [8086:8c94] (rev d0)
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:1c.3 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 4 [8086:8c96] (rev d0)
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:1d.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1 [8086:8ca6]
        Subsystem: ASRock Incorporation Device [1849:8ca6]
        Kernel driver in use: ehci-pci
        Kernel modules: ehci_pci
00:1f.0 ISA bridge [0601]: Intel Corporation 9 Series Chipset Family Z97 LPC Controller [8086:8cc4]
        Subsystem: ASRock Incorporation Device [1849:8cc4]
        Kernel driver in use: lpc_ich
        Kernel modules: lpc_ich
00:1f.2 RAID bus controller [0104]: Intel Corporation SATA Controller [RAID mode] [8086:2822]
        Subsystem: ASRock Incorporation Device [1849:2822]
        Kernel driver in use: ahci
        Kernel modules: ahci
00:1f.3 SMBus [0c05]: Intel Corporation 9 Series Chipset Family SMBus Controller [8086:8ca2]
        Subsystem: ASRock Incorporation Device [1849:8ca2]
        Kernel driver in use: i801_smbus
        Kernel modules: i2c_i801
01:00.0 PCI bridge [0604]: PLX Technology, Inc. PEX 8747 48-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch [10b5:8747] (rev ca)
        Kernel driver in use: pcieport
        Kernel modules: shpchp
02:08.0 PCI bridge [0604]: PLX Technology, Inc. PEX 8747 48-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch [10b5:8747] (rev ca)
        Kernel driver in use: pcieport
        Kernel modules: shpchp
02:10.0 PCI bridge [0604]: PLX Technology, Inc. PEX 8747 48-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch [10b5:8747] (rev ca)
        Kernel driver in use: pcieport
        Kernel modules: shpchp
06:00.0 PCI bridge [0604]: ASMedia Technology Inc. Device [1b21:1184]
        Kernel driver in use: pcieport
        Kernel modules: shpchp
07:01.0 PCI bridge [0604]: ASMedia Technology Inc. Device [1b21:1184]
        Kernel driver in use: pcieport
        Kernel modules: shpchp
07:03.0 PCI bridge [0604]: ASMedia Technology Inc. Device [1b21:1184]
        Kernel driver in use: pcieport
        Kernel modules: shpchp
07:05.0 PCI bridge [0604]: ASMedia Technology Inc. Device [1b21:1184]
        Kernel driver in use: pcieport
        Kernel modules: shpchp
07:07.0 PCI bridge [0604]: ASMedia Technology Inc. Device [1b21:1184]
        Kernel driver in use: pcieport
        Kernel modules: shpchp
09:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 02)
        Subsystem: ASRock Incorporation Motherboard [1849:0612]
        Kernel driver in use: ahci
        Kernel modules: ahci
0b:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 02)
        Subsystem: ASRock Incorporation Motherboard [1849:0612]
        Kernel driver in use: ahci
        Kernel modules: ahci
0c:00.0 Ethernet controller [0200]: Intel Corporation I211 Gigabit Network Connection [8086:1539] (rev 03)
        Subsystem: ASRock Incorporation Device [1849:1539]
        Kernel driver in use: igb
        Kernel modules: igb

So you have a mixture of XHCI and EHCI controllers present, but when you plugged in your scanner and captured the kernel output earlier, this was reported

new full-speed USB device number 11 using xhci_hcd

…and that could be problematic.

Have you tried the other USB ports? I would recommend leaving ‘dmesg -follow’ running in a terminal while you compare the messaging with attaching to different ports. Specifically we want to see something like this

new full-speed USB device number 15 using ehci_pci

If not, it might be that we need to force a particular port to EHCI mode as hinted at in my initial reply.

I tried plugging the scanner into every USB port on the computer and all say “using xhci_hcd” even the ones that are supposedly USB 2.0. I would like to set just one port to EHCI rather than downgrading them all to USB 2.0. I looked at the thread you referenced and found some links to some instructions involving using setpci. I don’t yet know how to determine the specific parameters for my system.

Yes, sometimes it’s not clear as to which physical ports are connected to a particular controller. I assume all the ports that you tried pertain to this controller

00:14.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB xHCI Controller [8086:8cb1]
        Subsystem: ASRock Incorporation Device [1849:8cb1]
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci

I would like to set just one port to EHCI rather than downgrading them all to USB 2.0.

Yes, I can understand that. :slight_smile:

I looked at the thread you referenced and found some links to some instructions involving using setpci. I don’t yet know how to determine the specific parameters for my system.

  1. Start the ball rolling by checking the value returned by the following
sudo setpci -H1 -s 00:14.0 d0.L

Report back with that.

  1. The next step is to find out which bit pertains to the chosen USB port that you wish to configure in EHCI mode. If you’re familiar with binary/hex it’s not too difficult to start by setting half the bits to ‘0’ and leave the other half at ‘1’, then plug in the scanner while watching the dmesg output. For example…
sudo setpci -H1 -s 00:14.0 d0.L=7f

I can guide you as you go along if necessary.

Deja vu, possibly, deano?

I can guide you as you go along if necessary

rotfl!

Hi 26hppuxtgnok

That’s my thread to which deano linked you. The method used was rather drawn out & initially confusing for me, but eventually resulted in a victory. I encourage you to give it a go.

So it would seem… now that you’re familiar with the tedious process you can take over if you like :stuck_out_tongue:

Eeeeek, aaaaaaaaarrrrghhhhhh. In the immortal words of Graham Chapman’s King Arthur in Monty Python & the Holy Grail, i shall now rapidly “Run awaaaaaaaaaaaaaaaaaay!”.


sudo setpci -H1 -s 00:14.0 d0.L
00003fff

sudo setpci -H1 -s 00:14.0 d0.L=7f
[173704.502633] usb 3-13: new full-speed USB device number 25 using xhci_hcd
[173704.710839] usb 3-13: string descriptor 0 read error: -22
[173704.710841] usb 3-13: New USB device found, idVendor=04a9, idProduct=220d
[173704.710842] usb 3-13: New USB device strings: Mfr=64, Product=77, SerialNumber=0

I’m wondering about the message “string descriptor 0 read error: -22”. Does that indicate a problem or should I disregard it?

I’m wondering about the message “string descriptor 0 read error: -22”. Does that indicate a problem or should I disregard it?

Yes, it does indicate a problem, and it’s why I suggested that it could be down to the incompatibility of some old scanner hardware with the XHCI driver. If we reconfigure the port its plugged in so that it functions as an EHCI host controller (and using the ehci_pci driver instead) that might help.


sudo setpci -H1 -s 00:14.0 d0.L
00003fff

Ok, so 14 bits to choose from. (Not all necessarily will pertain to a physical port of course.)

sudo setpci -H1 -s 00:14.0 d0.L=7f
[173704.502633] usb 3-13: new full-speed USB device number 25 using xhci_hcd
[173704.710839] usb 3-13: string descriptor 0 read error: -22
[173704.710841] usb 3-13: New USB device found, idVendor=04a9, idProduct=220d
[173704.710842] usb 3-13: New USB device strings: Mfr=64, Product=77, SerialNumber=0

Now, try setting the 7 most significant bits to zero…

sudo setpci -H1 -s 00:14.0 d0.L=380

then disconnect/reconnect the scanner again and observe dmesg output. This ‘should’ force EHCI mode.

Now, try setting the 7 most significant bits to zero…

sudo setpci -H1 -s 00:14.0 d0.L=380

Sorry that should have been 7 least significant bits.

I think I know where this is going because “binary search” was mentioned. On the port the scanner is connected to the mask 3FBF sets it to EHCI:


[188658.075569] usb 2-1.7: new full-speed USB device number 15 using ehci-pci
[188658.196029] usb 2-1.7: string descriptor 0 read error: -22
[188658.196032] usb 2-1.7: New USB device found, idVendor=04a9, idProduct=220d
[188658.196032] usb 2-1.7: New USB device strings: Mfr=64, Product=77, SerialNumber=0

So we want to set only one bit to zero, and leave the rest as one, and that makes only one USB port use EHCI?

YaST Scanner now shows:


hpaio   No scanner recognized by this driver
plustek Canon CanoScan N670U/N676U/LiDE20 at plustek:libusb:002:015

The scanner now works in Skanlite and XSane! Thank you so much! Although I don’t care much for these programs for document scanning. Wish I could find something very similar to Kodak Imaging that was in Windows.

Yes, that’s correct.

YaST Scanner now shows:

hpaio No scanner recognized by this driver
plustek Canon CanoScan N670U/N676U/LiDE20 at plustek:libusb:002:015

The scanner now works in Skanlite and XSane! Thank you so much! Although I don’t care much for these programs for document scanning.

Well done. Thanks for the update!

Wish I could find something very similar to Kodak Imaging that was in Windows.

I’m not familiar with that application at all. You can scan from within gimp AFAIU. Perhaps ‘simple-scan’ will be more to your liking?

BTW, once you have the appropriate value and want to make it persistent, don’t forget to add the ‘setpci’ entry to /etc/init.d/boot.local, so that it takes effect at boot.

Hello,

I noticed that you have “ASMedia Technology Inc. ASM1062 Serial ATA Controller” installed. Is it integrated in motherboard or an add-on card ? Have you been able to connect external SATA drives to it ? I have an external ASMedia 1062 based PCIe card with 4 eSATA ports and cannot see drives attached to it (though bios does detect them) …

Thank you.


Try Vuescan
https://www.hamrick.com/old-versions.html

You’re best advised to start a new thread than tagging on to a thread like this. If necessary, you could send a PM to attract the attention of the user that your question appears to be directed to.