Re: USB device reset while printing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 14 Mar 2012, Wolfgang Rosenauer wrote:

> Am 14.03.2012 20:04, schrieb Alan Stern:
> > Let's start by getting more data about the problem.  I'd like you to 
> > collect a usbmon trace showing what happens when you try to print a 
> > two-page document.  (Instructions for usbmon are in the kernel source 
> > file Documentation/usb/usbmon.txt.)  Make the document itself extremely 
> > simple, like just a single line of text on each page.
> 
> Unfortunately extremely simple pages do not trigger the issue apparently.
> Therefore I used the same testcase I always used during the past days
> and made sure that I try to print exactly the same PDF in both cases.
> usbmon output attached. Please let me know if that format is not what
> you need.
> 
> > In fact, do this twice, once under 3.1 and once under 3.0, so we can
> > compare the results.
> 
> usbmon.out.ok.gz - 3.0.23
> usbmon.out.failed.gz - 3.1.9
> 
> > Also, please include either the "lsusb -v" output for the printer or
> > else the printer's section in /sys/kernel/debug/usb/devices.
> 
> attached.

Okay, I see what the problem is.  Your printer has a mass-storage 
interface -- a card reader or something of the sort, right?

Starting in 3.1 the kernel continually polls this mass-storage
interface, looking for media-change events (such as insertion of a
memory card).  Right at the time you began printing, the mass-storage
interface stopped responding to these polls.  After 30 seconds the
computer realized something was wrong, so it reset the printer.  This
reset interfered with the printing, so the second page never got
completed.

If you don't care about that card reader or whatever it is, you can 
prevent the kernel from polling it.  The command to use is:

	echo 0 >/sys/block/sdX/events_poll_msecs

where the X has to be filled in with the appropriate drive letter.  
You can see what the drive letter is by looking in the system log for
the time when the printer was plugged in or turned on.

With a little effort you could even write a udev rule that would do 
this for you automatically every time the printer is connected.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux