Ubuntu 10.04 does not recognize local printer connected via USB/parallel adapter cable

Bug #564917 reported by Gary Wing
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

To me, this is a serious problem that exists in Ubuntu 10.04 (also in 9.10). When I try to add a new printer that is connected via USB cable, the "New Printer" popup screen only shows three options for adding local printers: 1) "LPT #1" for parallel connection, 2) "Serial Port #1" for serial connection, and 3) "Other" for devices with a URI. The option to add a local USB printer does not show up. In earlier releases, such as 8.10 and 8.04, the option to add a USB printer does appear, and I have had no problems doing so. But, for some reason or another, Ubuntu 9.10 and 10.04 does not properly recognize the existence of USB printers anymore. It does not recognize my HP Laserjet 4 and probably fails to recognize other USB printers, too.
---
Architecture: amd64
CupsErrorLog:
 E [18/Apr/2010:09:43:44 -0600] [cups-deviced] PID 1768 (usb) crashed on signal 11!
 E [18/Apr/2010:09:46:36 -0600] [cups-deviced] PID 1817 (usb) crashed on signal 11!
DistroRelease: Ubuntu 10.04
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Beta amd64 (20100318)
Lpstat: Error: command ['lpstat', '-v'] failed with exit code 1: lpstat: No destinations added.
MachineType: Hewlett-Packard hp workstation xw8200
NonfreeKernelModules: nvidia
Package: cups 1.4.3-1
PackageArchitecture: amd64
Papersize: letter
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-20-generic root=UUID=cb15fc67-bc14-4617-928d-ed007709063b ro quiet splash
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-20.30-generic 2.6.32.11+drm33.2
Tags: lucid
Uname: Linux 2.6.32-20-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
dmi.bios.date: 05/31/2006
dmi.bios.vendor: Hewlett-Packard
dmi.bios.version: 786B8 v2.10
dmi.board.name: 08B4h
dmi.board.vendor: Hewlett-Packard
dmi.chassis.asset.tag: 2UA5510Z5K
dmi.chassis.type: 6
dmi.chassis.vendor: Hewlett-Packard
dmi.chassis.version: HP Minitower
dmi.modalias: dmi:bvnHewlett-Packard:bvr786B8v2.10:bd05/31/2006:svnHewlett-Packard:pnhpworkstationxw8200:pvr:rvnHewlett-Packard:rn08B4h:rvr:cvnHewlett-Packard:ct6:cvrHPMinitower:
dmi.product.name: hp workstation xw8200
dmi.sys.vendor: Hewlett-Packard

affects: ubuntu → cups (Ubuntu)
Revision history for this message
Pascal De Vuyst (pascal-devuyst) wrote :

Please provide the information as described in the Printer detection section here:
https://wiki.ubuntu.com/DebuggingPrintingProblems

Also run the following command on a terminal to provide some useful printing related information about your system:
apport-collect 564917

Changed in cups (Ubuntu):
status: New → Incomplete
Revision history for this message
Gary Wing (bandemere) wrote : BootDmesg.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Gary Wing (bandemere) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Gary Wing (bandemere) wrote : Dependencies.txt

apport information

Revision history for this message
Gary Wing (bandemere) wrote : Locale.txt

apport information

Revision history for this message
Gary Wing (bandemere) wrote : Lspci.txt

apport information

Revision history for this message
Gary Wing (bandemere) wrote : Lsusb.txt

apport information

Revision history for this message
Gary Wing (bandemere) wrote : PrintingPackages.txt

apport information

Revision history for this message
Gary Wing (bandemere) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Gary Wing (bandemere) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Gary Wing (bandemere) wrote : ProcModules.txt

apport information

Revision history for this message
Gary Wing (bandemere) wrote : UdevDb.txt

apport information

Revision history for this message
Gary Wing (bandemere) wrote : UdevLog.txt

apport information

Revision history for this message
Gary Wing (bandemere) wrote : Re: [Bug 564917] Re: Ubuntu 10.04 does not recognize local printer (HP Laserjet 4) connected via USB.
Download full text (3.9 KiB)

Pascal,

Output from USB Printer Detection is listed below.

There is one interesting thing that I have noticed in the output. In the last section of the output, the "/dev/lp0" is associated with "direct parallel". This is probably a CUPS error. Although my HP Laserjet 4 is actually connected to a USB port and nothing is connected to the parallel port, CUPS seems to falsely and erroneously think that it is a parallel printer.

Anyway, as an experiment, I navigated to System > Administration > Printing and tried to add my HP Laserjet 4 as a parallel printer, even though it was actually connected to a USB port. Although it accepted my printer as a parallel printer and I was able to create an entry for it, I was unable to actually print out any documents because the printing process would always freeze or hang in suspension with a "pending" or "processing" status. The printing job would never go to completion or finish.

***************************************************************************

toysun@xw8200:~$ lsmod | grep usb
usblp 12407 0
usbhid 40988 0
hid 83376 1 usbhid

toysun@xw8200:~$ tail -f /var/log/messages
Apr 18 09:37:18 xw8200 rsyslogd: [origin software="rsyslogd" swVersion="4.2.0" x-pid="605" x-info="http://www.rsyslog.com"] rsyslogd was HUPed, type 'lightweight'.
Apr 18 09:41:26 xw8200 kernel: [ 1010.040065] usb 4-2: USB disconnect, address 3
Apr 18 09:41:26 xw8200 kernel: [ 1010.040321] usblp0: removed

Apr 18 09:42:51 xw8200 kernel: [ 1095.190018] usb 4-2: new full speed USB device using uhci_hcd and address 4
Apr 18 09:42:51 xw8200 kernel: [ 1095.386105] usb 4-2: configuration #1 chosen from 1 choice
Apr 18 09:42:51 xw8200 kernel: [ 1095.430131] usblp0: USB Bidirectional printer dev 4 if 0 alt 1 proto 2 vid 0x067B pid 0x2305
^C

toysun@xw8200:~$ lpinfo -v
network lpd
network ipp
network socket
network http
direct scsi
serial serial:/dev/ttyS0?baud=115200
network smb
network beh
direct parallel:/dev/lp0
direct hp
direct hpfax

toysun@xw8200:~$

***************************************************************************

--- On Sat, 4/17/10, Pascal De Vuyst <email address hidden> wrote:

> From: Pascal De Vuyst <email address hidden>
> Subject: [Bug 564917] Re: Ubuntu 10.04 does not recognize local printer (HP Laserjet 4) connected via USB.
> To: <email address hidden>
> Date: Saturday, April 17, 2010, 3:46 AM
> Please provide the information as
> described in the Printer detection section here:
> https://wiki.ubuntu.com/DebuggingPrintingProblems
>
> Also run the following command on a terminal to provide
> some useful printing related information about your system:
> apport-collect 564917
>
> ** Changed in: cups (Ubuntu)
>        Status: New =>
> Incomplete
>
> --
> Ubuntu 10.04 does not recognize local printer (HP Laserjet
> 4) connected via USB.
> https://bugs.launchpad.net/bugs/564917
> You received this bug notification because you are a direct
> subscriber
> of the bug.
>
> Status in “cups” package in Ubuntu: Incomplete
>
> Bug description:
> To me, this is a serious problem that exists in Ubuntu
> 10.04 (also in 9.10). When I try to add a new printer...

Read more...

Revision history for this message
Pascal De Vuyst (pascal-devuyst) wrote : Re: Ubuntu 10.04 does not recognize local printer (HP Laserjet 4) connected via USB.

Does this printer have USB connection or only parallel connection?
Are you using standard USB cable? lsusb shows Parallel to USB converter Prolific Technology, Inc. PL2305 Parallel Port

Does it work after removing lsusb module? Open a terminal an run following command:
sudo rmmod usblp

Revision history for this message
Gary Wing (bandemere) wrote : Re: [Bug 564917] Re: Ubuntu 10.04 does not recognize local printer (HP Laserjet 4) connected via USB.
Download full text (4.6 KiB)

HP Laserjet 4 printer has only parallel and serial ports. It does not have native USB port. I am using Prolific Technology adapter cable that has parallel connector at one end (which is connected to parallel port on printer) and USB connector at other end (which is connected to computer). This equipment setup previously worked for me on all Ubuntu releases prior to 9.10.

Removing the usblp module did not solve printing problem when HP Laserjet 4 was added as a "parallel" printer, even though it was actually connected via USB adapter cable.

I have also tried connecting HP Laserjet 4 to computer using standard parallel cable that has parallel connectors at both ends. Although printer seemed to be properly recognized and added to system, nonetheless all print jobs would still freeze for hang up in "processing" status. However, this is a different issue or problem and belongs in a different bug report, which I may or may not open as a bug report in the future,

My main concern is to try to get the printer to work with Ubuntu via USB adapter cable. The USB adapter cable offers more flexibility for me because I can also use it to connect to other computer equipment that I have, such as Apple laptop computers that are lacking in parallel ports. So far, I have encountered no problems printing out documents when my Apple laptops, running under the Mac operating system, are connected to the printer via USB adapter cable.

--- On Tue, 4/20/10, Pascal De Vuyst <email address hidden> wrote:

> From: Pascal De Vuyst <email address hidden>
> Subject: [Bug 564917] Re: Ubuntu 10.04 does not recognize local printer (HP Laserjet 4) connected via USB.
> To: <email address hidden>
> Date: Tuesday, April 20, 2010, 1:26 PM
> Does this printer have USB connection
> or only parallel connection?
> Are you using standard USB cable? lsusb shows Parallel to
> USB converter Prolific Technology, Inc. PL2305 Parallel Port
>
>
> Does it work after removing lsusb module? Open a terminal
> an run following command:
> sudo rmmod usblp
>
> --
> Ubuntu 10.04 does not recognize local printer (HP Laserjet
> 4) connected via USB.
> https://bugs.launchpad.net/bugs/564917
> You received this bug notification because you are a direct
> subscriber
> of the bug.
>
> Status in “cups” package in Ubuntu: Incomplete
>
> Bug description:
> To me, this is a serious problem that exists in Ubuntu
> 10.04 (also in 9.10). When I try to add a new printer that
> is connected via USB cable,  the "New Printer" popup
> screen only shows three options for adding local printers:
> 1) "LPT #1" for parallel connection, 2) "Serial Port #1" for
> serial connection, and 3) "Other" for devices with a URI.
> The option to add a local USB printer does not show up. In
> earlier releases, such as 8.10 and 8.04, the option to add a
> USB printer does appear, and I have had no problems doing
> so. But, for some reason or another, Ubuntu 9.10 and 10.04
> does not properly recognize the existence of USB printers
> anymore. It does not recognize my HP Laserjet 4 and probably
> fails to recognize other USB printers, too.
> ---
> Architecture: amd64
> CupsErrorLog:
> E [18/Apr/2010:09:43:44 -0600] [cup...

Read more...

Revision history for this message
John Gotts (jgotts) wrote : Re: Ubuntu 10.04 does not recognize local printer (HP Laserjet 4) connected via USB.

What you may want to try is opening the USB serial port with minicom and then exiting. Be sure to configure minicom with the correct serial port settings and flow control (on a separate page). Delete the modem initialization string as well. Once minicom has initialized the port and you have exited, you will see some junk characters on your first print out (naturally) but subsequent print outs should be okay.

I have noticed that CUPS appears to not initialize the USB serial port correctly anymore. The version of CUPS shipped with Fedora 11 worked fine. It is also possible that the kernel USB serial driver changed and now requires more initialization.

Please have a look at the Fedora bug I filed:

https://bugzilla.redhat.com/show_bug.cgi?id=624564

Thanks to Jiri Popelka for pointing out this ticket.

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

Can you run

/usr/lib/cups/filter/usb

in a terminal window and post the output here?

If you have only one printer on USB (the LJ4 with adapter cable) can you try as a workaround to open system-config-printer and choose the option to enter an URI. Enter the URI

parallel:/dev/usb/lp0

the manually choose manufacturer and model of your printer and complete setting up the print queue. Can you print using this new print queue?

summary: Ubuntu 10.04 does not recognize local printer (HP Laserjet 4) connected
- via USB.
+ via USB/parallel adapter cable.
Revision history for this message
Turgon (hormigon-pretensado-ubuntu) wrote : Re: Ubuntu 10.04 does not recognize local printer (HP Laserjet 4) connected via USB/parallel adapter cable.

 Same problem here. The workaround suggested by Tim Kamppeter ( https://bugs.launchpad.net/ubuntu/+source/cups/+bug/620217/comments/2 ) works for me.

 Thanks a lot for your work.

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

See also bug #436495.

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

Attached is a patch for the source code of CUPS which should fix the USB-Parallel adapter cable problem. It does additional checks to assure whether the device ID read from the device is really a correct device ID. If not, it rejects the device ID and assumes an unknown printer model with device URI

usb://Unknown/

or

usb://Unknown/?serial=XXX

If you get the first form, you will be able to use one adapter cable per computer, if you get the second form, you can also use more than one adapter cable. Real USB printers you will always be able to use, independent of the device URI of your adapter cable. If you get the first form you can try to obtain the second form by blacklisting the "usblp" kernel module.

Please try the patch if you have no problems with compiling stuff. Otherwise I am committing it to the Debian BZR repository of CUPS so that it will be in the next CUPS package in Maverick. You can try with a daily live CD of Maverick then (or by simply updating if you use Maverick).

tags: added: patch
Changed in cups (Ubuntu):
status: In Progress → Fix Committed
importance: Undecided → Medium
Revision history for this message
Tim Waugh (twaugh) wrote :

Why is the Device ID corrupted though?

summary: - Ubuntu 10.04 does not recognize local printer (HP Laserjet 4) connected
- via USB/parallel adapter cable.
+ Ubuntu 10.04 does not recognize local printer connected via USB/parallel
+ adapter cable.
summary: Ubuntu 10.04 does not recognize local printer connected via USB/parallel
- adapter cable.
+ adapter cable
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Tim, USB->Parallel adapter cables seem not to pass through the device ID of the printer, nor do they have their own device ID. It seems that they answer the request for the device ID with some arbitrary noise or an arbitrary pointer. See bug 468701, comments #30, #36, and #37. This causes the "usb" CUPS backend to skip the device or to segfault.

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

This bug was fixed in the package cups - 1.4.5-1ubuntu1

---------------
cups (1.4.5-1ubuntu1) natty; urgency=low

  [ Till Kamppeter ]
  * debian/patches/cups-avahi.dpatch: Added patch from Tim Waugh from Red Hat
    to implement full Avahi support, not only for printer discovery by the
    "dnssd" backend but also for print queue broadcasting and browsing by the
    scheduler (CUPS daemon). Fixes LP: #465916.
  * debian/patches/dnssd-avahi.dpatch: Removed, is part of new
    cups-avahi.dpatch.
  * debian/patches/quiesce-bonjour-warning.dpatch: Removed, not needed any
    more with the new cups-avahi.dpatch.
  * debian/patches/usb-backend-no-segfault-on-bad-device-id.dpatch: Assure
    that the device ID string read from a USB device can never be a mess: Try
    other byte order for device ID string length also if length is too small,
    empty the read device ID string if there is an IOCTL failure, reject ID
    strings with unprintable characters, clean white space in the ID string,
    and finally accept the empty ID string as an unknown device. This
    overcomes the problem that USB-to-Parallel adapter cables do not
    report back a usable ID string. With these changes it is at least possible
    to use one adapter cable per computer if the cables do not report unique
    serial numbers via libusb and any number of adapter cables if they do
    report serial numbers via libusb. Real USB printers can always be used,
    also if there are other printers connected with an adapter cable
    (LP: #468701, LP: #564917).

  [ Martin Pitt ]
  * debian/local/apparmor-profile: Explicitly deny access to ttyUSB* to
    silence noise. This is presumably an extra control channel for some USB
    printers, but cupsd can't use it anyway. (LP: #692892)
 -- Till Kamppeter <email address hidden> Sun, 26 Dec 2010 18:07:33 +0100

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

Everyone who got to here because his bug was marked a duplicate of this one, please test the fix. Download and boot a live CD of Natty (Alpha version or daily), do a complete update after the boot and then try to create a new print queue and try to print through that queue. Does it work now?

Revision history for this message
DaNieL (daniele-pignedoli) wrote :

Im running on ubuntu LL, i cant try cups 1.4.5

Revision history for this message
David Ayers (ayers) wrote :

I haven't been able to get an updated Natty installation on my external hard drive. Either the installation failed (daily) or the upgrade after the initial installation failed (Alpha). I especially had issues with upgrading the hplip packages which I'd need for my LaserJet 6MP to test the printer. Please let us know a of a good daily that will install reliably which will hopefully upgrade cleanly.

Revision history for this message
Stefan K. (archilles) wrote :

I applied the patch from comment 21 to the cups source of lucid, 1.4.3 at the moment, and rebuilt the debian packages (dpkg-buildpackage). After that I copied the "backend binaries" over the installed in /usr/lib/cups/backend. Plugged the adapter into usb and it still doesn't work. At least for 1.4.3 this patch seems not to be enough. Additionally I tested "vanilla cups" (from cups.org) and all 1.4.x have the same problem. So it is definitely fixed by debian/ubuntu patches.

So I grabbed a copy of natty's sources 1.4.6, built these (working) packages and made a diff from the 1.4.6 backend against lucid's 1.4.3. I guess this changed a lot more code than needed, but 1.4.3 is working then, too. The usb backend is not segfaulting anymore and cups prints fine with the adapter and another pure usb printer.

Maybe a package maintainer can backport it into lucid/maverick source tree?

Revision history for this message
Bryce Nesbitt (bryce2) wrote :

Similar "crash on signal 11" reported in https://bugs.launchpad.net/ubuntu/+source/cups/+bug/793244

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

If there are still problems with recognizing parallel printers on USB->Parallel adapters, please have also a look on bug 872711.

Revision history for this message
billstei (billstei) wrote :

I have a fresh install of Ubuntu 11.10 and it does not recognise an HP LaserJet 5L connected via a Prolific Technology, Inc. PL2305 Parallel Port. The adapter shows up in lsusb okay.

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

billstei, your problem is bug 872711.

Revision history for this message
gherardo (gherardo) wrote :

I have the same problem as billstei besides I use 10.04.03 constantly fixed and IMHO is not the same as 872711 exactly because the printer is correctly recognized.
My HP2100/TN connected via a parallel to usb adapter is recognized but any print fails "unable to write 8192 byte..."
What info do you need to help me?

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

If you are still suffering this bug on Oneiric, can you please install all updates on your system and also the proposed kernel update of bug 872711. If after rebooting the problem is not solved, please try the new CUPS package in my PPA (https://launchpad.net/~till-kamppeter/+archive/ppa). Simply follow the instructions under "Adding this PPA to your system" and then update your system. Please tell here whether it solves your problem.

Revision history for this message
gherardo (gherardo) wrote :

Till K, any news for those on 10.04 Lynx?
Printer is recognized buy fails as descripted above.
I tried different drivers besides the suggested but got the same consistent failure.
Thanks

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

gherardo, did you try the proposed kernel update and also the CUPS in my PPA as I described in comment #34? Note that changing drivers does not help in such a case.

Revision history for this message
gherardo (gherardo) wrote :

Till, your cup is not for lynx.
Should I use it anyway?
How can I get it? Can't click on it :-(
I cannot load another kernel, too much disruptive.

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

New package (1.5.0-8ubuntu5~ppa2) uploaded to my PPA, to also fix crasher bug 887094. As soon as it gets available for download, please test this one.

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

Note that the proposed fixes are all for Oneiric, where the usblp kernel module was deprecated and after this new bugs got visible.

Revision history for this message
gherardo (gherardo) wrote :

So for Lynx there is no fix?

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

billstei (and anyone else still having this problem in Oneiric), if you have still the problem after booting the proposed kernel 3.0.0-13, please test the CUPS package in my PPA as described in comment #34 and tell whether this finally solves your problem.

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

Note that the patches of my package in my PPA are applied to Precise now and are also prepared for an SRU (Stable Release Update) for Oneiric. See bug 887094.

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

A CUPS package with this correction has been uploaded to oneiric-proposed. See bug 887094 for further instructions and test the package to see whether also this bug got fixed. Please report your results here.

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

There are still problems left with USB->parallel adapter cables, for the case if the cable does not provide a device URI at all. This is fixed in Precise (12.04) now and an update for Oneiric (11.10) is made available for testing. See bug 910272. Please test the package and report your results there, especially if the fixes presented in this bug do not solve your problem. Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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