Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Some USB printers do not like set_configuration and set_interface. #3965
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.
CUPS.org User: 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:
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.