You are not logged in.
Background: I need to print from to a number of different printers at work and home. The primary models in use are a Dell 2330dn (networked) and 3 different HPs - LaserJet p2014, LaserJet p3005, LaserJet p3010-Series (all via usb). Initially, I set up the Dell at home. This worked fine. I managed some not very satisfactory printing with the 2014 but I got the 3005 and 3010 to work fine as well. But I really need the 2014 to work and work well, too. Today when I tried to print, it was moving everything down so that the text was cut off at the bottom of the page and there was a very large margin at the top. I already knew that I really needed to set this one up better so I thought I might as well try.
Initially, I had cups + foomatic packages from the official repositories + hplip etc. installed. When I set up the 2014, I was told that I really needed a plugin for it to work properly. So, I ran hp-setup to try to do this. I could not, however, successfully install the plugin. I tried the trick of linking /usr/bin/python to python2 at the point of plugin installation but it did not help. I also tried downloading the plugin file directly and pointing the installer at that file but it still didn't work.
Given the location of the plugin, I thought I would see if the parent site had any useful information. This took me to openprinting.org where I consulted the database. It recommended using the foo2xqx driver for the printer which should get it to work "mostly". Investigating, I found I needed the alternative foomatic packages from AUR for foo2zjs. I installed foo2zjs and the associated foomatic package from AUR. I then tried to set the printer up using the new driver. Setup went fine but I could not print a self-test. Cups kept saying that the jobs had completed but nothing came out of the printer. I also tried installing foo2zjs-utils as it sounded potentially useful but pacman told me that all the files it wanted to install were already present on my system.
At this point, I had to come home. I've now tested the Dell which previously worked fine but now won't print. I tried rebooting the machine just to make sure everything was restarted properly but it didn't help. Cups complained that it was "unable to find the printer" and setting cupsd to debug to increase logging, I see that it is unable to resolve the printers uri (and therefore can't find the printer).
I [11/Jan/2012:22:01:47 +0000] Full reload complete.
D [11/Jan/2012:22:01:47 +0000] cupsdCleanFiles(path="/var/spool/cups/tmp", pattern="(null)")
I [11/Jan/2012:22:01:47 +0000] Cleaning out old files in "/var/spool/cups/tmp"...
D [11/Jan/2012:22:01:47 +0000] cupsdCleanFiles(path="/var/cache/cups", pattern="*.ipp")
I [11/Jan/2012:22:01:47 +0000] Cleaning out old files in "/var/cache/cups"...
E [11/Jan/2012:22:01:47 +0000] Unable to open listen socket for address [v1.::1]:631 - Address family not supported by protocol.
I [11/Jan/2012:22:01:47 +0000] Listening to 127.0.0.1:631 on fd 8...
I [11/Jan/2012:22:01:47 +0000] Listening to /var/run/cups/cups.sock:631 on fd 9...
I [11/Jan/2012:22:01:47 +0000] Resuming new connection processing...
...
D [11/Jan/2012:22:01:52 +0000] [CGI] Regular expression ".*PrintSelfTestPage.*"
D [11/Jan/2012:22:01:52 +0000] cupsdReadClient: 17 POST / HTTP/1.1
D [11/Jan/2012:22:01:52 +0000] cupsdSetBusyState: newbusy="Active clients and dirty files", busy="Active clients and dirty files
"
D [11/Jan/2012:22:01:52 +0000] cupsdAuthorize: No authentication data provided.
D [11/Jan/2012:22:01:52 +0000] cupsdReadClient: 17 1.1 Get-Jobs 1
D [11/Jan/2012:22:01:52 +0000] Get-Jobs ipp://localhost:631/printers/Dell_2330dn_ipp
D [11/Jan/2012:22:01:52 +0000] Returning IPP successful-ok for Get-Jobs (ipp://localhost:631/printers/Dell_2330dn_ipp) from loca
lhost
D [11/Jan/2012:22:01:52 +0000] cupsdSetBusyState: newbusy="Active clients and dirty files", busy="Active clients and dirty files
"
D [11/Jan/2012:22:01:52 +0000] cupsdReadClient: 17 WAITING Closing on EOF
D [11/Jan/2012:22:01:52 +0000] cupsdCloseClient: 17
D [11/Jan/2012:22:01:52 +0000] cupsdSetBusyState: newbusy="Active clients and dirty files", busy="Active clients and dirty files
"
D [11/Jan/2012:22:01:52 +0000] PID 5748 (/usr/lib/cups/cgi-bin/printers.cgi) exited with no errors.
D [11/Jan/2012:22:01:52 +0000] cupsdSetBusyState: newbusy="Dirty files", busy="Active clients and dirty files"
D [11/Jan/2012:22:01:52 +0000] cupsdReadClient: 15 GET /cups.css HTTP/1.1
...
D [11/Jan/2012:22:01:52 +0000] cupsdAuthorize: No authentication data provided.
D [11/Jan/2012:22:01:52 +0000] cupsdSetBusyState: newbusy="Dirty files", busy="Active clients and dirty files"
D [11/Jan/2012:22:01:52 +0000] [Job 75] Unable to resolve URI
D [11/Jan/2012:22:01:52 +0000] [Job 75] STATE: -connecting-to-device,offline-report
E [11/Jan/2012:22:01:52 +0000] [Job 75] Unable to find printer.
D [11/Jan/2012:22:01:52 +0000] [Job 75] Set job-printer-state-message to "Unable to find printer.", current level=ERROR
I [11/Jan/2012:22:01:52 +0000] [Job 75] Unable to locate printer.I tried deleting the Dell but I cannot now re-add it because cups cannot find any printer at all. When I "add printer", it should list the Dell under "local printers" in the web interface but there's nothing there.
I've read the troubleshooting section of the cups wiki page but it doesn't have anything which quite looks like this. The closest issue suggested deleting and readding the printer but the second stage of this is obviously not working out.
Can anybody suggest the best strategy for getting cups generally working properly again? And for setting up the 2014 without re-screwing up all of my printing? Would appreciate any advice or pointers.
Last edited by cfr (2012-01-12 04:12:45)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I believe you need the avahi-daemon running to find network printers. I had no problem in Arch with the firewall, but in Fedora I had to open firewall ports for my network printers to be discovered (fortunately Fedora's printer wizard did this for me).
Offline
ls /run/daemons
acpid alsa avahi-daemon avahi-dnsconfd bluetooth crond cupsd dbus iptables laptop-mode ntpd smartd syslog-ng wicdIs that right? Or should I only have one entry to do with avahi?
My firewall is currently pretty weak as I haven't really figured out how to convert ipfw rules for iptables. As a result it lets anything out and lets the resulting responses back in. So I doubt it is that. Plus printing worked fine for 3 out of 4 printers until I started trying to fix the fourth! (And the fourth is a USB connection - not networked.)
But maybe I should try taking the firewall down just to make sure for the networked Dell one... (Now just to remember the equivalent of ipfw2 flush - I miss ipfw from os x!)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Thank you!
OK. I understand what I'm doing even less than I thought. It works fine if I take the firewall down. (I say "fine" but obviously it's a printer so the first thing it did was jam and flash orange lights but still.)
So how can I figure out how to adapt my firewall rules to allow printing? I thought because I was initiating the connection, it would be OK but I guess maybe the computer needs to discover network services by letting stuff in somehow?
With ipfw, I would just watch the log if something didn't work and figure out from that what needed to be opened up. Also I had a configuration I borrowed from somewhere with extremely detailed comments which helped a lot. Plus the output looked somewhat like the rules I input. Whereas with iptables I can't even tell from the list of rules it shows me as output whether it is blocking anything at all. (Obviously it is blocking printing, anyway.)
And then I need to figure out how to get the 2014 working. I don't think the firewall is affecting usb printing because that was definitely working for the other HP printers since I set the firewall up.
Last edited by cfr (2012-01-12 01:29:21)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
OK. Well I figured out something which seems to work for the Dell. At least I've printed 2 test pages and cleared 2 paper jams...
I used this:
iptables -A UDP -p udp --source 10.0.1.6 --sport 5353 --dport 5353 -j ACCEPTI don't really know if this is right or not. When I look at the output from /etc/rc.d iptables save, it adds the rule at the bottom. This is part of what I don't understand. I thought that the first match triggered the relevant action. So if I earlier have a rule to drop UDP, how can a rule which appears later make any difference at all?
But anyway, it does seem to work.
So does anybody have any advice for getting the HP p2014 to print properly? I work for two departments and I need to print at the appropriate department's expense which is why I have to be able to get the 2014 printing and can't, say, just use one of the others for the time being. (Dell is home; 2014 is department 1; the other 2 HPs are shared printers in department 2 so if only one of those worked it would be OK but, of course, they're both fine...)
I'm particularly interested in whether anybody can advise me on whether I should be pursuing the foo2zjs strategy (and whether that is going to mess up the config for the other HPs) or whether it would be better to revert to the standard foomatic and try to find a way to install the plugin hp-setup wants.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Update: so today I tried printing a test page to the 2014 and, hey presto, it worked!
I then tried to print a document and nothing. I tried rebooting but nothing. I can't even print a test page.
So I tried deleting the printer but now I cannot re-add it as cups doesn't see it. Even though it is usb, I tried taking the firewall down but it made no difference.
Something odd is going on with usb and the printer. With no external devices connected, lsusb normally gives me a short list. As I add devices, I get a longer list as you'd expect. However, if the printer and my mouse are connected and/or just the printer is connected, lsusb sometimes fails to list any devices at all, even the internal ones. It seems to have something to do with the order in which things are added but I can't pin it down. Even when the list is empty, though, the mouse still works.
When I plug in the 2014 and compare the output with that described in the CUPS wiki, it doesn't look right at all:
[ 1184.974987] usb 1-1.1: new high speed USB device number 10 using ehci_hcd
[ 1185.060694] usb 1-1.1: config index 0 descriptor too short (expected 32, got 9)
[ 1185.060702] usb 1-1.1: config 1 has 0 interfaces, different from the descriptor's value: 1Note that I've haven't blacklisted any modules and I'm not clear whether to try that or not.
Also, I thought that the foo2zjs route was distinct from the hplip route but hplip is still listed in cups. Is this part of the problem? Though when I first installed foo2zjs, I had no problems adding the printer - it was just getting it to print anything which was problematic.
I have the distinct impression that every move I make is digging me into a deeper hole!
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
OK so I wiped foo2zjs and replaced the standard foomatic-db.
I also blacklisted usblp even though this didn't seem necessary before, rebooted.
At this point, cups can see the 2014 over usb. (kde's printer applet noticed it too but oddly failed to autoconfigure it as it does with other HPs.)
So I reinstalled the 2014. It printed a test page. It printed a document. But the output is too faint to be usable even though "normal" (as opposed to "draft" mode is enabled). The printer is not low on toner.
So I thought I'd have another go at installing the plugin using hp-setup without the gui this time. This successfully downloaded the plugin run file from openprinting. It went on to report errors, though:
----------------------
| INSTALLING PLUG-IN |
----------------------
Verifying archive integrity... All good.
Uncompressing HPLIP 3.11.10 Plugin Self Extracting Archive.........................................
/tmp/hplip-3.11.10-plugin.run: line 395: ./hplip-plugin-install: Permission denied
error: Python gobject/dbus may be not installed
Done.
---------------------
| PRINT QUEUE SETUP |
---------------------
warning: One or more print queues already exist for this device: HP_LaserJet_P2014.
Would you like to install another print queue for this device (y=yes, n=no*, q=quit) ?
Done.The error line is odd. dbus-python is installed. So is python2-gobject2 2.28.6-4. But there are several variations on the python/gobject theme. I know hp-setup will want python2 but there's also python-gobject2 2.28.6-4. Should this be installed instead or as well? (I figure the python3 versions are better left uninstalled.)
I tried printing another test page. This "printed" an entirely blank page. The printer reports it is fine for toner.
I've got a brother to play with now as well so maybe that will work better...
PS IT support are blaming Arch as a "non-standard" Linux distribution and recommend Ubuntu or Mint... Sigh. Given that Mint won't even talk to the display on my mother's machine without all kinds of work arounds, I can't say this advice fills me with confidence. (And the Ubuntu installer crashed leaving an unusable mess on my machine. I only wanted to see what it did to make EFI booting work but it hardly suggests a seamless user experience out of the box!)
Last edited by cfr (2012-01-12 17:50:37)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I ran hp-check and it tells me that hpaio is not installed correctly and needs to be added to /etc/sane.d/dll.conf. But I noticed that everything uncommented in this file has a corresponding conf file under /etc/sane.d but hpaio does not. I searched pacman and aur for hpaio with no luck. I seem to have the compiled libraries for this installed but I don't know what it does or how to configure it.
And I find it difficult to believe that hp-setup can really need this. I'm not trying to install a scanner!
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline