Delay after every print job on USB
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cups (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Precise |
Fix Released
|
High
|
Till Kamppeter |
Bug Description
Ubuntu 12.04 64 bit (also 32 bit is affected)
Zebra LP 2844-Z USB printer - connected with a generic "raw queue" driver.
usblp0 appears to disconnect after every print job and then automatically reconnect after 8 seconds. The next job to the printer won't print until it is reconnected. This is a problem for us in a high volume printing scenario.
Here are messages from syslog:
May 17 16:47:17 mlcx500 kernel: [25464.991868] usblp0: removed
May 17 16:47:25 mlcx500 kernel: [25473.131745] usblp0: USB Bidirectional printer dev 5 if 0 alt 0 proto 2 vid 0x0A5F pid 0x0027
May 17 16:47:25 mlcx500 udev-configure-
May 17 16:47:25 mlcx500 udev-configure-
May 17 16:47:25 mlcx500 udev-configure-
Note the 8 second pause between the first and second messages.
Not sure where the disconnect is coming from.
It doesn't appear to be hardware related as I have the problem with various combinations of printer and computer.
[IMPACT]
On some printers it can happen that with Precise's new libusb-based USB CUPS backend there is a small delay of around 8 seconds after each job. In environments where printers are continuously printing small jobs (~1 page each) this is a serious impact on printing performance.
The USB backend in the proposed package has a configurable option to turn off the bi-directional operation of the backend (sending print data and also reading answers of the printer). With uni-directional printing (only sending print data) the delay disappears.
Uni-directional printing can be set manually. We will give instructions in the Release Notes of 12.04.1.
[TESTCASE]
Unfortunately, for reproducing this bug one needs the actual printer.
Connect a printer with the problem to the USB port of the computer.
With current Precise you get the mentioned 8-second delay after each job when you print several jobs one after the other. If you install the proposed package you can suppress bi-directional printing via
lpadmin -p <queue name> -o usb-unidir-
Now the jobs get printed directly one after the other.
[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.
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: cups 1.5.2-9ubuntu1
ProcVersionSign
Uname: Linux 3.2.0-24-generic x86_64
NonfreeKernelMo
ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
Date: Thu May 17 17:47:22 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
Lpstat:
device for Officejet-
device for z6: usb://Zebra%
MachineType: Dell Inc. Precision M6500
Papersize: letter
PccardctlIdent:
Socket 0:
no product info available
PccardctlStatus:
Socket 0:
no card
PpdFiles: Officejet-
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: cups
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 06/07/2010
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A04
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.
dmi.product.name: Precision M6500
dmi.sys.vendor: Dell Inc.
mtime.conffile.
description: | updated |
Changed in cups (Ubuntu Precise): | |
assignee: | nobody → Till Kamppeter (till-kamppeter) |
here is detailed udev trace output
May 17 17:53:23 mlcx500 udevd[22093]: seq 2676 queued, 'remove' 'usb' pci0000: 00/0000: 00:1d.0/ usb2/2- 1/2-1.2/ 2-1.2:1. 0/usb/lp0' data/c180: 0: No such file or directory pci0000: 00/0000: 00:1d.0/ usb2/2- 1/2-1.2/ 2-1.2:1. 0' pci0000: 00/0000: 00:1d.0/ usb2/2- 1/2-1.2' pci0000: 00/0000: 00:1d.0/ usb2/2- 1' pci0000: 00/0000: 00:1d.0/ usb2' pci0000: 00/0000: 00:1d.0' pci0000: 00' rules.d/ 50-udev- default. rules:62 -printer add %p' /lib/udev/ rules.d/ 70-printers. rules:4 data/c180: 0' for '/devices/ pci0000: 00/0000: 00:1d.0/ usb2/2- 1/2-1.2/ 2-1.2:1. 0/usb/lp0' -printer add /devices/ pci0000: 00/0000: 00:1d.0/ usb2/2- 1/2-1.2/ 2-1.2:1. 0/usb/lp0' printer: add /devices/ pci0000: 00/0000: 00:1d.0/ usb2/2- 1/2-1.2/ 2-1.2:1. 0/usb/lp0 -printer add /devices/pci0...
May 17 17:53:23 mlcx500 udevd[22093]: passed 228 bytes to netlink monitor 0x7f297001c2d0
May 17 17:53:23 mlcx500 udevd[22810]: seq 2676 running
May 17 17:53:23 mlcx500 udevd[22810]: device 0x7f2970037130 filled with db file data
May 17 17:53:23 mlcx500 udevd[22810]: device node '/dev/usb/lp0' not found
May 17 17:53:23 mlcx500 udevd[22810]: removing device node '/dev/usb/lp0'
May 17 17:53:23 mlcx500 udevd[22810]: passed -1 bytes to netlink monitor 0x7f2970030fc0
May 17 17:53:23 mlcx500 udevd[22810]: seq 2676 processed with 0
May 17 17:53:23 mlcx500 udevd[22093]: seq 2676 done with 0
May 17 17:53:23 mlcx500 kernel: [29429.072893] usblp0: removed
May 17 17:53:31 mlcx500 udevd[22093]: seq 2677 queued, 'add' 'usb'
May 17 17:53:31 mlcx500 udevd[22093]: passed 225 bytes to netlink monitor 0x7f297001c2d0
May 17 17:53:31 mlcx500 udevd[22810]: seq 2677 running
May 17 17:53:31 mlcx500 udevd[22810]: device 0x7f2970030c10 has devpath '/devices/
May 17 17:53:31 mlcx500 udevd[22810]: no db file to read /run/udev/
May 17 17:53:31 mlcx500 udevd[22810]: device 0x7f29700342a0 has devpath '/devices/
May 17 17:53:31 mlcx500 udevd[22810]: device 0x7f2970035b70 has devpath '/devices/
May 17 17:53:31 mlcx500 udevd[22810]: device 0x7f29700310e0 has devpath '/devices/
May 17 17:53:31 mlcx500 udevd[22810]: device 0x7f2970031640 has devpath '/devices/
May 17 17:53:31 mlcx500 udevd[22810]: device 0x7f2970031f80 has devpath '/devices/
May 17 17:53:31 mlcx500 udevd[22810]: device 0x7f29700324c0 has devpath '/devices/
May 17 17:53:31 mlcx500 udevd[22810]: GROUP 7 /lib/udev/
May 17 17:53:31 mlcx500 udevd[22810]: RUN 'udev-configure
May 17 17:53:31 mlcx500 udevd[22810]: no node name set, will use kernel supplied name 'usb/lp0'
May 17 17:53:31 mlcx500 udevd[22810]: creating device node '/dev/usb/lp0', devnum=180:0, mode=0660, uid=0, gid=7
May 17 17:53:31 mlcx500 udevd[22810]: preserve file '/dev/usb/lp0', because it has correct dev_t
May 17 17:53:31 mlcx500 udevd[22810]: set permissions /dev/usb/lp0, 020660, uid=0, gid=7
May 17 17:53:31 mlcx500 udevd[22810]: creating symlink '/dev/char/180:0' to '../usb/lp0'
May 17 17:53:31 mlcx500 udevd[22810]: created db file '/run/udev/
May 17 17:53:31 mlcx500 udevd[25478]: starting 'udev-configure
May 17 17:53:31 mlcx500 kernel: [29437.148560] usblp0: USB Bidirectional printer dev 5 if 0 alt 0 proto 2 vid 0x0A5F pid 0x0027
May 17 17:53:31 mlcx500 udev-configure-
May 17 17:53:31 mlcx500 udevd[22810]: 'udev-configure