Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

(Solved) Getting printing working on new AMD64 install.

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
anarchosax
n00b
n00b
Posts: 53
Joined: Thu Nov 13, 2025 2:10 pm

(Solved) Getting printing working on new AMD64 install.

  • Quote

Post by anarchosax » Thu Dec 11, 2025 7:01 pm

I am trying to get printing working on my new system. The printer is an HP driverless color laser printer, connected to my local network. I have installed the following and their dependencies:

avahi, hplip, netcat, cups, cups-meta and system-config-printer.

I have run:

Code: Select all

# rc-update add cupsd default
So far, I have neither been able to configure the printer through http://localhost:631/, nor through system-config-printer, with the added problem, that I am unable to unlock system-config-printer as a regular user, to try to configure it.

I have however, been able to connect to the printer and print to it over the network by the following means:

Code: Select all

$ nc 192.168.1.XXX 9100 < /home/user_name/test.txt &
Piping ghostscript through netcat works as well, although the printout doesn't conform to the parameters (i.e. A4 size paper):

Code: Select all

$ gs -sPAPERSIZE=a4=- -sOutputFile=- | nc 192.168.1.XXX 9100 < /home/user_name/test.txt &
Not really sure where I should go from here. I am hoping someone is able to help me out...
Last edited by anarchosax on Wed Dec 17, 2025 5:49 pm, edited 1 time in total.
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2404
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Fri Dec 12, 2025 7:24 pm

HPLIP has a bunch of functions hp-*, one of which is AFAIR the one you need,

Code: Select all

hp-setup
For more details, see the Gentoo wiki HPLIP entry
Greybeard
Top
anarchosax
n00b
n00b
Posts: 53
Joined: Thu Nov 13, 2025 2:10 pm

  • Quote

Post by anarchosax » Sat Dec 13, 2025 8:38 am

Goverp wrote:HPLIP has a bunch of functions hp-*, one of which is AFAIR the one you need,

Code: Select all

hp-setup
For more details, see the Gentoo wiki HPLIP entry
Wow, cool, thanks. I have never tried setting up a printer using hplip. I eventually got the printer correctly setup in cups as well. Unfortunately, the test page, when printed out only has the IP address and a bunch of unrecognizeable symbols.
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2404
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Sat Dec 13, 2025 11:47 am

I find the situation with CUPS and HPLIP is confused by the fact that CUPS is changing to the driverless architecture, which means that PPD files are going.

IIUC, HPLIP extracts PPDs from its own database and puts them somewhere for CUPS to use, so manually configuring CUPS can lead to a mismatch. In my case, before I realised my mistake, I had to replace my chosen PPD file every time CUPS got updated. However, there's another gotcha - for me, the printer in question is quite old, so nobody other than me cares if it works, and there's been a typo in the HPLIP "model" data file that means it doesn't match with the printer device title generated by udev; I have to edit that d*med file each HPLIP update. I guess in your case it's possible the other way round - your printer might be new enough that the HPLIP stuff hasn't been fully tested.

The file in question is

Code: Select all

/usr/share/hplip/data/models/models.dat
Greybeard
Top
anarchosax
n00b
n00b
Posts: 53
Joined: Thu Nov 13, 2025 2:10 pm

  • Quote

Post by anarchosax » Sat Dec 13, 2025 3:46 pm

Goverp wrote:The file in question is

Code: Select all

/usr/share/hplip/data/models/models.dat
Not sure what I am looking for... Everything looks OK for my printer, as far as I can see:

Code: Select all

[hp_color_laserjet_pro_m453-4]
align-type=0
clean-type=0
color-cal-type=0
copy-type=0
embedded-server-type=1
fax-type=0
fw-download=False
icon=hp_LaserJet_1200.png
io-mfp-mode=1
io-mode=1
io-support=14
job-storage=0
linefeed-cal-type=0
model1=HP Color LaserJet Pro M453cdn
model2=HP Color LaserJet Pro M454dn
model3=HP Color LaserJet Pro M454cdn
model4=HP Color LaserJet Pro M453cdw
model5=HP Color LaserJet Pro M454nw
model6=HP Color LaserJet Pro M454dw
model7=HP Color LaserJet Pro M454cdw
monitor-type=0
panel-check-type=0
pcard-type=0
plugin=0
plugin-reason=0
power-settings=0
ppd-name=hp-color_laserjet_pro_m453-4-ps.ppd
family-ppd=hp-postscript-laserjet-pro.ppd
pq-diag-type=0
r-type=0
r0-agent1-kind=4
r0-agent1-sku=CF412A
r0-agent1-type=5
r0-agent2-kind=4
r0-agent2-sku=CF413A
r0-agent2-type=6
r0-agent3-kind=4
r0-agent3-sku=CF411A
r0-agent3-type=4
r0-agent4-kind=4
r0-agent4-sku=CF410A
r0-agent4-type=1
scan-src=0
scan-type=0
status-battery-check=0
status-dynamic-counters=0
status-type=10
support-released=True
support-subtype=45e8
support-type=2
support-ver=3.19.6
tech-class=Postscript
family-class=Undefined
tech-subclass=Normal
tech-type=4
usb-pid=c42a
usb-vid=3f0
wifi-config=3
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2404
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Sat Dec 13, 2025 7:52 pm

It may well be OK. IIRC, in my case the printer name shown in things like the KDE Printer settings widget didn't agree with the name in that file (an extra "_printer"). The result was that printing used the CUPS PPD, which was out of date and was missing some paper sizes, instead of the one in HPLIP.

I missed that you mentioned your printer was driverless. All my printers are old, so I've not had to delve into what that means. I guess you need to read the relevant Gentoo wiki article. I'm not sure if driverless printing replaces or augments HPLIP and CUPS setup.

It's worth Googling on "HPLIP driverless printing" and reading the AI summary. Assuming it's correct ;-)
Greybeard
Top
anarchosax
n00b
n00b
Posts: 53
Joined: Thu Nov 13, 2025 2:10 pm

  • Quote

Post by anarchosax » Mon Dec 15, 2025 2:22 pm

Goverp wrote:It may well be OK. IIRC, in my case the printer name shown in things like the KDE Printer settings widget didn't agree with the name in that file (an extra "_printer"). The result was that printing used the CUPS PPD, which was out of date and was missing some paper sizes, instead of the one in HPLIP.

I missed that you mentioned your printer was driverless. All my printers are old, so I've not had to delve into what that means. I guess you need to read the relevant Gentoo wiki article. I'm not sure if driverless printing replaces or augments HPLIP and CUPS setup.

It's worth Googling on "HPLIP driverless printing" and reading the AI summary. Assuming it's correct ;-)
OK, I tried using the Google suggested commands. None of the output of which appear to be anything that would affect the printing:

Code: Select all

$ qlist -IRv net-print/hplip
net-print/hplip-3.25.6-r1::gentoo

Code: Select all

$ equery uses net-print/hplip
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for net-print/hplip-3.25.6-r1:
 U I
 + + X                               : Enables scanner GUI dependencies with USE="scanner" where
                                       media-gfx/xsane is preferred over media-gfx/sane-frontends
 - - doc                             : Add extra documentation (API, Javadoc, etc). It is recommended
                                       to enable per package instead of globally
 - - fax                             : Enable fax on multifunction devices which support it
 + + hpcups                          : Build the hpcups driver for cups (by HP)
 - - hpijs                           : Build the IJS driver for cups (Foomatic)
 - - kde                             : Enables kde-misc/skanlite as scanner GUI with USE="scanner X"
 + + libnotify                       : Enable desktop notification support
 - - libusb0                         : Depend on virtual/libusb SLOT 0. Some old printers do not work
                                       with virtual/libusb SLOT 1.
 - - minimal                         : Only build internal hpijs/hpcups driver (not recommended at
                                       all, make sure you know what you are doing)
 - - parport                         : Enable parallel port for devices which require it
 + + policykit                       : Enable PolicyKit (polkit) authentication support
 - - python_single_target_python3_11 : Build for Python 3.11 only
 - - python_single_target_python3_12 : Build for Python 3.12 only
 + + python_single_target_python3_13 : Build for Python 3.13 only
 + + qt5                             : Add support for the Qt 5 application and UI framework
 - - scanner                         : Enable scanner on multifunction devices which support it
 + + snmp                            : Add support for net-analyzer/net-snmp which enables this
                                       driver to work over networks (both for server and client)
 - - static-ppds                     : Use statically-generated PPDs instead of Dynamic PPDs.
                                       Although this is deprecated some printers may still need it to
                                       work properly. Use this flag if hp-setup fails to find/create
                                       a valid PPD file

