Cups on Ubuntu Karmic does not recognize USB printer

Bug #468701 reported by Carlos Lerzundy on 2009-11-01
62
This bug affects 11 people
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Undecided
Till Kamppeter
Lucid
Undecided
wayne bantz
Maverick
Undecided
Till Kamppeter

Bug Description

Binary package hint: cups

CUPS 1.4.1-1 does not recognize Samsung usb printer, so the printer cannot be added.

# dmesg after unplugging and then reinserting the printer plug:

[ 645.290037] usb 3-1: USB disconnect, address 2
[ 645.290178] usblp0: removed
[ 660.320011] usb 4-1: new full speed USB device using uhci_hcd and address 3
[ 660.509389] usb 4-1: configuration #1 chosen from 1 choice
[ 660.517183] usblp0: USB Bidirectional printer dev 3 if 0 alt 0 proto 2 vid 0x04E8 pid 0x3008

*Ubuntu is seeing the printer attached to it.

- No options for adding a USB printer is prompt when trying to add a new printer using CUPS localhost:631 .I tried to restart the system several times with the printer ON but does not work either.

- This is a new Ubuntu install (Ubuntu 9.10 64 bits) with a gnome desktop. Cups accessed via localhost:631 does not list the usb printer as a new printer.

- It used to work flawless for me with Ubuntu 9.04 which had the previous CUPS version.

- I am using a Samsung ML-6060 USB printer

ProblemType: Bug
Architecture: amd64
CupsErrorLog:
 W [01/Nov/2009:09:35:37 -0500] [CGI] Unhandled message: interface=org.freedesktop.DBus.Introspectable, path=/, member=Introspect
 E [01/Nov/2009:09:35:37 -0500] [cups-deviced] PID 2897 (usb) crashed on signal 11!
Date: Sun Nov 1 09:41:03 2009
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
Lpstat: Error: command ['lpstat', '-v'] failed with exit code 1: lpstat: No destinations added.
Package: cups 1.4.1-5ubuntu2
Papersize: letter
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.31-14-generic root=UUID=0681db2a-1088-4880-936e-1f0eea0be88a ro quiet splash
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: cups
Uname: Linux 2.6.31-14-generic x86_64
dmi.bios.date: 07/15/2009
dmi.bios.vendor: Intel Corp.
dmi.bios.version: DPP3510J.86A.0572.2009.0715.2346
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: DG33BU
dmi.board.vendor: Intel Corporation
dmi.board.version: AAD79951-407
dmi.chassis.type: 3
dmi.modalias: dmi:bvnIntelCorp.:bvrDPP3510J.86A.0572.2009.0715.2346:bd07/15/2009:svn:pn:pvr:rvnIntelCorporation:rnDG33BU:rvrAAD79951-407:cvn:ct3:cvr:

Carlos Lerzundy (arepaking) wrote :
Yuriy (ytkach) wrote :

Same issue with Canon usb printer on Ubuntu 9.10 32bits.

Carlos Lerzundy (arepaking) wrote :

Folks, here is an update that I got from from the Bug that I also logged on their side:

----------
[STR Closed w/o Resolution]

Please contact your Linux distributor for this issue.

CUPS 1.4 includes a new libusb-based USB backend (specifically requested
by the Linux distros) that requires the distributions to update their USB
configuration so that a) they don't have the kernel printer driver
installed and b) the permissions on the USB bus files allows the "lp" user
or "sys" group to read and write them.

Link: http://www.cups.org/str.php?L3404
Version: 1.4.1
Fix Version: Third-party
------

Looks like Ubuntu Dev team needs to update the USB config. Please any comments on this from Ubuntu?

Thanks in advance and keep up the good work guys!

Carlos Lerzundy

Carlos Lerzundy (arepaking) wrote :

Any comments from Ubuntu team?

Paul (p37307) wrote :

I have same problem and have to unplug the usb cord after restart and replug it in for the printer to work.

This happens only after restart. It is like Ubuntu is not recognising the usb printer.

The cups fix from Carlos does not work for me.

Howard Bliss (hbbliss) wrote :

I have a very similar problem. I had Ubuntu 9.04 and hplip 3.9.8 and both a parallel all-in-one and a usb all-in-one installed. Both AIO's worked under HP Director for printing and scanning. I upgraded to Ubuntu 9.10 and the usb AIO is no longer recognized by HP Director. Using System>Administration>Printing I can install both printers. Both AIO's work fine under XP. I installed 3.9.10 after uninstalling 3.9.8, same result, no usb under HP Director. As a test, I installed 3.9.8 on a different computer running Ubuntu 9.04. Both AOI"s again worked normally for printing and scanning. Under 9.10, running hp-check says "no usb devices found" and says that " sudo aptitude install --assume-yes cupsddk cupsddk-drivers" should be run to remove the errors (this does nothing, hp-check will return the same errors). My analysis is that there is a disconnect between cups 1.4.1 and Ubuntu 9.10 There is also a disconnect between hp-check and cups 1.4.1. I hope this helps to pinpoint and correct the problems.

Alt-F2 (kais-g) wrote :

Same here;

Architecture: amd64
Printer: Samsung ML-6040 USB printer.
Works perfectly with 8.10 LTS

dmesg after unplugging / plugging:
[286403.790159] usb 5-2: USB disconnect, address 5
[286403.790377] usblp0: removed
[286415.430121] usb 5-2: new full speed USB device using uhci_hcd and address 6
[286415.618823] usb 5-2: configuration #1 chosen from 1 choice
[286415.631754] usblp0: USB Bidirectional printer dev 6 if 0 alt 0 proto 2 vid 0x04E8 pid 0x3006

Cups Error log for the events;
E [04/Dec/2009:13:46:43 +0000] [cups-deviced] PID 6706 (usb) crashed on signal 11!
E [04/Dec/2009:13:46:58 +0000] [cups-driverd] Bad driver information file "/usr/share/cups/drv/sample.drv"!
E [04/Dec/2009:13:51:28 +0000] [cups-deviced] PID 6823 (usb) crashed on signal 11!
E [04/Dec/2009:13:51:43 +0000] [cups-driverd] Bad driver information file "/usr/share/cups/drv/sample.drv"!

Kevin (kevinshlee) wrote :

Mine has the same problem. I'm using Ubuntu 9.10 Karmic Koala Desktop 64 bit and a Samsung ML2010 printer.
It worked fine before in Ubuntu 9.10 yet doesn't work now.

Paul (p37307) wrote :

Karmic and Lucid fixed the problem. No problems now. Like a fine wine, ubuntu gets better every as it ages and matures.

Paul,
When was this fixed in karmic? I had issues as of last week.

Thanks,
C

On Apr 11, 2010, at 6:38 AM, Paul <email address hidden> wrote:

> Karmic and Lucid fixed the problem. No problems now. Like a fine wine,
> ubuntu gets better every as it ages and matures.
>
> --
> Cups on Ubuntu Karmic does not recognize USB printer
> https://bugs.launchpad.net/bugs/468701
> You received this bug notification because you are a direct subscriber
> of the bug.

Ian Halpern (ihh) wrote :

I am having the same or very similar problem. The printer hasn't worked on either 9.10 or 10.04 but works great on a 9.04 live usb boot.

OS: Ubuntu Lucid Linx 10.04
Architecture: amd64
Printer: Dell 3130cn Color Laser
Connection: USB

$ lsmod | grep usb
usblp 12407 0
usbhid 40988 0
hid 83376 1 usbhid

dmesg on usb connect:

[ 5355.860031] usb 1-8: new high speed USB device using ehci_hcd and address 6
[ 5356.011006] usb 1-8: configuration #1 chosen from 1 choice
[ 5356.011714] usblp0: USB Bidirectional printer dev 6 if 0 alt 0 proto 2 vid 0x413C pid 0x5603
[ 5357.187391] usb 1-8: usbfs: interface 0 claimed by usblp while 'usb' sets config #1

dmesg on disconnect:

[ 5418.352753] usb 1-8: USB disconnect, address 6
[ 5418.353009] usblp0: removed

$ lpinfo -v
serial serial:/dev/ttyS0?baud=115200
direct scsi
network socket
network ipp
network http
network beh
network lpd
network smb
network dnssd://HP%20Photosmart%202570%20series%20iMac._ipp._tcp.local/cups
network dnssd://Adobe%20PDF%209.0%20iMac._ipp._tcp.local/cups
direct parallel:/dev/lp0
direct hp
direct hpfax

$ lsusb
Bus 005 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 003 Device 003: ID 047d:102d Kensington Pilot Optical
Bus 003 Device 002: ID 1241:1503 Belkin Keyboard
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 007: ID 413c:5603 Dell Computer Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Cups error log (/var/log/cups/error_log):

E [30/Apr/2010:13:38:22 -0400] [cups-deviced] Bad line from "usb": direct usb://Dell/3130cn%20Color%20Laser "Dell 3130cn Color Laser" "Dell 3130cn Color Laser" "MFG:Dell;CMD:PJL,RASTER,DOWNLOAD,PCLXL,PCL,HBPL,POSTSCRIPT;MDL:3130cn Color Laser;DES:Dell 3130cn Color Laser;CLS:PRINTER;STS:AAAQBAD/AP8AAAAAAAgAAWQDZANkA2QDZANkM2AaAAAAALCGAAAAAAAAAAAAAAAAAAAAAAAAAAAA
E [30/Apr/2010:13:38:22 -0400] [cups-deviced] Bad line from "usb": AAAA4AAAIAAAAAAAABAM;" ""

Carlos Lerzundy (arepaking) wrote :

As Ian mentioned. I confirmed this issue also in 10.04
when I execute the command "lsusb" I can see my Samsung ML-6060 detected by Ubuntu but I had unsuccessful results with CUPS when I tried to add a new printer. Basically there is no option for USB devices.

Any thoughts!?

Can you all run

sudo /usr/lib/cups/backend/usb

in a terminal window and post the result here? Thanks.

Changed in cups (Ubuntu):
status: New → Incomplete

Can you also run

sudo usb_printerid /dev/usb/lp0
sudo usb_printerid /dev/usb/lp1

in a terminal window and post the result here? Thanks.

Ian Halpern (ihh) wrote :

$ sudo /usr/lib/cups/backend/usb

