I recently installed ubuntu 18.04. I installed the Seiko scanner program per their instructions. I checked it using terminal and the Bash command "lsusb" and the hardware detects the scanner. I use "Classic menu indicator" and it sees the scanner program; however, when I click on the program name, "image scan!for Linux" I get a message "could not send command to scanner. Check the scanners status". Does anyone have a solution for this problem?
Ubuntu – Ubuntu 18.04: scanner program does not detect scanner
scanner
Related Solutions
Your USB 2.0 device (in this case, scanner) has some compatibility problem interacting with your USB 3.0 system (either USB3 ports, or USB2 ports of a USB3 hub). The problem could be caused by the scanner hardware/firmware, PC EFI/BIOS firmware, PC USB chipset, or the Linux kernel xhci_hcd driver.
Possible solutions:
Use a short USB 2 extension cable (or just a USB2 cable) to connect the device. This forces the USB 3 port to use USB 2 signalling. A USB 3 device or cable has 9 pins, whereas a USB 2 device or cable only has 4 pins. A USB 3 port will default to USB 2 signaling communication when only 4 pins are connected. A USB 2 extension cable only caries 4 wires that connect the 4 pins of USB 2 only communications.
Use a cheap USB 1.1 (or 2.0) hub and connect it to the USB3 port. Connect your device to the USB 1.1/2.0 hub. This will force the connection to be USB1.1/2.0. Since the hub has a different USB controller, it will workaround some protocol bugs. A USB 1.1 hub is a good choice for a "low speed" device like a mouse, keyboard etc. A USB 2.0 hub may well be necessary for a "full speed" device like a scanner that won't downgrade to USB 1.1.
Upgrade your PC/laptop BIOS. Manufacturers can workaround many USB issues with fixes in the BIOS/EFI.
Connect the USB 2.0 device (scanner) via a USB 2.0 port if the laptop has one. This may make no difference if your USB2 ports are also controlled by the xhci_hcd driver (ie. you still see
new high-speed USB device number x using xhci_hcd
in dmesg), in which case try using an external USB2 hub.If this is a desktop or server rather than a laptop, try a different PCI USB controller card. Different USB3 cards have different XHCI host controller chips, so compatibility with different USB hubs/devices varies.
Upgrade the firmware of your USB 2.0 device. This is probably not possible for a consumer-level scanner, but is possible for some USB 2.0 devices (eg. Pro cameras)
Replace your USB 2.0 device (scanner) with a USB 3.0 compatible device
In the UEFI/BIOS change the setting under USB configuration, "XHCI Pre-Boot mode" from enabled to disabled. In some BIOS configurations this setting is known as "XHCI Mode".
USB 3.0 ports are controlled by the xhci_hcd driver in Linux. When "XHCI pre-boot mode" is enabled the BIOS will route the USB 3.0 ports to the USB3 xHCI controller. When it is disabled, the USB 3.0 ports are routed to the EHCI (USB 2.0) ports. The wording "pre-boot mode" implies that this option only affects the environment before a full operating system is booted (the associated BIOS help text explicitly mentions that this option is used for USB3 support in MSDOS); however, it seems this can also affect the post-boot environment, and can have the effect of connecting the USB 3.0 ports to the USB 2.0 controller even after Linux is loaded. The disadvantage of this is that all the USB 3 ports will now run at USB 2 speed.
Disable USB powersaving for all devices with the autosuspend kernel module option:
modprobe usbcore autosuspend=-1
Or if usbcore is not a module with this kernel boot parameter:
usbcore.autosuspend=-1
(in Ubuntu usbcore is builtin so use the kernel boot parameter)
Disable powersaving (USB autosuspend) for the scanner (from Documentation/usb/power-management.txt.
When you plug the scanner in check
dmesg|tail
and you will see something likeusb 3-3: Product: SCX-4200 Series
The number
3-3
represents the USB path of the device in the format bus-port.port.port. You will find the corresponding sysfs directory at /sys/bus/usb/devices/3-3. Write on to power/control here to disable autosuspend:echo on > /sys/bus/usb/devices/3-3/power/control
I found a word an affective workaround in the comments of the Ubuntu's sane-backends bug #1728012. I documented it as a comment on the bug report.
The problem seems to reside in missing symlinks to the epkowa (SEIKO EPSON) libraries in the /usr/lib/x86_64-linux-gnu/sane
(or, more generically, /usr/lib/$(uname -m)-linux-gnu/sane
) folder.
I thus did the following:
sudo ln -sfr /usr/lib/sane/libsane-epkowa* /usr/lib/x86_64-linux-gnu/sane
Removed the
usb 0x04b8 0x0137
entry I had added to/etc/sane.d/epkowa.conf
Added a
55-epson-libsane.rules
file to/etc/udev/rules.d/
with the following text:SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE=="0666" SUBSYSTEM=="usb_device", MODE=="0666" ATTRS{manufacturer}=="EPSON", DRIVERS=="usb", SUBSYSTEMS=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="*", MODE="0666" ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0137", MODE="0666", GROUP="scanner", ENV{libsane_matched}="yes"
Finally I unplugged / plugged my scanner and tried
scanimage -L
and got this encouraging answer:
device `epkowa:interpreter:003:011' is a Epson GT-S50 flatbed scanner
Then I started
iscan
(Image Scan!) and it immediately detected my scanner. I then could successfully scan a page. Yipee! :-)
UPDATE: (Ubuntu 20.04)
I suddenly got the issue back after upgrading to Ubuntu 20.04.
I searched quite a bit because nothing seemingly changed in my config... and all of a sudden I noticed that somehow my /etc/sane.d/epkowa.conf
file's permissions had been altered and that the file was only readable for root !
After changing it back to "world" readable (chmod +r /etc/sane.d/epkowa.conf
) everything went back to normal and both iscan and scanimage would again be able to detect the scanner properly without having to be invoked using "sudo".
Best Answer
Add a link & a file
The problem stems from missing symbolic links in the
/usr/lib/x86_64-linux-gnu/sane
(or, more generically,/usr/lib/$(uname -m)-linux-gnu/sane
) to the Epson driver directory.Furthermore, a
55-epson-libsane.rules
file needs to be added to the/etc/udev/rules.d/
directory with the following contents:After power cycling the scanner, the following command should now properly list the connected scanner:
Use
xsane
or the proprietary Epsoniscan
to operate the scanner.