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
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

I never tested it with 11.10 or any previous version of Ubuntu.

al@al-desktop:~$ lsmod | grep usb
snd_usb_audio 122982 1
snd_pcm 97188 6 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_usb_audio,snd_bt87x
btusb 18288 2
bluetooth 180104 23 rfcomm,bnep,btusb
usbhid 47199 0
hid 99559 1 usbhid
snd_hwdep 13668 2 snd_hda_codec,snd_usb_audio
snd_usbmidi_lib 25395 1 snd_usb_audio
snd_rawmidi 30748 2 snd_usbmidi_lib,snd_seq_midi
snd 78855 28 snd_hda_codec_hdmi,snd_hda_codec_via,snd_hda_intel,snd_hda_codec,snd_usb_audio,snd_bt87x,snd_pcm,snd_hwdep,snd_usbmidi_lib,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
usb_storage 49198 1
al@al-desktop:~$ ps auxwww | grep usb
root 321 0.0 0.0 0 0 ? S 10:20 0:00 [usb-storage]
root 403 0.0 0.0 0 0 ? S 10:20 0:00 [usb-storage]
root 3105 0.0 0.0 136180 1832 ? Sl 10:25 0:00 usb://HP/LaserJet%204L 59 al Untitled Document 1 1 InputSlot=Default TonerDensity=3 PageSize=A4 number-up=1 REt=Medium Manualfeed=Off Economode=Off Resolution=300x300dpi job-uuid=urn:uuid:26910e14-cf08-3591-684b-caad924b7afc job-originating-host-name=localhost time-at-creation=1337937922 time-at-processing=1337937922
al 5434 0.0 0.0 13584 884 pts/3 S+ 13:26 0:00 grep --color=auto usb
al@al-desktop:~$ lpstat -o
LaserJet-4L-59 al 11264 Fri 25 May 2012 10:25:22 BST
al@al-desktop:~$

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

Can you cancel all jobs and turn off and turn on your printer again (or do whatever is needed to be able to print on your printer again) and after that print jobs until you do have one which does not print (should be two jobs, one working, the next not). Then attach your error_log. If possible, do not compress it.

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

That's exactly what I did this morning.

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

Which job in your error_log is the one which correctly printed then?

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

The first one.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Download full text (3.8 KiB)

I did everything again, this is what I did:

Power off printer.
cancel -a
Update to newest PPA - 1.5.3-0ubuntu2~ppa1.
Reboot computer.

On rebooting:

al@al-desktop:~$ date && cancel -a
Sat May 26 12:09:54 BST 2012
al@al-desktop:~$ date && sudo logrotate -fv /etc/logrotate.d/cups
Sat May 26 12:10:01 BST 2012
[sudo] password for al:
reading config file /etc/logrotate.d/cups
reading config info for /var/log/cups/*log

Handling 1 logs

rotating pattern: /var/log/cups/*log forced from command line (7 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/cups/access_log
  log needs rotating
considering log /var/log/cups/error_log
  log needs rotating
considering log /var/log/cups/page_log
  log does not need rotating
rotating log /var/log/cups/access_log, log->rotateCount is 7
dateext suffix '-20120526'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
renaming /var/log/cups/access_log.7.gz to /var/log/cups/access_log.8.gz (rotatecount 7, logstart 1, i 7),
renaming /var/log/cups/access_log.6.gz to /var/log/cups/access_log.7.gz (rotatecount 7, logstart 1, i 6),
renaming /var/log/cups/access_log.5.gz to /var/log/cups/access_log.6.gz (rotatecount 7, logstart 1, i 5),
renaming /var/log/cups/access_log.4.gz to /var/log/cups/access_log.5.gz (rotatecount 7, logstart 1, i 4),
renaming /var/log/cups/access_log.3.gz to /var/log/cups/access_log.4.gz (rotatecount 7, logstart 1, i 3),
renaming /var/log/cups/access_log.2.gz to /var/log/cups/access_log.3.gz (rotatecount 7, logstart 1, i 2),
renaming /var/log/cups/access_log.1.gz to /var/log/cups/access_log.2.gz (rotatecount 7, logstart 1, i 1),
renaming /var/log/cups/access_log.0.gz to /var/log/cups/access_log.1.gz (rotatecount 7, logstart 1, i 0),
old log /var/log/cups/access_log.0.gz does not exist
rotating log /var/log/cups/error_log, log->rotateCount is 7
dateext suffix '-20120526'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
renaming /var/log/cups/error_log.7.gz to /var/log/cups/error_log.8.gz (rotatecount 7, logstart 1, i 7),
renaming /var/log/cups/error_log.6.gz to /var/log/cups/error_log.7.gz (rotatecount 7, logstart 1, i 6),
renaming /var/log/cups/error_log.5.gz to /var/log/cups/error_log.6.gz (rotatecount 7, logstart 1, i 5),
renaming /var/log/cups/error_log.4.gz to /var/log/cups/error_log.5.gz (rotatecount 7, logstart 1, i 4),
renaming /var/log/cups/error_log.3.gz to /var/log/cups/error_log.4.gz (rotatecount 7, logstart 1, i 3),
renaming /var/log/cups/error_log.2.gz to /var/log/cups/error_log.3.gz (rotatecount 7, logstart 1, i 2),
renaming /var/log/cups/error_log.1.gz to /var/log/cups/error_log.2.gz (rotatecount 7, logstart 1, i 1),
renaming /var/log/cups/error_log.0.gz to /var/log/cups/error_log.1.gz (rotatecount 7, logstart 1, i 0),
old log /var/log/cups/error_log.0.gz does not exist
renaming /var/log/cups/access_log to /var/log/cups/access_log.1
creating new /var/log/cups/access_log mode = 0640 uid = 0 gid = 109
renaming /var/log/cups/error_log to /var/log/cups/error_log.1
creating new /var/log/cups/error_log mode = 0640 uid = 0 gid = 109
running postrotate script
compressing log with: /bin/gzip
removing old log /var/log/cup...

Read more...

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

Again, the job eventually printed at 7:53 am the following day.

Changed in cups (Ubuntu):
status: Incomplete → Confirmed
Changed in cups (Ubuntu Precise):
status: Incomplete → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.8 KiB)

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

---------------
cups (1.5.3-0ubuntu1) precise-proposed; 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,
    de...

Read more...

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

Reopening wrongly closed Precise task.

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

I have uploaded a modified CUPS package to my PPA now. Please add my PPA to your system as described on

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

in the section "Adding this PPA to your system" and then install the new CUPS package, preferably by simply doing a full system update. The CUPS version must be 1.5.3-0ubuntu2~ppa2.

Now turn off and turn on your printer and re-plug the USB (with the printer turned on). Try to print. does it work now?

Independent whether printing works for you now or not, reactivate the usblp kernel module by running the following two commands in a terminal window:

sudo mv /etc/modprobe.d/blacklist-cups-usblp.conf ~
sudo modprobe usblp

Turn off and turn on your printer again and re-plug the USB (with the printer turned on). Try to print again. does it also work now?

If it works, you are done. If it worked in the first test and stopped in the second, return to the configuration of the first test by running the following commands in a terminal window:

sudo mv ~/blacklist-cups-usblp.conf /etc/modprobe.d/
sudo rmmod usblp

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

With the latest PPA cups does not detect my printer at all, with out without usblp loaded.

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

*with or without

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

My CUPS upload to my PPA (1.5.3-0ubuntu2~ppa2) is broken. In some hours the new version 1.5.3-0ubuntu2~ppa3 will be available. Please wait for this new version, update your system then, check whether you actually have 1.5.3-0ubuntu2~ppa3 and then do the tests of comment #50.

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

with cups 1.5.3-0ubuntu2~ppa3 my printer is not detected at all with or without usblp.

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

Next testing round to get the USB backend working: In some hours cups 1.5.3-0ubuntu2~ppa4 will be available on my PPA, update your system to get it, check whether you actually got it, and do the tests of comment #50 again. For each failed test attach the error_log and /var/log/syslog, thanks.

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

No local printers found

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

Alistair, so ~ppa4 from my PPA is still a total block of printer detection for you?

Have you checked that you actually have ~ppa4?

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

New version uploaded which does not do an initial reset on the printer (~ppa5). please do the same tests with this version.

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

with ppa5 the printer is detected again but I cannot print at all. The first job stays at "processing" indefinitely.

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

Alistair, can you also attach your /var/log/syslog file to see which messages the tests generate here? Thanks.

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

The job that I sent yesterday just printed, and I was able to immediately print another job. However, when I tried to print a second job, it got stuck, exactly as before.

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

Next testing round: cups 1.5.3-0ubuntu2~ppa7 is uploaded to my PPA now and this respects uni-directional devices and gives some more messages in error_log.

Please repeat the tests with it (with and without blacklisting usblp) and attach syslog and error_log of the failing tests.

In addition, you can try to force uni-directional mode by

lpadmin -p <queue> -o usb-unidir-default=true

and restore to normal mode via

lpadmin -p <queue> -o usb-unidir-default=false

For <queue> the name of your print queue has to be inserted.

Please repeat your tests with forced uni-directional mode.

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

Test: ppa7, usblp blacklisted, no force uni-directional.

The printer jammed several times during this test. I discovered that pressing the "clear error" button on the printer will make it print the next job even if it has not jammed. But other than that, it still only prints once, as before.

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

Test: ppa7, usblp NOT blacklisted, no force uni-directional.

Result: can only print once.

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

Test: ppa7, usblp blacklisted, usb-unidir-default=true

Result: can only print once.

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

Test: ppa7, usblp not blacklisted, usb-unidir-default=true

Result: 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 :

This means that the USB -> Parallel adapter problem does neither depend on the presence of the usblp kernel module nor on whether bi-directional communication with the printer is allowed or not. In any case your printer prints only one job.

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

Alistair, can you do the following test:

Deactivate blacklisting and also do no force uni-directional mode. Cancel all jobs and power-cycle the printer.

Run the following commands in a terminal window:

lpstat -v
sudo /usr/lib/cups/backend/usb
sudo /usr/lib/cups/backend/usb

(it is correct that I ask you for the same command twice) and post the output here. Is the output of the last two commands the same (should be)? Does the URI ("usb:/...") match the the one of the first command?

power-cycle the printer again. Do the following sequence of actions:

1. sudo /usr/lib/cups/backend/usb
2. Print a job

Repeat until the job hangs (should be the second time).

Now cancel the job (but DO NOT power-cycle the printer) and run another

sudo /usr/lib/cups/backend/usb

Post the output of all commands here

Cancel all jobs and power-cycle the printer again. Repeat the two tests, but running

lsusb

before each

sudo /usr/lib/cups/backend/usb

and post all command output again.

Also attach the error_log files of all these tests.

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

al@al-desktop:~/Source/myapp$ lpstat -v
device for Hewlett-Packard-LaserJet-4L: usb://HP/LaserJet%204L
al@al-desktop:~/Source/myapp$ sudo /usr/lib/cups/backend/usb
DEBUG: list_devices
DEBUG: libusb_get_device_list=20
direct usb://HP/LaserJet%204L "HP LaserJet 4L" "HP LaserJet 4L" "MANUFACTURER:Hewlett-Packard;COMMAND SET:HP ENHANCED PCL5,PJL;MODEL:LaserJet 4L;" ""
al@al-desktop:~/Source/myapp$ sudo /usr/lib/cups/backend/usb
DEBUG: list_devices
DEBUG: libusb_get_device_list=20
direct usb://HP/LaserJet%204L "HP LaserJet 4L" "HP LaserJet 4L" "MANUFACTURER:Hewlett-Packard;COMMAND SET:HP ENHANCED PCL5,PJL;MODEL:LaserJet 4L;" ""
al@al-desktop:~/Source/myapp$ sudo /usr/lib/cups/backend/usb
DEBUG: list_devices
DEBUG: libusb_get_device_list=20
direct usb://HP/LaserJet%204L "HP LaserJet 4L" "HP LaserJet 4L" "MANUFACTURER:Hewlett-Packard;COMMAND SET:HP ENHANCED PCL5,PJL;MODEL:LaserJet 4L;" ""
al@al-desktop:~/Source/myapp$ sudo /usr/lib/cups/backend/usb
DEBUG: list_devices
DEBUG: libusb_get_device_list=20
direct usb://HP/LaserJet%204L "HP LaserJet 4L" "HP LaserJet 4L" "MANUFACTURER:Hewlett-Packard;COMMAND SET:HP ENHANCED PCL5,PJL;MODEL:LaserJet 4L;" ""
al@al-desktop:~/Source/myapp$ sudo /usr/lib/cups/backend/usb
DEBUG: list_devices
DEBUG: libusb_get_device_list=20
direct usb://HP/LaserJet%204L "HP LaserJet 4L" "HP LaserJet 4L" "MANUFACTURER:Hewlett-Packard;COMMAND SET:HP ENHANCED PCL5,PJL;MODEL:LaserJet 4L;" ""
al@al-desktop:~/Source/myapp$ sudo /usr/lib/cups/backend/usb
DEBUG: list_devices
DEBUG: libusb_get_device_list=20
direct usb://Unknown/Printer "Unknown" "Unknown" "" ""

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Download full text (4.7 KiB)

al@al-desktop:~/Source/myapp$ lpstat -v
device for Hewlett-Packard-LaserJet-4L: usb://HP/LaserJet%204L
al@al-desktop:~/Source/myapp$ lsusb; sudo /usr/lib/cups/backend/usb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 05e3:0607 Genesys Logic, Inc. Logitech G110 Hub
Bus 001 Device 004: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 003 Device 002: ID 045e:0029 Microsoft Corp. IntelliMouse Optical
Bus 002 Device 002: ID 059b:0370 Iomega Corp.
Bus 004 Device 005: ID 067b:2305 Prolific Technology, Inc. PL2305 Parallel Port
Bus 005 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 005 Device 003: ID 045e:0288 Microsoft Corp. Xbox Controller S Hub
Bus 001 Device 006: ID 046d:c228 Logitech, Inc.
Bus 001 Device 007: ID 046d:c229 Logitech, Inc.
Bus 001 Device 008: ID 0424:2640 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 009: ID 046d:0821 Logitech, Inc. HD Webcam C910
Bus 005 Device 004: ID 045e:0289 Microsoft Corp. Xbox Controller S
Bus 001 Device 010: ID 0424:4060 Standard Microsystems Corp. Ultra Fast Media Reader
DEBUG: list_devices
DEBUG: libusb_get_device_list=20
direct usb://HP/LaserJet%204L "HP LaserJet 4L" "HP LaserJet 4L" "MANUFACTURER:Hewlett-Packard;COMMAND SET:HP ENHANCED PCL5,PJL;MODEL:LaserJet 4L;" ""
al@al-desktop:~/Source/myapp$ lsusb; sudo /usr/lib/cups/backend/usb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 05e3:0607 Genesys Logic, Inc. Logitech G110 Hub
Bus 001 Device 004: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 003 Device 002: ID 045e:0029 Microsoft Corp. IntelliMouse Optical
Bus 002 Device 002: ID 059b:0370 Iomega Corp.
Bus 004 Device 005: ID 067b:2305 Prolific Technology, Inc. PL2305 Parallel Port
Bus 005 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 005 Device 003: ID 045e:0288 Microsoft Corp. Xbox Controller S Hub
Bus 001 Device 006: ID 046d:c228 Logitech, Inc.
Bus 001 Device 007: ID 046d:c229 Logitech, Inc.
Bus 001 Device 008: ID 0424:2640 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 009: ID 046d:0821 Logitech, Inc. HD Webcam C910
Bus 005 Device 004: ID 045e:0289 Microsoft Corp. Xbox Controller S
Bus 001 Device 010: ID 0424:4060 Standard Microsystems Corp. Ultra Fast Media Reader
DEBUG: list_devices
DEBUG: libusb_get_device_list=20
direct usb://HP/LaserJet%204L "HP LaserJet 4L" ...

Read more...

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
Till Kamppeter (till-kamppeter) wrote :

Alistair, can you do the tests of comment #74 with cups 1.5.3-0ubuntu2~ppa8 from my PPA and attach error_log files for all tests? The new CUPS package logs the detected device URI of your adapter/printer combo on every access. So one can see whether the results change from access to access.

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

Can you run

lsusb -vvv

and post the output here? Thanks.

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

Sorry, please run

sudo lsusb -vvv

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

Can you all try cups 1.5.3-0ubuntu2~ppa9 from my PPA? This should solve the problem. Test it, with and without the blacklisting of usblp and tell whether it works.

Independent whether it works, please attach your error_log.

Revision history for this message
Lucy Llewellyn (lucyllewy) wrote :
Download full text (42.4 KiB)

first off, only one of my cups packages upgraded to ppa8:

$ dpkg -l |grep cups
ii bluez-cups 4.98-2ubuntu7 Bluetooth printer driver for CUPS
ii cups 1.5.3-0ubuntu2~ppa7 Common UNIX Printing System(tm) - server
ii cups-bsd 1.5.3-0ubuntu2~ppa7 Common UNIX Printing System(tm) - BSD commands
ii cups-client 1.5.3-0ubuntu2~ppa7 Common UNIX Printing System(tm) - client programs (SysV)
ii cups-common 1.5.3-0ubuntu2~ppa8 Common UNIX Printing System(tm) - common files
ii cups-driver-gutenprint 5.2.8~pre1-0ubuntu2 transitional dummy package for gutenprint printer driver
ii cups-filters 1.0.18-0ubuntu0.1 OpenPrinting CUPS Filters
ii cups-ppdc 1.5.3-0ubuntu2~ppa7 Common UNIX Printing System(tm) - PPD manipulation utilities
ii ghostscript-cups 9.05~dfsg-0ubuntu4 interpreter for the PostScript language and for PDF - CUPS filters
ii hplip-cups 3.12.2-1ubuntu3 transitional dummy package for hpcups printer driver
ii libcups2 1.5.3-0ubuntu2~ppa7 Common UNIX Printing System(tm) - Core library
ii libcupscgi1 1.5.3-0ubuntu2~ppa7 Common UNIX Printing System(tm) - CGI library
ii libcupsdriver1 1.5.3-0ubuntu2~ppa7 Common UNIX Printing System(tm) - Driver library
ii libcupsfilters1 1.0.18-0ubuntu0.1 OpenPrinting CUPS Filters - Shared library
ii libcupsimage2 1.5.3-0ubuntu2~ppa7 Common UNIX Printing System(tm) - Raster image library
ii libcupsmime1 1.5.3-0ubuntu2~ppa7 Common UNIX Printing System(tm) - MIME library
ii libcupsppdc1 1.5.3-0ubuntu2~ppa7 Common UNIX Printing System(tm) - PPD manipulation library
ii printer-driver-hpcups 3.12.2-1ubuntu3 HP Linux Printing and Imaging - CUPS Raster driver (hpcups)
ii python-cups 1.9.61-0ubuntu2 Python bindings for CUPS
ii python-cupshelpers 1.3.8+20120201-0ubuntu8.1 Python modules for printer configuration with CUPS

$ lpstat -v
device for ML-4500: usb://Samsung/ML-4500

$ sudo /usr...

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

Daniel, and this package is not the one with the fix (the fix is in the "cups" package). Probably you polled the package list ("sudo apt-get update") from your download mirror in the middle of the tranfer of the new CUPS packages to the mirror. Please re-run "sudo apt-get update" and update again. You must have the binary package cups 1.5.3-0ubuntu2~ppa8 on your system for this test.

Revision history for this message
Lucy Llewellyn (lucyllewy) wrote :
Download full text (7.2 KiB)

a further update/upgrade in apt-get got me the remainder of the ppa8 files. Tests as below (NOT the ppa9 which was mentioned in the latest request of comment 83):

$ lpstat -v
device for ML-4500: usb://Samsung/ML-4500

$ sudo /usr/lib/cups/backend/usb
DEBUG: list_devices
DEBUG: libusb_get_device_list=13
DEBUG: Printer found with device ID: MFG:Samsung;CMD:GDI;MDL:ML-4500;CLS:PRINTER;MODE:GDI;STATUS:IDLE; Device URI: usb://Samsung/ML-4500
direct usb://Samsung/ML-4500 "Samsung ML-4500" "Samsung ML-4500" "MFG:Samsung;CMD:GDI;MDL:ML-4500;CLS:PRINTER;MODE:GDI;STATUS:IDLE;" ""

$ sudo /usr/lib/cups/backend/usb
DEBUG: list_devices
DEBUG: libusb_get_device_list=13
DEBUG: Printer found with device ID: MFG:Samsung;CMD:GDI;MDL:ML-4500;CLS:PRINTER;MODE:GDI;STATUS:IDLE; Device URI: usb://Samsung/ML-4500
direct usb://Samsung/ML-4500 "Samsung ML-4500" "Samsung ML-4500" "MFG:Samsung;CMD:GDI;MDL:ML-4500;CLS:PRINTER;MODE:GDI;STATUS:IDLE;" ""

[power cycle]

$ sudo /usr/lib/cups/backend/usb
DEBUG: list_devices
DEBUG: libusb_get_device_list=13
DEBUG: Printer found with device ID: MFG:Samsung;CMD:GDI;MDL:ML-4500;CLS:PRINTER;MODE:GDI;STATUS:IDLE; Device URI: usb://Samsung/ML-4500
direct usb://Samsung/ML-4500 "Samsung ML-4500" "Samsung ML-4500" "MFG:Samsung;CMD:GDI;MDL:ML-4500;CLS:PRINTER;MODE:GDI;STATUS:IDLE;" ""

[print job 10 - no printout]

$ cancel -a
$ sudo /usr/lib/cups/backend/usb
DEBUG: list_devices
DEBUG: libusb_get_device_list=13
DEBUG: Printer found with device ID: Device URI: usb://Unknown/Printer
direct usb://Unknown/Printer "Unknown" "Unknown" "" ""
DEBUG: Failed to set configuration 1 for 067b:2305

[power cycle]

$ lpstat -v
device for ML-4500: usb://Samsung/ML-4500

$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 004 Device 002: ID 04f2:0402 Chicony Electronics Co., Ltd Genius LuxeMate i200 Keyboard
Bus 004 Device 013: ID 067b:2305 Prolific Technology, Inc. PL2305 Parallel Port
Bus 004 Device 004: ID 050d:0119 Belkin Components F5U120-PC Dual PS/2 Ports / F5U118-UNV ADB Adapter
Bus 002 Device 002: ID 152d:2339 JMicron Technology Corp. / JMicron USA Technology Corp. JM20339 SATA Bridge

$ sudo /usr/lib/cups/backend/usbDEBUG: list_devices
DEBUG: libusb_get_device_list=13
DEBUG: Printer found with device ID: MFG:Samsung;CMD:GDI;MDL:ML-4500;CLS:PRINTER;MODE:GDI;STATUS:IDLE; Device URI: usb://Samsung/ML-4500
direct usb://Samsung/ML-4500 "Samsung ML-4500" "Samsung ML-4500" "MFG:Samsung;CMD:GDI;MDL:ML-4500;CLS:PRINTER;MODE:GDI;STATUS:IDLE;" ""

$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 roo...

Read more...

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

Daniel, you need to activate debug logging:

cupsctl LogLevel=debug

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

most of this will be identical to my last comment, but in the interests of completeness I've duplicated the tests with the full debug logs

$ lpstat -v
device for ML-4500: usb://Samsung/ML-4500

$ sudo /usr/lib/cups/backend/usb
DEBUG: list_devices
DEBUG: libusb_get_device_list=13
DEBUG: Printer found with device ID: MFG:Samsung;CMD:GDI;MDL:ML-4500;CLS:PRINTER;MODE:GDI;STATUS:IDLE; Device URI: usb://Samsung/ML-4500
direct usb://Samsung/ML-4500 "Samsung ML-4500" "Samsung ML-4500" "MFG:Samsung;CMD:GDI;MDL:ML-4500;CLS:PRINTER;MODE:GDI;STATUS:IDLE;" ""

$ sudo /usr/lib/cups/backend/usb
DEBUG: list_devices
DEBUG: libusb_get_device_list=13
DEBUG: Printer found with device ID: MFG:Samsung;CMD:GDI;MDL:ML-4500;CLS:PRINTER;MODE:GDI;STATUS:IDLE; Device URI: usb://Samsung/ML-4500
direct usb://Samsung/ML-4500 "Samsung ML-4500" "Samsung ML-4500" "MFG:Samsung;CMD:GDI;MDL:ML-4500;CLS:PRINTER;MODE:GDI;STATUS:IDLE;" ""

[error_log.1]

power cycle

$ sudo /usr/lib/cups/backend/usb
DEBUG: list_devices
DEBUG: libusb_get_device_list=13
DEBUG: Printer found with device ID: MFG:Samsung;CMD:GDI;MDL:ML-4500;CLS:PRINTER;MODE:GDI;STATUS:IDLE; Device URI: usb://Samsung/ML-4500
direct usb://Samsung/ML-4500 "Samsung ML-4500" "Samsung ML-4500" "MFG:Samsung;CMD:GDI;MDL:ML-4500;CLS:PRINTER;MODE:GDI;STATUS:IDLE;" ""

print job #12 results in no pages printed

$ sudo /usr/lib/cups/backend/usb
DEBUG: list_devices
DEBUG: libusb_get_device_list=13
DEBUG: Printer found with device ID: Device URI: usb://Unknown/Printer
direct usb://Unknown/Printer "Unknown" "Unknown" "" ""
DEBUG: Failed to set configuration 1 for 067b:2305

[error_log.2]

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

Daniel, can you first try to print with the usblp kernel module blacklisted and tell whether this works (if not attach error_log and /var/log/syslog) and after that upgrade to cups 1.5.3-0ubuntu2~ppa9 and then test with and without blacklisting the usblp module. Tell us what works and what not. Thank you.

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

Daniel, Alistair, can you test with my latest package (~ppa9)? Thanks.

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

with ppa9 I can't print at all.

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

Alistair, thank you for testing.

As a workaround you could try to connect your printer with the adapter to the USB port of your router or NAS and then see whether system-config-printer finds it as a network printer.

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

Can you all try cups 1.5.3-0ubuntu2~ppa10 from my PPA? This could solve the problem. Test it, with and without the blacklisting of usblp and tell whether it works.

Independent whether it works, please attach your error_log.

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

I have a sample parallel printer (Epson Stylus Color 880) with USB->Parallel Adapter now and can reproduce the bug. After a few jobs, sometimes already during the first job) the printer gets unresponsive (USB timeout in error_log) and no device ID returned when canceling the job and running "sudo /usr/lib/cups/backend/usb". I have to cancel the job and to power-cycle the printer to continue printing.

I tested this with usblp blacklisted and without forcing uni-directional mode. More tests to follow.

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

Currently I am testing with forced uni-directional communication via

lpadmin -p <printer> -o usb-unidir-default=true

and the Epson prints perfectly. It did already ~15 jobs one after the other without power-cycling.

The USB -> Parallel adapter which I am using identifies itself as

Bus 001 Device 039: ID 067b:2305 Prolific Technology, Inc. PL2305 Parallel Port

The usblp kernel module is blacklisted.

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

Without blacklisting the kernel module I make the following observations:

1. The kernel module is not able to obtain the device ID from the printer. Trying to get it with "sudo usb_printerid /dev/usb/lp0" leads to an I/O error.

2. Independent of this I can print arbitrarily many print jobs through the CUPS USB backewnd of my current PPA, still in forced uni-directional mode. The error_log does not show any error but completely successful jobs and the printer does not crash. I do not need to power-cycle it. It is now turned on uninterruptedly since the beginning of comment #97.

3. Though the error_log looks fine and the printer does not crash, the jobs come out incomplete. On every job around the last third of the last page is missing. All pages but the last page come out correctly. It seems that the re-attaching of the kernel module after the job completion sends a reset to the printer and this makes the printer aborting the rest of the job which is already in the printer's memory but not yet printed. Another evidence for the attaching of the module sending a reset is that the print head makes some noise when loading the kernel module manually with "sudo modprobe usblp".

The fact that the kernel module sends some kind of reset to the printer when attached can perhaps cause other bugs like bug 997040.

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

I have done further tests, also with some slight modifications on the USB CUPS backend and found out that the USB->Parallel adapter is rather instable. Forced uni-directional mode improves on its stability, also blacklisting the usblp kernel module, but one can prove that the problem is not a bug of the CUPS backend. It is probably somewhere in the kernel. Following observations lead to this:

1. With the usblp module not blacklisted and loaded I cannot get the device ID through the kernel module.

sudo usb_printerid /dev/usb/lp0

gives an I/O error for me.

till@till:~/ubuntu/cups/bzr/precise/cups-1.5.3$ sudo usb_printerid /dev/usb/lp3
[sudo] password for till:
Error: Input/output error: GET_DEVICE_ID on '/dev/usb/lp3'
till@till:~/ubuntu/cups/bzr/precise/cups-1.5.3$

2. "lsusb" sometimes does not show the adapter, "sudo lsusb -vvv" sometimes hangs infinitely.

Adding kernel and libusb tasks.

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

Can you all try cups 1.5.3-0ubuntu2~ppa12 from my PPA? This could solve the problem. Test it, with and without the blacklisting of usblp and with and without forcing uni-directional mode and tell whether it works. Especially I want to know whether it actually works without blacklisting and without forcing uni-directional now.

Independent whether it works, please attach your error_log.

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

I'm using the same adapter as yourself:

Bus 004 Device 004: ID 067b:2305 Prolific Technology, Inc. PL2305 Parallel Port

attachments are the error_logs.

with blacklisting and uni-directional mode: transaction timeout (attachment on this post - job 3)
with blacklisting bi-directional mode: transaction timeout (attachment below - job 4)
without blacklisting: not recognised: "Printer State" reports "Stopped - Unplugged or turned off"; usb_printerid /dev/usb/lp0 says:

$ sudo usb_printerid /dev/usb/lp0
GET_DEVICE_ID string:
MFG:Samsung;CMD:GDI;MDL:ML-4500;CLS:PRINTER;MODE:GDI;STATUS:IDLE;

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

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

Changed in libusb-1.0 (Ubuntu Precise):
status: New → Confirmed
Changed in libusbx (Ubuntu):
status: New → Confirmed
Revision history for this message
Lucy Llewellyn (lucyllewy) wrote :

this attachment disappeared. here it is again. This is the bi-directional test with blacklisting in-place.

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

Installed ~ppa12. Turned blacklisting off and uni-directional off. Reset printer.

It now seems to be able to print more than one print job.

error_log attached.

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

Installed ~ppa12. Turned blacklisting off and uni-directional off. Reset printer.

It now seems to be able to print more than one print job.

error_log attached.

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

Sandra, Daniel, can you attch your error_log files again, they all did not arrive in the bug report.

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)
To post a comment you must log in.
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.