Cannot print on Gutsy Gibbon with HP DeskJet 720C

Bug #155530 reported by mikel on 2007-10-21
44
Affects Status Importance Assigned to Milestone
cupsys (Ubuntu)
Medium
Martin Pitt
Gutsy
Undecided
Martin Pitt

Bug Description

I select my printer model from the list and get the appropriate driver, but when I try to print with my HP DeskJet 720C nothing happens.
This is my /var/log/cups/error_log:

E [21/Oct/2007:21:17:26 +0200] [Job 22] Job stopped due to filter errors.
E [21/Oct/2007:21:17:35 +0200] cupsdAuthorize: Local authentication certificate not found!
E [21/Oct/2007:21:17:35 +0200] cupsdAuthorize: Local authentication certificate not found!
E [21/Oct/2007:21:17:35 +0200] cupsdAuthorize: Local authentication certificate not found!
E [21/Oct/2007:21:17:57 +0200] PID 6452 (/usr/lib/cups/filter/foomatic-rip) stopped with status 3!
E [21/Oct/2007:21:18:07 +0200] [Job 23] Job stopped due to filter errors.
E [21/Oct/2007:21:18:50 +0200] PID 6474 (/usr/lib/cups/filter/foomatic-rip) stopped with status 3!
E [21/Oct/2007:21:19:00 +0200] [Job 24] Job stopped due to filter errors.
E [21/Oct/2007:21:21:37 +0200] PID 6014 (/usr/lib/cups/filter/foomatic-rip) stopped with status 3!
E [21/Oct/2007:21:21:47 +0200] [Job 25] Job stopped due to filter errors.
E [21/Oct/2007:21:23:19 +0200] PID 6062 (/usr/lib/cups/filter/foomatic-rip) stopped with status 3!
E [21/Oct/2007:21:24:38 +0200] PID 5175 (/usr/lib/cups/filter/foomatic-rip) stopped with status 3!
E [21/Oct/2007:21:24:48 +0200] [Job 26] Job stopped due to filter errors.

TEST CASE:
 - Using System -> Administration -> Printers, configure a HP DeskJet 710C on parallel port. (You don't need to actually have that printer, or anything connected to the parallel port, or you can use a different backend, too).
 - Print a test page.
 - dmesg will show
   operation="inode_permission" requested_mask="r" denied_mask="r" name="/etc/pnm2ppa.conf" pid=17598 profile="/usr/sbin/cupsd"
   and /var/log/cups/error_log will have
   E [28/Nov/2007:11:41:41 +0100] PID 17583 (/usr/lib/cups/filter/foomatic-rip) stopped with status 3!

With the fixed package, dmesg will just show

   DMA write timed out

which is ok since no printer is actually connected. Remove the test printer again.

xtknight (xt-knight) wrote :

I have a 722C and I have good luck with Gutsy (and have had issues w/ Dapper and Edgy and maybe Feisty).

Mario Young (mayeco) wrote :

This seems to be a Cups bug

Thank you!

Thanks for your report.
Please provide the output of the printingbug info script, it can be found here: https://wiki.ubuntu.com/PrintingBugInfoScript.

Changed in cupsys:
assignee: nobody → pascal-devuyst
status: New → Incomplete
mikel (kyokushinmail) wrote :

Here it is the output of printingbuginfo -l.

Mario Young (mayeco) wrote :

sorry, this is a HPLIP bug!

Thank you!

Till Kamppeter (till-kamppeter) wrote :

This is one of the few HP printers NOT supported by HPLIP. The printer is supposed to work with the "pnm2ppa" printer driver.

mikel (kyokushinmail) wrote :

It is using the pnm2ppa driver. Here is the info I get from the graphical interface of the driver it is using: 'HP DeskJet 720C Foomatic/pnm2ppa (recommended)'
When I install the printer I choose it from the list and it recommends me to use that driver, but the printer just doesn't work.

Bob E (trurl9) wrote :

I upgraded to Gutsy and can't print to hpdj720C on lp0. Here's the errors I'm getting from syslog.

Oct 24 19:31:14 qrynsyl kernel: [27707.308000] audit(1193279473.995:30): type=1503 operation="inode_permission" requested_mask="a" denied_mask="a" name="/dev/tty" pid=20613 profile="/usr/sbin/cupsd"
Oct 24 19:31:32 qrynsyl parport0: io/hpmud/model.c 503: no DESKJET_720C attributes found in /usr/share/hplip/data/models/models.dat
Oct 24 19:31:32 qrynsyl parport0: io/hpmud/model.c 514: no DESKJET_720C attributes found in /usr/share/hplip/data/models/unreleased/unreleased.dat
Oct 24 19:31:32 qrynsyl kernel: [27725.376000] ppdev0: registered pardevice
Oct 24 19:31:32 qrynsyl kernel: [27725.672000] audit(1193279491.996:31): type=1503 operation="inode_permission" requested_mask="rw" denied_mask="rw" name="/dev/tty" pid=20646 profile="/usr/sbin/cupsd"
Oct 24 19:31:32 qrynsyl kernel: [27725.720000] audit(1193279491.996:32): type=1503 operation="inode_permission" requested_mask="rw" denied_mask="rw" name="/dev/tty" pid=20649 profile="/usr/sbin/cupsd"
Oct 24 19:31:32 qrynsyl kernel: [27725.748000] audit(1193279492.496:33): type=1503 operation="inode_permission" requested_mask="r" denied_mask="r" name="/etc/pnm2ppa.conf" pid=20653 profile="/usr/sbin/cupsd"
Oct 24 19:31:32 qrynsyl pnm2ppa[20653]: read_config_file(): couldn't open config file
Oct 24 19:31:46 qrynsyl kernel: [27737.652000] ppdev0: unregistered pardevice

Bob E (trurl9) wrote :

added printbuginfo output

To work around HPLIP I installed the hpdj720c on lpt1 using the 710c pnm2ppa driver.
This allowed me to print test page and evolution email thus far.
Renamed /etc/pnm2ppa.conf to pnm2ppa.conf.bak due to earlier error message in syslog.

Does it work when disabling AppArmor with:
$ sudo aa-complain cupsd
AppArmor can be reenabled with:
$ sudo aa-enforce cupsd

Disabled AppArmor and printing worked.
Removed work-around printer to make sure I wasn't using it as default.
Printing worked with AppArmor disabled
Re-enabled AppArmor
Printing worked with AppArmor enabled
Still getting error messages in syslog:

On Thu, 2007-10-25 at 18:28 +0000, Pascal De Vuyst wrote:
> Does it work when disabling AppArmor with:
> $ sudo aa-complain cupsd
> AppArmor can be reenabled with:
> $ sudo aa-enforce cupsd
>

Bob E (trurl9) wrote :

Disabled AppArmor and printing worked.
Removed work-around printer to make sure I wasn't using it as default.
Printing worked with AppArmor disabled
Re-enabled AppArmor
Printing worked with AppArmor enabled
Still getting following error messages in syslog:
(11:57 print, AppArmor disabled)
(12:05 print, AppArmor enabled)

Oct 25 11:57:42 qrynsyl kernel: [ 6366.016000] ppdev0: registered pardevice
Oct 25 11:57:42 qrynsyl kernel: [ 6366.248000] audit(1193338661.897:12): type=1502 operation="inode_permission" requested_mask="rw" denied_mask="rw" name="/dev/tty" pid=8901 profile="/usr/sbin/cupsd"
Oct 25 11:57:42 qrynsyl kernel: [ 6366.296000] audit(1193338661.897:13): type=1502 operation="inode_permission" requested_mask="rw" denied_mask="rw" name="/dev/tty" pid=8904 profile="/usr/sbin/cupsd"
Oct 25 11:58:11 qrynsyl kernel: [ 6396.104000] ppdev0: registered pardevice
Oct 25 12:01:03 qrynsyl kernel: [ 6567.588000] ppdev0: unregistered pardevice
Oct 25 12:01:03 qrynsyl kernel: [ 6567.628000] ppdev0: unregistered pardevice
Oct 25 12:05:20 qrynsyl parport0: io/hpmud/model.c 503: no DESKJET_720C attributes found in /usr/share/hplip/data/models/models.dat
Oct 25 12:05:20 qrynsyl parport0: io/hpmud/model.c 514: no DESKJET_720C attributes found in /usr/share/hplip/data/models/unreleased/unreleased.dat
Oct 25 12:05:21 qrynsyl kernel: [ 6825.124000] ppdev0: registered pardevice
Oct 25 12:05:21 qrynsyl kernel: [ 6825.308000] audit(1193339120.923:14): type=1503 operation="inode_permission" requested_mask="rw" denied_mask="rw" name="/dev/tty" pid=9164 profile="/usr/sbin/cupsd"
Oct 25 12:05:21 qrynsyl kernel: [ 6825.364000] audit(1193339120.923:15): type=1503 operation="inode_permission" requested_mask="rw" denied_mask="rw" name="/dev/tty" pid=9167 profile="/usr/sbin/cupsd"

I Have tested by myself, setting up a queue using the "pnm2ppa" driver printing into a file (I do not have an appropriate printer). When printing a test page the printout fails and I get the following in /var/log/syslog:

Oct 25 21:46:50 till-laptop kernel: [199573.940000] audit(1193345209.677:18): type=1503 operation="inode_permission" requested_mask="r" denied_mask="r" name="/etc/pnm2ppa.conf" pid=9649 profile="/usr/sbin/cupsd"

After applying "sudo aa-complain cupsd" the jobs get completed without errors and the output file gets filled (978169 bytes for the letter-sized Ubuntu test page, all options left on the default values).

So this is another bug of CUPS' AppArmor protection. Moving to the cupsys package ...

Changed in pnm2ppa:
assignee: pascal-devuyst → pitti
importance: Undecided → Medium
milestone: none → gutsy-updates
status: Incomplete → Triaged
Dominic Chen (ddcc) wrote :

I've got the exact same printer, and I'm confirming that disabling AppArmor worked for me too.

Jorge Ferrer (jorge-ferrer) wrote :

I had the same problem here with a Samsung SCX-4200

Setting AppArmor to 'complain' fixed the problem.

Thanks for the info.

LWT (lorent) wrote :

I have an HP DeskJet 712C which would not print with Ubuntu 7.10 Gutsy Gibbon either until I read this forum and ran the "sudo aa-complain cupsd" command. Thanks to all for the fix and I hope they fix their problem with cups soon in this release.

Martin Pitt (pitti) on 2007-11-28
Changed in cupsys:
milestone: gutsy-updates → ubuntu-8.04-beta
assignee: nobody → pitti
milestone: none → gutsy-updates
status: New → Confirmed
Martin Pitt (pitti) wrote :

Fixed in bzr head.

description: updated
Changed in cupsys:
status: Triaged → Fix Committed
Martin Pitt (pitti) wrote :

cupsys (1.3.4-1ubuntu3) hardy; urgency=low

  * debian/local/apparmor-profile:
    - Allow rw access to /dev/parport* and ro access to
      /proc/sys/dev/parport/**, so that parallel port printer detection works.
    - Allow unconfined execution of the bluetooth backend. AppArmor currently
      forbids creation of bluetooth sockets without providing a profile option
      to allow it (see bug #172534). (LP: #147800)
    - Permit reading /etc/pnm2ppa.conf. (LP: #155530)
    - Disable AA profile for Samsung's MFP driver, since it needs very high
      and unknown privileges and is a third-party driver which we cannot
      control. (LP: #152537)

 -- Martin Pitt <email address hidden> Wed, 28 Nov 2007 12:05:30 +0100

Changed in cupsys:
status: Fix Committed → Fix Released
Martin Pitt (pitti) wrote :
Changed in cupsys:
status: Confirmed → In Progress
Martin Pitt (pitti) wrote :

Accepted into gutsy-proposed, please test:

 cupsys (1.3.2-1ubuntu7.2) gutsy-proposed; urgency=low
 .
   * debian/local/apparmor-profile:
     - Allow rw access to /dev/parport* and ro access to
       /proc/sys/dev/parport/**, so that parallel port printer detection works.
     - Allow bluetooth socket creation to unbreak the bluetooth backend.
       (LP: #147800)
     - Permit reading /etc/pnm2ppa.conf. (LP: #155530)
     - Only restrict backends which are shipped by cupsys itself (or known
       packages like cups-pdf). All other backends remain unrestricted, since we
       cannot predict which privileges they need. (LP: #152537)

Changed in cupsys:
status: In Progress → Fix Committed
Martin Pitt (pitti) wrote :

Testing anyone? Without verification this cannot go to -updates.

Bertjebebo (a-bouwen) wrote :

i've installed cupsys (1.3.2-1ubuntu7.2) for a while & can print as used to do, without any problem

but i didn't change anything about apparmor. I switched it off as proposed.

what can i test more specific?

Brian Murray (brian-murray) wrote :

I tested using cupsys version 1.3.2-1ubuntu7.1 on Gutsy Gibbon and received the error message regarding 'pnm2ppa.conf'. I then installed cupsys version 1.3.2-1ubuntu7.2 from the -proposed repository and no longer received that error message nor the one in '/var/log/cupsys'. However, looking at dmesg I did see some error messages regarding "inode_permission" and "/dev/tty". I believe this is unrelated though and will set the bug to verification done.

Brian Murray (brian-murray) wrote :

Bertjebebo - you should turn apparmor back on to ensure that the proposed package really fixes the bug - disabling apparmor is a workaround.

Bertjebebo (a-bouwen) wrote :

with apparmor on (sudo aa-enforce cupsd) printing seems normal

thank u guys & girls to fix this bug!

I had the same problem with my HP deskjet 710C, (some PDF don't print and sometimes some html pages) and with this "sudo aa-complain cusp", the problem was solved.

Pigeon (ubuntu-pigeonsnest) wrote :

This bug or something very similar has just bitten me out of the blue with a Hewlett-Packard LaserJet III on Gutsy.

Before today the printer was working fine with the foomatic (recommended) driver. About an hour ago I tried to print and it failed with the identical apparmor messages in the log: droitwix kernel: [stamp] audit(stamp): type=1502 operation="inode_permission" requested_mask="rw" denied_mask="rw" name="/dev/tty" pid=foo profile="/usr/sbin/cupsd"

Since I last tried to print - which was a few days ago - there has been an update including various CUPS packages, and a "PDF file generator" virtual printer has appeared out of nowhere :-) in the CUPS printers listing.

I deleted that and the HPLJ3, leaving me with no printers, restarted CUPS, and recreated the entry for the HPLJ3, but it made no difference.

Disabling apparmor with sudo aa-complain cups made no difference either, it still didn't work. Removing /etc/apparmor.d/usr.sbin.cupsd entirely and restarting apparmor got rid of the error messages in the log but I still couldn't print, now it just failed silently.

What did get it working was to reconfigure the printer to use the gutenprint driver instead of foomatic. Now it works fine with no error messages (and apparmor back to enforce mode), but it is a LOT slower (the box is a 450MHz PII with 320MB RAM and usually uses 200MB-300MB of swap, so perhaps more modern machinery would not notice, but in general ubuntu runs remarkably well despite the slowness of the box; with the foomatic driver, when that was working, printing was acceptably quick, but now that I have to use gutenprint it groans, and other applications become unresponsive for significant/annoying pauses while it prints).

cupsys on this box is now at 1.3.2-1ubuntu7.3 - is it possible that the update that fixes the above bug has broken something else?

Kenyon Ralph (kralph) wrote :

Same as Pigeon - latest cups updates broke filtering. I'm using an HP PSC 2400.

MyR (myr-jedi) wrote :

same problem here (hp deskjet 720c)

Arkady (gryphon) wrote :

Same problem (and error messages) as Pigeon, using HP Photosmart C5180.

Martin Pitt (pitti) wrote :

If you have version 1.3.2-1ubuntu7.3, then you got the recent security update, but not the update which fixes this bug. Please enable the 'gutsy-proposed' repository in the software sources (System -> Administration) and upgrade to version 1.3.2-1ubuntu7.5. This should fix this bug. Once you did that, please give feedback here.Thank you!

Arkady (gryphon) wrote :

Upgraded to 7.5 from the gutsy-proposed repository.

Successful print jobs now occurring whereas before they would stay lodged in the print queue as 'stopped'. No error messages appearing in cups log or in /var/log/messages.

Thanks :)

Martin Pitt (pitti) wrote :

Copied to gutsy-updates.

Changed in cupsys:
status: Fix Committed → Fix Released
Pigeon (ubuntu-pigeonsnest) wrote :

Not been on this system for a while so I haven't updated the sources config, I've just updated from the standard sources, which now have themselves been updated to include cupsys 1.3.2-1ubuntu7.5.

The foomatic/ljet3 now works again and there's nothing in /var/log/cups/error_log but I'm still getting errors like this in /var/log/syslog:

type=1503 operation="inode_permission" requested_mask="rw" denied_mask="rw" name="/dev/tty" pid=4472 profile="/usr/sbin/cupsd"

Roli (roli-vorsicht-bissig) wrote :

using a DeskJet 880C and struggling with the same symptoms, updating to 7.5 gave the same problems as before :-(
i'm trying to install it via http://localhost:631/admin since it seems that the printer's uri is nonsense.

Roli (roli-vorsicht-bissig) wrote :

> i'm trying to install it via http://localhost:631/admin since it seems that the printer's uri is nonsense.

This works :-)
Open http://localhost:631/admin in your favorite konqueror window
Choose "Add Printer"
Type some useful name
Choose the entry stating your printer name and USB (the strange one, not USB #1). #1 defaults to the first usb printer, if I remember right the painful time when I had two usb printers installed. The strange entry chooses always the correct printer.
Choose your favorite driver
Print a test page
Dance for joy

Christopher Hübner (huebnerc) wrote :

I'm using an old Laerjet 4 over Network (JetDirect).
Printing works fine, expect some PDFs from http://www.mvv-muenchen.de, which show a footpath to an adress (graphic). The failure only happens when i try to print that page with evince, with kpdf there is no problem.
My actual cups version is: 1.3.2-1ubuntu7.5

Pigeon (ubuntu-pigeonsnest) wrote :

It has randomly decided to fail again.

cupsys is still at 1.3.2-1ubuntu7.5

No change to error messages in log - ie. still getting eg. [489581.995636] audit(1200938082.483:38): type=1502 operation="inode_permission" requested_mask="rw" denied_mask="rw" name="/dev/tty" pid=9861 profile="/usr/sbin/cupsd" in /var/log/syslog - which is the same as was happening yesterday when it was working. Nothing at all in /var/log/cups/error_log.

Setting aa-complain /usr/sbin/cupsd makes no difference.

But as before, switching to the gutenprint driver instead of foomatic makes it work.

(Printer, as before, is HP LJ3).

goslackware (goslackware) wrote :

I changed the URI to:
parallel:/dev/lp0

This fixed it on my HP712C printer. The URI used to have hp_something in it.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers