Link to home
Start Free TrialLog in
Avatar of jhzkongo

asked on

Printing problem on Linux

I have been unable to print with Linux for some time.
I have tried everything, and I think I've narrowed the problem,
I can't cat file > /dev/bus/usb/005/005 which is the printer.
I get the message "permission denied," even though I am running as root.
Also have tried changing permissions to 777, doesn't help.
I can't understand it and don't know what to try next.
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

What Linux distribution and version?  
What is the printer make and model?  
How did you install it?  
Did you use CUPs?
Avatar of jhzkongo


I believe all that is irrelevant.  CUPS works fine, it send the jobs to the printer but it never gets there.
The error log shows no write permission on the device, even though I am root.  I'm pretty sure that's the problem.
One should be able to cat a text file to the printer directly, but I can't.
Check the various log messages.  Access to the port which a special device.

Is cups running?  
Remove and re-add the printer using the cups interface.  Do you have another system to which you can attach the printer to make sure it works I.e. it has nt run up of ink, paper, etc.

/var/log/messages should tell you what might be going on.

You have not provided any information on which we could even try to guess.

I.e. I get into my car and can't get to point B.
Any suggestions?
Interesting.  It doesn't work but you don't want to answer any questions.  Good luck.
what is your printer model and you are installing printer, which version os of your linux.
I have two printers, HP and Lexmark.  Mandriva Linux.  They are both installed correctly and I repeat I don't believe there is any problem with CUPS.
I have spent considerable time troubleshooting and I believe I have isolated the problem.
I just have no solution.
Running as root, I cannot write to the printers at /dev/bus/usb/005/005 and ditto, 003.
The CUPS error log says:  Permission denied.
Therefore, the print jobs are being sent to the printers just fine but they do not print.
It is even more bizarre, because all other usb devices work fine, only the two printers do not.
I have looked online and this problem seems fairly common, only there is no solution.  Obviously since I am already root the solution of running as root, or just changing the permissions, doesn't help.
Did they ever work on Linux?  In the Windows world, those would be 'GDI printers' where the printing image is generated by the driver on the computer and sent as a 'video stream' to the printer.  You can't just send characters to them over USB becuase there isn't any print engine like PCL built into those printers.
A long time ago, I had problems with the printer which were related to having duplicate udev configuration files.  When I finally fixed that however, the Lexmark did work for a while.

Then one day, I had a paper jam and had to yank the paper out of the machine.  Afterwards, it stopped printing altogether!

OK, I understand sending via cat might print gobbledygook, or nothing.  But the message I'm getting is can't write to the device AT ALL.

I recently connected another printer from a friend, the HP.  And I can get it to print out the alignment sheet using the program hp-align (which, I think, bypasses CUPS and goes directly to the printer.

Thanks for your help.
At this point, I would plug them into a Windows machine to verify that they actually work before I spent anymore time on them.
Here is part of CUPS error log:

STATE: +connecting-to-device
D [04/Jul/2013:12:20:32 -0700] [Job 275] print_device_libusb
D [04/Jul/2013:12:20:32 -0700] [Job 275] usb_find_busses=0
D [04/Jul/2013:12:20:32 -0700] [Job 275] usb_find_devices=0
D [04/Jul/2013:12:20:32 -0700] [Job 275] libusb couldn't open USB device /dev/bus/usb/005/003: Permission denied.
D [04/Jul/2013:12:20:32 -0700] [Job 275] libusb requires write access to USB device nodes.
D [04/Jul/2013:12:20:37 -0700] [Job 275] STATE: +connecting-to-device
D [04/Jul/2013:12:20:37 -0700] [Job 275] print_device_libusb
D [04/Jul/2013:12:20:37 -0700] [Job 275] usb_find_busses=0
D [04/Jul/2013:12:20:37 -0700] [Job 275] usb_find_devices=0
D [04/Jul/2013:12:20:37 -0700] [Job 275] libusb couldn't open USB device /dev/bus/usb/005/003: Permission denied.
D [04/Jul/2013:12:20:37 -0700] [Job 275] libusb requires write access to USB device nodes.
D [04/Jul/2013:12:20:42 -0700] [Job 275] STATE: +connecting-to-device
D [04/Jul/2013:12:20:42 -0700] [Job 275] print_device_libusb
D [04/Jul/2013:12:20:42 -0700] [Job 275] usb_find_busses=0
D [04/Jul/2013:12:20:42 -0700] [Job 275] usb_find_devices=0
D [04/Jul/2013:12:20:42 -0700] [Job 275] libusb couldn't open USB device /dev/bus/usb/005/003: Permission denied.
D [04/Jul/2013:12:20:42 -0700] [Job 275] libusb requires write access to USB device nodes.
D [04/Jul/2013:12:20:44 -0700] cupsdAcceptClient: 13 from localhost (Domain)

Remember, I'm running as root and have set permissions to 777 anyway!

I got another program called PDQ which I think bypasses CUPS.  It marks the job as "finished" ie sent to printer (I think), but still doesn't print.
Oh, I'm sure they work.  They work fine copying and scanning, they worked for a time on Linux,
and as I say the HP does print from the program hp-align.  No question the printers work.  Problem is the software.
I have two HP USB printers.  Though I haven't had any trouble for a long time, the 'cure' for connection problems has always been to disconnect the cable and power off the printers.  Then power up, re-connect the cable and let the software re-sync or what ever it does.  I am suggesting that you connect them to Windows to put them back in the proper state as well as checking the functions.  It is kind of stupid that it works that way but all I can say is that I didn't write the firmware or drivers.  Copying doesn't use the USB interface which is where the problem is.
What about scanning?  That works too.
I don't have a Windows computer easily available, nor do I have drivers to install them on a Windows system.  However, I can certainly turn them on and off.

Doubt that will help though.  I'm sure it's something more fundamental.  Maybe a bug in libusb, or the kernel.  Thinking of trying another kernel, or maybe another version of Linux to see if they might work with that.  I hate rebooting though.
Windows would probably go get the drivers for you.  Scanning from the printer to a program on the computer works?  That's interesting.  Any chance the scanning program or driver has taken possession of the port and is blocking any other use?

When I have had connection problems with my USB printers, just turning them off and back on didn't fix it.  The HP printers at least seem to remember something as long as the cable is still connected.  In fact, the directions from HP for one of the models explicitly describes the sequence above.

And even Linux occasionally has to reboot to fix some problems.
In scanning, the data goes the other way--from the printer to the computer.  Does it go through the same device, just the other way?  Don't know that, but obviously there is no problem with permissions.

I can leave Linux running literally for months and years, without problems.  Occasionally I restart the X window.
You can leave it running if you don't change anything.  But something is not working now and something must be changed.  That also means that you have not done any Linux core updates because they require the server to be rebooted.  I get those every few months on my Ubuntu machines.  You should know that my web host reboots the Linux servers every day at 5 AM, in part because things change every day on web hosting.

USB communication is actually a networking protocol.  No matter what the service is, data goes both ways.  So if your scanner software is working to send data to the computer, then the USB channel is working.  However, if your scanning software never releases the channel to be used by another service, that could be why you are get permission denied messages.
I don't think that's the problem though, because I've never scanned from the HP, only the Lexmark.
I don't know what you mean by core updates.  I can update the kernel (I can choose from over 70 Mandriva kernels!).  But there is no new version of Mandriva, and I'm wary of it anyway because it always breaks the system.
There are no new versions of CUPS or libusb available either.
The oddest thing is that the HP will print out the HP alignment sheet, but nothing else.  How do you explain that?
I don't know but your idea about it going directly to the port sounds plausible.
This looks interesting, Wireshark USB capture.  Note that it requires Linux  kernel 2.6.21 or newer (which what I meant about 'core' updates, 'kernel updates').
Something is wrong since it does not work.
Do you have Selinux enabled?

As was suggested.  Disconnect the printers.
Make sure you have the correct drivers for cups, clear the cups config for the printer you disconnected. Connect the printer configure cups and see whether you can print the test page.

Check the spool.
you can download driver for linux from hp site and install it

your problem will be resolve to install this driver.this is cups related problem.
What is Selinux?  Not sure I have it.
As for printing the alignment sheet, I have figured out that that is in the printer itself.  Doesn't have to be sent from computer itself, but the signal to print is being sent through the device file, presumably.  So something is getting through.

I'll try some of this stuff, see if it works.
OK, ran the installation script again.
Now I get a new error message:

held since
Sat 06 Jul 2013 10:13:30 AM PDT
"/usr/lib/cups/backend/hp failed"
I now have the wireshark program, but have no idea what to do with it.
The debugfs is mounted, and I have a directory, /sys/kernel/debug/usb/usbmon.
It has a number of files in it but all are empty.
Wireshark is used to capture data packets mainly via network traffic.
Not sure you can use wireshark to capture data going to a USB port.

The printer has that script/filter defined for the printer? Check whether /usr/lib/cups/backend/hp exists and what it is.

Often, enscript is used as a script to convert text into a format acceptable to the printer. Ps, PCL, etc.
direct hp:/usb/Officejet_5600_series?serial=CN694DF59X04CY "HP Officejet 5600 series" "HP Officejet 5600 series USB CN694DF59X04CY HPLIP" "MFG:HP;MDL:Officejet 5600 series;CLS:PRINTER;DES:Officejet 5600 series;SN:CN694DF59X04CY;"
Essentially, the "backend failed' message seems the same as the earlier one--date not being sent to printer.
For Wireshark, look at the link I posted.
Yes, I have.  I don't understand what this would do though.  Analyze the packets sent through the USB device?  What would we do then?
Results attached.
I was really expecting to see some error messages but I don't know what any of that means.
If I sent testpage to the printer, there's no error on Wireshark but nothing happens and nothing shows up.
I don't have anything more at this point.
A failure may deal with the inability to convert the data being sent into the correct format for the printer.
Do you have the Linux drivers installed?
I have the driver.
I don't think it's a question.  No data can be sent to the device.
Do you have an external storage that uses a similar cable?
I doubt that it is the cable, but worth trying unless you already confirmed that the cable/printer work in a different setup.

The issue might be as simple as having a switch out of place.  Does the system have a parallel port as well?  If so does it have a slide?

Does it have a network connection you could use instead f the USB?  Check the configuration settings of the printer to make sure up it expects data through the USB.
The strange thing is that all the other USB devices work fine.  Only the printer does not.
I doubt any other possible connection could be used since it is a USB printer.  Obviously it expects data through USB.
No possible connection through parallel port.
Let me recall two facts:
1.  Problem began when paper jammed; after that, printer which had worked before stopped working.
2.  Date is successfully sent to computer through program hp-align, although alignment sheet is already on printer.
Can anyone explain those facts?
Since the scanner part of the printer works, the USB connection and channel must be OK.  USB uses a network protocol and data always goes both ways when something is working.  I don't know what the hp-align program actually does so I don't know what it says about the ability to print.  We do know that info can be sent to the printer because the scanner works.

The other thing we know is that because of the software on either the computer or the printer, communication for normal printing is not working.  My experience on Windows is that the printer and connection need to be power and connection cycled to re-establish a working connection.  I do not know if that is also true with Linux and I don't really have a way to test it at the moment.
Well, it seems to be very hard to diagnose the problem.  I wonder what I could do to solve it?  
I can't upgrade CUPS or libusb because I have the latest versions, from Mandriva anyway.
Could I migrate to another version of Linux?  What's the easiest way to do so?
Would trying another kernel help?  That's about all I can think of.
Do not believe printer drivers are kernel integrated, but you may wish to recompile the printer drivers if you updated the kernel.
One way is to use the dyncamically build kernel dkms though not sure whether it works with mandriva.
What DKMS does is when the system boots with a new kernel, it automatically (if properly configured) builds the drivers that are needed by the system.
But we are not having a problem with the printer drivers.  We are having a problem sending data through the device.
I believe that is handled by the kernel, or else by libusb.  No?
I've never seen DKMS work very well.  I tried to get a program called Virtual Box, so I could try other Linux versions.  It tried to build a kernel module but failed.
I disagree.  Communication over USB is working as shown by the scanner function.  You are having a problem between the printer driver and the printer internal printing functions.
Well, the error messages have been "Permission denied to write to /dev/bus/usb/005/005" and "Backend failed."  We know the printer works, we know CUPS is sending out the jobs (and PDQ).
So surely the problem is there.
When I get the "backend failed" message, the job is "held."  However, I can release it and then the same thing happens again.  I wonder if this means anything?
The process of printing is a job is sent through lpr to cups which then uses the driver to convert the data stream it receives into a printer driver specified format which is then pushed through with the kernel/driver dealing with data exchange.

You may have two conflicting drivers that lock access to the resource.  Also, the USB socket is likely locked by a different process.

You can use lsof and Fuser to see what process is locking/using the resource.

Strace is a debugging command that can look at a process and follow any child process.
The complexity is that you would need to know what you are looking for.
I'll see what lsof comes up with.
However, I am thinking it is a bug in libusb.  I have installed a program called libusb-compat-debug and perhaps that will produce some messages.
For what it's worth:

 fuser -m /dev/bus/usb/005/005
/dev/bus/usb/005/005:     1   208m   515  2432  3252  3374  3456  3462  3496  3502  3508  3580  3595  3657  3663  3665  3764  3792  3807  3917  3946  3947  3997c  3999c  4004c  4009c  4014c  4019c  4053  4083  4110  4111  4127  7656  7665  7732  7735  7737  7752  7753 14185 14186 15542 16059 16063 16064 16067 16071 16079 16080 16109 16114 16639 16915 16929 20064 20087 20088m 20092 20093m 20098 20099 20102 21411m 25360 25365 25369 29109 29110 31760


cupsd     31760       root  cwd       DIR        8,1      4096          2 /
cupsd     31760       root  rtd       DIR        8,1      4096          2 /
cupsd     31760       root  txt       REG        8,3    546752     467285 /usr/sbin/cupsd
cupsd     31760       root  mem       REG        8,3     65536    1450930 /usr/lib/samba/valid.dat
cupsd     31760       root  mem       REG        8,3     26048    1409396 /usr/lib/gconv/gconv-modules.cache
cupsd     31760       root  mem       REG        8,3    131072    1450798 /usr/lib/samba/lowcase.dat
cupsd     31760       root  mem       REG        8,3    112272    1331595 /usr/lib/
cupsd     31760       root  mem       REG        8,3    206715    1330944 /usr/lib/
cupsd     31760       root  mem       REG        8,3    144300    1331073 /usr/lib/
cupsd     31760       root  mem       REG        8,1     52732     213564 /lib/
cupsd     31760       root  mem       REG        8,1   3513536     213631 /lib/
cupsd     31760       root  mem       REG        8,1     22096     213452 /lib/
cupsd     31760       root  mem       REG        8,1     42656     213611 /lib/
cupsd     31760       root  mem       REG        8,1     92020     213606 /lib/
cupsd     31760       root  mem       REG        8,3      9584    1409397 /usr/lib/gconv/
cupsd     31760       root  mem       REG        8,3      9596    1409411 /usr/lib/gconv/
cupsd     31760       root  mem       REG        8,3    131072    1450776 /usr/lib/samba/upcase.dat
cupsd     31760       root  mem       REG        8,3 101475008     207328 /usr/share/locale/locale-archive
cupsd     31760       root  mem       REG        8,3     34464    1329903 /usr/lib/
cupsd     31760       root  mem       REG        8,1     50030     213504 /lib/
cupsd     31760       root  mem       REG        8,1     95800     213486 /lib/
cupsd     31760       root  mem       REG        8,3    112928    1331069 /usr/lib/
cupsd     31760       root  mem       REG        8,1     83780     211335 /lib/
cupsd     31760       root  mem       REG        8,3     59136    1331343 /usr/lib/
cupsd     31760       root  mem       REG        8,1   1750080     221806 /lib/i686/
cupsd     31760       root  mem       REG        8,1     13888     213593 /lib/
cupsd     31760       root  mem       REG        8,3    173860    1329787 /usr/lib/
cupsd     31760       root  mem       REG        8,3    876812    1329782 /usr/lib/
cupsd     31760       root  mem       REG        8,3    262096    1327603 /usr/lib/
cupsd     31760       root  mem       REG        8,1     67428     213612 /lib/
cupsd     31760       root  mem       REG        8,1    169476     220977 /lib/i686/
cupsd     31760       root  mem       REG        8,3    364328    1331955 /usr/lib/
cupsd     31760       root  mem       REG        8,3     67456    1330628 /usr/lib/
cupsd     31760       root  mem       REG        8,3     50888    1330386 /usr/lib/
cupsd     31760       root  mem       REG        8,1     34784     220970 /lib/i686/
cupsd     31760       root  mem       REG        8,1    121700     220978 /lib/i686/
cupsd     31760       root  mem       REG        8,1    297108     213501 /lib/
cupsd     31760       root  mem       REG        8,1    156395     211367 /lib/
cupsd     31760       root  mem       REG        8,1     13944     213549 /lib/
cupsd     31760       root  mem       REG        8,1     54932     213459 /lib/
cupsd     31760       root  mem       REG        8,3    315284    1330962 /usr/lib/
cupsd     31760       root  mem       REG        8,3     75824    1329945 /usr/lib/
cupsd     31760       root  mem       REG        8,3   1865192    2277431 /usr/lib/
cupsd     31760       root  mem       REG        8,3    365372    2277432 /usr/lib/
cupsd     31760       root  mem       REG        8,1     91736     211369 /lib/
cupsd     31760       root  mem       REG        8,3     20652    1330986 /usr/lib/
cupsd     31760       root  mem       REG        8,1      9636     213572 /lib/
cupsd     31760       root  mem       REG        8,1     46732     213476 /lib/
cupsd     31760       root  mem       REG        8,1    645249     213613 /lib/
cupsd     31760       root    0r      CHR        1,3                 3839 /dev/null
cupsd     31760       root    1w      CHR        1,3                 3839 /dev/null
cupsd     31760       root    2w      CHR        1,3                 3839 /dev/null
cupsd     31760       root    3u     IPv4 2772579138                  TCP *:ipp (LISTEN)
cupsd     31760       root    4u     IPv6 2772579139                  TCP *:ipp (LISTEN)
cupsd     31760       root    5u     unix 0xc18e7840           2772579140 /var/run/cups/cups.sock
cupsd     31760       root    6u     IPv4 2772579141                  UDP *:ipp
cupsd     31760       root    7r     FIFO        0,8           2772579142 pipe
cupsd     31760       root    8w     FIFO        0,8           2772579142 pipe
cupsd     31760       root    9u      REG        8,2     24568    1048757 /var/log/cups/error_log
cupsd     31760       root   10u     unix 0xed1c3600           2772495163 socket
cupsd     31760       root   11u      REG        8,2      1433    1048749 /var/log/cups/access_log
cupsd     31760       root   12u      REG        8,2       166    1048762 /var/log/cups/page_log
cupsd     31760       root   15u     unix 0xe8844240           2772511502 socket
cupsd     31760       root   18r      CHR        1,9                 3844 /dev/urandom
Look at modprobe to see whether that is the source of the conflict I.e. it reflects the drong device/driver mapping.
How exactly would I do this?  The only use of modprobe I know is to put a module into the kernel.
Modprobe  -l might be correct format for your system to list all the modules.

Modprobe.conf deals with mapping resources.

I've not encountered a situation similar to yours where some portion of the device used to work now does not, but other functionality of the device still works.

Can you place a paper in the scanner and printout the copy? I believe the multifunction have the copy capability.  Trying to see whether the functionality still functions onthe printer.
lsmod lists the modules.  All the USB modules are there.
Not sure what you mean.  Copying still works and scanning also works; just printing from the computer doesn't work.
Yes, it does seem bizarre.
Found this:

USB printers can get accessed with two methods: The usblp kernel module and libusb. The former is the classic way. It is simple: data is sent to the printer by writing it to a device file as a simple serial data stream. Reading the same device file allows bi-di access, at least for things like reading out ink levels, status, or printer capability information (PJL). It works very well for simple printers, but for multi-function devices (printer/scanner) it is not suitable and manufacturers like HP supply their own backends. Source: here.
Blacklisting usblp
Warning: As of cups version 1.6.0, you no longer need to blacklist the usblp kernel module. If you find out this is the only way to fix a remaining issue please report this upstream to the CUPS bug tracker and maybe also get in contact with Till Kamppeter (Debian CUPS maintainer). See upstream bug for more.

If you have problems getting your USB printer to work, you can try blacklisting the usblp kernel module:
Does modprobe -l on your system list the modules!
Use grep -i USB to see which is LinkedIn your system.

You could try following the suggestions to see if it works for you.
I tried this; removing the usblp module.  However it did not work.
I wonder if there is a way to do the other thing, i.e. get rid of libusb and use usblp?  I could urpme libusb but I'm afraid to try it.
In any case, above above info seems to be getting close to problem.
I wish I could get cups 1.6 but I can't.  I using cups 1.4.2
The following info may be helpful

look at the modprobe output and modprobe.d/blacklist (centsos/redhat) this is where you can map a device to a driver.

It may work.  As I am unfamiliar with Mandriva, I never remove packages/libraries as a means to try to fix something unless it is determinable that it is the cause.

There might be dependencies that are not apparent that may break.
I removed usblp and this removes the device /dev/usb/lp1.  This may be progress since there is now only one device which goes to the printer!
However, I still get a message that the printer is not connected!
I've now rebooted the whole system and am running a different kernel, 3.03.  No change.
You can have multiple paths to a printer, but the Renee/driver/spooler will handle the job scheduling passing one job at a time.
The only thing I can think of to do is remove libusb and rely on the usblp module.
But if I do that, wouldn't the other USB devices cease to work?  And maybe other things too.
That is the issue that I am uncertain about.
See whether it is possible using an entry within /etc/modprobe.d to link the printer to the USB reference you think should work.
Are you in a graphical environment within Mandriva? See whether it has a utility that deals with printers which includes a way to reference the USB driver you think should work?
There is printerdrake but it is not helpful.
Apparently there are now two USB drives, usblp (kernel module) and libusb.  I tried removing usblp but that didn't work.
I'm reluctant to remove libusb for fear that will disable all the USB devices.
Unfortunately, I do not have this setup nor a way to replicate it to help you trouble shoot the issue.
It looks like much has been tried.  I may have missed something in all the history so forgive me if I suggest you try something already tried.

Also, I realize some of these suggestions don't make much sense.  OTOH, I've tried just about all of them at one point or another in strange situations and sometimes each of them has solved a USB problem.  (Not always with printers but always with a USB port.)

They may also seem desperate longshots but nothing else has worked.

As you are aware, the permission denied doesn't make sense when running as root.  Having said that, there has to be a reason for it.  

What other USB devices are attached?

Have you tried using a different USB port?

Have you tried printing with less USB devices attached?

Have you tried using a powered hub?  (I know, but I've solved problems like this in the past doing just that.)

Have you disabled and stopped CUPS, perhaps rebooted, and then tried the direct print to see if you still get permission denied?

In the end, however, it might be that your hardware has an obscure problem (so that it almost completly works but not 100%) and that might be combined with the USB driver also having an obscure bug that it only noticable when there's an obscure hardware problem.  (You might need to change the computer or change the printer to solve this).  If there is a H/W issue, my guess is it with with the printer in it's USB chip.  That's a guess.

I could be wrong but sometimes I'm right and I have solved weird problems with weird solutions in the past.

"One should be able to cat a text file to the printer directly, but I can't. "
1. In Linux you cannot always send data directly to device . Getting permission denied doesn't necessary means it's the issue. Unless you are 100% you had while the printer was working.

"I believe all that is irrelevant."
2. What about provide related information so other experts with the same hp printer might be able to help?  DaveBaldwin, has asked valid, basic questions that still haven't answered yet.

"Then one day, I had a paper jam and had to yank the paper out of the machine.  Afterwards, it stopped printing altogether!"
"They work fine copying and scanning, they worked for a time on Linux,
and as I say the HP does print from the program hp-align. No question the printers work.  Problem is the software.  
3. If you have confirmed the hardware - usb cable and printer arn't the problem. If you have confirmed that the printer has work previously and not anymore, then the problem is your setup, not the software. Did you use hplip for install?
Have you tried to add root to group "lp" ?
If these are GDI printers they will not accept standard printer output or control codes.
GDI printers will not print anything if sent text, they need pre-rasterised mage files.
Sending a text stream to one would probably lock the USB busy.
That error will occur it the user doesn't have rights to send data through the port or if data can't be sent through the port. With user being root the first can can be ignored. The later case can be a bad USB interface, a bad cable, or a fault in the interface in the device.
jlevie said "The later case can be a bad USB interface, a bad cable, or a fault in the interface in the device."

I agree and hope jhzkongo will recognize those as possibilities.  The cable, which I think is the least likely, is the cheapest to test.  If the fault is at the computer end, using another USB port (not on the same controller) might "solve" it.  Unfortunately, my guess is the problem is on the printer end and the driver isn't handling the issue perfectly.  Testing the printer on different but similar Linux box would help determine that.
Thanks for all your suggestions.
Here is output of lsusb:

Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 0451:2046 Texas Instruments, Inc. TUSB2046 Hub
Bus 001 Device 004: ID 046d:c52f Logitech, Inc. Wireless Mouse M305
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 004: ID 03f0:4f11 Hewlett-Packard OfficeJet 5600 (USBHUB)
Bus 005 Device 003: ID 043d:011d Lexmark International, Inc.
Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubLinux localhost.localdomain 3.0.22-1mdv #1 SMP PREEMPT Tue Feb 21 10:38:58 UTC 2012 i686 i686 i386 GNU/Linux
Bus 006 Device 005: ID 13fe:3600 Kingston Technology Company Inc.

I rebooted and am now running kernel 3.0.22-1mdv. uname -a:
Linux localhost.localdomain 3.0.22-1mdv #1 SMP PREEMPT Tue Feb 21 10:38:58 UTC 2012 i686 i686 i386 GNU/Linux

I have a rather idiosyncratic setup; I use Enlightenment window manager.

Keep in mind that I have two printers, a Lexmark and an HP.  Since both won't print (except the HP with hp-align), it makes it unlikely that two cables, etc. have failed.  I'm pretty sure that
the problem is with the USB device.  

I have ordered another USB hub; we'll see if that makes a difference.  Somehow doubt it will.

Yes, I suspect even another version of Linux on this computer might solve the problem.  I have  a program called Virtual Box which enables virtual running of other systems, including Windows.
Unfortunately, it isn't able to compile the kernel module with DKMS which it requires.  So I can't try that.
However, I might reboot into another Linux version and see if that helps.  I don't like to reboot because when I do, it takes forever with fscks etc.

Can anyone understand why the hp-align program will print?  I believe that page is already in the printer, but still, some sort of signal to print is being sent through the USB device.
Would there be some reason that signal would go through, but the testpage would not go through?  (The printer files can all be found, incidentally, in the /var/spool/cups directory).
If hp-align prints, but other don't suggests that your cups setup does not properly convert the data into a stream the printer understands I.e. text to ps3,ufrii,pcl5,pcl6 or as others point to gdI.
You need the PPD files for the printer.
That's possible; but the fact that the Lexmark used to work might indicate otherwise.
Anyway, how do I get those?  I thought hplip installed them?  Or printerdrake?  Both of which I've run several times.
I now have a new USB hub, but I would have to get a 5 v AC power plug to give it AC power.
Would that be worthwhile trying?
OK.  I'll try it.
Incidentally, I've just found I have a whole directory of PPD files at /usr/share/ppd for both HP and Lexmark.  No problem there, I think.
You need to make sure that within cups it is configured to handle data for each printer correctly. The PPD files might also be something that is being passed to the workstations when the printer was added.
Are you using lpr to print a document out that passes the data to cups?
I've used lpr but it simply goes through cups, doesn't it.  Also doesn't work.
I just tried the testpage with hp-testpage.  Now I get a new error message:

 Skipping "/usr/local/share/ppd": loop detected!
E [15/Jul/2013:14:32:31 -0700] [cups-driverd] Skipping "/usr/share/ppd": loop detected!
E [15/Jul/2013:14:32:31 -0700] [cups-driverd] Skipping "/opt/share/ppd": loop detected!
Loop detected suggests that the stream is being redirected and then returns

This might explain why the printing does not even start.
Discussion not directly applicable to printers in use,;wap2
This suggests changing printers.conf
The device URI for the Lexmark is /dev/usb/lp1.  But the Lexmark is actually /dev/usb/lp3; and that uses the kernel module usblp rather than libusb.
The HP uses an hp: device URI. (would that use libusb?)
Also the error policy is to stop-printer.  
What about changing printers.conf manually and restarting cups?  Change to what?
There is not enough info for me to know what is going on. Not sure how your configuration is causing a loop.
The issue using USBlp vs lib usb might not be an issue directly but some ow your configuration feeds data.

Look at printers.conf to see what is there.
I have looked but it is hard to understand it.
The relevant parts might be device uri and error policy.  If it is stopping the printers after an error, that might be why they are not printing.  No?
CUPS shows no less than eight printers installed, including a cups-pdf printer.  One is marked "automatically installed by hplip"  Would it be good to delete the others?  (Except Lexmark).
I also have the program xpdq (by passing cups).  This shows the job as "finished" by nothing happens.
The only other way I would know to send a job would be cat, of course that doesn't work either.
No way or me to tell.
What is in the printers.conf?
You could delete and have them reinstalled/recreated.
Surely not delete all eight?  Why not leave the HP "auto installed by hplip" and one Lexmark?
I could leave just two and post resulting printers.conf here
You should only delete the printer entry that you try to use and it does not work.  Look at the printers.conf or cups to see whether they point to the wrong device as you pointed out earlier.
They all don't work.  I have deleted and reinstalled several times now.
Now I get a new error message:

E [15/Jul/2013:16:41:40 -0700] Unsupported character set "iso-8859-1"!
E [15/Jul/2013:16:41:40 -0700] Returning IPP client-error-bad-request for CUPS-Get-Printers (no URI) from localhost
E [15/Jul/2013:16:41:40 -0700] Unsupported character set "iso-8859-1"!
E [15/Jul/2013:16:41:40 -0700] Returning IPP client-error-bad-request for CUPS-Get-Printers (no URI) from localhost
That sounds like an an incorrect CUPS printer configuration. IPP is a network printing protocol and would not be used for a directly connected printer.
So how do I correct it?
Delete the printer. You should see either the printer or a USB port listed as a device/destination. Either selection should work.
I now have eight printers installed in Cups.  You want me to delete them all?  Then what?
The issue is that during install your reference on access to the printer seems to use an incorrect path, incorrect printer definition, etc.
ISO-8859-1 is Latin1 language setting.

Post printers.conf and cups.conf.
Yes, delete every printer and start fresh.
OK.  If I reinstall (both printers, or only one?) There are actually several ways to do it.  Printerdrake (Mandriva utility); CUPS, or hp-setup.  Which would be best?

I will then post the new printers.conf and cups.conf
It sounds every time the asker goes through this process more and more printers are being added.
Lets see the configuration files.
Use the CUPS interface (http://localhost:631)
What does the driver entry in proc/bus/usb/devices say?

The loop may be associated with virtualbox.
I don't seem to have a file /proc/bus/usb/devices.
Virtualbox isn't working, though it is partially installed.
OK, I need some more help I'm afraid.
I deleted all the printers with lpadmin -x.  Successful
Then went to cups browser interface.  No printers shown.  Good
Then tried "find new printers;" no printers found.
So attempted to manually add.  One has to manually specify the connection, hp something.
What would be the right thing to put in here?
Or might it be better to use the command line?
lpinfo -v:

network smb
network http
network ipp
file cups-pdf:/
network socket
direct hp
network lpd
direct pdf
direct scsi
network beh
lpinfo -m produces a whole list of available drivers.
Any other useful command lines?
Avatar of arnold
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Not sure what you mean by "partially installed".
I would remove VBox, if only to eliminate it.
It has been known to lock up USB and network connections.

To get the same info as cat /proc/bus/usb/devices, enter


in a terminal, this should list all devices and associated drivers.
Virtualbox shouldn't be an issue if it isn't running, but as suggested any possibility will be eliminated if you remove it. There is one more thing to try. Disconnect the printer, wait a bit and plug it back in. The execute dmesg to see if the system is recognizing a usb device being connected. Some devices can be a bit slow. So if you see no messages, wait a few seconds and execute dmesg again.
I succeed in installing the Lexmark (but not the HP) with cups.It's called Lexmark_USB_Backend_3
However, it won't print test page from cups and lpr and it doesn't show up with lpinfo.


T:  Bus=06 Lev=02 Prnt=07 Port=01 Cnt=01 Dev#= 13 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=043d ProdID=011d Rev=00.01
S:  Manufacturer=Lexmark
S:  Product= 2600 Series
S:  SerialNumber=3001960SG782915
C:  #Ifs= 3 Cfg#= 1 Atr=c0 MxPwr=10mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I:  If#= 1 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp
I:  If#= 2 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid

T:  Bus=06 Lev=02 Prnt=07 Port=02 Cnt=02 Dev#= 14 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=03f0 ProdID=4f11 Rev=01.00
S:  Manufacturer=HP
S:  Product=Officejet 5600 series
S:  SerialNumber=CN694DF59X04CY
C:  #Ifs= 3 Cfg#= 1 Atr=c0 MxPwr=2mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=cc Prot=00 Driver=(none)
I:  If#= 1 Alt= 0 #EPs= 3 Cls=07(print) Sub=01 Prot=02 Driver=usblp
I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)

printers.conf:# Printer configuration file for CUPS v1.4.8
# Written by cupsd on 2013-07-17 14:28
<Printer Lexmark_USB_Backend_3>
Info Lexmark  2600 Series
Location Local Printer
MakeModel Lexmark 2600 Series, 1.0
DeviceURI lxkusb://Lexmark/2600%20Series
State Idle
StateTime 1374096464
Type 61452
Filter application/vnd.cups-raw 0 -
Filter application/vnd.cups-raster 0 /usr/local/lexmark/lxk08/bin/printdriver
Accepting Yes
Shared No
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
What errors if any are you getting from cups or when you reference the printer with LPR?
lpr: Error - no default destination available.
This is odd, because it's certainly there in the browser interface.  It's the only printer connected.

Stop the presses!  I just sent the testpage to the printer with the lexijtools utility, and it printed it out!
The cups interface shows the job as finished.

Now how do I make it the default printer; that should just about solve the problem, I should think.
lpr -Pprintername

No default means that your printers.conf does not have a default printer setting set.
I.e. within printers.conf you would set one printer as <DefaultPrinter>
It is now the default printer in printers.conf
However, I just sent it a file and only a blank page came out.
What type of file?

What cups reports? You may have to define different handling.
Plain text file.
However, black ink seems to be low so that may be the problem.  Testpage is mostly color.
Actually, I think ink is OK as it's nearly half.
I think this problem has been caused by using too many methods of installing printers.  So I'm not going to do anything else right now and hope for the best.
I've requested that this question be closed as follows:

Accepted answer: 0 points for jhzkongo's comment #a39337117

for the following reason:

It appears that on my system at least, using CUPS to install printers works and other methods do not.
One has to be particularly careful not to use multiple methods which may conflict with each other.
Yes, I see that you said that.
Unfortunately, I did not pay attention at the time.  My fault.
"One has to be particularly careful not to use multiple methods which may conflict with each other. "

I didn't use those words but my advice involved eliminating conflicts.

In any event, I think points should be awarded.  They shouldn't go to me but to someone who did a lot more work than me.  But it shouldn't be 0.

I suspect that maybe your hardware is still broken; it's just not showing it now.  I've seen this sort of thing before.  It's hard to solve without simply replacing the computer.  Of course, perhaps the hardware will keep working until the computer is retired and we'll never know.  Take care but please award points to someone.
How do I do that?
I doubt that this is a hardware problem.  All indications are that hardware is working fine.
How do we close this case?
I bought a new black cartridge and the printer is now working fine.
Pick one or multiple comments that helped you resolve the issue.
If multipe, splt the points among the posts as you see fit.
This solved the problem