Bug 699052 - Can't add a parallel printer
Summary: Can't add a parallel printer
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: cups
Version: 18
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-22 19:55 UTC by James Wilkinson
Modified: 2018-07-11 09:26 UTC (History)
7 users (show)

Fixed In Version: hplip-3.12.2-4.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-05 22:40:49 UTC
Type: ---


Attachments (Terms of Use)
/var/log/cups/error_log (433.40 KB, text/plain)
2011-04-22 19:57 UTC, James Wilkinson
no flags Details
strace results (1.30 MB, text/x-log)
2012-12-10 14:22 UTC, jean-filip tripcevic
no flags Details


Links
System ID Priority Status Summary Last Updated
Launchpad 961995 None None None Never

Description James Wilkinson 2011-04-22 19:55:23 UTC
Description of problem:
I'm trying to configure a parallel printer (an HP LaserJet 4: yes, it must be getting on for twenty years old now!) on Fedora 15 (current). I don't see any option to add a parallel printer in the web interface or the Gnome 3 control centre.

Version-Release number of selected component (if applicable):
cups-1.4.6-15.fc15.x86_64

How reproducible:
1. Go to http://localhost:631/admin
2. Click "Add printer"
3. Wait while it looks for a printer
4. The only local printer option I can see is "SCSI printer"!

Additional info:
There's also a USB Deskjet on this system. That's detected.

lpinfo -l -v
Device: uri = socket
        class = network
        info = AppSocket/HP JetDirect
        make-and-model = Unknown
        device-id = 
        location = 
Device: uri = ipp
        class = network
        info = Internet Printing Protocol (ipp)
        make-and-model = Unknown
        device-id = 
        location = 
Device: uri = scsi
        class = direct
        info = SCSI Printer
        make-and-model = Unknown
        device-id = 
        location = 
Device: uri = http
        class = network
        info = Internet Printing Protocol (http)
        make-and-model = Unknown
        device-id = 
        location = 
Device: uri = https
        class = network
        info = Internet Printing Protocol (https)
        make-and-model = Unknown
        device-id = 
        location = 
Device: uri = lpd
        class = network
        info = LPD/LPR Host or Printer
        make-and-model = Unknown
        device-id = 
        location = 

System Settings > Printers from the GNOME Shell doesn't show any printers (I unlock it, click on "+", wait, and I see "Add a new printer", "Local" (which is highlighted), "Network", and absolutely nothing in the right hand pane).

The printer works fine under Fedora 14, and has done back to about FC3.

ls /dev shows 
crw-rw----. 1 root lp       99,   0 Apr 22 19:59 parport0

Thanks for all the work you do on Fedora!

Comment 1 James Wilkinson 2011-04-22 19:57:06 UTC
Created attachment 494305 [details]
/var/log/cups/error_log

Comment 2 Jiri Popelka 2011-04-26 11:26:24 UTC

*** This bug has been marked as a duplicate of bug 678804 ***

Comment 3 James Wilkinson 2011-04-28 21:17:03 UTC
OK, so Bug 678804 applied to my situation, but fixing that *still* doesn't let me add a printer:

# cat /etc/modules-load.d/lp.conf 
#Load lp at boot
lp

# lsmod | grep lp
usblp                  10814  0 
lp                      9725  0 
parport                32438  3 ppdev,parport_pc,lp

# ls -l /dev/lp*
crw-rw----. 1 root lp 6, 0 Apr 28 22:07 /dev/lp0

And http://localhost:631/admin/ -> Add Printer gives:

Add Printer
Local Printers: 	SCSI Printer
HP Deskjet F2400 series (HP Deskjet F2400 series)

(The Deskjet is a USB printer, not the parallel LaserJet I want to configure).

Comment 4 James Wilkinson 2011-05-10 07:15:15 UTC
Weird.

Not sure which package is responsible, but it's started working.

Sorry to take up your time.

Comment 5 jean-filip tripcevic 2011-12-05 16:48:58 UTC
Whatever it's worth I had this same problem on FC15 and FC16. I spent this afternoon looking at why even with the fix mentioned above and in Bug 678804 that Cups and the system-config-printer still did not display LPT as a device to add. I discovered that the following package, colord-0.1.15-1.fc15.i686 grabs /dev/parport0 thus keeping any other program from gaining access. Once I killed the daemon the printer config programs did propose the parallel port (in my case I had an HP DeskJet 710C connected) as a local printer. Here's a printout of the package info for colord:
Name        : colord
Version     : 0.1.15
Release     : 1.fc15
Architecture: i686
Install Date: lun. 05 déc. 2011 06:13:50 CET
Group       : Unspecified
Size        : 572802
License     : GPLv2+ and LGPLv2+
Signature   : RSA/SHA256, sam. 26 nov. 2011 12:29:13 CET, Key ID b4ebf579069c8460
Source RPM  : colord-0.1.15-1.fc15.src.rpm
Build Date  : sam. 26 nov. 2011 10:24:37 CET
Build Host  : x86-12.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://www.freedesktop.org/software/colord/
Summary     : Color daemon
Description :
colord is a low level system activated daemon that maps color devices
to color profiles in the system context.

I haven't looked into why it grabs the parallel port yet...next on my to do list

Comment 6 Tim Waugh 2011-12-05 17:06:02 UTC
I did try this earlier on in the Fedora 16 cycle so it was working at one point.  Perhaps it's intermittent.

Re-opening.

Comment 7 Tim Waugh 2011-12-05 17:08:32 UTC
Note that when a printer is added to CUPS, or when CUPS starts, it will talk to colord.  This will activate it if is not yet running.

When colord starts, it looks for all scanner devices using libsane.  In the course of doing this it will open /dev/parport0 many times (many drivers are able to drive parallel port connected scanners).  However, once discovery is complete the port should no longer be held open.

CCing colord author.

Comment 8 jean-filip tripcevic 2011-12-05 17:41:33 UTC
I have two hard drives on my PC. The primary drive I have FC15 which I use daily. I put FC16 on my secondary drive to try out before I upgrade. On both versions I see colord running after boot Fedora. I see that colord is in my dbus-1 so I suppose it gets activated by dbus as I commented out the Exec portion of the dbus
config file for dbus-1 ColorManager service (system-services) and the daemon is no longer started and my parallel printer shows up. Since you've copied the corlod author I'll look forward to his/her comments. In any case with the daemon not running I can use my parallel port printer on both versions of Fedora. In the meantime I'll have a look at the colord code.

Comment 9 Peter Scott 2012-01-03 12:42:04 UTC
I'm suffering from this in Fedora 16 with a Deskjet printer.

It is intermittent. I was able to install the printer and it began to print before stopping. I transferred the printer to a windoze box and used it via cups without any problem for a week or two. I removed the local printer from cups.

Since I moved the Deskjet back to F16 "+ Add" has not been able to see the deskjet at all. Ubuntu has the same bug.

Here is the interesting stuff from my dmesg:

$ dmesg | grep -i -e 'parport' -e ppdev -e lp0 -e '[Ii][Rr][Qq] *7'       
[    0.000000] spurious 8259A interrupt: IRQ7.
[    0.148172] pnp 00:0a: [irq 7]
[   11.983433] parport_pc 00:0a: reported by Plug and Play ACPI
[   11.983884] parport0: PC-style at 0x378 (0x778), irq 7 [PCSPP,TRISTATE,EPP]
[   12.369195] parport0: Printer, HEWLETT-PACKARD DESKJET 720C
[   12.433560] ppdev: user-space parallel port driver
[  563.155330] lp0: using parport0 (interrupt-driven).
[  563.155342] lp0: console ready
[  577.653880] parport0: lp tried to release parport when not owner
[  577.662068] parport0: lp tried to release parport when not owner
[ 1824.067562] parport0: lp already owner
[ 1824.067572] parport0: don't know how to wake lp
[ 1839.113803] parport0: don't know how to wake lp
[ 1839.114855] parport0: don't know how to wake lp
[ 1839.114890] parport0: don't know how to wake lp

Comment 10 Peter Scott 2012-01-14 17:26:13 UTC
I don't know if this is relevant but when I started system-config-printer manually I saw this message when I tried to look at the print queue.

$ su -
(ROOT .bash_profile)
(ROOT .bashrc)
# system-config-printer&
[1] 2050
# 
(system-config-printer.py:2050): libnotify-WARNING **: Failed to connect to proxy
$

Comment 11 Peter Scott 2012-01-31 12:47:16 UTC
I installed the latest colord (colord-0.1.15-2.fc16.x86_64) and moved the printer back from the windoze box. system-config-printer still does not see the printer on the parallel port. dmesg still shows:

[  295.185562] parport0: lp tried to release parport when not owner

(twice) whenever I try to add a printer.

/var/log/messages still contains

