• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

xfce, cups, hplip, and printing

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

splat

ASCII Moderator
Joined
Apr 6, 2002
so i've been having a problem for a while where I can not print. I have cups, hplip, and samba all installed and set up. I have a hp deskjet 895cse that I have successfullly configured to print before, and be shared over the network and print over the network from a windows computer. However, I think that upgrading to the latest XFCE4 a few months ago is what borked my printing capabilites. I've been trying to get help on the gentoo forum but i haven't gotten it to work yet. so here's a full description of what is going on:

i have cups running, but I cannot access http://localhost:631 to get to the config page. When I plug in my usb printer, i get the udev node, and the printer shows up in my xfce print manager. i can configure it in there, and I can send pages to the printer, but the pages just hang in the queue and i get no action from the printer.

here is some of the log file:
Code:
..truncated.. 
D [16/Jul/2007:20:38:51 -0400] [Job 16] /cupsHeight 
D [16/Jul/2007:20:38:51 -0400] [Job 16] /undefined 
D [16/Jul/2007:20:38:51 -0400] [Job 16] /𓓤ÿ 
D [16/Jul/2007:20:38:51 -0400] [Job 16] gval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1   3   %oparray_pop   1   3   %oparray_pop   1   3   %oparray_pop   1   3   %oparray_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   1   3   %oparray_pop   --nostringval--   1   3   %oparray_pop   --nostringval--   --nostringval-- 
D [16/Jul/2007:20:38:51 -0400] [Job 16] Dictionary stack: 
D [16/Jul/2007:20:38:51 -0400] [Job 16] --dict:1132/1686(ro)(G)--   --dict:0/20(G)--   --dict:72/200(L)-- 
D [16/Jul/2007:20:38:51 -0400] [Job 16] Current allocation mode is local 
D [16/Jul/2007:20:38:51 -0400] [Job 16] Last OS error: 2 
D [16/Jul/2007:20:38:51 -0400] [Job 16] GPL Ghostscript 8.54: Unrecoverable error, exit code 1 
E [16/Jul/2007:20:38:51 -0400] PID 24265 (/usr/libexec/cups/filter/pstoraster) stopped with status 1! 
E [16/Jul/2007:20:38:51 -0400] [Job 16] No pages found! 
D [16/Jul/2007:20:38:51 -0400] Discarding unused printer-state-changed event... 
E [16/Jul/2007:20:38:51 -0400] PID 24266 (/usr/libexec/cups/filter/rastertohp) stopped with status 1! 
D [16/Jul/2007:20:38:54 -0400] cupsdReadClient: 8 POST / HTTP/1.1 
D [16/Jul/2007:20:38:54 -0400] cupsdAuthorize: No authentication data provided. 
D [16/Jul/2007:20:38:54 -0400] CUPS-Get-Printers 
D [16/Jul/2007:20:38:54 -0400] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok) 
D [16/Jul/2007:20:38:54 -0400] cupsdReadClient: 11 POST / HTTP/1.1 
D [16/Jul/2007:20:38:54 -0400] cupsdAuthorize: No authentication data provided. 
D [16/Jul/2007:20:38:54 -0400] Get-Printer-Attributes ipp://mediabox.splatnet:631/printers/DeskJet-895C

and i found that error code 1 is:

Code:
1 (CUPS_BACKEND_FAILED) 
The print file was not successfully transmitted to the device or remote server. The scheduler will respond to this by canceling the job, retrying the job, or stopping the queue depending on the state of the error-policy attribute.
but i still have no idea how to fix this.

anyone have some ideas?
 
I have a similar setup, and get similar problems IF the cups daemon is started BEFORE hplip. I don't know how to do this in Gentoo, but in Arch the order in which daemons are started is dictated by /etc/rc.conf.
hplip MUST start before cups. Hope that helps. :)
 
i'll double check both of these when i get home, but I know that cupsd and hplip are in my default run level and i have restarted both several times trying to figure this out.
 
ok yes both cupsd and hplip are definitely "started". I stopped them both, then started hplip first, then cupsd. same thing, the document just sits in the queue.

here is the tail of the error log when the doc is sitting idle:
Code:
splat@mediabox ~ $ tail /var/log/cups/error_log
D [31/Aug/2007:18:59:07 -0400] cupsdReadClient: 8 POST / HTTP/1.1
D [31/Aug/2007:18:59:07 -0400] cupsdAuthorize: No authentication data provided.
D [31/Aug/2007:18:59:07 -0400] Get-Jobs ipp://localhost/printers/DeskJet895cse
D [31/Aug/2007:18:59:07 -0400] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
D [31/Aug/2007:18:59:07 -0400] cupsdAcceptClient: 12 from localhost:631 (IPv4)
D [31/Aug/2007:18:59:07 -0400] cupsdReadClient: 12 POST /printers/ HTTP/1.1
D [31/Aug/2007:18:59:07 -0400] cupsdAuthorize: No authentication data provided.
D [31/Aug/2007:18:59:07 -0400] Get-Printer-Attributes ipp://localhost/printers/DeskJet895cse
D [31/Aug/2007:18:59:07 -0400] cupsdProcessIPPRequest: 12 status_code=0 (successful-ok)
D [31/Aug/2007:18:59:07 -0400] cupsdCloseClient: 12
and then the tail after i kill the doc: (printing from firefox):
Code:
splat@mediabox ~ $ tail /var/log/cups/error_log
D [31/Aug/2007:19:01:58 -0400] cupsdReadClient: 8 POST / HTTP/1.1
D [31/Aug/2007:19:01:58 -0400] cupsdAuthorize: No authentication data provided.
D [31/Aug/2007:19:01:58 -0400] Get-Jobs ipp://localhost/printers/DeskJet895cse
D [31/Aug/2007:19:01:58 -0400] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
D [31/Aug/2007:19:01:58 -0400] cupsdAcceptClient: 12 from localhost:631 (IPv4)
D [31/Aug/2007:19:01:58 -0400] cupsdReadClient: 12 POST /printers/ HTTP/1.1
D [31/Aug/2007:19:01:58 -0400] cupsdAuthorize: No authentication data provided.
D [31/Aug/2007:19:01:58 -0400] Get-Printer-Attributes ipp://localhost/printers/DeskJet895cse
D [31/Aug/2007:19:01:58 -0400] cupsdProcessIPPRequest: 12 status_code=0 (successful-ok)
D [31/Aug/2007:19:01:58 -0400] cupsdCloseClient: 12
the "no authentication data provided" sticks out at me, but I think i've seen that before. and when i run "netstat -a" i see nothing listening to :631 like I would think cupsd would. but i do see:
Code:
unix  2      [ ACC ]     STREAM     LISTENING     917686 /var/run/cups/cups.sock
 