Code: Select all

$ lpstat -v
device for HP_Color_LaserJet_Pro_M453-4: ipps://192.168.1.XXX:9100

Code: Select all

$ lpinfo -m
lsb/usr/HP/hp-color_laserjet_pro_m453-4-ps.ppd.gz HP Color LaserJet Pro M453-4 Postscript

Code: Select all

$ ls /etc/cups/ppd/*.ppd
/etc/cups/ppd/HP_Color_LaserJet_Pro_M453-4.ppd

Code: Select all

$ grep -E "cupsFilter|cupsVersion|PSVersion|LanguageVersion|NickName" /etc/cups/ppd/HP_Color_LaserJet_Pro_M453-4.ppd
*LanguageVersion: English
*ShortNickName: "HP Color LaserJet Pro M453-4"
*NickName: "HP Color LaserJet Pro M453-4 Postscript (recommended)"
*PSVersion: "(3010.107) 3"
*cupsVersion: 1.6
*cupsFilter: "application/vnd.cups-postscript 0 hpps"
*da.Translation ShortNickName/HP Color LaserJet Pro M453-4: ""
*da.Translation NickName/HP Color LaserJet Pro M453-4: ""
*de.Translation ShortNickName/HP Color LaserJet Pro M453-4: ""
*de.Translation NickName/HP Color LaserJet Pro M453-4: ""
*es.Translation ShortNickName/HP Color LaserJet Pro M453-4: ""
*es.Translation NickName/HP Color LaserJet Pro M453-4: ""
*fi.Translation ShortNickName/HP Color LaserJet Pro M453-4: ""
*fi.Translation NickName/HP Color LaserJet Pro M453-4: ""
*fr.Translation ShortNickName/HP Color LaserJet Pro M453-4: ""
*fr.Translation NickName/HP Color LaserJet Pro M453-4: ""
*it.Translation ShortNickName/HP Color LaserJet Pro M453-4: ""
*it.Translation NickName/HP Color LaserJet Pro M453-4: ""
*ja.Translation ShortNickName/HP Color LaserJet Pro M453-4: ""
*ja.Translation NickName/HP Color LaserJet Pro M453-4: ""
*ko.Translation ShortNickName/HP Color LaserJet Pro M453-4: ""
*ko.Translation NickName/HP Color LaserJet Pro M453-4: ""
*no.Translation ShortNickName/HP Color LaserJet Pro M453-4: ""
*no.Translation NickName/HP Color LaserJet Pro M453-4: ""
*nl.Translation ShortNickName/HP Color LaserJet Pro M453-4: ""
*nl.Translation NickName/HP Color LaserJet Pro M453-4: ""
*pt.Translation ShortNickName/HP Color LaserJet Pro M453-4: ""
*pt.Translation NickName/HP Color LaserJet Pro M453-4: ""
*ru.Translation ShortNickName/HP Color LaserJet Pro M453-4: ""
*ru.Translation NickName/HP Color LaserJet Pro M453-4: ""
*sv.Translation ShortNickName/HP Color LaserJet Pro M453-4: ""
*sv.Translation NickName/HP Color LaserJet Pro M453-4: ""
*zh_CN.Translation ShortNickName/HP Color LaserJet Pro M453-4: ""
*zh_CN.Translation NickName/HP Color LaserJet Pro M453-4: ""
*zh_TW.Translation ShortNickName/HP Color LaserJet Pro M453-4: ""
*zh_TW.Translation NickName/HP Color LaserJet Pro M453-4: ""

Code: Select all

$ hp-check
/usr/bin/hp-check:630: SyntaxWarning: invalid escape sequence '\s'
  lsusb_pat = re.compile("""^Bus\s([0-9a-fA-F]{3,3})\sDevice\s([0-9a-fA-F]{3,3}):\sID\s([0-9a-fA-F]{4,4}):([0-9a-fA-F]{4,4})(.*)""", re.IGNORECASE)
/usr/bin/hp-check:685: SyntaxWarning: "is not" with 'str' literal. Did you mean "!="?
  if 'getfacl' not in g and '' is not g and 'file' not in g:
Saving output in log file: /home/user_name/hp-check.log

error: xsane         xsane - Graphical scanner frontend for SANE                  OPTIONAL        0.9             -               MISSING    'xsane needs to be installed'
 error: scanimage     scanimage - Shell scanning program                           OPTIONAL        1.0             -               MISSING    'scanimage needs to be installed'

  error: policykit     PolicyKit - Administrative policy framework                  OPTIONAL        -               126             MISSING    'policykit needs to be installed'

   error: sane          SANE - Scanning library                                      REQUIRED        -               -               MISSING    'sane needs to be installed'
 error: sane-devel    SANE - Scanning library development files                    REQUIRED        -               -               MISSING    'sane-devel needs to be installed'

  error: python3-reportlab Reportlab - PDF library for Python                           OPTIONAL        2.0             -               MISSING    'python3-reportlab needs to be installed'

  error: NOT FOUND OR FAILED TO LOAD! Please reinstall HPLIP and check for the proper installation of scanext.
 error: scanext       Scan-SANE-Extension                                          REQUIRED        -               3.25.6          MISSING    'scanext needs to be installed'

 HP_Color_LaserJet_Pro_M453-4
----------------------------
Type: Unknown
Device URI: ipps://192.168.1.XXX:9100
PPD: /etc/cups/ppd/HP_Color_LaserJet_Pro_M453-4.ppd
PPD Description: HP Color LaserJet Pro M453-4 Postscript (recommended)
Printer status: printer HP_Color_LaserJet_Pro_M453-4 now printing HP_Color_LaserJet_Pro_M453-4-2.  enabled sinConnecting to printer.50:51 PM CET
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend for HP-Devices.
[/code]
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2404
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Mon Dec 15, 2025 3:06 pm

Your HPLIP installation looks OK.
You're currently using the ipps: deviceless setup for the printer, so HPLIP is irrelevant.
IIUC the Gentoo wiki item, you have the choice - ipps: or hp:, The second one will give you more function through the HP Device Manager on your desktop - the choice is yours.

If you are meaning to use driverless printing, you should NOT have a device-specific PPD. Driverless apparently means CUPS and the printer communicate to determine config that previously was in the PPD. The wiki says you should be using the "everywhere" model and its PPD.

I get similarly bad hp-check output - there's clearly a bug or two in the early code, possibly something not converted for the current python - but it seems to actually work regardless. As you will have seen, it tends to mark missing "optional" features as "error", which is just sloppy coding. Whatever, I think it says HPLIB is correctly configured for the printing part; if your device also supports scanning, you're missing the relevant bits of SANE to make that work.

Switching to the HPLIP operation instead of driverless should be simple: you change the printer URL in CUPS to specify the "hp:" protocol. Actually, I thought hp-setup did that for you, but perhaps it only does that if there's not already a URL for the printer.

For example, my printer is:

Code: Select all

hp:/usb/HP_Color_Inkjet_CP1700?serial=SG27I5111W0T
This is assuming you are printing to the printer attached locally to your PC. AFAIK the hp: protocol used a PPD created on the fly by HPLIP.

FWIW, I tried the following query with Google, and the AI response says something completely different to any of the above! It might be right, as this is well outside my experience, or it may be hallucinating again!

Code: Select all

CUPS configuration for HP Color LaserJet Pro M453-4 Postscript
Greybeard
Top
anarchosax
n00b
n00b
Posts: 53
Joined: Thu Nov 13, 2025 2:10 pm

  • Quote

Post by anarchosax » Mon Dec 15, 2025 8:29 pm

Goverp wrote:Your HPLIP installation looks OK.
Well, after having tried all sorts of things, as this thread can attest, it looks like the simplest solution was the best. I went into system-config-printer, and deleted the printer. It then disappeared in hplip as well although it was created in hplip first. Then I went to the cups web interface and setup the printer again. So far it appears to be behaving now, but I will wait a few days before I mark the thread solved.

Thanks for all the feedback.
Top
Post Reply

9 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic