HP Envy 4504 Set-up

I bought a HP Envy 4504. Overall I am happy with it. This is how I configure it so I can use with Linux.

This mini howto applies to ArchLinux, void linux and Centos/RedHat distributions.

Installation

Archlinux:

cups, hplip, python2, sane

Centos:

cups, hplip, hplip-gui, sane

Some optional dependancies may be needed.

void linux:

hplip-gui

And for scanning, install:

simple-scan and/or xsane

Configuration Arch Linux and Centos/RedHat

sudo systemctl enable cups
sudo systemctl start cups
sudo hp-setup

hp-setup -i Select "Network", and "Advanced Options -> Manual Discovery" Printer: npr1 PPD File:

/usr/share/ppd/HP/hp-envy_4500_series.ppd

Uncoment hpaio from /etc/sane/dll.conf.

void linux configuration

These are void linux specific settings:

enable cups:

ln -s /etc/sv/cupsd /var/service

Add printer (run with sudo):

print_host=npr1
hp-setup $print_host

Tweaks

Some commands:

lpstat -p
cupsenable printer

Also since it is a WIFI printer no To prevent thisrmally it will go into sleep/power save mode. This means if you then try to print from cups it will fail (printer is asleep). Subsequent prints should work but now cupsd has flagged the printer as paused. To prevent this you should run this command as root:

lpadmin -p ENVY_4500 -o printer-error-policy=retry-job

More configuration commands:

  • Set default paper size:
    • echo a4 > /etc/papersize

Updates

  • 2022-11-06: Removed from voidlinux:
    • uncompress PPD file (otherwise it is not recognized) so that it runs:
    • removed OBSOLEtE patch
    • For scanning, uncoment hpaio from /etc/sane/dll.conf.
  • 2020-03-09 : Removed:
    • To prevent this you should configure the default ErrorPolicy in /etc/cups/cupsd.conf by adding in the top scope: "ErrorPolicy retry-job"
    • References: superuser.com
  • 2019-02-19 : Added void linux instructions.