cupsys does not automatically detect parallel printer

Bug #29050 reported by Mark W. Tomlinson
136
Affects Status Importance Assigned to Milestone
cupsys (Ubuntu)
Fix Released
High
Martin Pitt
gnome-cups-manager (Ubuntu)
Invalid
Medium
Unassigned
linux-source-2.6.17 (Ubuntu)
Invalid
High
Unassigned

Bug Description

NOTE: I'm guessing as to the faulty package!

Bring up System>Administration>Printing>New Printer, Local Printer is already selected but "Use a detected printer" is greyed out with "No printers detected" in the selection box. "Use another printer by specifying a port" is selected but the drop-down box contains "hp no_device_found". I can manually configure the printer (LPT #1, HPLIP, HP LaserJet 6p driver) but this setup was recognized by 5.10 (Breezy) straightaway.

It's an HP LaserJet 6p connected to the only parallel port on my Intel D865GLC motherboard. Dapper is fully upgraded as of c. 1 hour ago.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks for your bug report. Which version of gnome-cups-manager do you use? Is cups running? Could you try to start gnome-cups-manager from a terminal and add the output as an attachment to the bug?

Changed in gnome-cups-manager:
status: Unconfirmed → Needs Info
Revision history for this message
Mark W. Tomlinson (mark-tomlinson) wrote : Output of gnome-cups-manager

...when executed from the CLI in a terminal.

Revision history for this message
Mark W. Tomlinson (mark-tomlinson) wrote : Re: 6.04 (Dapper) doesn't recognize working printer

Above is the redirected output from gnome-cups-manager (version 0.31-1.1ubuntu1). The cupsd daemon is running (well, sleeping) and the cupsys service is activated.

Let me know if you need more...

Revision history for this message
Neil Woolford (neil-neilwoolford) wrote :

Very similar experience here with an Epson CX-3200 which has worked fine under Warty through to Breezy. (Though requiring manual selection of "USB Printer #1" on the Properties Connection tab to work under Breezy. I think this may have been more automatic under earlier releases)

Using Dapper, when the Add a Printer wizard appears, there is no printer detected and if I try to specify a port then no USB ports are listed for selection. Just LPT #1, Parallel Port #1 (Epson or Canon) and hp no_device_found. So I can't get the printer to run at all under Dapper using the gui.

Running gnome-cups-manager produced little output; the most I got on one run was "IPP request failed with status 1030" repeated a couple of times.

Neil

Revision history for this message
Neil Woolford (neil-neilwoolford) wrote : Redirected terminal output when running gnome-cups-manager from the command line.

Updated Dapper at around 8pm on the 6th of February. Noticed some printer system and database updates, so thought I'd try again!

Invoked gnome-cups-manager from a terminal as an ordinary user.
Redirected the output into this file.

Went as far as the stage at which the wizard pops up to tell me that no printer has been detected, and from which I can't select the USB port so can't look for the printer myself. Problem still here for me then...

Neil

Revision history for this message
Foaming Draught (foamingdraught) wrote : Re: 6.04 (Dapper) doesn't recognize working printer

Same here. USB locally-atteched Epson CX5100 which is fine under Breezy. HAL and lsusb show it in all its glory, but the new printer dialogue on GNOME and KDE can't find it. I shouldn't have to use localhost:631 in the 21st century, but there isn't even a USB port option there.
This is being posted about at half-hourly intervals on the Dapper forum by GDE and KDE users, and still no response. Can we make it critical, please, and have an update?
I suspect that Gutenprint has a hand in the problem. There is a bug filed about Gutenprint drivers not loading.

Revision history for this message
Mark W. Tomlinson (mark-tomlinson) wrote :

Just did a fresh install of the "Flight 4" ISO, identical results - HP LaserJet 6p connected to only parallel port on Intel D865GLC mainboard still not being recognized & must be manually installed.

Revision history for this message
Foaming Draught (foamingdraught) wrote :

Output from gnome-cups-manager is:

** (gnome-cups-manager:7727): WARNING **: IPP request failed with status 1030

It would be nice to see some comment on the Dapper development forum or on here about when, if ever, we will be able to print from a locally-attached USB printer

Revision history for this message
essexman (ralphsmail) wrote :

I can confirm this bug, (having just figured out how to use the search properly)

Bug #31178 https://launchpad.net/malone/bugs/31178 (recently rejected is a duplicate of this bug

Revision history for this message
Mark W. Tomlinson (mark-tomlinson) wrote :

FYI to all interested parties:

Earlier today, I downloaded & installed the latest release of Foresight Linux (which also uses GNOME 2.13.91/2) and encountered exactly the same behavior - gnome-cups-manager fails to detect the printer, port & printer must be manually installed.

Looks like it's not just an Ubuntu issue to me...

Revision history for this message
Pascal De Vuyst (pascal-devuyst) wrote :

Please post the output of:
$ lpinfo -v
This shows the printer devices available to cups.

What is the output of (only if you have a HP printer):
$ hp-probe

What happens if you stop hplip, restart cups an then run lpinfo -v again:
$ sudo /etc/init.d/hplip stop
$ sudo /etc/init.d/cupsys restart
$ lpinfo -v

Revision history for this message
Mark W. Tomlinson (mark-tomlinson) wrote :

mark@anduril:~$ lpinfo -v
network socket
network beh
network bluetooth
direct hp:/no_device_found
network http
network ipp
network lpd
direct parallel:/dev/lp0
direct canon:/dev/lp0
direct epson:/dev/lp0
network smb
mark@anduril:~$ hp-probe

 HP Linux Imaging and Printing System (ver. 0.9.6)
 Device Detection (Probe) Utility ver. 1.3

 Copyright (c) 2003-5 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.

 [WARNING]: No devices found. If this isn't the result you are expecting,
 [WARNING]: check to make sure your devices are properly connected.
mark@anduril:~$

mark@anduril:~$ sudo /etc/init.d/hplip stop
Password:
 * Stopping HP Linux Printing and Imaging System [ ok ]
mark@anduril:~$ sudo /etc/init.d/cupsys restart
 * Stopping Common Unix Printing System: cupsd [ ok ]
 * Starting Common Unix Printing System: cupsd ...done.
mark@anduril:~$ lpinfo -v
network socket
network beh
network bluetooth
network http
network ipp
network lpd
direct parallel:/dev/lp0
direct canon:/dev/lp0
direct epson:/dev/lp0
network smb
mark@anduril:~$

Revision history for this message
_RoX_ (robi-lampreht) wrote :

The problem is ownership of /dev/usblp0 as it is assigned to scanner group. Change that to lp and voila.

Run:
sudo chown root:lp /dev/usblp0

After that lpinfo -v should recognize it.
I have DX3850 on USB and have just printed test page :)

Have fun.

Revision history for this message
Mark W. Tomlinson (mark-tomlinson) wrote :

RoX, I'm confused. My LaserJet 6p is connected via parallel port, not USB - in fact, I don't even have a /dev/usblp0 file to be owned by anyone...

Thanks for the feedback, though.

Revision history for this message
_RoX_ (robi-lampreht) wrote :

If it's connected via lpt, you should check /dev/lp0 for group.

ls -l /dev/lp0

But I couldn't even manually configured my printer because there was no option for usb port and this solved it for me.

Revision history for this message
Neil Woolford (neil-neilwoolford) wrote :

Thank you RoX!

If I make the suggested change of /dev/usblp0 from scanner to root, my Epson CX3200 scanner/printer is detected by the gui Add Printer system. It prints a test page, and is still recognised by XSane as a working scanner.

The goodness doesn't survive a reboot of course; although the printer is still listed as installed it is now back in the scanner group and so won't print until the manual change is made again.

My naive take on this is that the problem is the multi-function device identifying as only one of its functions and therefore ending up in a restrictive group. Thus gnome-cups-manager and gutenprint drivers are innocent. The problem perhaps lies in udev/hal magic that I do not understand...

Surely there should be a witty t-shirt for *nix people with a slogan on the lines of "It's always a file permissions/groups problem...". But witty of course, rather than just descriptive ;)

Neil

Revision history for this message
Martin Pitt (pitti) wrote :

Rox, thanks a lot for the great debugging.

The cure is quite easy: the cupsys user should be in the 'scanner' group, too:

  sudo adduser cupsys scanner

I will add this to the cupsys package postinstallation script, so that it will happen automatically.

Changed in cupsys:
assignee: nobody → pitti
status: Unconfirmed → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Rejecting the gnome-cups-manager task, the problem is in cupsys (confirmed task).

Changed in gnome-cups-manager:
status: Needs Info → Rejected
Revision history for this message
Mark W. Tomlinson (mark-tomlinson) wrote :

I think the "sudo adduser cupsys scanner" fix might be effective for multifunction device users, but I'm still seeing the original behavior: when I open Printers>Add a Printer, it's still telling me "No printers detected", whereas in Breezy it correctly identifies my HP LaserJet 6p connected to the parallel port.

Am I missing something here? I hope? <g>

Revision history for this message
Martin Pitt (pitti) wrote : Re: cupsys cannot access printer/scanner device

 cupsys (1.1.99.b1.r4929-0ubuntu3) dapper; urgency=low
 .
   * debian/rules: Do not install dangling pdftops.conf symlink. (Malone #26785)
   * debian/cupsys.preinst: Remove a dangling pdftops.conf symlink on upgrades
     to this version.
   * debian/cupsys.postinst: Add cupsys to group 'scanner' to be able to access
     printer/scanner combined devices. (Malone #29050)
   * debian/patches/44_fixconfdirperms.dpatch: Make /etc/cups/ppd group
     writable. (Malone #31533)
   * debian/cupsys.init.d: Make sure that page_log exists with the right
     permissions. (Malone #33409)
   * Add debian/patches/51_dont_log_ipp_printer_query.dpatch: Do not flood
     access_log with successful CUPS-Get-Printers and Get-Printer-Attributes
     queries (which are generated by gnome-cups-icon every 3 seconds). This is
     a hideous and hackish patch, but it has to do until we dbusify cupsys
     properly. (Malone #29895)

Please open a new bug if you have troubles with a particular printer.

Changed in cupsys:
status: Confirmed → Fix Released
Revision history for this message
Mark W. Tomlinson (mark-tomlinson) wrote : AddPrinter Dialogue - Breezy

This is what I get in Breezy...

Revision history for this message
Mark W. Tomlinson (mark-tomlinson) wrote : AddPrinter Dialogue - Dapper

...and this is from Dapper.

Revision history for this message
Romakin (romakin-deactivatedaccount) wrote : Printer Problems

Me too! Printer = Canon BJC-1000, connected by a serial cable.
 In Breezy everything worked fine, but not Dapper Flight 5.

nick@ubuntu:~$ lpinfo -v
network socket
network beh
network bluetooth
direct hp:/no_device_found
network http
network ipp
network lpd
network smb

Revision history for this message
Mark W. Tomlinson (mark-tomlinson) wrote : Re: cupsys cannot access printer/scanner device

I see that the status on this bug has been changed to "fix released". The update to cupsys may have fixed the multifunction, USB-connected device issue, but the problem still remains that my parallel-connected printer, which was recognized & IDed by Breezy, doesn't seem to exist for Dapper.

This is not a showstopper (I can "make" my printer work). But I think expecting Dapper to at least work as well as Breezy is not unreasonable.

Revision history for this message
Martin Pitt (pitti) wrote :

Reopening for the parallel port printer issue.

Changed in cupsys:
assignee: pitti → nobody
status: Fix Released → Confirmed
Revision history for this message
grendel970 (dn) wrote :

I can confirm this issue exists with all latest dapper updates for my parallel connected hp deskjet 722c. The system does recognize it and connects lp0, but the box is grayed with "no printers detected".

I also cannot get my printer to work at all, even after replacing the / with - in the *NickName* fields in the .ppd file (BUG #32085), but this may be another issue which I am still investigating.

Revision history for this message
Martin Pitt (pitti) wrote :

Can you please precisely define 'the problem'? As far as I understand, the remaining bug is about a parallel printer not being automatically detected, but you can configure it manually. Is that right?

Changed in cupsys:
status: Confirmed → Needs Info
Revision history for this message
Mark W. Tomlinson (mark-tomlinson) wrote :

Martin - that's correct. Quickest way to clarify would be to check the "AddPrinter dialogue" screenshots I previously attached, but:

In Breezy, when I selected "Add a printer", my LaserJet-6p was automatically identified under "Use a detected printer". In Dapper, the same action yields "no printer detected" - I have to manually select the port (LPT #1). Then, the driver selection proceeds the same as under Breezy.

One other note - gnome-cups-manager is VERY slow. I just opened it and selected "Properties" for my default printer and it took c. 30 seconds to bring up the properties dialogue. I'd thought it sluggish before but this is a new level of "slow". Don't know if it's related or not...

Revision history for this message
grendel970 (dn) wrote : Re: [Bug 29050] Re: cupsys cannot access printer/scanner device

Martin,

ditto on Mark Tomlinson's explanation, including the slow speed, all
except that I have no confirmation my printer worked in worked in
Breezy, which I have never used.

This may be part of another issue, specifically I cannot make my printer
work at all, even after applying the fix in bug #32085. I have opened
bug #37881 against this.

On Mon, 2006-04-03 at 14:55 +0000, Martin Pitt wrote:
> Can you please precisely define 'the problem'? As far as I understand, the remaining bug is about a parallel printer not being automatically detected, but you can configure it manually. Is that right?
>
> ** Changed in: cupsys (Ubuntu)
> Status: Confirmed => Needs Info
>
> ** Summary changed:
>
> - cupsys cannot access printer/scanner device
> + cupsys does not automatically detect parallel printer

Revision history for this message
Julian Robbins (joolsr) wrote :

Hi I can confirm with dapper flight 5 and with all updates with that with my HP laserjet 5L Parallel, it isn't detected automatically by Gnome-CUPS manager. The device is picked up in dmesg.
This printer did also work fine in hoary, breezy without issues.

I also have a USB Epson Stylus Color 680 which was picked up fine with my current dapper setup.

I havent tried any manual fixes, as its way past my bedtime, but will help bug check if reqd !

Revision history for this message
Mark W. Tomlinson (mark-tomlinson) wrote :

Now, as of the 04/10/06 updates, I can't install my printer at all. With cupsys 1.1.99.b1.r4929-0ubuntu7 and gnome-cups-manager 0.31-1.1ubuntu4, I go through the "manual" install steps I've outlined before and...nothing. No printer becomes available, apps now want to print to "PostScript/default" with no other choices available.

In gnome-cups-manager, when I click "Apply" after selecting the appropriate driver (from either HP or HPLIP lists), I'm immediately returned to the gnome-cups-manager window where the only icon visible is "New Printer". I've waited c. 20 minutes to make sure, I've tried it with "Detect LAN printers" enabled and disabled, I've rebooted - nothing.

Revision history for this message
Matthias Klose (doko) wrote :

please recheck after a dist-upgrade to dapper 20060414, you should have installed
cupsys 1.1.99.b1.r4929-0ubuntu8
hplip-ppds 0.9.6-1ubuntu8

Changed in cupsys:
assignee: nobody → doko
Revision history for this message
Mark W. Tomlinson (mark-tomlinson) wrote :

Matthias,

Yes, I do have those versions of cupsys and hplip-ppds. I'm now able to "manually" configure my printer (as before). It still doesn't recognize the printer, as Breezy did, though.

Revision history for this message
grendel970 (dn) wrote :

Still a no go with my HP Deskjet 722c which is using the foomatic filters, the printer works fine, but it's not automatically detected.

Revision history for this message
essexman (ralphsmail) wrote :

I think this is upstream, as I have tried the latest Simply MEPIS version 6.0 pre-alpha and got the same result as Dapper

Revision history for this message
essexman (ralphsmail) wrote :

Matthias,

This is an old bug, but it is marked "Needs Info". What information do you need?

Revision history for this message
Martin Pitt (pitti) wrote :

Can you please try again with this version?

 cupsys (1.1.99.rc2-0ubuntu2) dapper; urgency=low
 .
   * debian/cupsys-client.links: Fix cupsenable/cupsdisable manpage link.
     Closes: LP#40725
   * debian/patches/09_runasuser.dpatch: Do not drop additional group
     privileges in scheduler/process.c. This should fix a range of bugs
     concerning detection of parallel port printers and other 'permission
     denied' bugs.

Changed in cupsys:
assignee: doko → pitti
Revision history for this message
Mark W. Tomlinson (mark-tomlinson) wrote :

Martin - I installed the 1.1.99.rc2-0ubuntu2 cupsys, rebooted and got the same thing - "no printer found".

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 29050] Re: cupsys does not automatically detect parallel printer

Hi Mark,

Mark W. Tomlinson [2006-04-24 21:41 -0000]:
> Martin - I installed the 1.1.99.rc2-0ubuntu2 cupsys, rebooted and got
> the same thing - "no printer found".

Alright, then let's dig a bit deeper. Can you please copy&paste the
output of the following two commands here:

  ls -l /dev/lp*

  sudo -u cupsys /usr/lib/cups/daemon/cups-deviced 1 1 `id -u cupsys` ''

  sudo /usr/lib/cups/daemon/cups-deviced 1 1 `id -u cupsys` ''

Comparing the outputs shuold be interesting. BTW, the last bit of
output looks a bit like garbage, don't worry please.

Thank you!

Revision history for this message
Mark W. Tomlinson (mark-tomlinson) wrote :

OK, here:

mark@anduril:~$ ls -l /dev/lp*
crw-rw---- 1 root lp 6, 0 2006-04-24 13:36 /dev/lp0
mark@anduril:~$ sudo -u cupsys /usr/lib/cups/daemon/cups-deviced 1 1 `id -u cupsys` ''
Password:
DEBUG: [cups-deviced] Added device "hp:/no_device_found"...
DEBUG: [cups-deviced] Added device "beh"...
DEBUG: [cups-deviced] Added device "ipp"...
DEBUG: [cups-deviced] Added device "lpd"...
DEBUG: [cups-deviced] Added device "smb"...
DEBUG: [cups-deviced] Added device "http"...
DEBUG: [cups-deviced] Added device "canon:/dev/lp0"...
DEBUG: [cups-deviced] Added device "epson:/dev/lp0"...
DEBUG: [cups-deviced] Added device "parallel:/dev/lp0"...
DEBUG: [cups-deviced] Added device "socket"...
DEBUG: [cups-deviced] Added device "bluetooth"...
Content-Type: application/ipp

Gattributes-charsetutf-8Hattributes-natural-languageen-USD
                                                                 device-classnetworkA
     device-infoAppSocket/HP JetDirectAdevice-make-and-modelUnknownE
device-urisocketA device-idmark@anduril:~$

I did a direct C&P of both of your "sudo" lines together, since there seemed to be some connection ( with the quotation (") marks). Let me know if this is what you wanted...

Martin Pitt (pitti)
Changed in cupsys:
status: Needs Info → Confirmed
Martin Pitt (pitti)
Changed in cupsys:
status: Confirmed → Fix Released
36 comments hidden view all 116 comments
Revision history for this message
gcordoba (glgcg) wrote :

Hi,
I am trying to fix the non-detection problem for a HP LaserJet 5L (parallel port). I am using Ubuntu6.06. I just tried with most of the tips without success. However, it seems to me that the problem is that the parallel port are used by someone/something.
I am attaching al the trials done.
Any idea?
Thanks,
Gustavo

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

gcordoba, can you check whether the parallel port setting in the BIOS of your computer supports bi-directional communication?

Make also sure not having any other device (like a parallel scanner) on the same parallel port.

Do also not use any Canon or Epson entries for your parallel port.

Can you set up your printer manually (choose parallel port, then select model manually) and then print on it?

Revision history for this message
gcordoba (glgcg) wrote :

Yes, it is Standart Bi-directional.

No other physical devices attached to the port

I do not know about any Canon or Epson entries

It do not print manually.

Best regards,
Gustavo

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

What does the printer do if you enter

sudo cat ~/.bashrc > /dev/lp0

Revision history for this message
gcordoba (glgcg) wrote :

gcordoba@ecordoba-laptop:~$ sudo cat ~/.bashrc > /dev/lp0
bash: /dev/lp0: Permission denied

It souds just as a permissions problem...
Gustavo

Revision history for this message
Martin Pitt (pitti) wrote :

'sudo cat ~/.bashrc > /dev/lp0' does not work the way you intend it to. You need to do

  echo hello | sudo tee /dev/lp0

Revision history for this message
gcordoba (glgcg) wrote :

gcordoba@ecordoba-laptop:~$ echo hello | sudo tee /dev/lp0
Password:
hello
gcordoba@ecordoba-laptop:~$

As you can see, that line produced only the echo.

Gustavo

Revision history for this message
gcordoba (glgcg) wrote :

Please, any idea?...

Gustavo

Revision history for this message
Chilleddu Malevadau (cm614) wrote :

If I understand correctly, the solution to the problem is
sudo modprobe ppdev
I am running 6.06 fully updated 15 min ago and that doesn't solve the problem. I have an HP LJ 6MP on the parallel port which is not recognized. Installing it manually doesn't work either.
Am I missing something?
Thanks,
Chilleddu

Revision history for this message
Mark W. Tomlinson (mark-tomlinson) wrote :

I've just set up Edgy RC1...and I'm seeing the same behavior. My LaserJet 6P is not detected. I'll experiment with ppdev, etc. when I get home from work tonight...

Revision history for this message
Trouilliez vincent (vincent-trouilliez-modulonet) wrote :

Yep, the problem is still there (Edgy RC + updates)... kernel detects my parport HP Laserjet 6P just fine (based on messages I can see in /var/log/messages), but gnome-cups-manager doesn't, unless I manually load the ppdev module.

Revision history for this message
Mark W. Tomlinson (mark-tomlinson) wrote :

Okay, I've essentially recreated the earlier scenario. Doing nothing, gnome-cups-manager gives "No printer detected" when I double-click "New Printer". After loading the ppdev module, it finds my HP LaserJet 6P immediately. Here's the shell session (with a couple of comments):

# "No printer found" in gnome-cups-manager
[mark@anduril:~$ dmesg | grep lp0
[17179594.376000] lp0: using parport0 (interrupt-driven).
mark@anduril:~$ sudo modprobe ppdev
Password:
# "HP LaserJet 6P" detected in gnome-cups-manager
mark@anduril:~$ dmesg | grep lp0
[17179594.376000] lp0: using parport0 (interrupt-driven).
[17180252.676000] lp0: ECP mode
[17180252.696000] lp0: ECP mode
[17180252.788000] lp0: ECP mode
[17180308.600000] lp0: ECP mode
[17180308.612000] lp0: ECP mode
[17180308.652000] lp0: ECP mode
[17180322.032000] lp0: ECP mode
[17180322.044000] lp0: ECP mode
[17180322.080000] lp0: ECP mode
mark@anduril:~$

I'm adding ppdev to my /etc.modules file and will report if I have any further trouble.

Revision history for this message
gcordoba (glgcg) wrote :

Today, I tried the same without success:

gcordoba@ecordoba-laptop:~$ sudo dmesg | grep lp0
gcordoba@ecordoba-laptop:~$ dmesg | grep lp0
gcordoba@ecordoba-laptop:~$ dmesg | grep lp
[17179569.184000] On node 0 totalpages: 65344
[17179571.836000] Calibrating delay using timer specific routine.. 3991.79 BogoMIPS (lpj=7983593)
[17179572.624000] PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report
[17179573.012000] Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
[17179595.180000] lp: driver loaded but no devices found
gcordoba@ecordoba-laptop:~$ pci=routeirq
gcordoba@ecordoba-laptop:~$ dmesg | grep lp
[17179569.184000] On node 0 totalpages: 65344
[17179571.836000] Calibrating delay using timer specific routine.. 3991.79 BogoMIPS (lpj=7983593)
[17179572.624000] PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report
[17179573.012000] Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
[17179595.180000] lp: driver loaded but no devices found
gcordoba@ecordoba-laptop:~$ sudo modprobe ppdev
gcordoba@ecordoba-laptop:~$

It seems that this is a very bug. Is it possible that this bug is related with some default permissions bug?
Again, please, any idea? (or better: please, help me!)
Thanks,
Gustavo

Revision history for this message
Ante Karamatić (ivoks) wrote : Re: [Bug 29050] Re: cupsys does not automatically detect parallel printer

U Čet, 26. 10. 2006., u 07:30 +0000, gcordoba je napisao/la:

> [17179572.624000] PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report

[...]

> gcordoba@ecordoba-laptop:~$ pci=routeirq

You should add pci=routeirq to 'defoptions' in /boot/grub/menu.lst, so
it looks like this:

# defoptions=quiet splash pci=routeirq

(don't erase that # on the begining). Then save and run 'sudo
update-initramfs' and reboot.

> gcordoba@ecordoba-laptop:~$ sudo modprobe ppdev

Adding output of 'dmesg' after this command would be usefull.

Revision history for this message
gcordoba (glgcg) wrote :

gcordoba@ecordoba-laptop:~$ sudo pico /boot/grub/menu.lst
Password:
gcordoba@ecordoba-laptop:~$ sudo update-initramfs
You must specify at least one of -c, -u, or -d.

Usage: /usr/sbin/update-initramfs [OPTION]...

Options:
 -k [version] Specify kernel version or ALL
 -c Create a new initramfs
 -u Update an existing initramfs
 -d Remove an existing initramfs
 -t Take over a custom initramfs with this one
 -v Be verbose
 -h This message

gcordoba@ecordoba-laptop:~$ sudo update-initramfs -u

Afret reboot:
gcordoba@ecordoba-laptop:~$ sudo dmesg | grep lp
[17179569.184000] On node 0 totalpages: 65344
[17179572.972000] Calibrating delay using timer specific routine.. 3991.84 BogoMIPS (lpj=7983690)
[17179573.760000] PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report
[17179574.152000] Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
[17179596.504000] lp: driver loaded but no devices found
gcordoba@ecordoba-laptop:~$

A question: how can I know the permissions for the parallel port? How can I modify them?
I would like to see if the problem is about permissions.
Thanks,
Gustavo

Revision history for this message
Ante Karamatić (ivoks) wrote :

U Čet, 26. 10. 2006., u 18:51 +0000, gcordoba je napisao/la:

> gcordoba@ecordoba-laptop:~$ sudo update-initramfs
> You must specify at least one of -c, -u, or -d.

My mistake. update-initramfs -u

> gcordoba@ecordoba-laptop:~$ sudo dmesg | grep lp

Once again, dmesg is important after loading 'ppdev' module. Don't grep
it, just past last few lines.

> A question: how can I know the permissions for the parallel port? How can I modify them?

ls -dl /dev/lp0

Revision history for this message
gcordoba (glgcg) wrote :

Hi, thanks for your advice.
The dmesg is very long, then I am attaching it as a file (dm.txt)

Here some of the output:
[17211146.124000] Inbound IN=eth0 OUT= MAC=00:00:39:ea:32:f4:00:0d:66:24:60:55:08:00 SRC=172.202.234.230 DST=82.40.163.178 LEN=63 TOS=0x00 PREC=0x00 TTL=114 ID=37674 PROTO=UDP SPT=52407 DPT=6346 LEN=43
[17211159.200000] Inbound IN=eth0 OUT= MAC=00:00:39:ea:32:f4:00:0d:66:24:60:55:08:00 SRC=172.202.234.230 DST=82.40.163.178 LEN=63 TOS=0x00 PREC=0x00 TTL=114 ID=38094 PROTO=UDP SPT=53158 DPT=6346 LEN=43
[17211241.672000] Inbound IN=eth0 OUT= MAC=00:00:39:ea:32:f4:00:0d:66:24:60:55:08:00 SRC=82.245.33.185 DST=82.40.163.178 LEN=64 TOS=0x00 PREC=0x00 TTL=36 ID=19777 DF PROTO=TCP SPT=4659 DPT=135 WINDOW=53760 RES=0x00 SYN URGP=0
[17211244.632000] Inbound IN=eth0 OUT= MAC=00:00:39:ea:32:f4:00:0d:66:24:60:55:08:00 SRC=82.245.33.185 DST=82.40.163.178 LEN=64 TOS=0x00 PREC=0x00 TTL=36 ID=21013 DF PROTO=TCP SPT=4659 DPT=135 WINDOW=53760 RES=0x00 SYN URGP=0
[17211266.092000] Inbound IN=eth0 OUT= MAC=00:00:39:ea:32:f4:00:0d:66:24:60:55:08:00 SRC=172.202.234.230 DST=82.40.163.178 LEN=63 TOS=0x00 PREC=0x00 TTL=114 ID=38649 PROTO=UDP SPT=52407 DPT=6346 LEN=43
[17211279.888000] Inbound IN=eth0 OUT= MAC=00:00:39:ea:32:f4:00:0d:66:24:60:55:08:00 SRC=172.202.234.230 DST=82.40.163.178 LEN=63 TOS=0x00 PREC=0x00 TTL=114 ID=39066 PROTO=UDP SPT=53158 DPT=6346 LEN=43
gcordoba@ecordoba-laptop:~$ sudo dmesg>dm.txt
gcordoba@ecordoba-laptop:~$ ls -dl /dev/lp
ls: /dev/lp: No such file or directory
gcordoba@ecordoba-laptop:~$ ls -dl /dev/lp0
ls: /dev/lp0: No such file or directory
gcordoba@ecordoba-laptop:~$

I do not understand why neither lp0 nor lp exist!
Gustavo

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

The original poster has reported the bug of parallel printers not being detected and that is not fixed yet. It is most probably a kernel problem.

The dmesg output of gcordoba says

[17179596.504000] lp: driver loaded but no devices found

So the "lp" kernel module did not find the printer. This must be caused by the kernel.

So I add the kernel package to this bug.

Changed in linux-source-2.6.17:
importance: Undecided → High
status: Unconfirmed → Confirmed
Revision history for this message
xtknight (xt-knight) wrote :

Well, I'm having other troubles getting my Deskjet 722C to work out of the box. It looks like the pnm2ppa conf file problem (Version variable with HP printers) was fixed, but my printer is not detected at all in Edgy! Turns out I had to do 'sudo modprobe ppdev' before I did 'gksu gnome-cups-add'. Then, it finally detected my local parallel port printer.

Revision history for this message
xtknight (xt-knight) wrote :

I should add that appending 'ppdev' to /etc/modules fixes my problem permanently.

Revision history for this message
gcordoba (glgcg) wrote :

In my case 'gksu-cups-add' detected two ppds for ach driver tested (the gzipped and the gunzipped). e.g.:

** (gnome-cups-add:6359): WARNING **: Two ppds have driver == 'Standard'
        ->linuxprinting.org-postscript/Savin/Savin-SLP26n_PS.ppd.gz (Savin SLP26n PS[0]) and
        ->linuxprinting.org-gs-builtin/Savin/Savin-SLP26n-Postscript.ppd (Savin SLP26n PS)[0]

** (gnome-cups-add:6359): WARNING **: Two ppds have driver == 'Standard'
        ->linuxprinting.org-postscript/Savin/Savin-SLP32_PS.ppd.gz (Savin SLP32 PS[0]) and
        ->linuxprinting.org-gs-builtin/Savin/Savin-SLP32-Postscript.ppd (Savin SLP32 PS)[0]

** (gnome-cups-add:6359): WARNING **: Two ppds have driver == 'Standard'
        ->linuxprinting.org-postscript/Savin/Savin-SLP38c_PS.ppd.gz (Savin SLP38c PS[0]) and
        ->linuxprinting.org-gs-builtin/Savin/Savin-SLP38c-Postscript.ppd (Savin SLP38c PS)[0]

** (gnome-cups-add:6359): WARNING **: Two ppds have driver == '1.2'
        ->linuxprinting.org-postscript/Sharp/shc260mj.ppd.gz (Sharp AR-C260M PS, 1.2[0]) and
        ->linuxprinting.org-postscript/Sharp/shac260m.ppd.gz (Sharp AR-C260M PS, 1.2)[0]

Revision history for this message
Daniel Werner (demitsu) wrote :

...and another frustrated person to confirm this problem, this time with Debian. I've had the same "no parallel port printer discovered" problem for some time now. The antiquated HP LaserJet worked just fine when attached to a Debian 'sarge' system running LPRng. If I remember correctly, it still worked when I switched to CUPS last year (eventually ;). On Debian 'etch', though, it doesn't work at all.

Currently recompiling my kernel package with ppdev-support. Let's see if this works...

Revision history for this message
Daniel Werner (demitsu) wrote :

Bad luck. Even with lp, ppdev, parport, parport_pc loaded and cupsys restarted, gnome-cups-add won't detect anything at all. Some kernel output:

demitsu@jazzu:~$ dmesg | tail
[drm] Setting GART location based on new memory map
[drm] Loading R300 Microcode
[drm] writeback test succeeded in 1 usecs
pnp: Device 00:0a disabled.
pnp: Device 00:0a activated.
parport: PnPBIOS parport detected.
parport0: PC-style at 0x378 (0x778), irq 7, dma 3 [PCSPP,TRISTATE,COMPAT,ECP,DMA]
parport0: Legacy device
lp0: using parport0 (interrupt-driven).
ppdev: user-space parallel port driver

Revision history for this message
gcordoba (glgcg) wrote :

I am attaching the the printingbuginfo output.
Just in case.
Gustavo

Revision history for this message
Don Knudson (donknudson) wrote :

I have just upgraded to Debian "etch" Linux, and after three days of searching for how to get my HP Deskjet 722C to print again, I have finally found success. Here's what I did (except for what didn't work ; - ) . . .

I downloaded HP-DeskJet_722C-pnm2ppa.ppd from

http://www.linuxprinting.org/show_driver.cgi?driver=pnm2ppa

then copied it to

/etc/cups/ppd

Visited http://localhost:631 and chose "add printer"

Rather than choosing a listed printer, I browsed to

/etc/cups/ppd/HP-DeskJet_722C-pnm2ppa.ppd

I printed a test page and Voila! It worked! : - )

Description: HP Deskjet 722C
Location:
Make and Model: HP DeskJet 722C Foomatic/pnm2ppa (recommended)
Printer State: processing, accepting jobs, published.
Device URI: parallel:/dev/lp0

Apparently, the problem was just that the driver for this particular "Windows" style of printer was not already included with my cups installation.

Revision history for this message
steve.gensemer@gmail.com (steve-gensemer) wrote :

The permissions are still set wrong in 6.10 - I just downloaded and installed it, and the printing worked fine on the live CD but not on the hd install.

I ran into this problem but it was only a permissions issue with lp0. Took me 1/2 hour of sifting through this and other threads to track it down. This thread is a year old - why the heck is something as major as wrong permissions for lp0 still hanging around?

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

The problem here was that CUPS checked whether the "lp" module was loaded, and if not, it loaded both "lp" and "ppdev". With "lp" already loaded at CUPS startup (the usual case), CUPS did not load any module, so "ppdev" was not loaded again.

I have modified the CUPS startup script now, that CUPS tries to load both "lp" and "ppdev" if "LOAD_LP_MODULE=yes" in /etc/default/cupsys, independent whether "lp" is already loaded or not. Now "lp" and "ppdev" are always loaded when CUPS is started.

Packages for testing are here:

http://www.linux-foundation.org/~till/tmp/ubuntu/feisty/cupsys/

Changed in cupsys:
status: Fix Released → Fix Committed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Please install the new CUPS packages and check whether it really solves the problem, so that we can see whether we can close (reject) the kernel task.

Changed in cupsys:
status: Fix Committed → Fix Released
Revision history for this message
gcordoba (glgcg) wrote :

Just today I tried to install the packages. However, I couldnt install them: They report:
1) Dependency is not satisfiable: libc6
2) Conflicts with installed libcupssys2-dev
Any advice?
Thanks,
Gustavo

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

The packages are for Ubuntu Feisty. They do not work with older versions like Edgy or Dapper. To run the packages on an older version you will have to rebuild the source package.

Revision history for this message
Trouilliez vincent (vincent-trouilliez-modulonet) wrote :

> from Till Kamppeter
> Please install the new CUPS packages and check whether it really solves the > problem, so that we can see whether we can close (reject) the kernel task.

Seems to work : I just did a fresh install of Feisty Herd 3, updated it, and it successfully found my HP Laserjet 6P, I didn't have to load ppdev manually or do anything.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Fix in the cupsys package solves the problem, the kernel seems to be OK.

Changed in linux-source-2.6.17:
status: Confirmed → Rejected
Revision history for this message
Pascal De Vuyst (pascal-devuyst) wrote :

> The problem here was that CUPS checked whether the "lp" module
> was loaded, and if not, it loaded both "lp" and "ppdev". With "lp"
> already loaded at CUPS startup (the usual case), CUPS did not load
> any module, so "ppdev" was not loaded again.

The usual case is that the lp module is loaded at boot because it is present in /etc/modules.
Simple workaround: removing lp from /etc/modules and rebooting fixes parallel printer autodetection for Dapper and Edgy.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

In Gutsy, perhaps already in Feisty this has falklen back to the original, broken state. I think the problem is that if we fix it at Ubuntu the fix survives only until the next sync with Debian. This needs really to be fixed at Debian and the Debian folks need to be made aware of this.

Changed in cupsys:
status: Fix Released → Confirmed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

The piece of code to load the kernel modules is:

        if [ "$LOAD_LP_MODULE" = "yes" -a -f /usr/lib/cups/backend/parallel \
             -a -f /proc/devices -a -f /proc/modules -a -x /sbin/modprobe \
             -a -z "$(grep -e ' lp$' /proc/devices 2>/dev/null)" ]; then
          modprobe -q lp || true
          modprobe -q ppdev || true
        fi

It should be

        if [ "$LOAD_LP_MODULE" = "yes" -a -f /usr/lib/cups/backend/parallel \
             -a -f /proc/devices -a -f /proc/modules -a -x /sbin/modprobe]; then
          modprobe -q lp || true
          modprobe -q ppdev || true
        fi

so that the parallel port kernel modules are simply always loaded if $LOAD_LP_MODULE is set to "yes", /usr/lib/cups/backend/parallel is present, and kernel modules are supported.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks; I'll commit it to Debian, too.

Changed in cupsys:
status: Confirmed → In Progress
Revision history for this message
Mark W. Tomlinson (mark-tomlinson) wrote :

Should do; my laptop sees the LaserJet 6P connected to my desktop. Good job, guys!

Revision history for this message
Martin Pitt (pitti) wrote :

cupsys (1.2.12-3ubuntu1) gutsy; urgency=low

  * Merge latest fixes from Debian unstable. (LP: #29050)
  * debian/local/apparmor-profile:
    - Use abstractions/authentication and drop the passwd/shadow/pam rules.
    - Drop the redundant "/usr/lib/** mr" rule (already in 'base').
    - Enforce by default, so that we get actual protection.

 -- Martin Pitt <email address hidden> Thu, 09 Aug 2007 21:16:34 +0200

Changed in cupsys:
status: In Progress → Fix Released
Revision history for this message
whatme33 (whatme33) wrote :

 I found that using the printer files for brother or other ones would not work. I changed the executable file to one that ubuntu uses and the files worked perfectly. this was on 2040 laser and some other laser printers.

Revision history for this message
Roland (rosun) wrote :

Hi, I am using Feisty, and I set BIOS to Standart Bi-directional from ETC. Then did try some changes in modules file, such as ignoring lp and adding ppdev, it seems does have any effect. Provided http://www.linux-foundation.org/~till/tmp/ubuntu/feisty/cupsys/ does not have the content. Finally I checked the cupsys file and it does have the updated form as suggested above.
Any opinions ? Thanks

Displaying first 40 and last 40 comments. View all 116 comments or add a comment.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.