LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   HP Printer not being started by PC. (https://www.linuxquestions.org/questions/linux-hardware-18/hp-printer-not-being-started-by-pc-4175693722/)

Novatian 04-15-2021 06:30 AM

HP Printer not being started by PC.
 
In Manjaro KDE I find my HP printer cannot be started by this PC, all plugged in and switched on. I checked the printer notification and made sure it was set up. It has worked on this PC before. The Printer information reads: PRINTER SERVICE UNAVAILABLE, BAD FILE DESCRIPTOR.

Is there a fix for this?

computersavvy 04-15-2021 03:26 PM

How did you set up the printer?
What driver is in use? If hplip then what version? If not hplip then why not?
Did you set up the printer using the hplip-gui tools?
What version of Manjaro?
What model printer?
How is the printer connected? Wifi? Ethernet? USB?
If the printer is wifi or ethernet is the IP set to static so it is always assigned the same IP.?
Is the IP assigned by DHCP?
Is cups running?

josephj 04-15-2021 07:44 PM

What computersavvy said. We can't look over your shoulder, so you need to provide all the details.

HP printers generally work great with Linux (probably because HP had (has?) HP-UX their own UNIX/Linux distro and so were motivated to support their devices on it.)

I have had a lot of printer issues. Generally, I make sure hplip is installed and CUPS is running.
Then, I go to localhost:631 in my browser (don't use any Chrome-based browser for this - Firefox works). This is the CUPS web interface. From there, you can tell it to search for and install any printers it detects. This usually does it although there are a bunch of minor settings you may want to configure.

You can also run hp-toolbox (part of hplip) which lets you set things and check ink/toner levels, etc.

You may also want to add your user to the lpadmin group. I don't remember why I needed that, but it helped.

Sometimes CUPS and hplip don't agree on everything, but until your printer is recognized, that won't matter.

Also, take a look at dmesg output when you attach your printer or power it on. Linux should see it and tell you useful information about the connection. There are other tools such as lspci and lsusb which can also help depending on how your printer is connected to your system.

computersavvy 04-16-2021 10:25 AM

Just a followup triggered by what @josephj said.

On fedora when hplip is installed it adds the user to the hplip group so that user can manage all the installed HP printers.

kay.pea 04-18-2021 04:45 AM

If this device is connected by networking, either ethernet or wifi, then check whether Manjaro is running a software firewall. This could well be stomping on the IP packets that the printer uses.

Can you see the printers built-in web management page? You should be able to see this by entering the numerical IP address of the printer into a browsers address bar (after the http:\\).

Assuming the above works and you can disconnect from the wider internet then I would disable entirely the built-in firewall. Now check whether CUPS will find the printer. This worked for me with Linux Mint and an ethernet-connected Epson MFD.

From the notes I made at the time and with the firewall disabled:
Quote:

Open a terminal/console and run the commands:
$ ping <IP of the printer>
$ nmap <IP of the printer>
Replace "<IP of the printer>" by the printer's IP address. The first command checks whether
you can access the printer through the network, the second shows which port numbers are used by
the printer and through this which protocols are active (80: Has web interface, 139: SMB,
443: encrypted IPP or encrypted web interface, 515: LPD, 631: IPP, 9100: JetDirect/AppSocket).

The nmap command output was:
Starting Nmap 6.40 ( deleted URL ) at 2017-05-13 02:19 BST
Nmap scan report for 10.0.0.24
Host is up (0.0046s latency).
Not shown: 997 closed ports
PORT STATE SERVICE
80/tcp open http
515/tcp open printer
9100/tcp open jetdirect
MAC Address: 00:00:48:etc (Seiko Epson)

Nmap done: 1 IP address (1 host up) scanned in 2.47 seconds
This tells you which ports need to be opened in the firewall. With the firewall running again I used a program called "ufw" (the uncomplicated firewall) thus:
sudo ufw allow 515/tcp
but you should be able to use
iptables -A INPUT -p tcp --dport 515 -j ACCEPT

Hope this helps and good luck.

frankbell 04-18-2021 08:42 PM

If you are using an HP, I expect you should have HPLIP installed. If you have the HPLIP GUI (hp-toolbox), you could open it and see what it tells you about the printer connection.

You might also check the logs in /var/log/cups/, particularly the error logs; they might provide some useful information.


All times are GMT -5. The time now is 06:20 PM.