Public
1 - Resolved
3 - Moderate, e.g. unable to compile the software
1 - Specific to a machine/printer
Some USB printers do not like set_configuration and set_interface.
1.5-current
Henry Wong
Michael Sweet
1.6-current (SVN: r10196)

Discussion

Login to Post

Oct 21, 2011 by Henry Wong :
Attached file: cups-1.6-r10087-usb-skip-interface-altsetting.patch

Oct 21, 2011 by Henry Wong :
See http://blog.stuffedcow.net/2011/10/samsung-linux-cups-usb-printing/

Some printers (e.g., Samsung ML-2010, Samsung ML-1740) don't tolerate being sent a SET_CONFIGURATION or SET_INTERFACE request after the printer has already been configured. Sending these extra requests are legal under the USB spec, but it causes my printer to often ignore subsequent print jobs after the first one. These problems did not occur using usblp.

The libusb backend sends SET_CONFIGURATION and SET_INTERFACE requests before every print job. Under usblp, these are not (verified by capturing a USB trace).

This patch first makes the libusb backend first query whether sending SET_CONFIGURATION and SET_INTERFACE are necessary before sending them, bringing the behaviour closer to usblp. It also fixes the problems with my Samsung printers.

With this patch, the only remaining difference between usblp and libusb is that a GET_CONFIGURATION request is sent before each print job, whereas usblp assumes without verification that the printer is already using the correct configuration. The GET_CONFIGURATION request was added by this patch because I wasn't comfortable with blindly assuming the currently-selected configuration is correct.

This problem is probably related to STR #3964, and may also fix that issue, without needing to do an intrusive USB reset.

Nov 11, 2011 by Till Kamppeter:
I have applied this patch and the patch of STR #3978 to the package in Ubuntu Oneiric now and asked the people suffering the following Ubuntu bugs for testing:

https://bugs.launchpad.net/ubuntu/+source/cups/+bug/887094
  usb printer backend crashes

https://bugs.launchpad.net/ubuntu/+source/cups/+bug/872483
  laser printer only prints first job correct

https://bugs.launchpad.net/ubuntu/+source/cups/+bug/883169
  Brother MFC-8840D usb printer not detected

https://bugs.launchpad.net/ubuntu/+source/cups/+bug/793244
  After suspend/hibernate usb printer backend repeatedly crashes

https://bugs.launchpad.net/ubuntu/+source/cups/+bug/564917
  Ubuntu 10.04 does not recognize local printer connected via
  USB/parallel adapter cable

For the first three I got answers and they are definitely fixed by the two patches. On the other two I am still waiting for an answer but they are most probably also fixed.

Together with the USB fix on the Linux kernel (STR #3884) it looks like that all known problems of libusb-based USB printing (after deprecation of the "usblp" kernel module) are solved together with these two patches on the libusb-based "usb" CUPS backend. So I highly recommend the inclusion of the two patches in the upstream repository of CUPS, for both CUPS 1.5.x and 1.6.x.

Dec 14, 2011 by Michael Sweet:
This should be applied to CUPS 1.5.

Jan 27, 2012 by Michael Sweet:
Attached file: str3965+3978.patch

Jan 27, 2012 by Michael Sweet:
Fixed in Subversion repository.

Login to Post