DEBUG: list_devices_libusb
DEBUG: usb_find_busses=5
DEBUG: usb_find_devices=8
direct usb://Dell/3130cn%20Color%20Laser "Dell 3130cn Color Laser" "Dell 3130cn Color Laser" "MFG:Dell;CMD:PJL,RASTER,DOWNLOAD,PCLXL,PCL,HBPL,POSTSCRIPT;MDL:3130cn Color Laser;DES:Dell 3130cn Color Laser;CLS:PRINTER;STS:AAATAQD/AP8AAAAAAAgAAWQDZANkA2QDZANkM2AaAAAAALCGAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAA4AAAIAAAAAAAABAM;" ""

$ sudo usb_printerid /dev/usb/lp0

GET_DEVICE_ID string:
MFG:Dell;CMD:PJL,RASTER,DOWNLOAD,PCLXL,PCL,HBPL,POSTSCRIPT;MDL:3130cn Color Laser;DES:Dell 3130cn Color Laser;CLS:PRINTER;STS:AAATAQD/AP8AAAAAAAgAAWQDZANkA2QDZANkM2AaAAAAALCGAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAA4AAAIAAAAAAAABAM;

$ sudo usb_printerid /dev/usb/lp1

Error: No such file or directory: can't open '/dev/usb/lp1'

Carlos Lerzundy (arepaking) wrote :

Hello Till,
Here are my results per your request:

a) sudo /usr/lib/cups/backend/usb
Results:
DEBUG: list_devices_libusb
DEBUG: usb_find_busses=8
DEBUG: usb_find_devices=15
Segmentation fault

b) sudo usb_printerid /dev/usb/lp0
Results:
GET_DEVICE_ID string:

Thank in advance Till for helping us out to figure it out what is going on.

Warm Regards,
Carlos Lerzundy

c) sudo usb_printerid /dev/usb/lp1
Results:
Error: No such file or directory: can't open '/dev/usb/lp1'

Carlos Lerzundy (arepaking) wrote :

By the way, by running lsusb I get:

$ lsusb
Bus 005 Device 002: ID 04e8:3008 Samsung Electronics Co., Ltd ML-6060 laser printer

Ian, your Dell printer has a newline character in its device ID, which breaks the printer discovery mechanism of CUPS. I have created a patch to make CUPS working with that. I will commit this patch to Debian's BZR repository of CUPS from where it will make it into the Ubuntu package. Thanks for your report.

Everone who still has this problem please follow the instructions in comment #13 and comment #14. Thanks.

Ian Halpern (ihh) wrote :

@Till Kamppeter Thanks! Great to hear it was easily spotted and fixed. Could you post a link to the patch or the commit. I would like to give it a try. Again, great job.

Ian, I have the patch for the CUPS source code attached.

Carlos Lerzundy (arepaking) wrote :

Till,
Any advice in regards to my issue? Thanks in advance for your help!

The newline problem is also described in bug 519690.

Carlos Lerzundy (and everyone who still has this problem), please run the following commands in a terminal window:

sudo /usr/lib/cups/backend/usb
sudo usb_printerid /dev/usb/lp0
sudo usb_printerid /dev/usb/lp1
lsusb
ls -l /dev/usb/lp* /dev/bus/usb/*/*

Post the output here.

Carlos Lerzundy (arepaking) wrote :

Hello Till,
Here are my results:

------------------------------------------------------
$ sudo /usr/lib/cups/backend/usb
DEBUG: list_devices_libusb
DEBUG: usb_find_busses=8
DEBUG: usb_find_devices=15
Segmentation fault
-------------------------------------------------------

-------------------------------------------------------
$ sudo usb_printerid /dev/usb/lp0
GET_DEVICE_ID string:
--------------------------------------------------------

---------------------------------------------------------
$ sudo usb_printerid /dev/usb/lp1
Error: No such file or directory: can't open '/dev/usb/lp1'
----------------------------------------------------------

----------------------------------------------------------
$ lsusb
Bus 008 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 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 04e8:3008 Samsung Electronics Co., Ltd ML-6060 laser printer
Bus 005 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 003 Device 003: ID 413c:2105 Dell Computer Corp. Model L100 Keyboard
Bus 003 Device 002: ID 413c:3012 Dell Computer Corp. Optical Wheel Mouse
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 046d:0809 Logitech, Inc.
Bus 002 Device 002: ID 0bda:0151 Realtek Semiconductor Corp. Mass Storage Device
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 006: ID 04a9:2225 Canon, Inc. CanoScan LiDE 70
Bus 001 Device 004: ID 13b1:0014 Linksys
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
---------------------------------------------------------------

----------------------------------------------------------------
$ ls -l /dev/usb/lp* /dev/bus/usb/*/*
crw-rw-r-- 1 root root 189, 0 2010-05-03 08:16 /dev/bus/usb/001/001
crw-rw-r-- 1 root root 189, 3 2010-05-03 08:16 /dev/bus/usb/001/004
crw-rw-r-- 1 root root 189, 5 2010-05-03 08:16 /dev/bus/usb/001/006
crw-rw-r-- 1 root root 189, 128 2010-05-03 08:16 /dev/bus/usb/002/001
crw-rw-r-- 1 root root 189, 129 2010-05-03 08:16 /dev/bus/usb/002/002
crw-rw-r-- 1 root root 189, 130 2010-05-03 08:16 /dev/bus/usb/002/003
crw-rw-r-- 1 root root 189, 256 2010-05-03 08:16 /dev/bus/usb/003/001
crw-rw-r-- 1 root root 189, 257 2010-05-03 08:16 /dev/bus/usb/003/002
crw-rw-r-- 1 root root 189, 258 2010-05-03 08:16 /dev/bus/usb/003/003
crw-rw-r-- 1 root root 189, 384 2010-05-03 08:16 /dev/bus/usb/004/001
crw-rw-r-- 1 root root 189, 512 2010-05-03 08:16 /dev/bus/usb/005/001
crw-rw-r-- 1 root lp 189, 513 2010-05-03 08:16 /dev/bus/usb/005/002
crw-rw-r-- 1 root root 189, 640 2010-05-03 08:16 /dev/bus/usb/006/001
crw-rw-r-- 1 root root 189, 768 2010-05-03 08:16 /dev/bus/usb/007/001
crw-rw-r-- 1 root root 189, 896 2010-05-03 08:16 /dev/bus/usb/008/001
crw-rw---- 1 root lp 180, 0 2010-05-03 08:16 /dev/usb/lp0
--------------------------------------------------------------------------------------------------------

