# [cups] [Error] Unable to print on HP Laserjet [UNSOLVED]

## dzchimp

 *Quote:*   

> I'm getting an error while trying to add a new Printer via the KDE Printer config control module. 
> 
> Specs:
> 
> 3.2.12-gentoo
> ...

 

Though the error message disappeared (see below), I'm still unable to print anything on my printer. The print job disappears.Last edited by dzchimp on Tue May 15, 2012 10:08 am; edited 3 times in total

----------

## LordVan

tried revdep-rebuild and / or python-updater just in case?

or you look what you upgraded recently  :Wink: 

----------

## dzchimp

 *LordVan wrote:*   

> tried revdep-rebuild and / or python-updater just in case?
> 
> or you look what you upgraded recently 

 

Thank you.

I tried revdep-rebuild which informed me that there were no linking issues on the system. After python-updater was run and cupsd restarted, the error message that appeared at the end disappeared. But though the printer is immediately detected, the print jobs disappear without printing. Are there any logs that I can gather to know what the issue is?

About upgraded packages.. This is a clean fresh install of Gentoo (in fact my first ever install). I ran the live cd, downloaded the stage 3 tarball and i686 and installed. After the base system was installed, I installed emacs, mc and maybe a couple or more small packages which I dont remember, and then installed kde sc by emerging kde-meta.  The kernel was compiled with support for line printer (all options as per the official handbook), but not with genkernel.

PPD: "HP LaserJet P1007 Foomatic/foo2xqx (recommended)"

Cupsd log: http://pastebin.com/h23cW53v

----------

## LordVan

/var/log/cupsd.log i believe.

http://www.novell.com/documentation/suse91/suselinux-adminguide/html/ch05s05.html <- how to turn up log level

----------

## dzchimp

Unfortunately I cant make out any errors in the log (attached in prev post)

----------

## LordVan

did you try printing a testpage from the web admin?

----------

## dzchimp

I've been trying a lot of things ever since my last post (like umerging foo2zjs and adding hplip). So I'm not sure whether I've made it worse than before.  :Smile: 

At the moment, my admin page at http://127.0.0.1:631/printers/ shows:

▼ Queue Name ▼	Description	Location	Make and Model	Status

HP_LaserJet_P1007	HP_LaserJet_P1007		HP LaserJet p1007, hpcups 3.12.4, requires proprietary plugin	Paused - "/usr/libexec/cups/filter/hpcups failed"

This is the error log after sending a test print page (which didnt print) through the web interface: http://pastebin.com/xVqrp0sG

I also tried the hplip plugin, and got an error while installing the plugin:

```
droidzone@supernova-gentoo /usr $ sudo hp-setup   

HP Linux Imaging and Printing System (ver. 3.12.4)

Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-14 Hewlett-Packard Development Company, LP

This software comes with ABSOLUTELY NO WARRANTY.

This is free software, and you are welcome to distribute it

under certain conditions. See COPYING file for more details.

(Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)

Using connection type: usb

Using device: hp:/usb/HP_LaserJet_P1007?serial=RE0FCTR

Setting up device: hp:/usb/HP_LaserJet_P1007?serial=RE0FCTR

------------------------

| PLUG-IN INSTALLATION |

------------------------

HP Linux Imaging and Printing System (ver. 3.12.4)

Plugin Download and Install Utility ver. 2.1

Copyright (c) 2001-14 Hewlett-Packard Development Company, LP

This software comes with ABSOLUTELY NO WARRANTY.

This is free software, and you are welcome to distribute it

under certain conditions. See COPYING file for more details.

(Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)

/

-----------------------------------------

| PLUG-IN INSTALLATION FOR HPLIP 3.12.4 |

-----------------------------------------

  Option      Description                                       

  ----------  --------------------------------------------------

  d           Download plug-in from HP (recomended)             

  p           Specify a path to the plug-in (advanced)          

  q           Quit hp-plugin (skip installation)                

Enter option (d=download*, p=specify path, q=quit) ? d

--------------------------

| DOWNLOAD CONFIGURATION |

--------------------------

Checking for network connection...

Downloading configuration file from: http://hplip.sf.net/plugin.conf

Downloading configuration: [\                                                                          ] 0%     

-------------------

| DOWNLOAD PLUGIN |

-------------------

Checking for network connection...

Downloading plug-in from: http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-3.12.4-plugin.run

Downloading plug-in: [\                                                                                ] 0%   Receiving digital keys: /usr/bin/gpg --no-permission-warning --keyserver pgp.mit.edu --recv-keys 0xA59047B9

 

----------------------

| INSTALLING PLUG-IN |

----------------------

Verifying archive integrity... All good.

Uncompressing HPLIP 3.12.4 Plugin Self Extracting Archive.........................................

  File "./plugin_install.py", line 78

    except ImportError, e:

                      ^

SyntaxError: invalid syntax

error: Python gobject/dbus may be not installed

------------------------

| DOWNLOADING FIRMWARE |

------------------------

Downloading firmware to device hp:/usb/HP_LaserJet_P1007?serial=RE0FCTR...

error: Firmware file '/usr/share/hplip/data/firmware/hp_laserjet_p1007.fw.gz' not found.

```

