USB Scanner disappears after some seconds of system runtime

Hello,

I have OpenSuSE Linux 13.1 running. Everything is fine except of one thing. My scanner is not recognized although it should be.I have a Dell 1815DN MFP printer and scanner attached through USB to the host. The printer is running the scanner is not. in /etc/sane.d/dll.conf I have enabled

xerox_mfp

. This includes support for the Dell scanner.

If I invoke

scanimage -L

just some seconds after the linux system has been freshly rebootet, the Dell scanner is shown. A couple of seconds later invoking the same command the scanner is not there anymore. Thus subsequent scan commands can not be executed.

Running

lsusb

shows the Dell scanner with the same ID as it is shown with

scanimage -L

. In

lsusb

the device is always there and does not disappear.

What is the reason that the scanner disappears. I can imagine that some processes running in the background during boot are finished only seconds later. That means that if I invoke

scanimage -L

for the first time really after fresh reboot the scanner shows there. If those background processes are done the the scanner is not there any more. This is just an ASSUMPTION. On the other hand I do not have special daemons running.

Can You please help me?

Thanks

honterus0

My suggestion is to open a terminal, and run

sudo tail -f /var/log/messages

Observe the output when you disconnect and reconnect the scanner USB plug. Maybe that will provide some clues about what it happening. (Copy/paste any relevant kernel output here if you need help interpreting it.)

Hello,

according to the proposal of deano_ferrari i deattached the USB cable of the MFP and some seconds later I attached the device again.

After deattaching it, I found this information in

/var/log/messages

015-01-17T14:54:33.633714+01:00 celeron kernel: [16992.190408] usb 1-2.3: USB disconnect, device number 6
2015-01-17T14:54:33.633746+01:00 celeron kernel: [16992.191094] usblp0: removed
2015-01-17T14:54:33.644521+01:00 celeron udev-configure-printer: remove /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.3
2015-01-17T14:54:33.650378+01:00 celeron udev-configure-printer: URI of detected printer: usb://Dell/Laser%20MFP%201815, normalized: dell laser mfp 1815
2015-01-17T14:54:33.651431+01:00 celeron udev-configure-printer: URI of print queue: usb://Dell/Laser%20MFP%201815, normalized: dell laser mfp 1815
2015-01-17T14:54:33.652509+01:00 celeron udev-configure-printer: Queue ipp://localhost:631/printers/delllasermfp1815 has matching device URI
2015-01-17T14:54:33.655707+01:00 celeron udev-configure-printer: Disabled printer ipp://localhost:631/printers/delllasermfp1815 as the corresponding device was unplugged or turned off
2015-01-17T14:54:33.657451+01:00 celeron systemd[4682]: Service printer.target is not needed anymore. Stopping.
2015-01-17T14:54:33.658483+01:00 celeron systemd[4682]: Stopping Printer.
2015-01-17T14:54:33.659514+01:00 celeron systemd[4082]: Service printer.target is not needed anymore. Stopping.
2015-01-17T14:54:33.660499+01:00 celeron systemd[4682]: Stopped target Printer.
2015-01-17T14:54:33.661396+01:00 celeron systemd[4082]: Stopping Printer.
2015-01-17T14:54:33.662261+01:00 celeron systemd[4082]: Stopped target Printer.
2015-01-17T14:54:33.663080+01:00 celeron systemd[1]: Service printer.target is not needed anymore. Stopping.
2015-01-17T14:54:33.663791+01:00 celeron systemd[1]: Stopping Printer.
2015-01-17T14:54:33.664529+01:00 celeron systemd[1]: Stopped target Printer.

After reattaching the MFP again I got this messages:


2015-01-17T14:54:47.807695+01:00 celeron kernel: [17006.365011] usb 1-2: reset high-speed USB device number 3 using xhci_hcd
2015-01-17T14:54:47.818733+01:00 celeron kernel: [17006.376239] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff880255bc79c0
2015-01-17T14:54:48.087752+01:00 celeron kernel: [17006.645357] usb 1-2.3: new high-speed USB device number 7 using xhci_hcd
2015-01-17T14:54:48.100740+01:00 celeron kernel: [17006.657630] usb 1-2.3: New USB device found, idVendor=413c, idProduct=5124
2015-01-17T14:54:48.100770+01:00 celeron kernel: [17006.657640] usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
2015-01-17T14:54:48.100775+01:00 celeron kernel: [17006.657646] usb 1-2.3: Product: DELL Laser MFP 1815
2015-01-17T14:54:48.100778+01:00 celeron kernel: [17006.657652] usb 1-2.3: Manufacturer: Dell
2015-01-17T14:54:48.100780+01:00 celeron kernel: [17006.657656] usb 1-2.3: SerialNumber: 2619D91.........
2015-01-17T14:54:48.100783+01:00 celeron kernel: [17006.658292] usb 1-2.3: ep 0x3 - rounding interval to 8 microframes, ep desc says 10 microframes
2015-01-17T14:54:48.100785+01:00 celeron kernel: [17006.658306] usb 1-2.3: ep 0x84 - rounding interval to 8 microframes, ep desc says 10 microframes
2015-01-17T14:54:48.100788+01:00 celeron kernel: [17006.658315] usb 1-2.3: ep 0x1 - rounding interval to 8 microframes, ep desc says 10 microframes
2015-01-17T14:54:48.100790+01:00 celeron kernel: [17006.658324] usb 1-2.3: ep 0x82 - rounding interval to 8 microframes, ep desc says 10 microframes
2015-01-17T14:54:48.101926+01:00 celeron kernel: [17006.659336] usb 1-2.3: ep 0x1 - rounding interval to 8 microframes, ep desc says 10 microframes
2015-01-17T14:54:48.101952+01:00 celeron kernel: [17006.659355] usb 1-2.3: ep 0x82 - rounding interval to 8 microframes, ep desc says 10 microframes
2015-01-17T14:54:48.103152+01:00 celeron kernel: [17006.660306] usblp 1-2.3:1.1: usblp0: USB Bidirectional printer dev 7 if 1 alt 0 proto 2 vid 0x413C pid 0x5124
2015-01-17T14:54:48.122352+01:00 celeron systemd[4682]: Starting Printer.
2015-01-17T14:54:48.123555+01:00 celeron systemd[4682]: Reached target Printer.
2015-01-17T14:54:48.124745+01:00 celeron systemd[4082]: Starting Printer.
2015-01-17T14:54:48.128579+01:00 celeron systemd[4082]: Reached target Printer.
2015-01-17T14:54:48.130995+01:00 celeron systemd[1]: Starting Printer.
2015-01-17T14:54:48.132135+01:00 celeron systemd[1]: Reached target Printer.
2015-01-17T14:54:48.133151+01:00 celeron systemd[1]: Starting Configure Plugged-In Printer...
2015-01-17T14:54:48.134019+01:00 celeron systemd[1]: Started Configure Plugged-In Printer.
2015-01-17T14:54:48.134993+01:00 celeron udev-configure-printer: add usb-001-007
2015-01-17T14:54:48.174026+01:00 celeron udev-configure-printer: device devpath is /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.3
2015-01-17T14:54:48.175046+01:00 celeron udev-configure-printer: MFG:Dell MDL:Laser MFP 1815 SERN:- serial:2619D91.........
2015-01-17T14:54:49.238381+01:00 celeron hp[7515]: io/hpmud/pp.c 627: unable to read device-id ret=-1
2015-01-17T14:54:49.396522+01:00 celeron python: io/hpmud/pp.c 627: unable to read device-id ret=-1
2015-01-17T14:54:49.420021+01:00 celeron udev-configure-printer: URI matches without serial number: usb://Dell/Laser%20MFP%201815
2015-01-17T14:54:49.420738+01:00 celeron udev-configure-printer: No serial number URI matches so using those without
2015-01-17T14:54:49.421323+01:00 celeron udev-configure-printer: URI of detected printer: usb://Dell/Laser%20MFP%201815, normalized: dell laser mfp 1815
2015-01-17T14:54:49.421942+01:00 celeron udev-configure-printer: URI of print queue: usb://Dell/Laser%20MFP%201815, normalized: dell laser mfp 1815
2015-01-17T14:54:49.423282+01:00 celeron udev-configure-printer: Queue ipp://localhost:631/printers/delllasermfp1815 has matching device URI
2015-01-17T14:54:49.424125+01:00 celeron udev-configure-printer: Re-enabled printer ipp://localhost:631/printers/delllasermfp1815

After attaching dhe device again I tried the command:


scanimage -L

to see, if the scanner is there. And yes it was there, I got


device `xerox_mfp:libusb:001:007' is a Dell Dell Laser MFP 1815 multi-function peripheral

Now trying to scan something was not working again because meanwhile (within seconds) the scanner disappeared agein. Invoking


scanimage -d xerox_mfp:libusb:001:007 > /tmp/image.prm

returned the error


scanimage: open of device xerox_mfp:libusb:001:007 failed: Invalid argument

Now, I checked if the scanner really disappeared and yes, unfortunatelly this was the case:
Running


scanimage -L

returned


No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

The output for all these actionfrom


var/log/messages

is here:


2015-01-17T15:01:09.879685+01:00 celeron kernel: [17388.436602] usb 1-2.3: usbfs: interface 1 claimed by usblp while 'scanimage' sets config #1
2015-01-17T15:01:28.952049+01:00 celeron kernel: [17407.509099] usb 1-2.3: usbfs: interface 1 claimed by usblp while 'scanimage' sets config #1
2015-01-17T15:01:36.767696+01:00 celeron kernel: [17415.324555] usb 1-2.3: usbfs: interface 1 claimed by usblp while 'scanimage' sets config #1

I can not find anything strange in the log file. On the other hand it still does not work. Dou You see something?

Thank You for suggestions

honterus0


2015-01-17T14:54:47.807695+01:00 celeron kernel: [17006.365011] usb 1-2: reset high-speed USB device number 3 using xhci_hcd
2015-01-17T14:54:47.818733+01:00 celeron kernel: [17006.376239] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff880255bc79c0
2015-01-17T14:54:48.087752+01:00 celeron kernel: [17006.645357] usb 1-2.3: new high-speed USB device number 7 using xhci_hcd
2015-01-17T14:54:48.100740+01:00 celeron kernel: [17006.657630] usb 1-2.3: New USB device found, idVendor=413c, idProduct=5124
2015-01-17T14:54:48.100770+01:00 celeron kernel: [17006.657640] usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
2015-01-17T14:54:48.100775+01:00 celeron kernel: [17006.657646] usb 1-2.3: Product: DELL Laser MFP 1815
2015-01-17T14:54:48.100778+01:00 celeron kernel: [17006.657652] usb 1-2.3: Manufacturer: Dell
2015-01-17T14:54:48.100780+01:00 celeron kernel: [17006.657656] usb 1-2.3: SerialNumber: 2619D91.........

I’m suspicious about the xhci_hcd (USB 3 kernel driver) behaviour here. There seem to be a large number posts/bugs reporting similar behaviour affecting some USB 2 hardware and USB 3 host chip-sets. One workaround is to try and force EHCI support by disabling XHCI support via the BIOS (providing such a setting exists).

FWIW, here are some examples I turned up from a quick search using ‘xhci scanner sane’ and similar
https://bugzilla.novell.com/show_bug.cgi?id=856794
https://bugs.launchpad.net/ubuntu/+source/xsane/+bug/1247371
http://askubuntu.com/questions/457901/usb-2-0-device-scanner-does-not-work-with-xhci-hcd-on-usb-3-0-system

Hello deano_ferrari,

Thank You for reply. I have an Asrock Q1900M mATX mainboard. This does not provide the EHCI vs. XHCI explicitly, but I tried all four available options regarding Intel USB 3. These are:

  • Aktiviert (Activated)
  • Deaktiviert (Deactivated)
  • Auto
  • Smart Auto (this is the default)

With the option “Deaktiviert (Deactivated)” I got an error loading the kernel and the system did not even boot till the shell login. All the other three did not make a visible effect on my problem. In all these cases the scanner still disapperead after some seconds.

Can I force the kernel to load only an EHCI module? Or is there any other chance to solve my issues?

Best regards

honterus0

Hello deano_ferrari,

do You think that an externel USB hub which is independent from the MB might help?

Best regards

honterus0

Connecting the scanner not directly to the PC but over the ATEN KVM switch did not change anything. I’m afraid that an external USB hub would also not help.

honterus0

Hello,

I’ve connected the scanner through USB2.0 to another PC with a different mainboard (ASUS with USB 2.0 and USB 3.0 connectors) and here the scanner is running fine. The other difference is that I’m running openSuSE 12.1 on this PC. The hardware for this PC is new but the installation is still old. (I only replaced the MB, maintaining the old set-up with 12.1). I saw that the 12.1 installation is also running the xhci module. So the questition is, is the problem related to the openSuSE version or to the two different mainboards?

There is another point. On the ASUS PC there is no printer driver for the Dell MFP installed. On the Asrock PC I have the USB printer driver installted. Could it be that the printer driver is making the mess with the scanner?

Best regards

honterus0

Can’t help too much but some USB 3 just don’t like openSUSE or at least the Linux kernel. If you have a usb2 port try that if not a usb2 hub might force it back to usb2

The only definitive way to tell would be to compare behaviour with same hardware (or vice versa), but different OS version really. It could be the chipset hardware, or a kernel regression.

There is another point. On the ASUS PC there is no printer driver for the Dell MFP installed. On the Asrock PC I have the USB printer driver installted. Could it be that the printer driver is making the mess with the scanner?

No, the printer driver is actually user-space driver, and only invoked when printing anyway.

I think you may find, (like others have reported), that if you attempted to scan after you have plugged in the scanner, it will work fine, but not when trying a subsequent scan.

I am not technically adept but want to add my experience.

There is an issue with USB 3.0 and specifically scanners. In simple terms the USB times out before the scanner can reply.

I understand this to be a kernel issue. Just where or how I am not sure.

It was fixed in 13.1 and had been working, at least for me in 13.2 until the most recent set of OpenSuSE updates came through today (Jan. 20, 2105).

The USB does pass through VirtualBox and as much as don’t want to use Windows I can at least scan and save the image.

I use a Fujitsu S1500 ScanSnap scanner with gscan2pdf in KDE.

There are postings in various sites discussing the kernel issue with USB and making adjustments for timing.

Hopefully there is someone more knowledgeable than I who can track this down.