I don't see anything listening to 631 on my print server either, yet I can get in just fine through a browser.

How are your cups useflags set? Mine are as follows:

Code:
[ Searching for packages matching cups... ]
[ Colour Code : set unset ]
[ Legend : Left column  (U) - USE flags from make.conf              ]
[        : Right column (I) - USE flags packages was installed with ]
[ Found these USE variables for net-print/cups-1.2.9 ]
 U I
 + + X     : Adds support for X11
 - - dbus  : Enable dbus support for anything that needs it (gpsd, gnomemeeting, etc)
 - - jpeg  : Adds JPEG image support
 - - ldap  : Adds LDAP support (Lightweight Directory Access Protocol)
 + + nls   : Adds Native Language Support (using gettext - GNU locale utilities)
 + + pam   : Adds support PAM (Pluggable Authentication Modules) - DANGEROUS to arbitrarily flip
 - - php   : Include support for php
 + + png   : Adds support for libpng (PNG images)
 - - ppds  : Adds support for automatically generated ppd (printing driver) files
 + + samba : Adds support for SAMBA (Windows File and Printer sharing)
 - - slp   : Adds Service Locator Protocol support
 + + ssl   : Adds support for Secure Socket Layer connections
 - - tiff  : Adds support for the tiff image format
 
Code:
[ebuild   R   ] net-print/cups-1.2.10-r1  USE="X dbus jpeg nls pam png samba ssl tiff -ldap -php -ppds -slp" 3,534 kB
those are my use flags
 
don't think I ever did that, i just looked back over the hplip guide in the gentoo-wiki and that step isn't in there.

I'll give it a try when I get home
 
don't think I ever did that, i just looked back over the hplip guide in the gentoo-wiki and that step isn't in there.

I'll give it a try when I get home

Cool. I really hope you get it figured out. Being unable to print something is really hard to accept and must be frustrating. :bang head
The hp-setup script worked flawlessly for me when I installed hplip.
 
well hp-setup looked like it ran fine, but still no luck. i made sure i was in the usb and lp groups, logged out, logged back in, still no luck.
 
o yeah, forgot to update.

I did finally get this working this week. I decided to install the 'unstable' cups, and I also enabled 'foomaticdb' and 'ppds' so now my cups and hplip look like this:
[ebuild R ] net-print/cups-1.2.12 USE="X dbus jpeg nls pam php png ppds samba slp ssl tiff -ldap" 0 kB
[ebuild R ] net-print/hplip-1.7.4a-r1 USE="X cups foomaticdb ppds qt3 scanner snmp -fax -parport" 0 kB

once those installed, i as able to finally run the hp-setup program (before it would die quietly, gave no error or command lineoutput), and the printer now works. Funny how that happens.
 
o yeah, forgot to update.

I did finally get this working this week. I decided to install the 'unstable' cups, and I also enabled 'foomaticdb' and 'ppds' so now my cups and hplip look like this:
[ebuild R ] net-print/cups-1.2.12 USE="X dbus jpeg nls pam php png ppds samba slp ssl tiff -ldap" 0 kB
[ebuild R ] net-print/hplip-1.7.4a-r1 USE="X cups foomaticdb ppds qt3 scanner snmp -fax -parport" 0 kB

once those installed, i as able to finally run the hp-setup program (before it would die quietly, gave no error or command lineoutput), and the printer now works. Funny how that happens.

Glad you got it working. In the future, try hp-check also. Pretty neat script. Gives all pertinent warnings/errors.
I was unable to print after upgrading to hplip 2.7.9-1, (which no longer utilizes init scripts). I had to remove hplip from my DAEMONS array in /etc/rc.conf and do:
Code:
# mv /etc/udev/rules.d/gphoto.rulesetc/udev/rules.d/54-gphoto.rules
so that the hplip rules (/etc/udev/rules.d/55-hpmud.rules) apply after. (Apparently, hplip mixes permissions amongst the lp and camera groups...how weird.)

Although this was very annoying to me, I really can't complain. hplip works very well and is quite well supported. I'm so glad hp is so GNU/Linux-friendly. :)
 
i guess i should update this again. When I thought I had the printer working, it wasn't working 100%. I could print from my local machine, but my fiance couldn't print from her windows laptop over the shared printer. At first it was saying that she didn't have rights to connect, so I went back thru the config files and fixed that. Once the permissions were fixed, any document sent to the printer would mysteriously not get there. I haven't looked in to it further yet, but I will some day.
 
I had that happen once, switched ppd's, and all was good.
 
printing from my powerbook works fine. i tested it last night. eventually i'll get around to testing the windows laptop again.
 
Back