LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   printing with hplip doesn't work: /usr/lib/cups/backend/hp failed (https://www.linuxquestions.org/questions/linux-hardware-18/printing-with-hplip-doesnt-work-usr-lib-cups-backend-hp-failed-859232/)

ToK 01-28-2011 08:52 AM

printing with hplip doesn't work: /usr/lib/cups/backend/hp failed
 
Hi everyone,

I have a strange problem. I have an old HP Laserjet 5L which is connected to the parallel port of my computer. I could hp-setup to configure the printer. It is connected to
hp:/par/HP_Laserjet_5L?device=/dev/parport0

Everytime a want to print the printer is stopped with the error message
/usr/lib/cups/backend/hp failed
(tried to print as root and as a normal user doesn't work)

If I try to print directly to the device works with
echo "test" > /dev/lp0

but it does not work with
echo "test" > /dev/parport0

the permissions are set to
crw-rw---- 1 root scanner 6, 0 28. Jan 14:54 /dev/lp0
crw-rw---- 1 root scanner 99, 0 28. Jan 14:54 /dev/parport0

My Distribution is archlinux with all updates installed

Does anybody know how to fix this?

ToK

Peacedog 01-28-2011 10:59 PM

Hi ToK, Are you in the lp group? What does cupsd.conf look like? Which ppd are you using?

Good luck. ;-)

ToK 01-29-2011 12:09 PM

Hi Peacedoc,

I am just re-installing linux, please wait. As far as I remember I was a member of the group lp...
I will report as far as I re-installed linux.

ToK

Peacedog 01-29-2011 02:06 PM

We'll all be here.

Good luck. ;-)

ToK 01-30-2011 06:29 AM

Thanks,

it works. Don't know why. If I should guess the modules parport and parport_pc are not loaded. But I cannot say for sure. I followed the Instruction on https://wiki.archlinux.org/index.php/CUPS and it works... ;)

Thanks anyway...

Tok

Peacedog 01-30-2011 08:25 AM

Glad you got it sorted!

Good luck. ;-)

ToK 01-31-2011 08:02 AM

1 Attachment(s)
Hi,

now it's getting crazy.
As I setup my machine (archlinux), i could print. As i continue to setup other applications, i cannot print any further... i've got the message /usr/lib/cups/backend/hp failed...

So let's start debugging:
First of all: this is my /etc/cups/cups.conf
Code:

#
# "$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.
#

# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel warn

# Administrator user group...
SystemGroup sys root


# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS dnssd

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

# Restrict access to the server...
<Location />
  Order allow,deny
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
</Location>

# Set the default printer/job policies...
<Policy 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>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </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>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

# Set the authenticated printer/job policies...
<Policy authenticated>
  # 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>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </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>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

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

Second of all: my ppd is "HP LaserJet 5L Foomatic/ljet4 (recommended)" - and now it's getting very crazy: the cups web page shows "(grayscale, 2-sided printing)". I never switched to "2-sided printing". Does this mean i should use duplex???
If I switch to "HP LaserJet 5L Foomatic/gutenprint-ijs.5.2" I could set "Double-Sided Printing" (which it was before), and I still got the message "(grayscale, 2-sided printing)"...:confused:
I should mention: I have another printer (with duplex) which works fine...

Third of all: As I switch the LogLevel to debug an start my printer (with a testpage job in the cue) I got the following message (see attachment). There is an error "ERROR: open device failed stat=12"
I googled around and found the page https://bbs.archlinux.org/viewtopic.php?id=85454
-> I changed the SystemGroup to lp an resumed and got the same error message
-> Installing and running avahi-daemon does'nt solve the problem...


PLEEEEEAAAASE Help!

ToK

Peacedog 01-31-2011 11:28 AM

Just looking into driver issues I've found this:

Quote:

For basic printing functionality use the "ljet4" or the HPIJS driver . For advanced functionality such as printer status and maintenance features, use the HPLIP driver (which includes HPIJS but works also together with "ljet4").

Remember that the 5L is more like the LaserJet 4 family than the LaserJet 5 family (as with most "L" printers from HP). For example it does not work with the "lj5gray" drivers but only with the "ljet4" or "lj4dith" drivers (and Gimp-Print or HPIJS).
Taken from: http://www.openprinting.org/printer/HP/HP-LaserJet_5L

Also are you in the "lp" group?

Good luck. ;-)

ToK 02-01-2011 01:00 AM

I've tried hplip and ljet4 (or lj4dith)

Yes I am a member of the group lp.

Did I already mention that I can't see the parport on the cups website when I want to configure a printer? There is only SCSI, Serial (1 and 2), HP Printer and HP Fax...

ToK

ToK 02-02-2011 01:49 PM

Hi,

I've got the reason: The group on the device file /dev/lp0 is set to scanner, not to lp. Everything works find if I set the the group to lp.
The group is set to scanner because I wrote a udev rule to set the permisson of my usb scanner. I don't know why it affects my parport. :confused: Since I removed the udev of my scanner the group of lp0 is set to lp and I could print again :D:D:D:D Funnily enough: the permisson of the usb port is not set to scanner (which it was not previous...)

So everything is fine now. Thanks for your help ;)

ToK

Peacedog 02-02-2011 04:45 PM

You're welcome. Glad you got it sorted!

Good luck. ;-)


All times are GMT -5. The time now is 04:29 AM.