LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Unable to print to printer. Please check device and try again. (http://www.linuxquestions.org/questions/slackware-14/unable-to-print-to-printer-please-check-device-and-try-again-4175493546/)

Sefid par 02-03-2014 08:36 AM

Unable to print to printer. Please check device and try again.
 
I have HP Laserjet 1020 printer and added it by Printers - KDE Control module. It downloaded the driver.
Then I could print some papers.
After some days I tried to print with it; Notification said job completed, But nothing was printed.
I installed foo2js and tested again by adding printer from cups and choose foo2js for printer driver.
Again didn't print,
After that tested hp-setup, and got error:
Code:

error: Unable to communicate with device (code=12): hp:/usb/HP_LaserJet_1020?serial=JL00ZPV
error:  Unable to print to printer.  Please check device and try again.

Also I added my root user to 'lp' and 'sys' groups.

But again I got the same error.
How can I solve this?

cwizardone 02-03-2014 10:06 AM

I had similar problem the other day and it wasn't until I ran the HP Device Manager that I found that, somehow, the printer had been turned "off."

You can also used
Quote:

localhost:631
in a browser to see what the settings are for your printer.

qlue 02-03-2014 10:17 AM

I've experienced similar issues with my HP LaserJet M1132 MP printer.
As near as I can figure it, the hplip software does not recognise the start-up state of a printer as an existing configuration. The printer always starts up in a 'factory fresh' state so that Windows will install and configure the printer if it isn't already installed and configured.

The Windows software automatically switches the printer to the 'ready' state, but Linux doesn't do this because it fails to recognise the printer. This happens because the printer identifies itself as a different device when you switch it on to when it's fully setup and configured.

So far, the only work-arounds that I have which seem to work are,

a) Connect printer to an always-on linux server and never turn either one off.

b) Re-install printer every time you want to use it.

c) Use Windows when you need to print something.


For me item 'a' is useless as I only print maybe once every six months. 'b' is way too much drama so I use 'c'

Note that the "driver" you download for you printer is actually the printer's firmware. It is because the print drivers are trying to communicate with firmware that has not been loaded that the printer fails to function correctly.

metaschima 02-03-2014 11:10 AM

All the aforementioned printers are listed as mostly working, or almost perfect:
http://www.openprinting.org/printer/HP/HP-LaserJet_1020
http://www.openprinting.org/printer/...onal_M1132_MFP

I also recommend using the CUPS web interface 'localhost:631' to configure printers. Never had any problems using this for any HP printer, and I have 5 different HP printers.

Paulo2 02-04-2014 10:30 AM

One more vote for printer off. This one I don't know how to handle
at command line, but if you have that HP icon near the clock,
go to Printer Control tab and see if printer is Started/Idle or Stopped.
If there is a cool round green plastic icon, this is not the problem.
If printer is stopped, the icon will be a yellow triangle.
(excuse me for gui description:D)

titopoquito 02-04-2014 02:49 PM

Quote:

There's the cupsenable command.

cupsenable printer

starts a disabled printer (to find out the printername you can list your printers with lpstat -p or lpc status).
taken from http://superuser.com/questions/28039...m-command-line


As I have this problem only with a HP printer I prefer the HP tray icon to resume the printer (it gets stopped if I send a job to it and it is still switched off at that moment).

qlue 02-04-2014 03:09 PM

Quote:

Originally Posted by metaschima (Post 5110479)
All the aforementioned printers are listed as mostly working, or almost perfect:
http://www.openprinting.org/printer/HP/HP-LaserJet_1020
http://www.openprinting.org/printer/...onal_M1132_MFP

I also recommend using the CUPS web interface 'localhost:631' to configure printers. Never had any problems using this for any HP printer, and I have 5 different HP printers.

I decided to revisit this issue and ran hp-check from the command line. It informed me that there were unmet dependencies.

However, to fix them it required the non-existent root password.

This is what I did instead. (note, running these things as root is generally not recommended)

I logged into root using;
Code:

sudo -i
I then ran;
Code:

hp-check
When it asked to fix the problems I entered 'y' for yes.

Then it launched a gui to download and install the module for my printer.

This appears to resolve the issue for me.
It appears that when hplip was installed, some dependencies were not.
The strange part being that it ran fine the first time.

P.S: What username and password does the cups browser interface require?

metaschima 02-04-2014 03:54 PM

Quote:

Originally Posted by qlue (Post 5111496)
This appears to resolve the issue for me.
It appears that when hplip was installed, some dependencies were not.
The strange part being that it ran fine the first time.

P.S: What username and password does the cups browser interface require?

The username is 'root', the password is the root password. However, I would like to find a way to let users login to it.

This is on Slackware ?

I don't even run the hp programs, I just use the CUPS interface and everything works. The only thing to make sure is that you select the printer with the serial number in the description. This is required on some HP multifunction printers, otherwise they won't scan.

Paulo2 02-04-2014 06:51 PM

Quote:

Originally Posted by titopoquito (Post 5111483)
taken from http://superuser.com/questions/28039...m-command-line


As I have this problem only with a HP printer I prefer the HP tray icon to resume the printer (it gets stopped if I send a job to it and it is still switched off at that moment).

Thanks :hattip: it works, and as man-page says, printer name is not case sensitive.

Sefid par 02-09-2014 12:32 PM

Thanks all,
I tried hp-check,
It sais:
Code:

warning:  distro is not found in AUTH_TYPES
also I tried with '-c' option.
Seems it tries to install hplip 3.13.10

It takes a while without any output!

Edit:
As I have Slackware 14.01, I have hplip 3.13.10 already installed.

tronayne 02-09-2014 01:34 PM

That message about AUTH_TYPES can be ignored (it has to do with HPLIP checking for updates which you don't want to do).

I would suggest that you take the printer system back to infancy; open CUPS in a browser and delete any existing printer entries for that printer (you don't configure an H-P printer in CUPS, that is done for you by hp-setup).

If your printer is a combination printer/scanner, make sure that your user account (and any user accounts that use the printer or scanner) are in the lp and scanner groups.

Open a terminal window and execute hp-setup. You will, as you've discovered, need the root password (userid and password are case-sensitive; it's root and whatever password).

As you step through hp-setup, you'll identify the connection (USB? Ethernet?) and hp-setup will find the printer and identify the printer for you. You want to add a short name for the printer, say, laserjet or something similar (you'll use that name for printing with the command line, for example).

I have an H-P Business Inkjet 2280tn that is connected via Ethernet and an H-P Photosmart C4680 connected via USB both were added with hp-setup and have worked just fine through a number of upgrades to hp-setup; it'll work if you let it, eh?

Take the recommended settings (they typically work fine); hp-setup "knows" the proper pre- and post processing settings for every printer (and other devices) H-P makes, trust it to make the best choice.

HPLIP has been included with Slackware for some years and it kept up-to-date when H-P releases a new version (as you noted, the current version in 14.1 is 3.13.10).

The one last step (and really the only thing you want to do with CUPS is open a browser and go to http://localhost:631. Click on the printer name (that you added; e.g., laserjet, then click on Administration and Set as Server Default. That way, you can simply
Code:

man -t ls | lp
and get a pretty-print manual page without having to define the printer name to lp.

Hope this helps some.

Sefid par 02-09-2014 02:10 PM

@tronayne:
Your solution worked fine.
After a week, Now I can print :)

Of course as glue says, I choose option b :) and reinstall printer every time I need it.


All times are GMT -5. The time now is 09:27 PM.