067b:2305 Can only print once with USB to parallel adapter and HP 4L
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
cups (Ubuntu) |
Fix Released
|
High
|
Unassigned | |||
Precise |
Fix Released
|
High
|
Till Kamppeter | |||
libusb-1.0 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | |||
libusbx (Ubuntu) | ||||||
Precise |
Invalid
|
Undecided
|
Unassigned | |||
linux (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I have a HP LaserJet 4L and a USB to parallel adapter:
Bus 004 Device 002: ID 067b:2305 Prolific Technology, Inc. PL2305 Parallel Port
When I connect them to my Ubuntu computer it immediately detects the correct printer. I can print ONCE and then the printer will not respond to any more jobs until it has been power cycled.
[IMPACT]
Everyone who has connected a printer via the Prolific USB -> Parallel adaptor cannot print on this printer. This worked in Lucid, the previous LTS, so it is a regression, at least for LTS users.
The adaptor is very common, and as in the era of parallel port printers there were made very robust, indestructible printers for which one still gets toner, like many HP LaserJet models for example, users want to continue using them on modern computers which do not have parallel ports any more.
The libusb-based USB backend of CUPS was far from completely implemented. It lacked the ability to communicate uni-directionally with devices which are not able to communicate bi-directionally, refrain from re-attaching the usblp kernel module after printing for some devices, reset the printer after printing the job, ... In the proposed package these adaptations for devices with quirks are done in the USB backend.
[TESTCASE]
Unfortunately, for reproducing this bug one needs the actual hardware.
Connect a parallel printer via a Prolific USB -> Parallel adaptor to the USB port of the computer.
With Precise with all updates applied you can set up the printer and print one job. When printing the second job the printer hangs. You have to cancel the stuck job, turn off and turn on the printer again and then you can print another job, but again only one. So you have to power-cycle the printer after each job.
After installing the proposed package the problem should disappear or at least it should work much better. Right after installing the new package clear the queue and power-cycle the printer, to clean out any remainders of the old package. After that print several jobs. They should print. If the printer hangs, then only rarely.
[Regression Potential]
The patch looks perhaps more dramatic than it is. This is because several code sections are put into "if" blocks, indenting all the (unchanged) code lines. This especially happens because now we suppress using the back channel for selected printers (and also printers which claim to be uni-directional only).
The code was developed in several steps and uploaded step-by-step to my PPA. There the reporters of the bugs covered by this SRU and some additional bugs (bug 902535, bug 995111) tested it intensively. They did not hit any regressions compared to stock Precise or the first CUPS SRU.
The code is also applied to the CUPS package in Quantal and this also did not cause any regression bug report yet.
I have tested the code on four HP printers (HP LaserJet 3390, HP Color LaserJet CM3530 MFP, HP PhotoSmart C8100, HP PhotoSmart C5200, all on direct USB) and one Epson printer (Epson Stylus Photo 880, both direct USB and parallel with Prolific USB -> Parallel adaptor) and all work fine, no regressions.
After running one print job, dmesg and syslog start to fill up with with these messages:
Apr 23 20:23:34 al-desktop kernel: [185587.281864] usblp0: removed
Apr 23 20:23:44 al-desktop kernel: [185597.289520] usblp0: USB Bidirectional printer dev 2 if 0 alt 1 proto 2 vid 0x067B pid 0x2305
Apr 23 20:23:44 al-desktop udev-configure-
Apr 23 20:23:44 al-desktop udev-configure-
Apr 23 20:23:44 al-desktop udev-configure-
Apr 23 20:23:49 al-desktop kernel: [185602.453587] usblp0: removed
Apr 23 20:23:59 al-desktop kernel: [185612.461564] usblp0: USB Bidirectional printer dev 2 if 0 alt 1 proto 2 vid 0x067B pid 0x2305
Apr 23 20:23:59 al-desktop udev-configure-
Apr 23 20:23:59 al-desktop udev-configure-
The printer appears, persists for exactly 5 seconds, and then disconnects. After another 10 seconds it appears again. This continues until the printer is powercycled.
If I attempt to send a print job during the 5 second period which the printer is visible
it immediately disconnects.
This behaviour happens with the ljet4, lj4dith, and hpijs drivers.
Also please note that this is not a hardware compatibility issue. The same USB to parallel adapter works correctly when passed through to Windows running in VirtualBox
on the same computer - but only if the printer is not already in the error state.
Replugging just the USB adapter also does not clear the error.
The error can also be cleared by following this exact sequence:
1. Print something.
2. Print a second thing = nothing will happen immediately.
3. Boot up windows in virtualbox to claim the USB device - attempting to print anything in windows will not work, but is not necessary.
4. Shut down virtualbox.
5. The second print job you sent (step 2) will now print.
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: cups 1.5.2-9ubuntu1
ProcVersionSign
Uname: Linux 3.2.0-23-generic x86_64
NonfreeKernelMo
ApportVersion: 2.0.1-0ubuntu5
Architecture: amd64
Date: Mon Apr 23 20:26:35 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120328)
Lpstat:
device for HP-Deskjet-5100: smb://WORKGROUP
device for LaserJet-4L: usb://HP/
MachineType: System manufacturer System Product Name
Papersize: a4
PpdFiles:
HP-Deskjet-5100: HP Deskjet 5100, hpcups 3.12.2
LaserJet-4L: HP LaserJet 4l hpijs, 3.12.2
ProcEnviron:
LANGUAGE=en_GB:en
TERM=xterm
PATH=(custom, user)
LANG=en_GB.UTF-8
SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: cups
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 11/25/2009
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0704
dmi.board.
dmi.board.name: M4A79XTD EVO
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev X.0X
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.name: System Product Name
dmi.product.
dmi.sys.vendor: System manufacturer
description: | updated |
description: | updated |
Changed in cups (Ubuntu): | |
status: | Incomplete → Confirmed |
Changed in cups (Ubuntu Precise): | |
status: | Incomplete → Confirmed |
Changed in cups (Ubuntu): | |
status: | Confirmed → Incomplete |
Changed in cups (Ubuntu Precise): | |
status: | Confirmed → Incomplete |
Changed in cups (Ubuntu): | |
status: | Incomplete → Confirmed |
Changed in cups (Ubuntu Precise): | |
status: | Incomplete → Confirmed |
Changed in cups (Ubuntu): | |
status: | Confirmed → Incomplete |
Changed in cups (Ubuntu Precise): | |
status: | Confirmed → Incomplete |
Changed in cups (Ubuntu): | |
status: | Incomplete → Confirmed |
Changed in cups (Ubuntu Precise): | |
status: | Incomplete → Confirmed |
Changed in cups (Ubuntu Precise): | |
status: | Confirmed → Fix Released |
Changed in cups (Ubuntu Precise): | |
status: | Fix Released → Confirmed |
Changed in libusbx (Ubuntu Precise): | |
status: | New → Invalid |
Changed in libusb-1.0 (Ubuntu): | |
status: | New → Invalid |
Changed in linux (Ubuntu): | |
status: | New → Confirmed |
Changed in linux (Ubuntu Precise): | |
status: | New → Confirmed |
Changed in libusb-1.0 (Ubuntu Precise): | |
status: | New → Confirmed |
Changed in libusbx (Ubuntu): | |
status: | New → Confirmed |
description: | updated |
Changed in cups (Ubuntu): | |
status: | Triaged → Fix Released |
Changed in cups (Ubuntu Precise): | |
status: | Triaged → Fix Committed |
Changed in cups (Ubuntu): | |
status: | Fix Released → Fix Committed |
Changed in cups (Ubuntu Precise): | |
assignee: | nobody → Till Kamppeter (till-kamppeter) |
tags: | added: patch |
tags: | added: patch |
no longer affects: | linux (Ubuntu Precise) |
no longer affects: | libusb-1.0 (Ubuntu Precise) |
no longer affects: | libusbx (Ubuntu) |
Status changed to 'Confirmed' because the bug affects multiple users.