I tried installing hplip enabling the debug option: http://pastebin.com/sLbCmvUD

----------

## dzchimp

Bump.... Any more ideas?

----------

## LordVan

maybe this?: 

http://nbabusyahid.wordpress.com/2010/06/24/installation-hp-laserjet-p1005-p1006-p1007-p1008-p1505-in-centos-5-5/

----------

## mbar

I have HP 2600dn connected to my home LAN and until I emerged net-print/hplip I couldn't just make it print.

Also hplip has print queue stopped by default, I have to start it every time I switch on the printer.

----------

## dzchimp

The installation issue of hplip was just due to python 3. eselect on python 2 solved that. I've installed hplip, and the weird thing is that it's as if everything works fine. The print job completes successfully, except for the fact that there is no print. CUPS reports a successfully finished job. I've installed and tried foo* driver too, but same issue. If I werent sure that the printing works on my multiboot Ubuntu, I'd have thought it was hardware related. 

I'm at a loss as to how to proceed. I can produce any logs required. Could this be something kernel related?

I'm loving the speed of Gentoo, compared to Ubuntu. If only I could solve the print issue.

----------

## mbar

Ahh, one more thing I remembered: I was also forced to install and enable avahi-daemon, without it the printer refused to print also, and yes, there was a notification about finished print job.

----------

## dzchimp

Emerged and started avahi-daemon, restarted cups-didnt help

Remerged ghostscript with USE flag cups..

Now I have the following in my cups log:

```
D [17/May/2012:23:40:04 +0530] [cups-driverd] Loading "/usr/share/ppd/NRG"...

D [17/May/2012:23:40:04 +0530] [cups-driverd] ChangedPPD=1

D [17/May/2012:23:40:04 +0530] cupsdReadClient: 12 WAITING Closing on EOF

D [17/May/2012:23:40:04 +0530] cupsdCloseClient: 12

I [17/May/2012:23:40:05 +0530] [cups-driverd] Wrote "/var/cache/cups/ppds.dat", 5619 PPDs...

I [17/May/2012:23:40:05 +0530] [cups-driverd] Wrote "/var/cache/cups/ppds.dat", 5619 PPDs...

D [17/May/2012:23:40:27 +0530] [cups-driverd] regex_string("HP LaserJet P1007 Foomatic/foo2xqx (recommended)")

D [17/May/2012:23:40:27 +0530] [cups-driverd] regex_string: "HP LaserJet P1007 Foomatic/foo2xqx \(recommended\)"

D [17/May/2012:23:40:27 +0530] [cups-driverd] regex_string: OK

D [17/May/2012:23:40:27 +0530] Script header: Content-Type: application/ipp

D [17/May/2012:23:40:27 +0530] Script header: 

D [17/May/2012:23:40:27 +0530] PID 14704 (/usr/libexec/cups/daemon/cups-driverd) exited with no errors.

D [17/May/2012:23:40:27 +0530] Script header: Content-Type: text/html;charset=utf-8

D [17/May/2012:23:40:27 +0530] Script header: 

D [17/May/2012:23:40:27 +0530] cupsdReadClient: 14 WAITING Closing on EOF

D [17/May/2012:23:40:27 +0530] cupsdCloseClient: 14

D [17/May/2012:23:40:27 +0530] cupsdSetBusyState: Not busy

D [17/May/2012:23:40:27 +0530] PID 14703 (/usr/libexec/cups/cgi-bin/admin.cgi) exited with no errors.

I [17/May/2012:23:40:48 +0530] Scheduler shutting down normally.

D [17/May/2012:23:40:48 +0530] Discarding unused server-stopped event...

D [17/May/2012:23:40:48 +0530] cupsdCloseClient: 11

D [17/May/2012:23:40:48 +0530] cupsdDeregisterPrinter(p=0xb9469818(HP_LaserJet_P1007), removeit=1)

I [17/May/2012:23:40:48 +0530] Saving job cache file "/var/cache/cups/job.cache"...

E [17/May/2012:23:41:06 +0530] Returning IPP client-error-document-format-not-supported for Print-Job (ipp://localhost:631/printers/HP_LaserJet_P1007) from localhost

E [17/May/2012:23:44:08 +0530] Returning IPP client-error-document-format-not-supported for Print-Job (ipp://localhost:631/printers/HP_LaserJet_P1007) from localhost

E [17/May/2012:23:44:43 +0530] [cups-driverd] Bad driver information file "/usr/share/cups/model/foomatic-db-ppds/Kyocera/ReadMe.htm"!

E [17/May/2012:23:45:06 +0530] Returning IPP server-error-not-accepting-jobs for Print-Job (ipp://localhost/printers/HP-LaserJet-P1007) from localhost

E [17/May/2012:23:45:17 +0530] [cups-driverd] Bad driver information file "/usr/share/cups/model/foomatic-db-ppds/Kyocera/ReadMe.htm"!

E [17/May/2012:23:45:48 +0530] [cups-driverd] Bad driver information file "/usr/share/cups/model/foomatic-db-ppds/Kyocera/ReadMe.htm"!
```

