[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: usb/cups printer problem after etch upgrade



On Mon, Apr 30, 2007 at 00:56:24 +0100, graham wrote:
> Florian Kulzer wrote:

[...]

>> Compare a directory listing before and after you plug in the printer if
>> necessary. You can use something like
>> find /dev/ | sort > before.txt
>> < plug in the printer >
>> find /dev/ | sort > after.txt
>> diff -u before.txt after.txt
>
> snoopy> diff -u before.txt after.txt

[ snip: I only kept the new device nodes below ]

> +/dev/bus/usb/001/110
> +/dev/.udev/db/class@usb_device@usbdev1.110
> +/dev/.udev/db/class@usb@lp0
> +/dev/.udev/db/devices@pci0000:00@0000:00:03.0@usb1@1-1@1-1:1.0@usbdev1.110_ep03+/dev/.udev/db/devices@pci0000:00@0000:00:03.0@usb1@1-1@1-1:1.0@usbdev1.110_ep82+/dev/.udev/db/devices@pci0000:00@0000:00:03.0@usb1@1-1@usbdev1.110_ep00
> +/dev/usb
> +/dev/usbdev1.110_ep00
> +/dev/usbdev1.110_ep03
> +/dev/usbdev1.110_ep82
> +/dev/usb/lp0

[...]

> snoopy>ls -al /dev/usb/lp0
> crw-rw---- 1 root lp 180, 0 2007-04-30 00:34 /dev/usb/lp0

That all looks fine to me. For real bout of paranoia you can quickly
check if you are still a member of the "lp" group.

> snoopy> udevinfo -a -p $(udevinfo -q path -n /dev/usb/lp0)

[...]

>   looking at device '/class/usb/lp0':
>     KERNEL=="lp0"
>     SUBSYSTEM=="usb"
>     DRIVER==""
>     ATTR{dev}=="180:0"
>
>   looking at parent device 
> '/devices/pci0000:00/0000:00:03.0/usb1/1-1/1-1:1.0':
>     KERNELS=="1-1:1.0"
>     SUBSYSTEMS=="usb"
>     DRIVERS=="usblp"
>     ATTRS{modalias}=="usb:v04F9p0016d0100dc00dsc00dp00ic07isc01ip02"
>     ATTRS{bInterfaceProtocol}=="02"
>     ATTRS{bInterfaceSubClass}=="01"
>     ATTRS{bInterfaceClass}=="07"
>     ATTRS{bNumEndpoints}=="02"
>     ATTRS{bAlternateSetting}==" 0"
>     ATTRS{bInterfaceNumber}=="00"
>     ATTRS{ieee1284_id}=="MFG:Brother_CMD:PJL,PCL,PCLXL_MDL:HL-5040 
> series_CLS:PRINTER_"
>
>   looking at parent device '/devices/pci0000:00/0000:00:03.0/usb1/1-1':
>     KERNELS=="1-1"
>     SUBSYSTEMS=="usb"
>     DRIVERS=="usb"
>     ATTRS{configuration}==""
>     ATTRS{serial}=="L3J497500"
>     ATTRS{product}=="HL-5040"
>     ATTRS{manufacturer}=="Brother"
>     ATTRS{maxchild}=="0"
>     ATTRS{version}==" 1.10"
>     ATTRS{devnum}=="125"
>     ATTRS{speed}=="12"
>     ATTRS{bMaxPacketSize0}=="16"
>     ATTRS{bNumConfigurations}=="1"
>     ATTRS{bDeviceProtocol}=="00"
>     ATTRS{bDeviceSubClass}=="00"
>     ATTRS{bDeviceClass}=="00"
>     ATTRS{bcdDevice}=="0100"
>     ATTRS{idProduct}=="0016"
>     ATTRS{idVendor}=="04f9"
>     ATTRS{bMaxPower}=="100mA"
>     ATTRS{bmAttributes}=="c0"
>     ATTRS{bConfigurationValue}=="1"
>     ATTRS{bNumInterfaces}==" 1"

[...]

I think we can now safely assume that udev works properly and that the
problem is with CUPS. (It is good to have these tests now in the archive
for other people to find.)

[...]

>> You could also try to find a serial number like this:
>> udevinfo -a -p $(udevinfo -q path -n /dev/usb/lp0)  | grep -i serial
>
> ATTRS{serial}=="L3J497500"
> ATTRS{serial}=="0000:00:03.0"
>
> I have tried setting:
>
> DeviceURI usb://dev/usb/lp0?serial=L3J497500
>
> and
>
> DeviceURI usb://dev/usb/lp0?serial=0000:00:03.0
>
> with no results.

Just for the sake of completeness I would also try:

DeviceURI usb://Brother/HL-5040%20series?serial=L3J497500

and

DeviceURI usb://Brother/HL-5040?serial=L3J497500

("0000:00:03.0" is the serial number of the OHCI Host Controller and
 should not be relevant for CUPS.)

>> Another thing that might be important is how you handled the cupsys
>> configuration files during the upgrade. Did you keep your old ones or
>> did you replace them with the maintainer's new versions?
>
> I kept the original version of cupsd.conf, the only file the installer 
> asked about.
> When it didn't work I tried using the new cupsd.conf.dpkg-dist, with no 
> more success

Just to be sure: Did you restart cupsys after making the change?

> Also:
>
> After I changed DeviceURI to /dev/usb/lp0, the cups admin panel immediately 
> showed 'new printer found'. I added this new printer, then looked at the 
> rewritten printers.conf. The line it had added was the same as the original 
> version:
>   	
> DeviceURI usb://Brother/HL-5040%20series
>
> The name cups auto-assigned to the new printer is 
> Brother_HL-5040_series_USB_1
>
> However, this 'newly discovered' printer also displays 'printer not 
> connected' when attempting to print to it.
>
> Thanks for your extreme patience!

I am afraid that I am slowly running out of ideas how to tackle this. I use Sid
and I remember at least two CUPS upgrades in the last 1.5 years which required
me to reinstall the printers (new PPD-files) and to overwrite the configuration
files. My feeling is therefore that there is a problem somewhere in the
configuration files of your CUPS. I am starting to lean towards the brute-force
approach:

1) Back up /etc/cups/ (for our old friend Mr Justin Case).

2) Purge CUPS from your system:
   
   apt-get --purge remove cupsys cupsys-common cupsys-client cupsys-driver-gutenprint 

   If you have "foomatic-filters-ppds" installed you might have to purge
   that as well.

3) If there are any files left in /etc/cups after that, find out which
   package is responsible ("dpkg -S etc/cups/") and purge that one, too.

4) Reinstall all the packages that you have purged:

   apt-get install ...

5) Use a browser of your choice to access the CUPS frontend at
   http://localhost:631. Use the "Add Printer" button to set up a new
   printer. If you are not a member of the "lpadmin" group then you will
   probably have to supply the root password.  For the DeviceURI I would
   use "usb://Brother/HL-5040%20series". If that does not work I would
   try to add "?serial=L3J497500" and/or suppress the "%20series" part.
   Make sure that you choose the right driver for the printer; I think
   it is "HL-5040 Foomatic/hl1250".

6) Try to print a test page using the button in the CUPS web-interface.
   If that fails you can try one of the other "HL-5040 ..." drivers.

7) That is all I have got, except for "file a bug report if the problem
   persists".

-- 
Regards,            | http://users.icfo.es/Florian.Kulzer
          Florian   |



Reply to: