usb printer backend hangs when usblp kernel module is loaded
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 | ||
Precise |
Invalid
|
Undecided
|
Unassigned | ||
libusbx (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Precise |
Invalid
|
Undecided
|
Unassigned | ||
linux (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Precise |
Invalid
|
Undecided
|
Unassigned |
Bug Description
After update from oneiric to precise Samsung SCX-4200 usb printer prints one page and stops responding to CUPS. Turning the printer off and on crashes usb backend.
[IMPACT]
Many users of USB-connected Samsung printers are not able to print any more after the upgrade from Lucid LTS or Oneiric to Precise LTS. In Precise the problem was solved by an ugly workaround of blacklisting the usblp kernel module in the first CUPS SRU. This solution breaks printing for other users, those who use proprietary printer drivers with CUPS backends based on the old /dev/usb/lp* device files and also users who send jobs by directly sending data to the /dev/usb/lp* device files. This worked under Lucid LTS.
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. Especially this backend now works with said Samsung printers, without blacklisting the usblp module. So this second SRU is an improved solution.
[TESTCASE]
Unfortunately, for reproducing this bug one needs the actual hardware.
Connect a Samsung printer to the USB port of the computer.
With stock Precise (without updates) you will not be able to print. After applying the already available updates (including the first SRU for CUPS) you will be able to print, but only because the usblp kernel module is blacklisted. Remove the blacklisting via
sudo mv /etc/modprobe.
sudo modprobe usblp
and you will not be able to print any more.
After installing the proposed package the kernel module is not blacklisted any more and you will still be able to print.
If you are on a Precise with all updates and you have a print queue with an URI containing /dev/usb/lp* you will not be able to print. This worked with stock Precise and works again with the proposed package.
You can easily test this with any Ubuntu-supported USB printer:
lpadmin -p test -E -v parallel:
lpadmin -p test -o PageSize=A4
lp- d test ~/.bashrc
The printing on this queue works on stock Precise, does not work on Precise with all updates (usblp is blacklisted) and works again with the proposed package.
[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 i686
ApportVersion: 2.0.1-0ubuntu7
Architecture: i386
Date: Wed May 9 13:23:47 2012
Lpstat: device for Samsung_
Lsusb:
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 046d:c03e Logitech, Inc. Premium Optical Wheel Mouse (M-BT58)
Bus 001 Device 004: ID 04e8:341b Samsung Electronics Co., Ltd SCX-4200 series
MachineType: Hewlett-Packard HP Vectra
Papersize: letter
PpdFiles: Samsung_
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: cups
UpgradeStatus: Upgraded to precise on 2012-05-09 (0 days ago)
dmi.bios.date: 11/23/99
dmi.bios.vendor: Phoenix Technologies Ltd.
dmi.bios.version: HZ.01.10US
dmi.board.name: HP Holmes System Board
dmi.board.vendor: Hewlett-Packard
dmi.board.version: D4066-60001
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: Hewlett-Packard
dmi.chassis.
dmi.modalias: dmi:bvnPhoenixT
dmi.product.name: HP Vectra
dmi.product.
dmi.sys.vendor: Hewlett-Packard
modified.
mtime.conffile.
summary: |
- usb printer backend crashes + usb printer backend hangs when usblp kernel module is loaded |
Changed in libusb-1.0 (Ubuntu): | |
status: | New → Invalid |
Changed in libusbx (Ubuntu Precise): | |
status: | New → Invalid |
Changed in linux (Ubuntu): | |
status: | New → Confirmed |
Changed in linux (Ubuntu Precise): | |
status: | New → Confirmed |
description: | updated |
tags: | removed: verification-done |
description: | updated |
Changed in cups (Ubuntu Precise): | |
assignee: | nobody → Till Kamppeter (till-kamppeter) |
.crash file form this crash