----------

## albright

sorry if this is obvious, but can you print if

you boot another distros live-CD, like ubuntu?

----------

## dzchimp

 *albright wrote:*   

> sorry if this is obvious, but can you print if
> 
> you boot another distros live-CD, like ubuntu?

 

Yup. It works fine on Ubuntu. I havent checked out printing on a live boot, but works fine on Ubuntu installation. I have a multi boot setup in Grub.

----------

## dzchimp

Maybe I should just reinstall everything from scratch after formatting? But I'm almost sure it's going to turn out the same.

----------

## albright

how different are the gentoo and  ubuntu cupsd.conf files

and other relevant config files?

----------

## LordVan

 *dzchimp wrote:*   

>  *albright wrote:*   sorry if this is obvious, but can you print if
> 
> you boot another distros live-CD, like ubuntu? 
> 
> Yup. It works fine on Ubuntu. I havent checked out printing on a live boot, but works fine on Ubuntu installation. I have a multi boot setup in Grub.

 

You could try comparing the drivers, settings and see what is different. maybe they have a different ppd or something like that

----------

## dzchimp

 *LordVan wrote:*   

>  *dzchimp wrote:*    *albright wrote:*   sorry if this is obvious, but can you print if
> 
> you boot another distros live-CD, like ubuntu? 
> 
> Yup. It works fine on Ubuntu. I havent checked out printing on a live boot, but works fine on Ubuntu installation. I have a multi boot setup in Grub. 
> ...

 

This is the difference in cupsd.conf (Target chosen as Ubuntu)

```
--- /etc/cups/cupsd.conf   2012-05-17 23:43:40.827781921 +0530

+++ /ubunturoot/etc/cups/cupsd.conf   2011-09-27 18:46:01.000000000 +0530

@@ -1,5 +1,4 @@

 #

-# "$Id: cupsd.conf.in 9310 2010-09-21 22:34:57Z mike $"

 #

 # Sample configuration file for the CUPS scheduler.  See "man cupsd.conf" for a

 # complete description of this file.

@@ -9,6 +8,10 @@

 # for troubleshooting...

 LogLevel warn

 

+# Deactivate CUPS' internal logrotating, as we provide a better one, especially

+# LogLevel debug2 gets usable now

+MaxLogSize 0

+

 # Administrator user group...

 SystemGroup lpadmin

 

@@ -18,14 +21,18 @@ Listen localhost:631

 Listen /var/run/cups/cups.sock

 

 # Show shared printers on the local network.

-Browsing On

+Browsing Off

 BrowseOrder allow,deny

 BrowseAllow all

-BrowseLocalProtocols CUPS

+BrowseLocalProtocols CUPS dnssd

+BrowseAddress @LOCAL

 

 # Default authentication type, when authentication is required...

 DefaultAuthType Basic

 

+# Web interface setting...

+WebInterface Yes

+

 # Restrict access to the server...

 <Location />

   Order allow,deny

@@ -45,12 +52,18 @@ DefaultAuthType Basic

 

 # Set the default printer/job policies...

 <Policy default>

+  # Job/subscription privacy...

+  JobPrivateAccess default

+  JobPrivateValues default

+  SubscriptionPrivateAccess default

+  SubscriptionPrivateValues default

+

   # Job-related operations must be done by the owner or an administrator...

   <Limit Create-Job Print-Job Print-URI Validate-Job>

     Order deny,allow

   </Limit>

 

-  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>

+  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>

     Require user @OWNER @SYSTEM

     Order deny,allow

   </Limit>

@@ -63,7 +76,7 @@ DefaultAuthType Basic

   </Limit>

 

   # All printer operations require a printer operator to authenticate...

-  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>

+  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>

     AuthType Default

     Require user @SYSTEM

     Order deny,allow

@@ -82,13 +95,19 @@ DefaultAuthType Basic

 

 # Set the authenticated printer/job policies...

 <Policy authenticated>

+  # Job/subscription privacy...

+  JobPrivateAccess default

+  JobPrivateValues default

+  SubscriptionPrivateAccess default

+  SubscriptionPrivateValues default

+

   # Job-related operations must be done by the owner or an administrator...

   <Limit Create-Job Print-Job Print-URI Validate-Job>

     AuthType Default

     Order deny,allow

   </Limit>

 

-  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>

+  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>

     AuthType Default

     Require user @OWNER @SYSTEM

     Order deny,allow

@@ -102,7 +121,7 @@ DefaultAuthType Basic

   </Limit>

 

   # All printer operations require a printer operator to authenticate...

-  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>

+  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>

     AuthType Default

     Require user @SYSTEM

     Order deny,allow

@@ -121,5 +140,4 @@ DefaultAuthType Basic

 </Policy>

 

 #

-# End of "$Id: cupsd.conf.in 9310 2010-09-21 22:34:57Z mike $".

 #

```

I'm not sure where I should be looking for the drivers. Where's the info on the currently active ppd stored?

----------

## Fitzcarraldo

Is your printer connected via USB or on a network? If the former, I had to rebuild the kernel with CONFIG_USB_PRINTER=n and rebuild CUPS with USE="usb" in order to get my USB printer working.

----------

## dzchimp

 *Fitzcarraldo wrote:*   

> Is your printer connected via USB or on a network? If the former, I had to rebuild the kernel with CONFIG_USB_PRINTER=n and rebuild CUPS with USE="usb" in order to get my USB printer working.

 

Well, I tried that, but a strange thing happened.  :Smile: 

```
droidzone@supernova-gentoo ~/downloads/cups-1.5.3 $ USE="usb" sudo emerge cups

 * IMPORTANT: 2 news items need reading for repository 'gentoo'.

 * Use eselect news to read news items.

Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) net-print/cups-1.4.8-r1

 * cups-1.4.8-source.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                          [ ok ]

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory:

 *     /lib/modules/3.2.12-gentoo/build

 * Found sources for kernel version:

 *     3.2.12-gentoo

 * If you plan to use USB printers you should enable the USB_PRINTER

 * support in your kernel.

 * Please enable it:

 *     CONFIG_USB_PRINTER=y

 * in /usr/src/linux/.config or

 *     Device Drivers --->

 *         USB support  --->

 *             [*] USB Printer support

>>> Unpacking source...

```

I had recompiled the kernel as per your suggestion, but apparently the system requests that kernel flag. I had 'CONFIG_USB_PRINTER=y' in .config, but set it to n as per your suggestion (though it didnt make sense to me to disable it, but no doubt I'm missing something here)

Edit: No, that didnt work. Gentoo couldnt detect my printer at all after setting CONFIG_USB_PRINTER=n. I'm going to recompile kernel to what it was previously.

----------

## albright

 *Quote:*   

> Emerging (1 of 1) net-print/cups-1.4.8-r1 

 

I don't understand why you're emerging the old version of cups

About usb, the new cups has oddities here. I just built

my cups with the usb use flag OFF and didn't need to

worry about the kernel.

You've probably read this already but if not it's

up to date:

http://en.gentoo-wiki.com/wiki/CUPS

----------

## Fitzcarraldo

 *dzchimp wrote:*   

> Edit: No, that didnt work. Gentoo couldnt detect my printer at all after setting CONFIG_USB_PRINTER=n. I'm going to recompile kernel to what it was previously.

 

That is strange, as I can only get USB printers to work if I have CONFIG_USB_PRINTER disabled in the kernel (as shown below) and have the usb USE flag set in CUPS version 1.5.2-r21 (also shown below):

```
# cat /usr/src/linux/.config | grep CONFIG_USB_PRINTER

# CONFIG_USB_PRINTER is not set
```

```
# eix -I --brief net-print/cups

[I] net-print/cups

     Available versions:  1.4.8-r1^t (~)1.4.8-r23^t 1.5.2-r4^t (~)1.5.2-r21^t **9999^t {{X acl avahi dbus debug elibc_FreeBSD +filters gnutls java +jpeg kerberos ldap linguas_da linguas_de linguas_es linguas_eu linguas_fi linguas_fr linguas_id linguas_it linguas_ja linguas_ko linguas_nl linguas_no linguas_pl linguas_pt linguas_pt_BR linguas_ru linguas_sv linguas_zh linguas_zh_TW pam perl php +png python slp +ssl static-libs systemd +threads +tiff usb xinetd}}

     Installed versions:  1.5.2-r21^t(17:12:29 14/05/12)(X acl avahi dbus filters gnutls jpeg kerberos ldap linguas_pt_BR pam png slp ssl threads tiff usb -debug -elibc_FreeBSD -java -linguas_da -linguas_de -linguas_es -linguas_eu -linguas_fi -linguas_fr -linguas_id -linguas_it -linguas_ja -linguas_ko -linguas_nl -linguas_no -linguas_pl -linguas_pt -linguas_ru -linguas_sv -linguas_zh -linguas_zh_TW -perl -python -static-libs -systemd -xinetd)

     Homepage:            http://www.cups.org/

     Description:         The Common Unix Printing System
```

----------

## dzchimp

 *albright wrote:*   

>  *Quote:*   Emerging (1 of 1) net-print/cups-1.4.8-r1  
> 
> I don't understand why you're emerging the old version of cups
> 
> 

 

I dont understand why I'm getting the old version either.  :Smile:  I'm new to portage. apt-get was my usual mate. I thought an emerge would pull the latest version by default. I'll have a read about emerge and cups.

----------

## Fitzcarraldo

CUPS 1.4.8-r1 is currently the latest version if you're using Gentoo Stable x86.

----------

## albright

I think with the 1.4... cups you need the usb printing turned

on in the kernel

you say you added yourself to "lsdadmin" group but it should

be "lpadmin" - just a typo I suppose

----------

## roarinelk

 *albright wrote:*   

> I think with the 1.4... cups you need the usb printing turned
> 
> on in the kernel

 

libusb AND usblp disabled in the kernel for cups 1.4  , the reverse for cups <=1.3.X

----------

## Fitzcarraldo

aCOSwt explains it in further detail in the thread Confused about the 'usb' use flag.

----------

## dzchimp

 *albright wrote:*   

> I think with the 1.4... cups you need the usb printing turned
> 
> on in the kernel
> 
> you say you added yourself to "lsdadmin" group but it should
> ...

 

Yes, I made a typo while posting. I'm a member of lpadmin.

----------

## sgarcia

 *albright wrote:*   

> I think with the 1.4... cups you need the usb printing turned
> 
> on in the kernel
> 
> you say you added yourself to "lsdadmin" group but it should
> ...

 

Unless you're a fan of the Unix Hater's Handbook.  I always loved the quote they had on the title page.  http://simson.net/ref/ugh.pdf

Two of the most famous products of Berkeley are LSD and Unix. We don't think that this is a coincidence.

----------

## mbar

 *dzchimp wrote:*   

> I'm a member of lpadmin.

 

"lp" group also?

----------

## ashija

 *dzchimp wrote:*   

> I've been trying a lot of things ever since my last post (like umerging foo2zjs and adding hplip). So I'm not sure whether I've made it worse than before. 
> 
> At the moment, my admin page at http://127.0.0.1:631/printers/ shows:
> 
> ▼ Queue Name ▼	Description	Location	Make and Model	Status
> ...

 

tried the above steps not working for meLast edited by ashija on Thu Jan 04, 2018 4:23 pm; edited 1 time in total

----------

## vasettoo

https://forums.gentoo.org/viewtopic-t-1051982-highlight-laserjet.html

http://foo2xqx.rkkda.com/

Try these and tell what happens after.

----------

