You are not logged in.

#1 2024-04-15 06:35:48

flamemagister
Member
Registered: 2024-04-02
Posts: 9

[SOLVED] HP Printer issue

Hi all I have an HP OfficeJet Pro 7740 MFC and I am having an issue printing from Arch. All the pages print shifted to the right and down by a few CMs by my estimation. My DE is cinnamon and there are no error logs in \var\cups\logs 

This post covers seems to cover the same issue but frustratingly the OP just says solved and doesn't mention how: https://bbs.archlinux.org/viewtopic.php?id=289849

I have installed hplip and hp1:3.23.12-3 and the most recent cups version 1:2.4.7-2 and cups-pdf; as well as the hplip-plugin 3.23.12-3 from AUR. I also have the system-config-printer package.


Any help gratefully received. I'm not sure which logs etc to include so happy to do so as directed.


Kind regards,

FM.

Last edited by flamemagister (2024-04-20 17:54:28)

Offline

#2 2024-04-15 07:07:49

seth
Member
Registered: 2012-09-03
Posts: 51,632

Re: [SOLVED] HP Printer issue

Just to rule out the absolute D'ohhh:
Wrong papaer type/margins?
Paper misaligned in the tray?

Offline

#3 2024-04-15 08:25:08

flamemagister
Member
Registered: 2024-04-02
Posts: 9

Re: [SOLVED] HP Printer issue

Good questions. I went through the usual suspects wrong paper etc. But it is worth mentioning that the "fit to page" and scaling options don't seem to work. Also the printer works fine when printing from my Ubuntu laptop so I am thinking its a driver issue unique to Arch.

Offline

#4 2024-04-15 12:10:39

seth
Member
Registered: 2012-09-03
Posts: 51,632

Re: [SOLVED] HP Printer issue

the "fit to page" and scaling options

In what client?
Does the testpage from http://localhost:631/ print properly?

Offline

#5 2024-04-16 13:07:50

flamemagister
Member
Registered: 2024-04-02
Posts: 9

Re: [SOLVED] HP Printer issue

The client is invoked through Cinnamon using the system-config-printer package - which gives an app to configure I assume cups. Printing via the cups web interface or even the HP cli results in the same issue.

Offline

#6 2024-04-16 15:30:30

seth
Member
Registered: 2012-09-03
Posts: 51,632

Re: [SOLVED] HP Printer issue

lpstat -e
lpoptions -p <printername_from_above> -l

https://wiki.archlinux.org/title/CUPS#D … paper_size
https://bbs.archlinux.org/viewtopic.php … 4#p2128594 - can you print properly from eg. libreoffice?

Offline

#7 2024-04-17 03:41:41

flamemagister
Member
Registered: 2024-04-02
Posts: 9

Re: [SOLVED] HP Printer issue

lpoptions -p OfficeJet_Pro_7740 -l
PageSize/Media Size: 11x14in 2L 2L.FB L L.FB 3x5in 3x5in.FB 4x5in 4x5in.FB 4x6in 4x6in.FB 4x12in 4x12in.FB 5x7in 5x7in.FB IndexCard3x5in IndexCard4x6in IndexCard5x8in IndexCardA4 IndexCardLetter 8x10in 8x10in.FB A6 A6.FB JapanesePostcard JapanesePostcard.FB OfukuHagaki *A4 A4.FB A5 A5.FB B5 B5.FB B5(JIS) B5(JIS).FB Executive Executive.FB Legal Legal.FB Letter Letter.FB Statement Custom1 Tabloid Tabloid.FB A3 A3.FB B4JIS B4JIS.FB 8.5x13in 8.5x13in.FB 3.63x6.5in Envelope#10 EnvelopeA2 EnvelopeC5 EnvelopeC6 EnvelopeDL EnvelopeMonarch JapaneseEnvelopeChou#3 JapaneseEnvelopeChou#4
ColorModel/Output Mode: *RGB CMYGray KGray
MediaType/Media Type: *Plain Glossy CoatedBrochure CoatedMatte BrochureGlosy FastGlossy Coated Brochure BrochureHagaki PlainThick PlainPaperLight
OutputMode/Print Quality: *Normal FastDraft Best Photo
InputSlot/Media Source: *Upper Lower
Duplex/Double-Sided Printing: DuplexNoTumble DuplexTumble *None

I changed /etc/papersize to A4 and it didn't change the outcome.
Libreoffice (and any printing) has the same issue.

Offline

#8 2024-04-17 06:36:06

seth
Member
Registered: 2012-09-03
Posts: 51,632

Re: [SOLVED] HP Printer issue

Interestingly the same printer shows up at https://forum.manjaro.org/t/hp-officeje … ers/155892 (with the same intial suspicion)
Look for the fittoplot and fit-to-page options mentioned there.
But also, according to https://www.pwg.org/printers/ "I did a quick search - the OfficeJet Pro 7740 does not appear to support ipp everywhere" is wrong assumign it'S https://support.hp.com/us-en/product/HP … el/7682228 ?
In that case you should really try to use IPP everywhere as the legacy drivers are being phased out.
https://wiki.archlinux.org/title/CUPS#Installation - this will require to install cups-pdf (which ubuntu might just install by default?)

Offline

#9 2024-04-18 14:22:56

millus
Member
Registered: 2019-07-21
Posts: 206

Re: [SOLVED] HP Printer issue

Just chiming in, since a few months ago the exact same problem started to happen on my HP 7740 pro wide!
Everything was fine, then suddenly all pages are shifted a few cm to the right.
Printing some diagnostics page from the printer's own hardware menu comes out fine!
(I already tried all the usual stuff such as aligning print head, resetting, but yeah, the hardware seems ok by itself.)

$ lpoptions -p HPOfficeJetPro7740 -l
PageSize/Media Size: 11x14in 2L 2L.FB L L.FB 3x5in 3x5in.FB 4x5in 4x5in.FB 4x6in 4x6in.FB 4x12in 4x12in.FB 5x7in 5x7in.FB IndexCard3x5in IndexCard4x6in IndexCard5x8in IndexCardA4 IndexCardLetter 8x10in 8x10in.FB A6 A6.FB JapanesePostcard JapanesePostcard.FB OfukuHagaki *A4 A4.FB A5 A5.FB B5 B5.FB B5(JIS) B5(JIS).FB Executive Executive.FB Legal Legal.FB Letter Letter.FB Statement Custom1 Tabloid Tabloid.FB A3 A3.FB B4JIS B4JIS.FB 8.5x13in 8.5x13in.FB 3.63x6.5in Envelope#10 EnvelopeA2 EnvelopeC5 EnvelopeC6 EnvelopeDL EnvelopeMonarch JapaneseEnvelopeChou#3 JapaneseEnvelopeChou#4
ColorModel/Output Mode: *RGB CMYGray KGray
MediaType/Media Type: *Plain Glossy CoatedBrochure CoatedMatte BrochureGlosy FastGlossy Coated Brochure BrochureHagaki PlainThick PlainPaperLight
OutputMode/Print Quality: Normal FastDraft *Best Photo
InputSlot/Media Source: *Upper Lower
Duplex/Double-Sided Printing: *DuplexNoTumble DuplexTumble None

(connected via wifi, as socket://)

Indeed the command-line command mentioned on the page linked by seth worked, even the plain version w/o fit-to-page, it prints without the right-shift glitch, as it should:

lp -d <printer-name> -o media=A4 ~/path/to/foo.pdf

Printing via system print dialogue or browser dialogue doesn't work ie right-shifts, despite setting media to "A4 borderless" or "Index Card A4".

Does the "lp" command also use cups or is it different from CUPS? Ie can we say that since it works from command-line "lp", then cups might/cannot be faulty?
I looked into cups settings of the printer and everything seemed normal, as usual. Nothing seems to have changed from when it was still in a working state.

Last edited by millus (2024-04-18 16:00:40)

Offline

#10 2024-04-18 14:33:39

seth
Member
Registered: 2012-09-03
Posts: 51,632

Re: [SOLVED] HP Printer issue

Please use [code][/code] tags, not "quote" tags. Edit your post in this regard.

pacman -Qo lp # spoiler: it's not "glasses"

What is "browser dialog" itr?
http://localhost:631 is cups, does printing the testpage from there work?
(Select the printer and use the Maintainance drop down menu)

Do you use hplip or the IPP everywhere filter/driver?
Afewmonthsago™, more specifically Dec 1st hplip moved from 3.23.8 to 3.23.12 … hmm

Offline

#11 2024-04-18 16:01:56

millus
Member
Registered: 2019-07-21
Posts: 206

Re: [SOLVED] HP Printer issue

browser dialog is in the webbrowser chromium/firefox, but also libreoffice/leafpad/any gui app really -> click print page in the menu -> gui window with stuff.
Now it does have an option to "use system print dialog" instead (I use xfce4 btw) but the result is the same: Page shifted to the right.

pacman -Qo lp
/usr/bin/lp is owned by cups 1:2.4.7-2

Oh I see so lp is part of cups :-o

Well that makes it really weird now because I just went to cups (localhost:631/admin) and printed a test page from the cups printer maintenance.
The result was again the right-shifted and thereby cut-off page.
But if "lp" works fine and is part of cups, that now means.. what, actually?

Last edited by millus (2024-04-18 16:19:59)

Offline

#12 2024-04-18 20:10:34

seth
Member
Registered: 2012-09-03
Posts: 51,632

Re: [SOLVED] HP Printer issue

Probably that the default printer options are ignored, you still specified "-o media=A4" for lp, what happens if you don't?
Also you've not commented on the hplip situation (and whether you've tried IPP everywhere and what the outcome of that was)
nb. that IPP everywhere depends on cups-pdf  for proper function.

Offline

#13 2024-04-19 07:28:50

millus
Member
Registered: 2019-07-21
Posts: 206

Re: [SOLVED] HP Printer issue

If I don't specify "-o media=A4" then lp too will print the wrong, right-shifted pages.

I have installed hplip and use the printer via socket conenction.


IPP:
First, I was unable to find out whether "IPP" and "IPP everywhere" are the same thing. It seemed that IPP-ev. is basically the "newest version" of IPP, so I went with that.
I tried to use IPP but there were no hints anywhere (cups, printer manual, google) how to find out the correct "IPP" address string to enter.
This is an HP pro 7740 wide.
CUPS has 4 options at first:

Internet Printing Protocol (https)
Internet Printing Protocol (ipps)
Internet Printing Protocol (http)
Internet Printing Protocol (ipp)

As there were no clues anywhere which one to use and how I just typed in these randomly (the printer's address is 192.168.1.90),
as the CUPS software suggests these formats specifically.

http://192.168.1.90:631/ipp/
http://192.168.1.90/ipp/
https://192.168.1.90/ipp
ipp://192.168.1.90/ipp/
ipp://192.168.1.90

but none of them worked, as in, sending a test page would not do anything.

EDIT:
Omg finally this one worked (as in, it actually prints), which is btw NOT a format suggested in the list given by cups!!! I just tried it randomly as I thought, well maybe the most basic approach should also be tried...
https://192.168.1.90
However, the page is still right-shifted.
Btw I did NOT have cups-pdf installed (I installed it now afterwards now, just for the heck of it).

Last edited by millus (2024-04-19 07:39:56)

Offline

#14 2024-04-19 07:37:31

seth
Member
Registered: 2012-09-03
Posts: 51,632

Re: [SOLVED] HP Printer issue

seth wrote:

Probably that the default printer options are ignored

I tried to use IPP but there were no hints anywhere (cups, printer manual, google) how to find out the correct "IPP" address string to enter.

Do you still have the self-test page you printed out at the printer?

nmap 192.168.1.90

"ipp://192.168.1.90/ipp/print" would be common - discovery requires avahi but isn't necessary.

Offline

#15 2024-04-19 07:42:51

millus
Member
Registered: 2019-07-21
Posts: 206

Re: [SOLVED] HP Printer issue

Uh, awkward when someone replies to your post before you posted an edited version of it --- edit-bump! I will delete this -_-"

Last edited by millus (2024-04-19 07:46:33)

Offline

#16 2024-04-19 07:46:10

seth
Member
Registered: 2012-09-03
Posts: 51,632

Re: [SOLVED] HP Printer issue

https://192.168.1.90
However, the page is still right-shifted.
Btw I did NOT have cups-pdf installed (I installed it now afterwards now, just for the heck of it).

w/o cups-pdf you're not using IPP everywhere and the https url is probably for hplip.

You could remove the latter to force yourself to find an IPP everywhere solution and I guess downgrading it (and the hplip-plugin accordingly!) might "fix" the papersize bug.
(Can you btw. configure that in the hplip toolbox as well? Maybe worth a shot)

Offline

#17 2024-04-19 08:11:01

millus
Member
Registered: 2019-07-21
Posts: 206

Re: [SOLVED] HP Printer issue

Uhh, I can't find a delete-post option, lol (@bump)

Anyway...
this hplip-plugin, is it part of hplip? Because I don't have any results from pacman -Ss hplip-plugin, doesn't seem to exist as its own package.

And do you know whether I have to reboot after downgrading hplip package?

Offline

#18 2024-04-19 08:14:45

seth
Member
Registered: 2012-09-03
Posts: 51,632

Re: [SOLVED] HP Printer issue

You can't delete posts, https://aur.archlinux.org/packages/hplip-plugin is typically needed for hplip and you'll probably at least have to restart cups after any downgrade

Offline

#19 2024-04-19 08:21:40

millus
Member
Registered: 2019-07-21
Posts: 206

Re: [SOLVED] HP Printer issue

Thanks.
But it seems my printer works fine without hplip-plugin, I don't have it?

$ pacman -Ss hplip
extra/hplip 1:3.23.12-3 [installed: 1:3.23.8-2]
    Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some
    LaserJet
$ sudo updatedb
$ locate hplip-plugin
<no results>

EDIT:
I downgraded to
hplip-1:3.22.6-1-x86_64.pkg.tar.zst
from june 2022.
Still right-shifted! And I'm pretty sure in 2022 this bug didn't happen yet.


About the "toolbox" - if you mean "hp-toolbox" I tried to start that but it crashes:

$ hp-toolbox 
Traceback (most recent call last):
  File "/usr/share/hplip/base/utils.py", line 2504, in import_ext
    return importlib.import_module(ext_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'cupsext'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/hp-toolbox", line 41, in <module>
    from base import status, tui, module
  File "/usr/share/hplip/base/status.py", line 50, in <module>
    cupsext = utils.import_ext('cupsext')
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/hplip/base/utils.py", line 2508, in import_ext
    return importlib.import_module(ext_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'cupsext'

...I will now delete "hplip" package and try with ipp (probably?) oO-

...ok!
The IPP printer I added stopped working after that, but when I used your URL

ipp://192.168.1.90/ipp/print

it works again, and printing a maintenance -> test page in CUPS printed with correct format, no more shifting!
Printing over that IPP printer works fine too, tested from chromium just now.
So it seems using IPP instead of hplip resolved it. But I still wonder why the problem persisted even with hplip from 2022, it seems it's not a bug in hplip per se but maybe some config file that persisted?

Thanks a lot, so I guess this is SOLVED now, well, as in, do not use hplip anymore oO.



---- SOLUTION / [SOLVED] ----

This right-shift glitch started happening in late 2023/early 2024 iirc, if using hplip.
Verify diagnosis whether this workarounds it, if this fixes the right-shift, it is probably a hplip config issue and this solution applies:

$ lpstat -e  # find your printer's name, to use it in commands below
$ lp -d yourprintername ~/somerandompdf.pdf    # this command should still print right-shifted
$ lp -d yourprintername -o media=A4 ~/somerandompdf.pdf    # this command should print correctly aligned

Downgrading hplip didn't work, so maybe it is config file corruption.
Solved it by using IPP (aka IPP everywhere, same thing) instead of hplip:

The ipp-URLs suggested by CUPS all do NOT work (at least not for this particular printer model I'm using). Instead, in CUPS (http://localhost:631/admin) set "ipp" for the printer (this was a HP officejet pro 7740 wide) with this URL format, adjust IP to your printer's IP:

ipp://192.168.1.90/ipp/print

UNINSTALL hplip to make sure it isn't used accidentally. For some strange reason even though I was using the IPP printer, as soon as I reinstalled hplip I suddenly got right-shifted printouts again, when using the _IPP printer_, until I uninstalled hplip again. It's amateur hour, somewhere.
Also install cups-pdf, because I dunno, losing the overview of what is actually happening, but it could be important for uh something.

Last edited by millus (2024-04-19 13:13:06)

Offline

#20 2024-04-19 12:10:10

seth
Member
Registered: 2012-09-03
Posts: 51,632

Re: [SOLVED] HP Printer issue

I don't think your approach w/ https://192.168.1.90 and w/o cups-pdf actually used the IPP everywhere driver (esp. w/ cups-pdf that's not possible)
As for downgrading hplip, assuming the 3.22.6-1 version wasn't affected, did you restart cups after the downgrade?

@flamemagister, can you confirm these findings?

Offline

#21 2024-04-19 13:11:24

millus
Member
Registered: 2019-07-21
Posts: 206

Re: [SOLVED] HP Printer issue

I restarted the whole PC after every down/upgrade, just to be on the safe side ~_~.

I see @ IPP. But I don't understand how a printer that is configured explicitely as "ipp" in CUPS can still instead "fallback" to hplip instead of just not working at all if ipp doesn't work =_=.
I have installed cups-pdf now, I should add this to the solution I guess.

Man this whole thing is already again wayyyy too complicated for any "user", people who create these drivers/packages/management tools w/e really need to get a grip. Not everyone can do hours of research to figure out why his system for no apparent reason just broke.
Always the same... audio, printing, bluetooth, audio, printing, bluetooth, audio, printing, bluetooth.... breaks in regular intervals for like what, 10 years+... I'm just baffled that at least GPUs work flawlessly all the time (oops edit: wait, gpu broke for gaming for me last year I just remembered, fortunately you and v1del were to the rescue again, as always. You should get paid super boni or sth for all the work you put into this ~_~ Actually is there a good way to support you two guys in particular somehow? I mean this deserves some recognition).

Last edited by millus (2024-04-19 13:30:20)

Offline

#22 2024-04-19 13:31:27

seth
Member
Registered: 2012-09-03
Posts: 51,632

Re: [SOLVED] HP Printer issue

Any uri that doesn't start w/ "ipp://" isn't "configured explicitly as "ipp""

this whole thing is already again wayyyy too complicated for any "user", people who create these drivers/packages/management tools w/e really need to get a grip

https://www.youtube.com/watch?v=qeUXktsSSS8

Offline

#23 2024-04-20 04:01:42

flamemagister
Member
Registered: 2024-04-02
Posts: 9

Re: [SOLVED] HP Printer issue

Hi @Seth and @millus - thank you both for the valuable insights and good to know there's someone else out there with this issue and its not just an arch noob like me.

I have read the thread carefully hoping to recreate @millus' success but I have not been able to. It could be that I have misunderstood or missed something.

With lp -d <printer-name> -o media=A4 ~/path/to/foo.pdf it works as intended with no shift right issue and replicates the shift right issue with the media option is removed. So I think the suggestion that the GUI based implementation (cinnamon is my DE) is ignoring the page size at least in arch, seems about right.

So on to ipp. Now this is where I may have gone astray. I deleted the hplip and hplip-plugin package (pacman -Rns hplip hplip-plugin) and rebooted. I deleted the old printer profile in the GUI and reinstalled using the URI option into which I placed ipp://<printer-ip>/ipp/print then selected IPP everywhere (I already had cups-pdf installed).

And the result was a blue screen message with an error code on the printer. So I restarted the printer and recreated the above steps. And while the GUI and print queue says processed and printed the test page in reality nothing happened.

Ok so next I tried the same URI but with a cups-pdf driver option - that one just printed mostly blank pages and one postscript random string. Interestingly this option gave me more info about the printer e.g. clean print heads.

I do get with both IPP everywhere and with cups-pdf a status message about wifi printing not being configured. This printer can not connect to wifi if there is ethernet connectivity as in my case. So no idea why that message would be there.

Grateful for any further suggestions etc.

I do take millus' point about not needing to grapple with this stuff - agreed it is very annoying - through I'm in two minds about that. The point is very well made but I also think the Linux / Arch ecosystem is built on a large amount of goodwill and I think it should be mutual between dev and user as well.  In other words I sort of expect to sort this stuff out when it happens (part of the fun) but when needed with assistance from the community - which I am grateful to the both of you for.


I'll re-read the thread in case I missed something and also I will see if a firmware update on the printer helps - the blue screen error on the printer might be suggestive of an incompatibility with IPP with the current firmware. Also I am not sure about the date this crept in. I was using the printer earlier this year (Jan/Feb) without issue but I blew that arch install away to redo it.

Offline

#24 2024-04-20 07:43:19

seth
Member
Registered: 2012-09-03
Posts: 51,632

Re: [SOLVED] HP Printer issue

Did you click the youtube link? It's a famous IBM TV spot from the mid-90ies
Printing has always sucked and you can thank MS/GDI for that (and they're about to do the same to IPPE again…)

On topic:

the result was a blue screen message with an error code on the printer

The printer crashed??

I deleted the old printer profile in the GUI and reinstalled using the URI option

What GUI?
http://localhost:631 ?
Stay away from some desktop specific GUIs - you don't know what they do.
Use the cups web server or lpadmin.

I do get with both IPP everywhere and with cups-pdf a status message about wifi printing not being configured. This printer can not connect to wifi if there is ethernet connectivity as in my case. So no idea why that message would be there.

nmap <printer-ip>

And check the manual, it's possible that network printing has to be specifically activated and/or can be configured.
IPP everywhere generally doesn't care about the carrier and even works on USB

Offline

#25 2024-04-20 08:29:22

millus
Member
Registered: 2019-07-21
Posts: 206

Re: [SOLVED] HP Printer issue

@seth
lol yes^^

@flamemagister
wth is happening, something bluescreened? like a Windows bluescreen that forces a reset? xD

Also, I feel I'm a magnet for everything that could possibly go wrong on Linux software issues, so you're definitely not alone~

Btw by "gui" im 99% sure he means the CUPS admin interface and/or also the browser's print dialogue, depending on context. I don't think there is any other GUI that is relevant here.

Last edited by millus (2024-04-20 08:58:33)

Offline

Board footer

Powered by FluxBB