Thank in advance,
Carlos

Carlos, thank you for the additional info. Your printer behaves correctly except that it does not return a device ID when it is asked for. This most probably causes the segmentation fault of the CUPS backend.

Carlos Lerzundy (arepaking) wrote :

Hi Till,
Thanks for your quick response.

I have to mention that this printer was working fine with ubuntu 9.04. It stopped working when I did a fresh install on ubuntu 9.10 and I was hoping that ubuntu 10.04 will be able to use the printer.

Is there a workaround for my problem?

My output shows differently than Carlos:

thnov@mistik:~$ sudo /usr/lib/cups/backend/usb
[sudo] password for thnov:
DEBUG: list_devices_libusb
DEBUG: usb_find_busses=5
DEBUG: usb_find_devices=11
direct usb://Xerox/Phaser%206140DN "Xerox Phaser 6140DN" "Xerox Phaser 6140DN" "MFG:Xerox;CMD:PJL,RASTER,DOWNLOAD,PCLXL,PCL,HBPL,POSTSCRIPT;MDL:Phaser 6140DN;DES:Xerox Phaser 6140DN;CLS:PRINTER;STS:AAAQBAD/AP8AAAAAAAgAA2QDZANkA2QDZANkA2QDQBoAAAAAsIIAAAAAAAAAAAAA4AAAEQAAAAAQ
DA==;" ""
thnov@mistik:~$ sudo usb_printerid /dev/usb/lp0
GET_DEVICE_ID string:
MFG:Xerox;CMD:PJL,RASTER,DOWNLOAD,PCLXL,PCL,HBPL,POSTSCRIPT;MDL:Phaser 6140DN;DES:Xerox Phaser 6140DN;CLS:PRINTER;STS:AAAQBAD/AP8AAAAAAAgAA2QDZANkA2QDZANkA2QDQBoAAAAAsIIAAAAAAAAAAAAA4AAAEQAAAAAQ
DA==;
thnov@mistik:~$ sudo usb_printerid /dev/usb/lp1
Error: No such file or directory: can't open '/dev/usb/lp1'
thnov@mistik:~$ lsusb
Bus 005 Device 002: ID 046d:c00b Logitech, Inc. MouseMan Wheel
Bus 005 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 003 Device 002: ID 0fce:d028 Sony Ericsson Mobile Communications AB
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 0471:060c Philips
Bus 002 Device 002: ID 04a5:7008 Acer Peripherals Inc. (now BenQ Corp.)
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 007: ID 0924:3d65 Xerox
Bus 001 Device 004: ID 2040:7070 Hauppauge Nova-T Stick 3
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
thnov@mistik:~$ ls -l /dev/usb/lp* /dev/bus/usb/*/*
crw-rw-r-- 1 root root 189, 0 2010-05-03 08:46 /dev/bus/usb/001/001
crw-rw-r-- 1 root root 189, 3 2010-05-03 08:46 /dev/bus/usb/001/004
crw-rw-r-- 1 root lp 189, 6 2010-05-03 20:05 /dev/bus/usb/001/007
crw-rw-r-- 1 root root 189, 128 2010-05-03 08:46 /dev/bus/usb/002/001
crw-rw-r-- 1 root root 189, 129 2010-05-03 08:46 /dev/bus/usb/002/002
crw-rw-r-- 1 root root 189, 130 2010-05-03 08:46 /dev/bus/usb/002/003
crw-rw-r-- 1 root root 189, 256 2010-05-03 08:46 /dev/bus/usb/003/001
crw-rw-r-- 1 root root 189, 257 2010-05-03 08:46 /dev/bus/usb/003/002
crw-rw-r-- 1 root root 189, 384 2010-05-03 08:46 /dev/bus/usb/004/001
crw-rw-r-- 1 root root 189, 512 2010-05-03 08:46 /dev/bus/usb/005/001
crw-rw-r-- 1 root root 189, 513 2010-05-03 08:46 /dev/bus/usb/005/002
crw-rw---- 1 root lp 180, 0 2010-05-03 20:05 /dev/usb/lp0

I can see now that I'm subscribed to this bug because of a duplicate (is it really a duplicate?) bug #519690

Paul Loughman (snowhog) wrote :

Tim -

Here's the output of the five commands you wanted run:

sudo /usr/lib/cups/backend/usb
nothing returned

sudo usb_printerid /dev/usb/lp0
GET_DEVICE_ID string:
6�

sudo usb_printerid /dev/usb/lp1
nothing returned

lsusb
Bus 005 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 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 1309:f002
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 008: ID 0458:0003 KYE Systems Corp. (Mouse Systems) Genius NetScroll+
Bus 001 Device 007: ID 0644:0000 TEAC Corp. Floppy
Bus 001 Device 006: ID 0409:0059 NEC Corp. HighSpeed Hub
Bus 001 Device 005: ID 05e3:0702 Genesys Logic, Inc. USB 2.0 IDE Adapter
Bus 001 Device 004: ID 05e3:0702 Genesys Logic, Inc. USB 2.0 IDE Adapter
Bus 001 Device 002: ID 0409:0059 NEC Corp. HighSpeed Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

ls -l /dev/usb/lp* /dev/bus/usb/*/*
crw-rw-r-- 1 root root 189, 0 2010-05-03 08:32 /dev/bus/usb/001/001
crw-rw-r-- 1 root root 189, 1 2010-05-03 08:32 /dev/bus/usb/001/002
crw-rw-r-- 1 root root 189, 3 2010-05-03 08:32 /dev/bus/usb/001/004
crw-rw-r-- 1 root root 189, 4 2010-05-03 08:32 /dev/bus/usb/001/005
crw-rw-r-- 1 root root 189, 5 2010-05-03 08:32 /dev/bus/usb/001/006
crw-rw-r-- 1 root root 189, 6 2010-05-03 08:32 /dev/bus/usb/001/007
crw-rw-r-- 1 root root 189, 7 2010-05-03 08:32 /dev/bus/usb/001/008
crw-rw-r-- 1 root root 189, 128 2010-05-03 08:32 /dev/bus/usb/002/001
crw-rw-r-- 1 root lp 189, 129 2010-05-03 08:32 /dev/bus/usb/002/002
crw-rw-r-- 1 root root 189, 256 2010-05-03 08:32 /dev/bus/usb/003/001
crw-rw-r-- 1 root root 189, 384 2010-05-03 08:32 /dev/bus/usb/004/001
crw-rw-r-- 1 root root 189, 512 2010-05-03 08:32 /dev/bus/usb/005/001
crw-rw---- 1 root lp 180, 0 2010-05-03 08:32 /dev/usb/lp0

Thomas, your problem is the same as Ian's, the device ID of your printer has a newline character. For this problem we already have a fix.

Paul L, your problem is the same as Carlos', your printer does not return any device ID and so the CUPS backend is not able to identify it. Due to at least two weird characters returned by the printer the CUPS backend does at least not segfault.

Bug #519690 is marked a duplicate of this one as both problems got reported there independently.

On Monday, May 03, 2010 10:58:42 am you wrote:
> Thomas, your problem is the same as Ian's, the device ID of your
printer
> has a newline character. For this problem we already have a fix.
>
> Paul L, your problem is the same as Carlos', your printer does not
> return any device ID and so the CUPS backend is not able to
identify it.
> Due to at least two weird characters returned by the printer the
CUPS
> backend does at least not segfault.
>
> Bug #519690 is marked a duplicate of this one as both problems
got
> reported there independently.
Why then, with the same printer, connected to the same laptop,
running Kubuntu Jaunty 9.04, does the printer work? Something
changed between the Kubuntu Jaunty 9.04 release and Kubuntu
Karmic 9.10, either with the main OS or with something in KDE. My
printer issue appeared in Karmic and continues in Lucid.

I'd be more than happy to boot into Jaunty and run the same five
commands and post the results for you.
--

Proudly running Linux since 2007
Kubuntu Lucid Lynx 10.04
Kubuntu Karmic Koala 9.10
Kubuntu Jaunty Jackalope 9.04

Carlos Lerzundy (arepaking) wrote :

I second Paul but with the Ubuntu distro...
Ubuntu Jaunty was working flawless with my printer. When Karmic appeared it stopped working at all... and continue with Lucid... something changed that's for sure... =(

Paul L, can you actually do so, booting into Jaunty and run the five commands? This would be really great.

Paul Loughman (snowhog) wrote :

On Monday, May 03, 2010 11:26:58 am you wrote:
> Paul L, can you actually do so, booting into Jaunty and run the five
> commands? This would be really great.
Yes. I'll do that shortly.

Thank you! If you can figure this out, and get our USB printers seen and
configurable again, that would be fantastic!

--

Proudly running Linux since 2007
Kubuntu Lucid Lynx 10.04
Kubuntu Karmic Koala 9.10
Kubuntu Jaunty Jackalope 9.04

Download full text (3.6 KiB)

