# cups error: 'printer not connected'

## chovy

NO matter what I do, I keep getting this error when I do a print test page via cups web interface http://localhost:631

 *Quote:*   

> HPDeskJet6122 "Printer not connected; will retry in 30 seconds..."
> 
> 

 

```
lpstat -a

HPDeskJet6122 accepting requests since Wed Oct  4 11:32:02 2006

```

```
lpq

HPDeskJet6122 is ready and printing

Rank    Owner   Job     File(s)                         Total Size

active  root    89      Test Page                       18432 bytes

```

However, nothing ever prints.

----------

## wynn

What are you using as the driver? If you're printing to the parallel port, I've had this problem because the kernel module "lp" isn't loaded. If it's connected via a USB port, have you got "USB Printer support" in your kernel config?

----------

## chovy

 *wynn wrote:*   

> What are you using as the driver? If you're printing to the parallel port, I've had this problem because the kernel module "lp" isn't loaded. If it's connected via a USB port, have you got "USB Printer support" in your kernel config?

 

```
CONFIG_USB_PRINTER=y
```

Is that the flag? If so yes...

----------

## wynn

```
CONFIG_USB_PRINTER=y
```

Yes, that's the one. You do have the other USB bits as well

```
Device Drivers -->

  USB Support -->

    <*> Support for Host-side USB

    (...)

    --- USB Host Controller Drivers

    (Select the HCD that your system uses. If you do not know which one

     to select, run "lspci -v | grep HCI" from another terminal)

    <*> EHCI HCD (USB 2.0) support ( or )

    <*> OHCI HCD support           ( or )

    <*> UHCI HCD (most Intel and VIA) support
```

(from Gentoo Printing Guide)

What version of CUPS have you got installed?

When you installed the printer in CUPS, was it connected and switched on? CUPS will then give you a line in Devices which has the printer name. Otherwise it may not have the correct URI for it.

Can you check in /var/log/messages that the printer was seen when it was switched on, something like

```
Oct  4 20:11:52 lightfoot [17126.555447] usb 3-1: new full speed USB device using uhci_hcd and address 3

Oct  4 20:11:52 lightfoot [17126.744108] usb 3-1: configuration #1 chosen from 1 choice

Oct  4 20:11:52 lightfoot [17126.754061] drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 3 if 0 alt 0 proto 2 vid 0x04B8 pid 0x0005
```

Would you set "LogLevel" in /etc/cups/cupsd.conf to "debug" and look in /var/log/cups/error_log to see what it says when you try to print a test page?

----------

## chovy

/var/log/messages recognizes the usb drive, and the printer shows up when I do an lstat -a or lpq

 *Quote:*   

> Oct  4 04:47:14 spring usbcore: registered new driver usbfs
> 
> Oct  4 04:47:14 spring usbcore: registered new driver hub
> 
> Oct  4 04:47:14 spring usbmon: debugfs is not available
> ...

 

I do have the correct USB config in my kernel.

UHCI and EHCI

I have cups version:

 *Quote:*   

> [ebuild   R   ] net-print/cups-1.2.4  USE="X jpeg nls pam php png ppds ssl -dbus -samba* -slp -tiff" 0 kB
> 
> 

 

With logleve at debug, there is way too much data to scroll through - although I did infact look I did not see anything leading to an error.

The printer is recognized at Device URI: usb:/dev/usb/lp0 as well as Device URI: usb://hp/deskjet%206122?serial=MY56N3B0R166.

Originally it was the latter (2nd) and I read somewhere to change it to usb:/dev/usb/lp0, but I'm still seeing the printer with status of "Printer not connected; will retry in 30 seconds..." next to it's name.

If I delete all pending jobs, and stop/start the printer it shows as green. As soon as I try to print it changes to yellow with the "printer not connected..." message.

The printer is on and attached.

----------

## wynn

What driver are you using for the DeskJet: is it the one from gimp-print-5.0.0 or from hplip? If it shows up as "Device URI: usb://dev/usb/lp0 as well as Device URI: usb://hp/deskjet%206122?serial=MY56N3B0R166" then it seems as though CUPS is getting confused. I would have thought that usb://hp/deskjet%206122?serial=MY56N3B0R166 was the correct one but then you need to have the HP driver installed.

The first one will need the gimp-print-5.0.0 driver (PPD) installing and the URI will then look like usb://hp/deskjet%206122

To install the gimp-print-5.0.0 driver (assuming you have it already emerge'd)

```
cups-genppd.5.0 -v hp-dj_6122
```

You may have to create the directory /usr/share/cups/model/gutenprint/5.0 if it fails because the directory isn't there.

There's some information on installing a printer using hplip in Gentoo Printing Guide and [Howto] HPLIP & CUPS.

The useful entries from error_log are usually preceded by something like "[Job 20]" but would you like to paste the whole of your error_log to http://pastebin.ca?

----------

## chovy

i'm using the hpijs driver.

http://pastebin.ca/191762

----------

## wynn

From what you've already written, I think the hp driver isn't installed properly, there's a vital connection missing somewhere.

I understand that hpijs is deprecated and hplip is the one now? Do you think it worth uninstalling hpijs and installing hplip according to [Howto] HPLIP & CUPS? This HOWTO seems to cover the details better.

Thank you for pasting your error_log, I'll have a look at it and see if anything stands out.

----------

## wynn

Since error_log ends just after calling ghostscript saying "[Job 92] Closing renderer", have you got ghostscript-esp installed and not one of the other variants?

Otherwise, as you said, there is nothing in error_log to suggest why it isn't working.

----------

## chovy

 *wynn wrote:*   

> Since error_log ends just after calling ghostscript saying "[Job 92] Closing renderer", have you got ghostscript-esp installed and not one of the other variants?
> 
> Otherwise, as you said, there is nothing in error_log to suggest why it isn't working.

 

i just rebuilt ghostscript-esp and no difference.

----------

## wynn

All I can suggest now is to try hplip and gimp-print as in a post above and see if using one of these instead of hpijs solves your problem.

----------

## Master_Of_Disaster

same here -  both with cups-1.2.2 and 1.2.4. I own a Laserjet 1000 and am using the foo2zjs driver. I have ghostscript-esp-8.15.3 installed, using ghostscript-gnu didn't change anything for me. I recompiled everything remotely connected with printing with less aggressive CFLAGS and unset LDFLAGS, but doesn't help either. Could this be a more general problem with cups and usb (Perhaps there's a connection to one of these? udev-100-r2, hal-0.5.7.1-r1, dbus-0.62-r1)?

----------

## wynn

Master_Of_Disaster: only ghostscript-esp will work with CUPS "ESP Ghostscript -- an enhanced version of GPL Ghostscript with better printer support".

If you think it's a CUPS error then you could try posting on the CUPS forum http://www.cups.org/newsgroups.php

----------

## chovy

 *wynn wrote:*   

> Master_Of_Disaster: only ghostscript-esp will work with CUPS "ESP Ghostscript -- an enhanced version of GPL Ghostscript with better printer support".
> 
> If you think it's a CUPS error then you could try posting on the CUPS forum http://www.cups.org/newsgroups.php

 

I have to try with the latest HPLIP driver...

----------

## rene80

I got exactly the same problems with a hp laserjet 1100 as described by the TS.

In my situation, I did not configure the kernel right, i.e., I forget to enable some options related to parallel printer support.

If the TS still has the problems, I am willing to post the concerning parts of the kernel configuration.

----------

## chovy

 *rene80 wrote:*   

> I got exactly the same problems with a hp laserjet 1100 as described by the TS.
> 
> In my situation, I did not configure the kernel right, i.e., I forget to enable some options related to parallel printer support.
> 
> If the TS still has the problems, I am willing to post the concerning parts of the kernel configuration.

 

i'm willing to try anything to get it to work...please kindly post your kernel config

----------

## yangman

Seems like a regression to me.

I'm having the same problem after upgrading to cups-1.2*, and the issue is present for both printers connected -- a Brother monochrome laser, as well as a HP Deskjet.

No printing issues existed before upgrading. Reinstalling drivers did not help.

----------

## yangman

 *yangman wrote:*   

> Seems like a regression to me.

 

Hm... Looks like I spoke too soon...

The HP, at least, has started working again after I re-added the printer to cups.

I will try the Brother later.

----------

## yangman

Okay, that's interesting: both printers are now working again.

I tried printing with the Brother printer just now, without re-adding it in cups, and it's working perfectly.

The only change I remember making is changing the value of SystemGroup from "lp" to "lpadmin" -- it seems that CUPS really doesn't like having Group and SystemGroup values being the same.

If you haven't done so already, go through your cupsd.conf and see if your 1.1* configuration is still valid for 1.2*. YMMV.

----------

## rene80

Below you can find the part of my kernel config related to the printer, i.e., options I have changed in order to get the printer working.

Please note that I am using a usb->parallel adapter in order to access my printer (HP 1100)

```

#

# Parallel port support

#

CONFIG_PARPORT=y

CONFIG_PARPORT_PC=y

# CONFIG_PARPORT_SERIAL is not set

# CONFIG_PARPORT_PC_FIFO is not set

# CONFIG_PARPORT_PC_SUPERIO is not set

# CONFIG_PARPORT_GSC is not set

# CONFIG_PARPORT_AX88796 is not set

CONFIG_PARPORT_1284=y

# USB Device Class drivers

#

# CONFIG_USB_ACM is not set

CONFIG_USB_PRINTER=y

#MISC

CONFIG_PRINTK=y

CONFIG_PRINTER=y

# CONFIG_SND_VERBOSE_PRINTK is not set

CONFIG_USB_PRINTER=y

```

----------

## chovy

 *rene80 wrote:*   

> Below you can find the part of my kernel config related to the printer, i.e., options I have changed in order to get the printer working.
> 
> Please note that I am using a usb->parallel adapter in order to access my printer (HP 1100)
> 
> ```
> ...

 

The only one I don't have enabled is:

```
CONFIG_PARPORT_1284=y
```

However, I'm having trouble finding it in the menuconfig screen...do you happen to know the path?

edit: found it! Device Drivers -> Parallel Port -> ...

I noticed you can do "/" to search for a config parameter.

----------

## chovy

this did *not* solve the issue for me. My printer is recongized, but all it does is timeout after 30 seconds...nothing ever gets printed.

----------

## rene80

In which way is your printer connected? (USB or Parallel)

----------

## iluxa

I've had a similar problem with a different USB printer. Crux of the matter is that

USB lp driver reports errors slightly differently then parallel driver, resulting in CUPS thinking the printer is disconnected while it really is not.

My fix was to replace usb://dev/usb/lp0 with file://dev/usb/lp0

in deviceURI.

----------

## someone19

 *yangman wrote:*   

> Okay, that's interesting: both printers are now working again.
> 
> I tried printing with the Brother printer just now, without re-adding it in cups, and it's working perfectly.
> 
> The only change I remember making is changing the value of SystemGroup from "lp" to "lpadmin" -- it seems that CUPS really doesn't like having Group and SystemGroup values being the same.
> ...

 

OMG!!!   I had a working cups/samba config working just fine (I don't remember previous cups ver now sorry) but it broke just recently, and after beating my head about the walls, this simple fix worked for me!  If you had a working cups and recently upgraded and now are broke, check this out.

However - when I first started my printing escapades, somehow net-print/foomatic-rip wasn't a dependency for foomatic (duh) and that was my first problem with identical symptoms.  But the logfiles pointed to that - my 2 C.

THANKS!

----------

## TheCoop

 *iluxa wrote:*   

> I've had a similar problem with a different USB printer. Crux of the matter is that
> 
> USB lp driver reports errors slightly differently then parallel driver, resulting in CUPS thinking the printer is disconnected while it really is not.
> 
> My fix was to replace usb://dev/usb/lp0 with file://dev/usb/lp0
> ...

 

Thats solved it! Thanks. Any idea if/when this will be fixed in the kernel or cups? Presumably the developers know about it?

----------

