Printer suddenly no longer recognised

Asked by Nikolaus Rath

Hello,

My Epson Stylus C82 worked fine for several months. However, this morning it just stopped printing. The are no error messages in /var/log/cups. I tried removing the printer with gnome-cups-manager and adding it again, but suddenly the printer is no longer detected.

When plugging in the printer, the kernel reports

Mar 9 15:24:21 nokile kernel: [17179689.976000] usb 5-8.4: new full speed USB device using ehci_hcd and address 5
Mar 9 15:24:21 nokile kernel: [17179690.076000] usb 5-8.4: configuration #1 chosen from 1 choice
Mar 9 15:24:21 nokile NetworkManager: <debug info>^I[1173450261.924931] nm_hal_device_added (): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_4b8_5_HM0180305241419230').
Mar 9 15:24:21 nokile NetworkManager: <debug info>^I[1173450261.990947] nm_hal_device_added (): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_4b8_5_HM0180305241419230_if0').
Mar 9 15:24:22 nokile kernel: [17179690.324000] drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 5 if 0 alt 0 proto 2 vid 0x04B8 pid 0x0005
Mar 9 15:24:22 nokile kernel: [17179690.324000] usbcore: registered new driver usblp
Mar 9 15:24:22 nokile kernel: [17179690.324000] drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Mar 9 15:24:22 nokile NetworkManager: <debug info>^I[1173450262.162993] nm_hal_device_added (): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_4b8_5_HM0180305241419230_usbraw').
Mar 9 15:24:22 nokile NetworkManager: <debug info>^I[1173450262.246007] nm_hal_device_added (): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_4b8_5_HM0180305241419230_if0_printer_noserial').

so everything seems to be fine. I cannot even add the printer manually, because under "Printer Ports" it just says "hp no_device_found".

How can I get my printer to work again?

Thanks in advance,
-Nikolaus

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Nikolaus Rath
Solved:
Last query:
Last reply:
Revision history for this message
Wolf Canis (wolf-canis) said :
#1

Hello Nikolaus,
after the printer is plugged in, try in a terminal the command

lsusb

you should get a brief listing of your USB devices. One of the entries should be your printer. Now type the following command

lsusb -v -s BUSNUMBER:DEVICENUMBER

BUSNUMBER and DEVICENUMBER you got in the previous output. For example:

$ lsusb
Bus 003 Device 004: ID 03f0:1204 Hewlett-Packard DeskJet 930c

$ lsusb -v -s 003:004

The last output give you a detailed description of the device. If that doesn't help you, post the output of both commands.

Mr Canis

Revision history for this message
Keith Watson (kpwatson) said :
#2

Can I just add an AOL style "me too" message. :o) I have a Canon S400 USB printer. Worked fine until last Friday (9-March) and now I have exactly the same symptoms.

And before you ask;

keith@watson:~$ lsusb
Bus 005 Device 001: ID 0000:0000
Bus 001 Device 003: ID 062a:0102 Creative Labs
Bus 001 Device 002: ID 046d:c408 Logitech, Inc. Marble Mouse (4-button)
Bus 001 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 004 Device 002: ID 04a9:105c Canon, Inc.
Bus 004 Device 001: ID 0000:0000
keith@watson:~$ lsusb -v -s 004:002

Bus 004 Device 002: ID 04a9:105c Canon, Inc.
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 1.10
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 8
  idVendor 0x04a9 Canon, Inc.
  idProduct 0x105c
  bcdDevice 1.03
  iManufacturer 1 Canon
  iProduct 2 S400
  iSerial 3 37R1Q6
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 32
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xc0
      Self Powered
    MaxPower 2mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 2
      bInterfaceClass 7 Printer
      bInterfaceSubClass 1 Printer
      bInterfaceProtocol 2 Bidirectional
      iInterface 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x01 EP 1 OUT
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x82 EP 2 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 0
Device Status: 0x0001
  Self Powered

also see https://launchpad.net/bugs/29050 which may be related?

Revision history for this message
Keith Watson (kpwatson) said :
#3

More info;

keith@watson:~$ lpinfo -v
network socket
network beh
direct hp:/no_device_found
network http
network ipp
network lpd
direct parallel:/dev/lp0
direct canon:/dev/lp0
direct epson:/dev/lp0
network smb

which means CUPS is not finding the device. So I examined the owner and group of /dev/lp0 which is recognised

keith@watson:~$ ls -l /dev/lp*
crw-rw---- 1 root lp 6, 0 2007-03-13 22:53 /dev/lp0

and for the USB printer also

keith@watson:~$ ls -l /dev/*lp*
crw-rw---- 1 root lp 6, 0 2007-03-13 22:53 /dev/lp0
crw-rw---- 1 root plugdev 180, 0 2007-03-13 22:53 /dev/usblp0

so I added the USB printer to the same group

keith@watson:~$ sudo chown root:lp /dev/usblp0

keith@watson:~$ ls -l /dev/*lp*
crw-rw---- 1 root lp 6, 0 2007-03-13 22:53 /dev/lp0
crw-rw---- 1 root lp 180, 0 2007-03-13 22:53 /dev/usblp0

and restarted CUPS

keith@watson:~$ sudo /etc/init.d/cupsys restart
 * Restarting Common Unix Printing System: cupsd

and now I get
keith@watson:~$ lpinfo -v
network socket
network beh
direct usb://Canon/S400
direct hp:/no_device_found
network http
network ipp
network lpd
direct parallel:/dev/lp0
direct canon:/dev/lp0
direct epson:/dev/lp0
network smb

and gnome-cups-manager now recognises the USB printer and I can print a test page. However I suspect the group may revert back after I reboot.

Revision history for this message
Keith Watson (kpwatson) said :
#4

Yep, after a reboot the group on /dev/usblp0 has reverted to plugdev. Looks like something changed around 8/9 March that now puts the device node into a different group. Any ideas as to what that might be? Goes beyond my knowledge of how these things work I'm afraid.

Still, we have a work around :o)

Revision history for this message
Wolf Canis (wolf-canis) said :
#5

Hello Keith Watson,
thanks for the information, but I can't reproduce it. I'm running Ubuntu 6.10 edgy on a Toshiba Satellite L30 (this model haven't a parallel port only USB and PCMCIA). I have connected a HP Deskjet 930C. The rights for the printer device are:

$ ls -l /dev/*lp*

crw-rw---- 1 root lp 180, 0 2007-03-14 08:20 /dev/usblp0

And my rights are:

$ id

uid=1000(rh) gid=1000(rh) groups=4(adm),20(dialout),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),109(lpadmin),111(scanner),114(admin),1000(rh)

How you see I'm in the admin group, because I'm the only one user on my system.
And that the upgrades from 7,8,9 march:

Commit Log for Wed Mar 7 14:13:55 2007

Upgraded the following packages:
mozilla-thunderbird (1.5.0.9-0ubuntu0.6.10) to 1.5.0.10-0ubuntu0.6.10
mozilla-thunderbird-inspector (1.5.0.9-0ubuntu0.6.10) to 1.5.0.10-0ubuntu0.6.10
mozilla-thunderbird-typeaheadfind (1.5.0.9-0ubuntu0.6.10) to 1.5.0.10-0ubuntu0.6.10
tcpdump (3.9.4-4) to 3.9.4-4ubuntu0.1

Commit Log for Thu Mar 8 12:36:00 2007

Upgraded the following packages:
gnupg (1.4.3-2ubuntu3.2) to 1.4.3-2ubuntu3.3
tzdata (2006p-0ubuntu6.10) to 2007b-0ubuntu0.6.10

Commit Log for Fri Mar 9 08:19:38 2007

Upgraded the following packages:
ekiga (2.0.3-0ubuntu3.1) to 2.0.3-0ubuntu3.2

--------

Therefore I don't think that have something to do with the upgrades.
Witch Ubuntu version you are running?
Could it be that you are not in the admin group?
What's with your udev rules (/dev/udev/rules.d)?

Mr Canis

Revision history for this message
Nikolaus Rath (nikratio) said :
#6

My printer magically started working again. I have not changed anything. I'm not closing this since it seems that other people suffer from similar effects.

Revision history for this message
Wolf Canis (wolf-canis) said :
#7

Hello Keith Watson,
is your printer working again?
If yes, it would be nice you post your solution here.

Thanks.

Mr Canis

Revision history for this message
Keith Watson (kpwatson) said :
#8

Hi, sorry for the delay in replying.

I'm running Ubuntu 6.10 and using a Canon S400 attached via a USB port. On my lp0 port I have a parallel attached scanner.

Yes I am in the admin group, as far as I can remember I always have been.

However some news. Since the weekend, last Saturday to be exact (17-March), my printer works fine from login and I don't have to apply the group change to /dev/usblp0 any more.

The usb printer is now back in the lp group

keith@watson:~$ ls -l /dev/*lp*
crw-rw---- 1 root lp 6, 0 2007-03-21 19:04 /dev/lp0
crw-rw---- 1 root lp 180, 0 2007-03-21 19:03 /dev/usblp0

The last update I did was in Friday (16-March) via Synaptic.

Apart from regularly applying updates via Synaptic I haven't changed anything else.

I don't have a /dev/udev/rules.d but I do have a /etc/udev/rules.d , is that what you mean?

Anyway here it is;

keith@watson:~$ ls -l /etc/udev/rules.d
total 180
-rw-r--r-- 1 root root 433 2006-10-16 13:39 00-init.rules
lrwxrwxrwx 1 root root 23 2006-11-22 20:35 025_libsane-extras.rules -> ../libsane-extras.rules
-rw-r--r-- 1 root root 807 2006-09-22 17:00 11-hplj10xx.rules
-rw-r--r-- 1 root root 2729 2006-10-16 13:39 20-names.rules
-rw-r--r-- 1 root root 190 2006-05-22 15:25 25-iftab.rules
-rw-r--r-- 1 root root 3146 2006-10-16 13:39 40-permissions.rules
-rw-r--r-- 1 root root 210 2006-10-13 18:36 45-hplip.rules
-rw-r--r-- 1 root root 52478 2007-03-15 19:34 45-libgphoto2.rules
-rw-r--r-- 1 root root 46855 2006-09-10 23:56 45-libsane.rules
-rw-r--r-- 1 root root 1319 2006-10-16 13:39 60-symlinks.rules
-rw-r--r-- 1 root root 1079 2006-10-16 13:39 65-persistent-input.rules
-rw-r--r-- 1 root root 2814 2006-10-16 13:39 65-persistent-storage.rules
-rw-r--r-- 1 root root 385 2006-05-22 15:25 80-programs.rules
-rw-r--r-- 1 root root 171 2006-05-29 13:03 85-alsa.rules
-rw-r--r-- 1 root root 210 2006-10-20 10:28 85-hal.rules
-rw-r--r-- 1 root root 81 2006-01-04 11:13 85-hdparm.rules
-rw-r--r-- 1 root root 126 2006-10-12 16:47 85-hwclock.rules
-rw-r--r-- 1 root root 657 2006-01-30 13:40 85-ifupdown.rules
-rw-r--r-- 1 root root 950 2006-07-21 02:02 85-pcmcia.rules
-rw-r--r-- 1 root root 2534 2006-05-22 15:25 90-modprobe.rules
-rw-r--r-- 1 root root 75 2006-05-22 15:25 99-udevmonitor.rules
-rw-r--r-- 1 root root 1224 2006-10-16 13:39 README

The only recent change seems to be 45-libgphoto2.rules. I'm not going to list it all because it's too big but here's a snippet

keith@watson:~$ cat /etc/udev/rules.d/45-libgphoto2.rules | head -20
# udev rules file for libgphoto2 devices (udev < 0.98)
#
BUS!="usb*", GOTO="libgphoto2_rules_end"
ACTION!="add", GOTO="libgphoto2_rules_end"

SYSFS{idVendor}=="0553", SYSFS{idProduct}=="0202", MODE="0660", GROUP="plugdev"
SYSFS{idVendor}=="06bd", SYSFS{idProduct}=="0403", MODE="0660", GROUP="plugdev"
SYSFS{idVendor}=="06bd", SYSFS{idProduct}=="0404", MODE="0660", GROUP="plugdev"
SYSFS{idVendor}=="04fc", SYSFS{idProduct}=="504b", MODE="0660", GROUP="plugdev"
SYSFS{idVendor}=="0553", SYSFS{idProduct}=="0202", MODE="0660", GROUP="plugdev"
SYSFS{idVendor}=="04fc", SYSFS{idProduct}=="504a", MODE="0660", GROUP="plugdev"
SYSFS{idVendor}=="0553", SYSFS{idProduct}=="0202", MODE="0660", GROUP="plugdev"
SYSFS{idVendor}=="08ca", SYSFS{idProduct}=="0111", MODE="0660", GROUP="plugdev"
SYSFS{idVendor}=="04fc", SYSFS{idProduct}=="504a", MODE="0660", GROUP="plugdev"
SYSFS{idVendor}=="04fc", SYSFS{idProduct}=="504b", MODE="0660", GROUP="plugdev"
SYSFS{idVendor}=="0e79", SYSFS{idProduct}=="120a", MODE="0660", GROUP="plugdev"
SYSFS{idVendor}=="0553", SYSFS{idProduct}=="0202", MODE="0660", GROUP="plugdev"
SYSFS{idVendor}=="2770", SYSFS{idProduct}=="9120", MODE="0660", GROUP="plugdev"
SYSFS{idVendor}=="093a", SYSFS{idProduct}=="010f", MODE="0660", GROUP="plugdev"

It's interesting that it puts devices in the plugdev group, because that's the problem I was having. Wonder if some printer vendor/product combinations got into here by mistake and where then removed?

Can you access the package sources relating to this and see what the changes were recently?

Hope this helps.

Keith

Revision history for this message
Wolf Canis (wolf-canis) said :
#9

Hello Keith Watson,

> I don't have a /dev/udev/rules.d but I do have a /etc/udev/rules.d , is that what you mean?

Yes, my fingers were a little bit to fast and my mind little bit to slow. ~;(

This issue is very curious. I did all updates too, but I can't remember that there were updates, who affected udev. Also there are not any entry in the Synaptic history. Very curious. But in your case your right the file /etc/udev/rules.d/45-libgphoto2.rules are changed on 2007-03-15 19:34, mine is from the 2006-10-25 15:34. Have you checked the logfiles?

> Can you access the package sources relating to this and see what the changes were recently?
I don't know the package, if you know the package you can get it in launchpad. But have you noticed that there are duplicates in /etc/udev/rules.d/45-libgphoto2.rules.

Because there are no updates relating udev, could it be that the numbers for idVendor and idProduct are sometimes changing? Why? I don't know and because I haven't this errors I can't test it. My suggestion would be, that you figured out, what ids have your printer now. You can do that by typing 'sudo lsusb -v'. And if the error comes back, you run the command again. The ids should the same.

Mr Canis

Revision history for this message
Keith Watson (kpwatson) said :
#10

Yes it's curious isn't it?

Unfortunately I haven't enough time to investigate this further and, as my printer is working again I shall leave this as it is for the time being. But if it happens again at least I have an idea where to look.

After all, as we say in England "every dog is allowed one bite" :o)

Regards,

Keith

Revision history for this message
Nikolaus Rath (nikratio) said :
#11

I'm marking this has solved, since the problem hasn't occured again.