My problem is also a segfault of the cups usb backend:
mf@feistnas:~$ sudo /usr/lib/cups/backend/usb
DEBUG: list_devices_libusb
DEBUG: usb_find_busses=5
DEBUG: usb_find_devices=12
Segmentation fault
mf@feistnas:~$ sudo usb_printerid /dev/usb/lp0
GET_DEVICE_ID string:
Af���jbo/com/ubuntu/Upstartscom.ubuntu.Upstart0_6s EmitEvengsasbi2c-adapter-devi
mf@feistnas:~$ sudo usb_printerid /dev/usb/lp1
GET_DEVICE_ID string:
MFG:HEWLETT-PACKARD;MDL:DESKJET 930C;CMD:MLC,PCL,PML;CLASS:PRINTER;DESCRIPTION:Hewlett-Packard DeskJet 930C;SERN:ES03N1D2D4JJ;VSTATUS:$XB0$XC0,ff,DN,OFFF,CUT,K0,C0,SM,NR,KP000,CP000;VP:0800,FL,B0;VJ: ;
mf@feistnas:~$ lsusb
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 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 002 Device 004: ID 04b4:fd11 Cypress Semiconductor Corp.
Bus 002 Device 002: ID 058f:9254 Alcor Micro Corp. Hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 005: ID 071d:2000 Eicon Networks Corp. Teledat Surf
Bus 001 Device 002: ID 050d:0231 Belkin Components
Bus 001 Device 004: ID 058f:6362 Alcor Micro Corp. Hi-Speed 21-in-1 Flash Card Reader/Writer (Internal/External)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
mf@feistnas:~$ ls -l /dev/usb/lp* /dev/bus/usb/*/*
crw-rw-r-- 1 root vboxusers 189, 0 2010-05-03 21:20 /dev/bus/usb/001/001
crw-rw-r-- 1 root vboxusers 189, 1 2010-05-03 21:20 /dev/bus/usb/001/002
crw-rw-r-- 1 root vboxusers 189, 3 2010-05-03 21:20 /dev/bus/usb/001/004
crw-rw-r-- 1 root vboxusers 189, 4 2010-05-03 21:20 /dev/bus/usb/001/005
crw-rw-r-- 1 root vboxusers 189, 128 2010-05-03 21:20 /dev/bus/usb/002/001
crw-rw-r-- 1 root vboxusers 189, 129 2010-05-03 21:20 /dev/bus/usb/002/002
crw-rw---- 1 root lp 189, 130 2010-05-03 21:20 /dev/bus/usb/002/003
crw-rw-r-- 1 root vboxusers 189, 131 2010-05-03 21:20 /dev/bus/usb/002/004
crw-rw----+ 1 root lp 189, 132 2010-05-03 21:21 /dev/bus/usb/002/005
crw-rw-r-- 1 root vboxusers 189, 256 2010-05-03 21:20 /dev/bus/usb/003/001
crw-rw-r-- 1 root vboxusers 189, 384 2010-05-03 21:20 /dev/bus/usb/004/001
crw-rw-r-- 1 root vboxusers 189, 512 2010-05-03 21:20 /dev/bus/usb/005/001
crw-rw---- 1 root lp 180, 0 2010-05-03 21:20 /dev/usb/lp0
crw-rw---- 1 root lp 180, 1 2010-05-03 21:20 /dev/usb/lp1

It seems that the deviceid of usb/lp0 is messed up, like you can see in the hexdump:
mf@feistnas:~$ sudo usb_printerid /dev/usb/lp0 | hd
00000000 47 45 54 5f 44 45 56 49 43 45 5f 49 44 20 73 74 |GET_DEVICE_ID st|
00000010 72 69 6e 67 3a 0a 41 66 00 88 ff ff 6a 00 00 00 |ring:.Af....j...|
00000020 62 00 00 00 01 01 6f 00 13 00 00 00 2f 63 6f 6d |b.....o...../com|
00000030 2f 75 62 75 6e 74 75 2f 55 70 73 74 61 72 74 00 |/ubuntu/Upstart.|
00000040 00 00 00 00 02 01 73 00 15 00 00 00 63 6f 6d 2e |......s.....com.|
00000050 75 62 75 6e 74 75 2e 55 70 73 74 61 72 74 30 5f |ubuntu.Upstart0_|
00000060 36 00 00 00 03 01 73 00 09 00 00 00 45 6d 69 74 |6.....s.....Emit|
00000070 45 76 65 6e 74 00 00 00 00 00 00 00 08 01 67 00 |Event............

Read more...

Paul Loughman (snowhog) wrote :

Tim -

From Kubuntu Jaunty 9.04, KDE 4.3.2.

Here's the output of the five commands you wanted run:

sudo /usr/lib/cups/backend/usb
 nothing returned

sudo usb_printerid /dev/usb/lp0
 GET_DEVICE_ID string:
�����|((�� b���ℷb���R��b���'��p=����DB�e��88�����p&��b��b���&���c���"���U���&������a���a���
                                                                                          ;���c��b!��;��;�
               ����"���&��pc��0���"��������������c������((��p=���������"���b���D��(�m��U��P���p�����셷�셷P���p�����셷�"�����P��PT�p �s�p=��0���
                                                   Dc��nJ���U��xW���R��P=�� ���"������R��PT��c���܄��m�H)��@;����h=��\T)�����;��dd����H�0d��.N=�X8��q���l�l�@;��X8��� �m�����.N=�((��Pe���ℷ@e���4e���'��@;��X&��hA��@e��4e���e��p&���`��tz��N�s���~��(e��
                                                                ��o

sudo usb_printerid /dev/usb/lp1
Error: No such file or directory: can't open '/dev/usb/lp1'
(same as in Karmic)

lsusb
 Bus 001 Device 007: ID 0644:0000 TEAC Corp. Floppy
Bus 001 Device 008: ID 0458:0003 KYE Systems Corp. (Mouse Systems) Genius NetScroll+
Bus 001 Device 006: ID 0409:0059 NEC Corp. HighSpeed Hub
Bus 001 Device 005: ID 05e3:0702 Genesys Logic, Inc. USB 2.0 IDE Adapter
Bus 001 Device 004: ID 05e3:0702 Genesys Logic, Inc. USB 2.0 IDE Adapter
Bus 001 Device 002: ID 0409:0059 NEC Corp. HighSpeed Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 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 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 1309:f002
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

And as previously stated, the printer works - I opened a document and printed it.

In CUPS (1.3.9), this is the information for my printer:
Panasonic (Default)
Description: KX-P4410
 Location: Desk
 Printer Driver: Panasonic KX-P4410 - CUPS+Gutenprint v5.2.3
 Printer State: idle, accepting jobs, published.
Device URI: hal:///org/freedesktop/Hal/devices/usb_device_1309_f002_noserial_if0_printer_noserial

Panasonic
Description: KX-P4410
 Location: Desk
 Printer Driver: Panasonic KX-P4410 Foomatic/ljet2p (recommended)
 Printer State: idle, accepting jobs, published.
Device URI: hal:///org/freedesktop/Hal/devices/usb_device_1309_f002_noserial_if0_printer_noserial

Two different printer drivers, and both work.

Paul Loughman (snowhog) wrote :

Additional info, from my Jaunty OS:

paul@myotherbrain:/var/log$ cat dmesg | grep directional
[ 19.270813] usblp0: USB Bidirectional printer dev 2 if 0 alt 1 proto 2 vid 0x1309 pid 0xF002

Paul L, I see, HAL and its CUPS backend were working around the problem that your printer does not return a usable device ID. HAL is deprecated now and therefore the hal CUPS backend is no part of Ubuntu any more. If your Panasonic is your only USB printer you can use the device URI

parallel:/dev/usb/lp0

as alternative in Karmic or Lucid.

One question: The Panasonic KX-P4410 is a rather old printer (PCL 4). Is this a native USB printer or are you using a USB/parallel adapter cable?

Paul Loughman (snowhog) wrote :

On Monday 03 May 2010 01:20:21 pm Till Kamppeter wrote:
> Paul L, I see, HAL and its CUPS backend were working around the problem
> that your printer does not return a usable device ID. HAL is deprecated
> now and therefore the hal CUPS backend is no part of Ubuntu any more. If
> your Panasonic is your only USB printer you can use the device URI
>
> parallel:/dev/usb/lp0
>
> as alternative in Karmic or Lucid.
>
> One question: The Panasonic KX-P4410 is a rather old printer (PCL 4). Is
> this a native USB printer or are you using a USB/parallel adapter cable?
>
Thank you. I'll try using that URI as soon as I reboot back into Karmic.

Yes, it's an old printer - very old (over ten years now), but it works like a
champ. Yes, it is a parallel printer, connected to one of my laptops USB ports
by a USB/Parallel cable.

--
Paul
------------
Powered by Linux:
Ubuntu Jaunty 9.04
Kubuntu Jaunty 9.04

Paul Loughman (snowhog) wrote :

Tim, your a God send! You're recommendation worked!! I have my printer again!!!

I set it up in CUPS as follows:

Administration > Add Printer > Local Printer > HP Printer (HPLIP) > Connection: parallel:/dev/usb/lp0

Gave it a name, description, and location and then selected the Printer and model and selected the driver to use, in my case, Panasonic KX-P4410 Foomatic/ljet2p (recommended).

Did a test print. Works great!

Set it as the default printer in Kubuntu (it doesn't get set by default there).

I've been without my printer since the installing Kubuntu Karmic 9.10. I kept Karmic Jaunty 9.04 largely because it had a working printer.

Again, thank you, thank you, thank you!! You've helped to make my new system complete.

Paul

Carlos Lerzundy (arepaking) wrote :

Till,
God bless you Sir! I followed your suggestion and it worked!!!!! I can believe that I had a complete year without being able to use my printer!

Ian Halpern (ihh) wrote :

@Till Kamppeter I applied the newline patch and the printer is now working! Thank you very much.
http://launchpadlibrarian.net/47216582/cups-deviced-allow-device-ids-with-newline.patch

devnulljp (sendittodevnull) wrote :

/I have the same issue with a Canon ip4000 since upgrading to Kubuntu 10.04. It worked perfectly in 9.x, but now it doesn't show up.
I tried running the patch above #21 with
sudo ./cups-deviced-allow-device-ids-with-newline.patch -patch
patching file scheduler/cups-deviced.c
Hunk #1 FAILED at 577.
1 out of 1 hunk FAILED -- saving rejects to file scheduler/cups-deviced.c.rej

Here's the output of the commands above
sudo /usr/lib/cups/backend/usb
DEBUG: list_devices_libusb
DEBUG: usb_find_busses=8
DEBUG: usb_find_devices=12
direct usb://Canon/iP4000 "Canon iP4000" "Canon iP4000" "MFG:Canon;CMD:BJL,BJRaster3,BSCCe;SOJ:TXT01;MDL:iP4000;CLS:PRINTER;DES:Canon iP4000;VER:1.06;STA:10;FSI:02;" ""

sudo usb_printerid /dev/usb/lp0
GET_DEVICE_ID string:
MFG:Canon;CMD:BJL,BJRaster3,BSCCe;SOJ:TXT01;MDL:iP4000;CLS:PRINTER;DES:Canon iP4000;VER:1.06;STA:10;FSI:02;

sudo usb_printerid /dev/usb/lp1
Error: No such file or directory: can't open '/dev/usb/lp1'

lsusb
Bus 008 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 006 Device 004: ID 04a9:1093 Canon, Inc. PIXMA iP4000
Bus 006 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 004 Device 002: ID 0a5c:2145 Broadcom Corp.
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 04b3:3107 IBM Corp. ThinkPad 800dpi Optical Travel Mouse
Bus 001 Device 003: ID 04b3:4485 IBM Corp. Serial Converter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
ls -l /dev/usb/lp* /dev/bus/usb/*/*
crw-rw-r-- 1 root root 189, 0 2010-05-13 13:20 /dev/bus/usb/001/001
crw-rw-r-- 1 root root 189, 2 2010-05-13 13:20 /dev/bus/usb/001/003
crw-rw-r-- 1 root root 189, 3 2010-05-13 13:20 /dev/bus/usb/001/004
crw-rw-r-- 1 root root 189, 128 2010-05-13 13:20 /dev/bus/usb/002/001
crw-rw-r-- 1 root root 189, 256 2010-05-13 13:20 /dev/bus/usb/003/001
crw-rw-r-- 1 root root 189, 384 2010-05-13 13:20 /dev/bus/usb/004/001
crw-rw-r-- 1 root root 189, 385 2010-05-13 13:20 /dev/bus/usb/004/002
crw-rw-r-- 1 root root 189, 512 2010-05-13 13:20 /dev/bus/usb/005/001
crw-rw-r-- 1 root root 189, 640 2010-05-13 13:20 /dev/bus/usb/006/001
crw-rw-r-- 1 root lp 189, 643 2010-05-13 14:40 /dev/bus/usb/006/004
crw-rw-r-- 1 root root 189, 768 2010-05-13 13:20 /dev/bus/usb/007/001
crw-rw-r-- 1 root root 189, 896 2010-05-13 13:20 /dev/bus/usb/008/001
crw-rw---- 1 root lp 180, 0 2010-05-13 14:40 /dev/usb/lp0

I'd love to get this working again.

devnulljp (sendittodevnull) wrote :

UPDATE: Applied the patch to the proper source tree and installed. Works fine now. Thanks

Accepted cups into lucid-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!

Changed in cups (Ubuntu Maverick):
status: Incomplete → Fix Committed
assignee: nobody → Till Kamppeter (till-kamppeter)
Changed in cups (Ubuntu Lucid):
status: New → Fix Committed
tags: added: verification-needed

devnulljp, Ian, Thomas, can you test the fixed package in lucid-proposed (see previous comment)? We need some confirmation that it really fixes the bug. Thanks.

Ian Halpern (ihh) wrote :

Installed the cups 1.4.3-1ubuntu1 from lucid-proposed and my printer works like a charm! Till Kamppeter, thank you. This confirms the newline bug has been fixed.

tags: added: verification-done
removed: verification-needed
devnulljp (sendittodevnull) wrote :

Installed cups 1.4.3-1ubuntu1 from lucid-proposed.
Printer (Canon iP4000) works fine.
Thanks Till.

Launchpad Janitor (janitor) wrote :

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

---------------
cups (1.4.3-1ubuntu1) lucid-proposed; urgency=low

  * debian/filters/pstopdf: Fixed the problem of the UseCIEColor warning of
    Ghostscript correctly. The file format converter should not do any kind
    of color correction but simply pass the colors through (LP: #578181).
  * debian/patches/cups-deviced-allow-device-ids-with-newline.dpatch: Some
    printers have broken device IDs with newline characters inside. These
    break the cups-deviced printer discovery mechanism and so the printers
    get ignored. This patch allows newline characters in device IDs
    (LP: #468701).
 -- Till Kamppeter <email address hidden> Fri, 14 May 2010 15:51:54 +0200

Changed in cups (Ubuntu Lucid):
status: Fix Committed → Fix Released
Martin Pitt (pitti) wrote :

copied to maverick, too

Changed in cups (Ubuntu Maverick):
status: Fix Committed → Fix Released
wayne bantz (w6huy) on 2010-08-23
Changed in cups (Ubuntu Lucid):
assignee: nobody → wayne bantz (w6huy)

The "Fix Released" is only for device URIs containing a newline but still being the expected structure of device URIs otherwise. Remaining is the problem of users of USB-Parallel adapter cables where a complete mess comes out as device URI. This problem is handled in bug 564917. Therefore I am marking this bug as a duplicate.

ivonne (ivonneleonor1) wrote :

Hi:
They are my results:

DEBUG: list_devices
DEBUG: libusb_get_device_list=5
leo@pio:/usr/lib/cups/backend$ sudo usb_printerid /dev/usb/lp0
Error: No such file or directory: can't open '/dev/usb/lp0'
leo@pio:/usr/lib/cups/backend$ sudo usb_printerid /dev/usb/lp1
Error: No such file or directory: can't open '/dev/usb/lp1'

I saw the patch but where can I put it? I have ubuntu 12.04

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

Other bug subscribers