Jan 31 12:17:56 peters kernel: [   12.421234] parport0: Printer, HEWLETT-PACKARD DESKJET 720C
Jan 31 12:18:01 peters colord: io/hpmud/model.c 532: no DESKJET_720C attributes found in /usr/share/hplip/data/models/models.dat
Jan 31 12:18:01 peters colord: io/hpmud/model.c 543: no DESKJET_720C attributes found in /usr/share/hplip/data/models/unreleased/unreleased.dat
Jan 31 12:18:01 peters colord: io/hpmud/pp.c 1242: ignoring hp:/par/DESKJET_720C?device=/dev/parport0 support=0

lsof still shows colord has /dev/partport0 open

Comment 12 Peter Scott 2012-01-31 12:54:32 UTC
Following the colord error message, I had a look at /usr/share/hplip/data/models/models.dat and it DOES have an entry in it like so:

[hp_deskjet_720c]
align-type=0
clean-type=1
color-cal-type=0
copy-type=0
embedded-server-type=0
fax-type=0
fw-download=False
.
.
.
etc
.
.
.
.

Comment 13 Tim Waugh 2012-02-23 12:54:47 UTC
Peter, what does 'lpinfo -l -v' say now?  I want to be sure of what the Device ID is.

Comment 14 Peter Scott 2012-02-23 15:14:25 UTC
I have just taken the printer from my windoze box and re-connected it to F16. system-config-printer still shows the old parallel:/dev/lp0 configuration. I have deleted the samba connection it had when it was on the windoze box.  However, I see nothing about it in the output you asked for:

# lpinfo -l -v 
Device: uri = serial:/dev/ttyS0?baud=115200
        class = serial
        info = Serial Port #1
        make-and-model = Unknown
        device-id = 
        location = 
Device: uri = serial:/dev/ttyS1?baud=115200
        class = serial
        info = Serial Port #2
        make-and-model = Unknown
        device-id = 
        location = 
Device: uri = ipp
        class = network
        info = Internet Printing Protocol (ipp)
        make-and-model = Unknown
        device-id = 
        location = 
Device: uri = smb
        class = network
        info = Windows Printer via SAMBA
        make-and-model = Unknown
        device-id = 
        location = 
Device: uri = lpd
        class = network
        info = LPD/LPR Host or Printer
        make-and-model = Unknown
        device-id = 
        location = 
Device: uri = https
        class = network
        info = Internet Printing Protocol (https)
        make-and-model = Unknown
        device-id = 
        location = 
Device: uri = http
        class = network
        info = Internet Printing Protocol (http)
        make-and-model = Unknown
        device-id = 
        location = 
Device: uri = ipps
        class = network
        info = Internet Printing Protocol (ipps)
        make-and-model = Unknown
        device-id = 
        location = 
Device: uri = beh
        class = network
        info = Backend Error Handler
        make-and-model = Unknown
        device-id = 
        location = 
Device: uri = socket
        class = network
        info = AppSocket/HP JetDirect
        make-and-model = Unknown
        device-id = 
        location = 
# 

If you need more info, just ask

Comment 15 Tim Waugh 2012-02-23 15:49:39 UTC
Is there an "hp" process running, which might be grabbing control of lp0?  The parallel backend didn't report anything. :-(

If you run /usr/lib/cups/backend/parallel as root do you get any output?

Comment 16 Peter Scott 2012-02-23 16:41:23 UTC
# /usr/lib/cups/backend/parallel never terminated. There was no output.


# ps -ef | grep '[h]p'
# lsof | grep lp0
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/cmsps/.gvfs
      Output information may be incomplete.
# lsof | grep parport
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/cmsps/.gvfs
      Output information may be incomplete.
colord    1799         root   16r      CHR               99,0        0t0      11713 /dev/parport0
colord    1799 1802    root   16r      CHR               99,0        0t0      11713 /dev/parport0
# 

As you see, no hp process. Nothing has lp0. colord has /dev/parport0.

As usual:

# dmesg | grep -i -e 'parport' -e ppdev -e lp0 -e '[Ii][Rr][Qq] *7'
[    0.000000] spurious 8259A interrupt: IRQ7.
[    0.153172] pnp 00:0a: [irq 7]
[   20.737542] parport_pc 00:0a: reported by Plug and Play ACPI
[   20.738115] parport0: PC-style at 0x378 (0x778), irq 7 [PCSPP,TRISTATE,EPP]
[   20.916259] parport0: Printer, HEWLETT-PACKARD DESKJET 720C
[   20.970261] ppdev: user-space parallel port driver
[  117.930503] lp0: using parport0 (interrupt-driven).
[  117.930513] lp0: console ready
[  133.247979] parport0: lp tried to release parport when not owner
[  133.252095] parport0: lp tried to release parport when not owner
#

Comment 17 Tim Waugh 2012-02-23 17:02:03 UTC
Can you try removing the libsane-hpaio package temporarily, then rebooting and trying again?

Comment 18 Peter Scott 2012-02-23 17:30:19 UTC
That fixed my problem! Thanks.

Here is the output:

# /usr/lib/cups/backend/parallel
direct parallel:/dev/lp0 "HP DESKJET 720C" "HP DESKJET 720C LPT #1" "MFG:HEWLETT-PACKARD;MDL:DESKJET 720C;CMD:SCP,VLINK;CLASS:PRINTER;DESCRIPTION:Hewlett-Packard DeskJet 720 Series;  " ""
#

I don't know if this bug is old or new.  It may be that I didn't have libsane-hpaio in my F14 installation. I have no scanner and wouldn't have chosen the package consciously. (I had to do a fresh install to get from F14 to 16.)

If you want more help with testing just ask and I'd be delighted to help.

Comment 19 Tim Waugh 2012-02-24 09:50:19 UTC
Thanks.  The foomatic package has the wrong device ID: filed bug #797099 for that.

Comment 20 Peter Scott 2012-03-16 14:44:00 UTC
I waited for foomatic-db-4.0-31.20120103 and then I re-installed libsane-hpaio to check if we had bottomed this bug. The fault came back exactly as before. There must be a bug in colord or in a routine in libsane-hpaio called by colord. Whenever it emits the message "no ???? attributes found in /usr/share/hplip/data/models/models.dat" it forgets to close /dev/parport0, preventing cups from using it.

Comment 21 Tim Waugh 2012-03-21 17:42:23 UTC
Could you please try this test package?
 http://koji.fedoraproject.org/koji/taskinfo?taskID=3918616

Download all the packages for your architecture into a new directory and then run this command in that directory:

 yum update ./*.rpm

If you don't already have it installed, install libsane-hpaio:

 yum install ./libsane-hpaio*.rpm

Does this now release the parallel port?

Comment 22 Peter Scott 2012-03-21 18:00:08 UTC
I am very happy to do that. However, will it matter that I am using F16?

Comment 23 Fedora Update System 2012-03-21 18:02:30 UTC
hplip-3.12.2-4.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/hplip-3.12.2-4.fc17

Comment 24 Fedora Update System 2012-03-21 18:04:58 UTC
hplip-3.12.2-4.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/hplip-3.12.2-4.fc16

Comment 25 Tim Waugh 2012-03-21 18:05:31 UTC
Please use the above build instead for F-16.

Comment 26 Fedora Update System 2012-03-21 18:12:51 UTC
hplip-3.12.2-4.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/hplip-3.12.2-4.fc15

Comment 27 Peter Scott 2012-03-21 20:08:01 UTC
Tested OK. Thanks

Comment 28 Fedora Update System 2012-03-22 01:56:01 UTC
Package hplip-3.12.2-4.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hplip-3.12.2-4.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-4403/hplip-3.12.2-4.fc15
then log in and leave karma (feedback).

Comment 29 Fedora Update System 2012-04-26 20:13:16 UTC
hplip-3.12.4-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 30 Fedora Update System 2012-05-13 01:55:54 UTC
hplip-3.12.2-4.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 31 Fedora Update System 2012-05-15 23:22:41 UTC
hplip-3.12.2-4.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 32 Till Kamppeter 2012-10-11 17:49:29 UTC
Reported this bug upstream as:

https://bugs.launchpad.net/hplip/+bug/1065582

Tim, can you attach the patch of your HPLIP package of comment #21 to this bug report or to the upstream bug report? This would make it easier for the upstream developers to fix this bug. Thanks.

Comment 33 Tim Waugh 2012-10-15 10:54:21 UTC
I already reported this upstream -- with patches -- in March this year:
  https://bugs.launchpad.net/hplip/+bug/961995

Comment 34 jean-filip tripcevic 2012-12-04 08:17:00 UTC
This problem is showing up in fc18. The patch is not in included in hplip-3.12.11-1-fc18. Can someone move it up?

Comment 35 Jiri Popelka 2012-12-04 09:25:10 UTC
(In reply to comment #34)
> The patch is not included in hplip-3.12.11-1-fc18.

That's because it's already been part of upstream hplip-3.12.11.

> Can someone move it up?

Re-opening.

Comment 36 jean-filip tripcevic 2012-12-04 11:13:35 UTC
You're absolutely right. It has been moved upstream. I should have looked beforehand. Although it's there it doesn't seem to fix the problem. Although in fc17 I saw the parallel port being held open with the lsof command. In fc18 it doesn't show up. Using the lpinfo command it doesn't show either. I might also add that in fc17 I'm using GNOME whereas in fc18 I'm using MATE. In any case in both situations removing hplip made the parallel port appear in the system printer config GUI

Comment 37 Jiri Popelka 2012-12-04 11:22:11 UTC
You mentioned hplip-3.12.11-1-fc18 (updates-testing atm).
Do you see the same with 3.12.10-4.a.fc18 ?

Comment 38 jean-filip tripcevic 2012-12-04 13:01:40 UTC
I replaced 3.12.11-1-fc18 with 3.12.10-4.a.fc18 and have the same problem

Comment 39 jean-filip tripcevic 2012-12-04 17:15:28 UTC
I've done some more testing and here's what I've found. My system has an HP DeskJet 710C connected to the parallel port. If the printer is connected when I use the system-config-printer and try and add a printer it displays only a serial port available. If I disconnect the printer then run system-config-printer and try to add a printer it will show LPT #1 and SERIAL #1 are available. I can then configure the printer. I believe the problem comes from the fact that the HPLIP application does not support the DeskJet 710C thus it ignores it if it's connected. When the hplip package is taken out and the printer is connected system-config-printer will display HPDESKJET 710C not LPT#1 and will select the parameters recommended automatically for the user during configuration (new for fc18). On fc17 with the hplip package inserted it displays LPT#1 if the printer is disconnected or HPDESKJET 710C if it's connected. So theoretically there's no problem as the fix still unblocks a claimed port but if it's an unsupported hp printer it displays as if it's not there. I would think that it should at least work like it did in fc17.

Comment 40 Tim Waugh 2012-12-10 13:30:40 UTC
Regardless of whether HPLIP supports the printer, it should still be offered as an available printer when configuring a new device.

It sounds like the HPLIP-provided 'hp' backend is indeed somehow stopping the CUPS-provided 'parallel' backend from discovering any devices.

To find out why this is, could you please follow these instructions, as root?:

1. Install the 'strace' package (yum install strace), and make sure HPLIP is installed
2. Start system-config-printer, ready to configure a new printer
3. Before clicking Add, run this command in a terminal window, as root:

set $(ps axf | grep [c]upsd)
strace -fp $1 2>cupsd.log

4. Now click Add, and wait until the devices have been displayed
5. Finally, press Control-C in the terminal window.

Hopefully, the printer has not been displayed at this point.

Compress that log file (gzip cupsd.log) and attach the resulting cupsd.log.gz file to this bug report.

Thanks!

Comment 41 jean-filip tripcevic 2012-12-10 14:21:08 UTC
Seems when I run the strace command then hit the Add button on system-config-printer my HPDESKJET on the parallel port shows up. If I do it without running the strace command then it fails and only shows the serial port! I've attached the log anyway.

Comment 42 jean-filip tripcevic 2012-12-10 14:22:06 UTC
Created attachment 660900 [details]
strace results

Comment 43 Tim Waugh 2012-12-10 14:40:56 UTC
This sounds like a simple race between the two backends.  strace alters the timings so that they don't conflict, but ordinarily it is possible for the hp backend to have /dev/parport0 open at the same time that the parallel backend wants to open /dev/lp0 -- which means it will get EBUSY.

Not really sure where the best place is to fix this.

Comment 44 Fedora End Of Life 2013-12-21 14:55:13 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 45 Fedora End Of Life 2014-02-05 22:40:49 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 46 Peter Paul 2018-07-11 09:26:27 UTC
I installed just yesterday Linux Mint 18 on my PC but I actually cannot use my printer. It is an old Oki OL600ex, that worked for years with other Linux distributions (such as Debian). The printer is not listed at the left of the "add printer" dialog, and it isn't listed neither on localhost:631. I tried just now the printer on Windows XP and it worked fine. Shall I activate some flag to use the parallel port?

https://www.hpcustomercarenumber.com/hp-customer-support/


Note You need to log in before you can comment on or make changes to this bug.