067b:2305 Can only print once with USB to parallel adapter and HP 4L

Bug #987485 reported by Alistair Buxton
66
This bug affects 11 people
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-printer: add /devices/pci0000:00/0000:00:12.1/usb4/4-1/4-1:1.0/usb/lp0
Apr 23 20:23:44 al-desktop udev-configure-printer: device devpath is /devices/pci0000:00/0000:00:12.1/usb4/4-1
Apr 23 20:23:44 al-desktop udev-configure-printer: Device already handled
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-printer: add /devices/pci0000:00/0000:00:12.1/usb4/4-1/4-1:1.0/usb/lp0
Apr 23 20:23:59 al-desktop udev-configure-printer: device devpath is /devices/pci0000:00/0000:00:12.1/usb4/4-1

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
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
Uname: Linux 3.2.0-23-generic x86_64
NonfreeKernelModules: nvidia
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/LAPTOP/Colour
 device for LaserJet-4L: usb://HP/LaserJet%204L
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=/boot/vmlinuz-3.2.0-23-generic root=UUID=52a203b1-3a2e-457f-bee8-6351a1c5421f ro quiet splash vt.handoff=7
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.asset.tag: To Be Filled By O.E.M.
dmi.board.name: M4A79XTD EVO
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev X.0X
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0704:bd11/25/2009:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnM4A79XTDEVO:rvrRevX.0X:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
description: updated
description: updated
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cups (Ubuntu):
status: New → Confirmed
Revision history for this message
Tomdkat (tomdkat) wrote :

I have a Brother HL-2040 Laser Printer with a USB to Parallel Port adapter and I have the same "print once" issue. This issue was first experienced with Ubuntu 11.10 and has carried over to 12.04. I *was* able to print multiple times to this printer with Ubuntu 11.04 and previous versions.

Revision history for this message
Tomdkat (tomdkat) wrote :

I'm also running the 64-bit version of Ubuntu 12.04.

Revision history for this message
vmagnin (vincent-magnin) wrote :

I have the same problem with:
- the same adapter: "Bus 003 Device 004: ID 067b:2305 Prolific Technology, Inc. PL2305 Parallel Port",
- a HP Laserjet 6P,
- since Ubuntu 11.10, and now under Ubuntu 12.04,
- with two PCs, one with Ubuntu 12.04 32 bits, the other with Ubuntu 12.04 64 bits.

Note that I also use an USB switch to select which PC can print.

To overcome the problem when the printer is blocked:
- I delete the printing job,
- I switch from PC1 to PC2, then again PC1,
- I print again the document.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Everyone with this problem, please follow the instructions of the sections "CUPS error_log" and "Capturing print job data" on https://wiki.ubuntu.com/DebuggingPrintingProblems. Thanks.

Changed in cups (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

In addition to following the instructions of my previous comment, doe the following tests:

1. Run the following commands:

cupsctl FileDevice=yes
lpadmin -p test -E -v file:/dev/usb/lp0 -P /etc/cups/ppd/<name of your original print queue>.ppd

Power-cycle your printer to reset the error from previous printing attempts and then print to the new "test" print queue. Are you able to print more than one job without power-cycling the printer now?

2. Another test is to blacklist the usblp kernel module. Run the command

sudo echo "blacklist usblp" > /etc/modprobe.d/blacklist-usblp.conf
sudo rmmod usblp

Now power-cycle the printer to clean any previous errors. Check whether the usblp module is staying away:

lsmod | grep usblp

Print several jobs (into your original print queue, "test" from (1) will not work during this test) and see whether they are printing correctly without need of power-cycling inbetween.

To restore your system after this test (and make "test" from (1) working again) run

sudo rm /etc/modprobe.d/blacklist-usblp.conf

and power-cycle your printer.

Please do both tests, also if printing already works correctly with the first test.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

test 1 results in correct printing

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

test 2 results in the usual single printout behaviour

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Changed in cups (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Please add my PPA to your system as described on

https://launchpad.net/~till-kamppeter/+archive/ppa

and update your system. This should give you an update of the CUPS packages. Please make sure you restore your system after test (2) of comment #7, power-cycle your printer and try to print through your original print queue. Are you able to print several jobs now?

If not, please supply an error_log again and do test (2) of comment #7 again. Does the test make it working? If not, supply also the error_log of this test.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

With ppa packages the printer still only works once.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

With ppa packages and blacklist usblp, the printer still only prints once.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Can you do the following tests

Power-cycle your printer. Print a job, trhe job could come out normally. Now run

sudo time /usr/lib/cups/backend/usb

If the command does nogt return immediately, wait, it can take around 20 sec.

Print another job. Does it come out?

Run

sudo time /usr/lib/cups/backend/usb

again.

Print a third job and run

sudo time /usr/lib/cups/backend/usb

again. Does the third job get printed?

Please post all screen output here and attach your error_log.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Can you , in addition, before each cvall of

sudo time /usr/lib/cups/backend/usb

call

lsusb

and also post this output? Thanks.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

running the command between each printout clears the error.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Alistair, do you mean that calling

sudo time /usr/lib/cups/backend/usb

after each job clears the error and allows printing another job?

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Alistair, can you do another test:

Power-cycle the printer and do print jobs. After each print job run ONLY

sudo time /usr/lib/cups/backend/usb

Can you keep printing without power-cycling the printer now?

Now power-cycle the printer and print several print jobs but run ONLY

time lsusb

after each job. Can you keep printing without further power-cycling?

In any case, please post the screen output and attach error_log. Do not compress any files which you attach.

Please do the second test also if you are able to keep on printing in the first test.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

> Power-cycle the printer and do print jobs. After each print job run ONLY
> sudo time /usr/lib/cups/backend/usb
> Can you keep printing without power-cycling the printer now?

No, this does not work any more.

> time lsusb
> after each job. Can you keep printing without further power-cycling?

No.

> In any case, please post the screen output and attach error_log. Do not compress any files which you attach.

Cannot attach uncompressed text file > 1mb to launchpad.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Can you now power-cycle the printer and do print jobs. After each print job run the two commands

lsusb
sudo time /usr/lib/cups/backend/usb

Can you keep printing without power-cycling the printer now?

Attach error_log if it does not work. Compress your error_log only if it is not accepted uncompressed.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Using the above method I was able to print 3 times before it stopped working.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I have uploaded a new CUPS version with additional fixes to my PPA (cups 1.5.2-9ubuntu1.1~ppa2). Please update your system with my PPA (comment #14) still active and then test again. Does this improve the situation or even solve the problem?

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

If the CUPS package from my PPA (see previous comment) does not solve the problem for you, try uninstalling system-config-printer-udev by entering the following command in a terminal window:

sudo dpkg -P --force-depends system-config-printer-udev

Then remove all jobs with

cancel -a

and turn off and turn on your printer. Now try to print. Does it work normally now? Can you print an arbitrary number of jobs?

If this still does not help, try uninstalling foo2zjs:

sudo dpkg -P --force-depends foo2zjs

Remove all jobs, turn off and turn on the printer again and try whether this helps.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Please remove the blacklisting by removing /etc/modprobe.d/blacklist-usblp.conf before doing the tests of comment #27.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Updating the PPA result: can only print once.

sudo dpkg -P --force-depends system-config-printer-udev ; cancel -a
result: can only print once

sudo dpkg -P --force-depends foo2zjs ; cancel -a
result:
dpkg: warning: there's no installed package matching foo2zjs

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

At 7:35 AM this morning the second print job printed, just slightly over 12 hours after i sent it. I'm not sure if that's a printer timeout or something in cups.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Sorry, the foo2zjs package got renamed. Do

sudo dpkg -P --force-depends printer-driver-foo2zjs

Do this test with the blacklisting removed, as described in comment #28.

Remove all jobs, turn off and turn on the printer again and try whether this helps.

Restore your system with

sudo apt-get install -f

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

I can still only print once.

However, I do now see an error about printing in the notifications.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I have uploaded a new CUPS version with additional fixes to my PPA (cups 1.5.2-9ubuntu1.1~ppa3). Please update your system with my PPA (comment #14) still active and then test again. Does this improve the situation or even solve the problem? Do not forget to remove the blacklisting of the usblp module and to turn off and turn on the printer.

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.8 KiB)

This bug was fixed in the package cups - 1.5.3-1

---------------
cups (1.5.3-1) unstable; urgency=low

  [ Till Kamppeter ]
  * New upstream release
     - Numerous fixes on IPP (LP: #945028, LP: #973270, LP: #990734,
       LP: #992468, LP: #992982, LP: #1000172, LP: #1000758)
     - USB backend based on the maintained libusb 1.0.x with support for
       bi-directional communication
     - Fixes on SNMP-based supply level reporting
     - PostScript prtinter auto-configuration reliable now
     - Several fixes on PostScript, SSL, authenticated printing, and
       networking issues
  * debian/patches/ipp-fixes-1.5.3.patch,
    debian/patches/fix-empty-translations.patch,
    debian/patches/ppd-cache-fix-crash.patch,
    debian/patches/commandtops-make-robust-against-broken-postscript.patch,
    debian/patches/cups-polld-reconnect.patch,
    debian/patches/usb-backend-libusb-1.0.patch,
    debian/patches/usb-backend-backchannel-support.patch: Removed patches which
    got included upstream.
  * debian/patches/fix-supply-level-computation-for-percent-supply-unit.patch,
    debian/patches/fix-supply-levels-for-enumerated-prtmarkersupplieslevel.patch,
    debian/patches/fix-status-reports-when-supply-levels-grow.patch,
    debian/patches/add-status-reports-for-full-waste-trays-and-cleaner-unit-eol.patch,
    debian/patches/match-marker-colorants-which-use-non-standard-string.patch,
    debian/patches/truncate-marker-supply-names-at-comma.patch: Removed supply
    level report fixes. This got solved differently upstream.
  * debian/patches/do-not-suppress-inputslot-setting-with-empty-ap-d-inputslot.patch:
    Removed, problem solved differently upstream.
  * debian/patches/cups-avahi.patch: Manually regenerated to adapt to upstream
    changes.
  * debian/patches/ppd-poll-with-client-conf.patch,
    debian/patches/colord-support.patch,
    debian/patches/airprint-support.patch,
    debian/patches/no-conffile-timestamp.patch,
    debian/patches/drop_unnecessary_dependencies.patch,
    debian/patches/read-embedded-options-from-incoming-postscript-and-add-to-ipp-attrs.patch,
    debian/patches/show-compile-command-lines.patch: Refreshed using quilt.
  * debian/patches/usb-backend-busy-loop-fix.patch: Correct loops to repeat
    claiming interfaces on USB devices when they are busy. Before, hitting busy
    state made the device opening function error out without comment
    (LP: #987485).
  * debian/patches/usb-backend-detach-usblp-earlier-crash-guards.patch: Protect
    against crashes by checking error codes of libusb functions (LP: #997040)
    and detach usblp kernel module in an earlier stage when opening a device
    (LP: #987485, LP: #997040).
  * debian/patches/usb-backend-initialize-usblp-attached-state.patch: Initialize
    usblp_attached field in printer data structure to assure that detaching
    and re-attaching the usblp kernel module is always done correctly
    (LP: #902535, LP: #959676, LP: #960666, LP: #987485,
    LP: #995111, LP: #997040, LP: #1000253, LP: #1001028).
  * debian/patches/install-sh-remove-bashism.patch: Removed bashism.
  * debian/local/blacklist-cups-usblp.conf, debian/cups.postinst,
    debian/cups.install: Bla...

Read more...

Changed in cups (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

New CUPS package with the following (and some addtional) fixes uploaded to precise-proposed (proposed updates for 12.04 (Precise)):

 - Crash and busy loop fixes on the USB backend
 - "usblp" kernel module blacklisted again as it also causes problems with the new USB backend
 - Lots of fixes on the IPP backend and also on the IPP server part in the CUPS daemon
 - Other networking issues

These fixes should address most of the bugs reported shortly after the release of Precise, especially the problems with USB printing and network printing. As soon as the package is approved and made available for testing and additional comment with installation instructions will get posted here. Please test the new package then and report here whether this solves your problems. We will decide on the results whether the package will be made an official update for Precise.

Please remove/cancel all jobs and turn off and turn on your printer before testing.

debdiff attached.

Changed in cups (Ubuntu Precise):
status: New → Fix Committed
importance: Undecided → High
Changed in cups (Ubuntu):
importance: Undecided → High
Changed in cups (Ubuntu Precise):
milestone: none → precise-updates
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Alistair, or anyone else affected,

Accepted cups into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Alistair Buxton (a-j-buxton) wrote : Re: Can only print once with USB to parallel adapter and HP 4L

No difference. Can only print once.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

First, did you hace the same problem in 11.10 (Oneiric)?

Can you run the command

lsmod | grep usb

in a terminal window and post its output?

The change we have done in terms of USB is mainly blacklisting the "usblp" kernel module, as for many users their problems went away when they blacklisted the module. We have also fixed a crash and did some missing variable initializations in the new USB backend.

This is not necessarily a fix for your problem, but we have asked also you for testing as it was a candidate.

To the SRU team: This bug turns out as not covered by this SRU. Removing verification tag.

tags: removed: verification-needed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

When you are in the state of the first job having printed and the second job not coming out, can you post the output of the commands

ps auxwww | grep usb
lsmod | grep usb
lpstat -o

Changed in cups (Ubuntu Precise):
status: Fix Committed → Incomplete
Changed in cups (Ubuntu):
status: Fix Released → 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):
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
Brad Figg (brad-figg)
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
68 comments hidden view all 148 comments
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Daniel, Alistair, can you run the command

sudo chmod -x /lib/udev/udev-configure-printer

and after that do the tests again?

Revision history for this message
Sandra Grabhorn (smoltish) wrote :

Re-attaching error_log.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :
Download full text (3.2 KiB)

Unfortunately, Launchpad has a bug and therefore attchement links do not get added to the comments in this bug report. Here I add the links of the last postings manually (if a comment not mentioned here does not exist in this bug report, this comment was without text, only with the attachment):

comment #46: "error_log"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3163962/+files/error_log

comment #47: "error_log"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3165268/+files/error_log

comment #60: "error_log.gz"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3188272/+files/error_log.gz

comment #62: "syslog.1"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3189181/+files/syslog.1

comment #65: "syslog"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3190864/+files/syslog

comment #66: "error_log.gz"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3190865/+files/error_log.gz

comment #67: "syslog"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3190889/+files/syslog

comment #68: "error_log.gz"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3190890/+files/error_log.gz

comment #69: "syslog"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3190899/+files/syslog

comment #70: "error_log.gz"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3190900/+files/error_log.gz

comment #71: "syslog.gz"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3190923/+files/syslog.gz

comment #72: "error_log.gz"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3190924/+files/error_log.gz

comment #77: "error_log.gz"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3191050/+files/error_log.gz

comment #78: "syslog.gz"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3191051/+files/syslog.gz

comment #82: "log.txt"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3191148/+files/log.txt

comment #88: "error_log.1"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3191422/+files/error_log.1

comment #89: "error_log.2"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3191423/+files/error_log.2

comment #92: "error_log.gz"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3197073/+files/error_log.gz

comment #93: "syslog"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3197074/+files/syslog

comment #101: "cups-error_log.blacklisted-unidir"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3206219/+files/cups-error_log.blacklisted-unidir

comment #105: "cups-error_log.blacklisted-bidir"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3206221/+files/cups-error_log.blacklisted-bidir

comment #106: "error_log"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3206243/+files/error_log

comment #110: "error_log"
   https:/...

Read more...

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

It seems that we have at least partial success now, at least for some printers connected with the adapter: Both Sandra (HP LaserJet 5) and me (Epson Stylus Color 880) are able to print several jobs in a row. Only Daniel (Samsung ML-4500) has problems. It is possible that Daniel is suffering bug 997040 now. About Alistair (HP LaserJet 4L) we do not know, as he did not answer on the most recent test packages.

Alistair, can you please test the most recent package from my PPA (~ppa13)? Thanks.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

with ppa14, usblp blacklist, and no force unidirectional mode, I can print multiple documents.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Alistair, can you now test ~ppa14 without blacklisting the kernel module and turning off all special options. To do so, before starting the test run the commands

cancel -a
sudo chmod +x /lib/udev/udev-configure-printer
lpadmin -p <queue> -R usb-no-reattach
lpadmin -p <queue> -R usb-unidir
mv /etc/modprobe.d/blacklist-cups-usblp.conf ~
sudo rmmod usblp
sudo modprobe usblp

then turn off and turn on your printer. Does your printer now work without any problems?

If it does not work correctly under these conditions, run the above commands but with

sudo chmod -x /lib/udev/udev-configure-printer

instead of +x and then turn off and turn on your printer again. Does it work now?

Revision history for this message
Sandra Grabhorn (smoltish) wrote :

Running ~ppa14:

Reset all the options per instructions. Was only able to print one job, and the second one stalled.

Switched to -x instead of +x. This time was able to print two jobs, and the third one stalled.

error_log attached.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Launchpad does not add links to the attachments to the comments any more. Here is the attachment of the previous comment:

"error_log"
   https://bugs.launchpad.net/ubuntu/+source/cups/+bug/987485/+attachment/3208381/+files/error_log

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Note that for returning from the special debug modes (forced uni-directional, no re-attaching of the kernel module) you have to give the option names with "-default":

lpadmin -p <queue> -R usb-no-reattach-default
lpadmin -p <queue> -R usb-unidir-default

Please check whether the modes got actually reset looking for a line containing "Deleting <option>-default" in your error_log. After that do the tests again.

Sorry for the inconvenience.

Revision history for this message
Sandra Grabhorn (smoltish) wrote :

I attempted to run the commands you indicated:

grabhorn@Beefy:~$ lpadmin -p HP-LaserJet-5L -R usb-no-reattach-default
grabhorn@Beefy:~$ lpadmin -p HP-LaserJet-5L -R usb-unidir-default

Tested the printer after each command, and it still only prints one job, then freezes.

The error_log is attached; it seems to show that the commands succeeded.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Link to error_log of comment #118: https://launchpadlibrarian.net/109564565/error_log

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Sandra, can you turn off and turn on your printer and do

sudo chmod -x /lib/udev/udev-configure-printer
sudo rmmod usblp
sudo modprobe usblp

again and try printing again? Can you print more than one job now?

Revision history for this message
Sandra Grabhorn (smoltish) wrote :

No, still only prints one job. error_log attached.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Sandra, Alistair, please try cups 1.5.3-0ubuntu2~ppa15 from my PPA. Here the USB backend sends a reset command to the printer after completing a job. Perhaps this could prevent your printer from crashing after the first job.

Revision history for this message
Sandra Grabhorn (smoltish) wrote :

Surprising result:

The second job appears to have been sent to the printer, in that it disappears from the queue and the printer's data lights blink. However, the second job does not in fact print. However, if I press the button on the printer, it then prints the second job.

error_log attached.

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.4 KiB)

This bug was fixed in the package cups - 1.5.3-3

---------------
cups (1.5.3-3) experimental; urgency=low

  * debian/patches/usb-backend-further-enhancements.patch: Added latest
    development work on the libusb-based USB backend:
     - Support for uni-directional devices, both protocol-1 devices and
       devices where no read endpoint is found.
     - Soft reset specific to the "PRINTER" device class. This allows a
       reset without reconnecting.
     - When closing the device, it will also get reset to its original
       configuration, before re-attaching the usblp kernel module. Do not
       restore the configuration setting when the old configuration was zero,
       as zero means "unconfigured".
     - Added option "usb-unidir" to force the backend into uni-directional
       mode. This allows to work around problems with bi-di communications,
       especially also a delay at the end of the job caused by closing the
       read channel (happens only for some devices, LP: #1001028). Also
       useful for debugging.
     - Added the quirk management of the usblp kernel module. So the problems
       of all printers which were worked around in the kernel module are
       also worked around in the libusb-based CUPS backend now (LP: #1000253).
     - Added new quirk type to quirk manager: Printers for which the usblp
       kernel module should not get reattached after printing a job
       (LP: #1000253, perhaps also LP: #995111).
     - Added additional quirks for the Prolific Technology USB -> Parallel
       adapter, as the adapter needs uni-directional mode to be forced and
       also does not like re-attaching the usblp kernel module after the
       job (last third of last page gets cut off, re-attaching probably
       sends a reset to the printer while there is still data to be printed
       in the printer's internal buffer (LP: #987485).
     - Added the command line option "usb-no-reattach". With the option set
       the usblp kernel module does not get reattached after a job has been
       printed. Some printers cut off the end of the job or even crash by
       re-attaching the module. This is a development/debug mode to test
       whether re-attaching was the culprit of a problem. Users should
       report such issues so that their printers can get added to the quirk
       list.
     - Some extra debug messages.
     - Added a missing libusb_free_config_descriptor().
    This patch is submitted upstream as CUPS STR #4128.
  * debian/patches/add-ipp-backend-of-cups-1.4.patch, debian/cups.config,
    debian/cups.lintian-overrides, debian/cups.postinst, debian/cups.prerm,
    debian/cups.templates: Add the IPP backend of CUPS 1.4.x to the current
    CUPS package as independent backend "ipp14". Some devices (like the
    LiveBox 2) do not work with the current IPP backend (LP: #945028,
    LP: #973270, LP: #990734, LP: #992468, LP: #992982).
  * debian/patches/ipp-backend-cups-1.5.4-fixes.patch: Backported latest
    fixes on the IPP backend from upstream.
  * debian/local/blacklist-cups-usblp.conf, debian/cups.postinst,
    debian/cups.install, debian/cups.preinst, debian/cups.postinst,
    debian/cups.postrm:...

Read more...

Changed in cups (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Sandra, do not get irritated by the "Fix Released" message for Quantal, please carry on testing.

Perhaps you should also do a test in a Quantal live system, simply leaving all in default settings, let the printer getting auto-set-up and see how well it performs. The Quantal system has also a newer Plug'n'Print UDEV module which is less invasive.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Sandra, if a job hangs in the printer again, can you try to simply send the next job without pressing the button on the printer? Does the hanging job come out right before the new job?

Revision history for this message
Sandra Grabhorn (smoltish) wrote :

Cannot reproduce the error. It may have been fixed:

Since the printer has no power switch, I have been just unplugging the USB cable to reset it. When I went to test this morning, the printer spit out a page of PJL codes prior to the first print job. Since I hadn't seen that before, I thought it best to fully reset the printer and start over, so I unplugged the power and USB cables.

After plugging both back in, I have been able to print multiple jobs consecutively without further resetting the printer and without any jobs hanging.

I've attached the error_log from force of habit, though I don't think there were any errors after the printer was properly reset.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :
Changed in cups (Ubuntu Precise):
status: Confirmed → Triaged
milestone: precise-updates → ubuntu-12.04.1
Changed in cups (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Sandra, great news! I will update the CUPS package of Quantal to the state of ~ppa15 now and then prepare a Stable Release Update (SRU) for Precise. Please stay tuned as we need your feedback on testing the package proposed as the official update. This is required for getting an update official.

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
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Uploaded proposed fix for Precise to the precise-proposed package repository. As soon as it gets approved we will post another comment here with instructions how to install and test it. Please test it that as your feedbvack here is required for making the package an official update.

For the SRU team: debdiff attached to bug 945028: https://bugs.launchpad.net/ubuntu/+source/cups/+bug/945028/+attachment/3219011/+files/cups_1.5.3-0ubuntu1_1.5.3-0ubuntu2.debdiff

SRU is for bug 945028, bug 973270, bug 987485, bug 997040, bug 1000253, and bug 1001028.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups - 1.5.3-4

---------------
cups (1.5.3-4) experimental; urgency=low

  [ Till Kamppeter ]
  * debian/patches/usb-backend-further-enhancements.patch: USB backend: Do
    a printer reset after each job, this makes the Prolific USB -> Parallel
    adapter finally work (LP: #987485) and makes it unnecessary to blacklist
    the usblp kernel module for some printers (LP: #997040).

  [ Martin Pitt ]
  * debian/control: Have cups strictly depend on the same binary version of
    libcups2, to avoid crashes when later libcups2 versions remove private
    symbols. (Closes: #668662)
  * Add snmp-dont-stop-without-ipv6.patch: snmp: do not die if there is no
    IPv6 support available. Patch backported from upstream trunk, thanks to
    Pino Toscano! (first half of #680604)
  * tests-ignore-warnings.patch: Also ignore avahi failure -1, to fix FTBFS on
    hurd due to D-BUS problems. Thanks Pino Toscano! (Closes: #680604)
 -- Martin Pitt <email address hidden> Wed, 11 Jul 2012 08:57:53 +0200

Changed in cups (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Lucy Llewellyn (lucyllewy) wrote :

ok, with PPA15 my results are the same usb transaction timeouts.

two attachments:

cups-error_log.default (this post): stock as installed from apt
cups-error_log.lib.udev.udev-configure-printer.chmod-x: /lib/udev/udev-configure-printer set -x permission; reloaded usblp module

Revision history for this message
Lucy Llewellyn (lucyllewy) wrote :

cups-error_log.udev-configure-printer.chmod-x

Revision history for this message
Lucy Llewellyn (lucyllewy) wrote :
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Daniel, are you able to print the first job after turning on the printer (as it happens to the original poster of this bug report)? Or does the first job already behave as in your attached error_log files?

The job's behaviour in the two error_log files seems to be exactly the same, so it looks like that the activating or deactivating /lib/udev/udev-configure-printer has no influence for you.

Revision history for this message
Lucy Llewellyn (lucyllewy) wrote :

Till, no, I am unable to get any printout whatsoever. The first job behaves exactly like the subsequent ones with usb timeouts.

Changed in cups (Ubuntu Precise):
assignee: nobody → Till Kamppeter (till-kamppeter)
Revision history for this message
Stéphane Graber (stgraber) wrote :

Please use "In progress" instead of "Fix commited" as the status for bugs that have a fix in the queue but not yet accepted to -proposed, otherwise it's making our reports quite confusing...
The SRU script will automatically changed it to "Fix commited" when it lands in -proposed and then "Fix released" when it lands in -updates.

Thanks

Changed in cups (Ubuntu Precise):
status: Fix Committed → In Progress
Revision history for this message
Clint Byrum (clint-fewbar) wrote : Please test proposed package

Hello Alistair, or anyone else affected,

Accepted cups into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/cups/1.5.3-0ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cups (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
vmagnin (vincent-magnin) wrote : Re: Can only print once with USB to parallel adapter and HP 4L

I have just upgraded with cups/1.5.3-0ubuntu2 on two PCs under ubuntu 12.04: I can now print several documents without problem. Thank you for your perseverance.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Vincent, thank you for testing, marking fix as verified.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Sandra Grabhorn (smoltish) wrote :

Installed proposed version. Restarted printer & unplugged/replugged USB cable.
Successfully printed 3 jobs in a row. Fix confirmed.

Revision history for this message
Clint Byrum (clint-fewbar) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote : Re: Can only print once with USB to parallel adapter and HP 4L
Download full text (3.7 KiB)

This bug was fixed in the package cups - 1.5.3-0ubuntu2

---------------
cups (1.5.3-0ubuntu2) precise-proposed; urgency=low

  * debian/patches/usb-backend-further-enhancements.patch: Added latest
    development work on the libusb-based USB backend:
     - Support for uni-directional devices, both protocol-1 devices and
       devices where no read endpoint is found (LP: #1000253, LP: #1001028).
     - Soft reset specific to the "PRINTER" device class. This allows a
       reset without reconnecting.
     - When closing the device, it will also get reset to its original
       configuration, before re-attaching the usblp kernel module. Do not
       restore the configuration setting when the old configuration was zero,
       as zero means "unconfigured".
     - Added option "usb-unidir" to force the backend into uni-directional
       mode. This allows to work around problems with bi-di communications,
       especially also a delay at the end of the job caused by closing the
       read channel (happens only for some devices, LP: #1001028). Also
       useful for debugging.
     - Added the quirk management of the usblp kernel module. So the problems
       of all printers which were worked around in the kernel module are
       also worked around in the libusb-based CUPS backend now (LP: #1000253).
     - Added new quirk type to quirk manager: Printers for which the usblp
       kernel module should not get reattached after printing a job
       (LP: #1000253).
     - Added additional quirks for the Prolific Technology USB -> Parallel
       adapter, as the adapter needs uni-directional mode to be forced and
       also does not like re-attaching the usblp kernel module after the
       job (last third of last page gets cut off, re-attaching probably
       sends a reset to the printer while there is still data to be printed
       in the printer's internal buffer, LP: #987485).
     - Added the command line option "usb-no-reattach". With the option set
       the usblp kernel module does not get reattached after a job has been
       printed. Some printers cut off the end of the job or even crash by
       re-attaching the module. This is a development/debug mode to test
       whether re-attaching was the culprit of a problem. Users should
       report such issues so that their printers can get added to the quirk
       list.
     - Do a printer reset after each job, this makes the Prolific USB ->
       Parallel adapter finally work (LP: #987485) and makes it unnecessary
       to blacklist the usblp kernel module for some printers (LP: #997040).
     - Some extra debug messages.
     - Added a missing libusb_free_config_descriptor().
    This patch is submitted upstream as CUPS STR #4128.
  * debian/patches/add-ipp-backend-of-cups-1.4.patch, debian/cups.config,
    debian/cups.lintian-overrides, debian/cups.postinst, debian/cups.prerm,
    debian/cups.templates: Add the IPP backend of CUPS 1.4.x to the current
    CUPS package as independent backend "ipp14". Some devices (like the
    LiveBox 2 and some Samsung printers) do not work with the current IPP
    backend (LP: #945028, LP: #973270).
  * debian/local/blacklist-cups-usblp.co...

Read more...

Changed in cups (Ubuntu Precise):
status: Fix Committed → Fix Released
tags: added: patch
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Removing the bot-added "patch" tag as the only patch attached is for CUPS and on CUPS it is already applied.

tags: removed: patch
tags: added: patch
Revision history for this message
FairMiles (fermilesi) wrote :

Sorry, beginner here: any way to fix (or bypass) the bug in oneiric?
[same happens with HP Laserjet 6P w/parallel to USB adapter]

(not ready yet for an upgrade to precise)

Revision history for this message
Rodrigo Alvarez (rodrigo-alvarez-i) wrote :

I've upgraded my full system to 12.04.1 yet localhost:631 still says CUPS 1.5.3 and I can only print one job to a Canon MP-160 via USB. Am I missing something or did the upgrade not go through?

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

I'm now on raring and cannot print at all. Opening a new bug.

Revision history for this message
penalvch (penalvch) wrote :

Closing all stales tasks as per https://bugs.launchpad.net/ubuntu/+source/linux/+bug/987485/comments/143 . If you have problems in Quantal+, please file a new report via a terminal:
ubuntu-bug cups

summary: - Can only print once with USB to parallel adapter and HP 4L
+ 067b:2305 Can only print once with USB to parallel adapter and HP 4L
Changed in linux (Ubuntu):
status: Confirmed → Invalid
penalvch (penalvch)
no longer affects: linux (Ubuntu Precise)
no longer affects: libusb-1.0 (Ubuntu Precise)
no longer affects: libusbx (Ubuntu)
Displaying first 40 and last 40 comments. View all 148 comments or add a comment.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.