Bug 30626 - Since updating to hplip 3.22.6 booting with a usb-connected printer powered up shows an error in the HP Device Manager
Summary: Since updating to hplip 3.22.6 booting with a usb-connected printer powered u...
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: All Packagers
QA Contact:
URL:
Whiteboard:
Keywords: IN_ERRATA9
Depends on:
Blocks:
 
Reported: 2022-07-12 03:14 CEST by Thomas Andrews
Modified: 2023-10-19 10:21 CEST (History)
5 users (show)

See Also:
Source RPM: hplip-3.22.6-1.mga8.src.rpm
CVE:
Status comment:


Attachments
Journal of a normal, fast boot (171.10 KB, text/plain)
2022-07-12 03:37 CEST, Thomas Andrews
Details
Journal of a slow boot with Deskjet powered up (176.36 KB, text/plain)
2022-07-12 03:38 CEST, Thomas Andrews
Details
Result of journalctl -b -p err > /tmp/tracejlb.txt (7.88 KB, text/plain)
2022-07-15 16:34 CEST, Jean Michel Varvou
Details

Description Thomas Andrews 2022-07-12 03:14:00 CEST
Description of problem:
Since updating to hplip 3.22.6, if I boot with a usb-connected printer powered up, that printer shows a "device communication error" in the HP device manager. If, however, I boot with the printer(s) powered down, then power them up later, That communication error does not occur. If I boot with the printer powered up, then power it down and back up, I still get the communication error.

I have three HP printers. The newest is a Envy Photo 7858 all-in-one. Next-newest is a Color Laserjet CP1215. The oldest is a Deskjet 5650.

It's no hardship for me to boot with the first two powered down, and in fact I do that when not using them. The Deskjet isn't so easy. The printer switch puts it into standby mode, rather than powering it off. I have put a switch into the line, so that I can power it off, again, not exactly a hardship, for me. 

But, I can imagine situations where a user would not want to power off his printer. In those situations, this issue can be very annoying.
Comment 1 Thomas Andrews 2022-07-12 03:36:38 CEST
In addition, I have determined that booting with the Deskjet printer powered up and on standby greatly increases boot time over when booting with power to the printer switched off.

My system uses an SSD boot drive, and normally boots in a few seconds. But, if the Deskjet is powered before the boot, boot time goes to what seems like well over a minute.

It did not do this before the update to hplip 3.22.6.

I will attach two text files. Bootfast.txt is a normal boot, while bootslow.txt is a slow one. Watching the display as it boots, the delay is occurring before control is handed off to sddm.
Comment 2 Thomas Andrews 2022-07-12 03:37:51 CEST
Created attachment 13330 [details]
Journal of a normal, fast boot
Comment 3 Thomas Andrews 2022-07-12 03:38:49 CEST
Created attachment 13331 [details]
Journal of a slow boot with Deskjet powered up
Comment 4 Dave Hodgins 2022-07-12 05:09:33 CEST
Please try "rpm -e --nodeps xsane xsane-gimp" and see if that fixes the
problem. I'm suggesting this as the slow boot has a 58 second delay
right before the line
python3[707]: io/hpmud/musb.c 427: Found interface conf=0, iface=0, altset=0, index=1
A search for "io/hpmud/musb.c 427" indicates it part of saned.

If that fixes the issue then it may be an xsane problem rather then an hplip
problem, even if the update to hplip is what triggered it's showing up now.

CC: (none) => davidwhodgins

Comment 5 Dave Hodgins 2022-07-12 05:13:55 CEST
Another suggestion no related to this bug, to speed up the boot.
Add a line with HARDDRAKE_ONBOOT=no to /etc/sysconfig/system, and manually run
harddrake2 any time you add hardware.
Comment 6 Thomas Andrews 2022-07-12 13:49:12 CEST
Regarding Comment 4, this is my production install and I am reluctant to remove xsane and/or xsane-gimp, as I use them semi-regularly with the all-in-one printer from Comment 0. It also seems odd that applying or removing power to the Deskjet would make a difference with xsane, as that is a printer-only, with no scanning capability.

I'm not on that computer right now, but last night I did do a boot with "splash quiet" removed from the boot options, and with the Deskjet receiving power. There was a delay at one point, something about waiting for udev, that had a limit of over two minutes possible. It didn't last that long, and the boot as a whole was not as long as it has been, but not as short as was normal before the hplip update. I didn't see any other delays during the boot.

https://bugs.mageia.org/show_bug.cgi?id=10072#c68 indicates that fixing that bug involved a change in udev rules. Perhaps that is the cause.

When I get back to that computer again I will try booting that way again, and report back here.
Comment 7 Thomas Andrews 2022-07-12 14:38:25 CEST
OK, another boot on the machine with the issue, and again there was a delay at the same point. I paid better attention this time, and it was a "start job" for udev to initialize hardware, with a potential limit of 2 minutes 59 seconds. (Why not 3 minutes? A conundrum.) I watched, and at around 58 or 59 seconds, it completed and the boot proceeded normally.
Comment 8 Thomas Andrews 2022-07-12 14:45:31 CEST
Another boot, this time with power removed from the Deskjet, and the other printers shut down. This time I did see the "start job" message, but it came and went too quickly to read anything more than that.
Comment 9 Dave Hodgins 2022-07-12 15:49:30 CEST
I should have made it clear. Remove xsane to see if it is the cause or not.
Re-install it once that's been determined.
Comment 10 I027614 I027614 2022-07-12 15:54:45 CEST
Since the update my HP Deskjet 930c powers up when the PC boots and cannot be powered down until the PC shuts down.

CC: (none) => I027614

Comment 11 Thomas Andrews 2022-07-13 02:01:05 CEST
(In reply to Dave Hodgins from comment #9)
> I should have made it clear. Remove xsane to see if it is the cause or not.
> Re-install it once that's been determined.

It doesn't look like it, but the issue has become more cloudy than ever.

Before removing xsane, I booted a 2-3 times, watching for the delay. It was there twice, and once was not. Then I removed xsane, and tried again. No delay on the first boot, and when I checked the Device Manager(DM) the Deskjet had the communication error. Another boot after a short pause, and the delay was there - and no communication error in the DM for the deskjet.

I repeated this several times, with the same result. Sometimes there was a udev delay, sometimes not. When there was, the DM communicated with the Deskjet, and when there was no delay it didn't.

Re-installing xsane now...
Comment 12 Lewis Smith 2022-07-13 21:28:09 CEST
Trying to clarify; is this right (printer on at boot)?
- If you get the long delay on booting, there is no "device communication error" in the HP device manager.
- If you do not get the long booting delay, you do get the preceding error.

CC: (none) => lewyssmith

Comment 13 Thomas Andrews 2022-07-13 22:10:55 CEST
@Lewis:

That's what I have observed so far with the Deskjet 5650. 

I have not tried my other printers individually yet.
Comment 14 Jean Michel Varvou 2022-07-15 16:25:01 CEST
Hello

For information, I have exactly the same problem on a friend's PC with an HP printer. To get around the abnormally long boot time, the easiest way is to turn off the printer.

Note that the printer is well recognized once the boot is done. It works correctly.

CC: (none) => jeanmichel.varvou

Comment 15 Jean Michel Varvou 2022-07-15 16:34:38 CEST
Created attachment 13337 [details]
Result of  journalctl -b -p err > /tmp/tracejlb.txt
Comment 16 Lewis Smith 2022-07-15 21:43:42 CEST
Thank you both for your similar evidence.

Assigning this to Nicolas S who put up version 3.22.6 (& earlier ones). Please re-assign it if you see the need.

Assignee: bugsquad => nicolas.salguero
Source RPM: (none) => hplip-3.22.6-1.mga8.src.rpm
CC: lewyssmith => (none)

Comment 17 Thomas Andrews 2022-07-16 14:17:03 CEST
I tried booting with my Envy Photo 7858 powered up and in standby. Long delay, and once booted no error in the DM.

Speculation follows. Please feel free to correct any misconceptions I have there.

My gut feeling is the long delay is being caused by udev repeatedly trying to upload firmware to printers that don't require it, eventually moving on. I can see, possibly, where a delay for a printer that needs the firmware might be necessary, but for those printers that don't there ought to be a way to shorten it.

Some older, slower printers like my Deskjet 5650 (usb 1.1, I believe) may take longer sometimes to "wake up" than others, don't respond to udev quickly enough, so udev believes they are offline. That may be why sometimes it works one way, sometimes another.
Lewis Smith 2022-10-27 12:37:30 CEST

Keywords: (none) => FOR_ERRATA9

Edward 2022-10-28 23:15:50 CEST

CC: (none) => epp

Lewis Smith 2022-10-31 18:28:13 CET

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=31007

Comment 18 Nicolas Salguero 2022-11-03 13:27:37 CET
Hi,

Does the problem still occur with hplip-3.22.10-1.mga9?

Best regards,

Nico.
Comment 19 Thomas Andrews 2022-12-05 00:25:52 CET
(In reply to Nicolas Salguero from comment #18)
> Hi,
> 
> Does the problem still occur with hplip-3.22.10-1.mga9?
> 
> Best regards,
> 
> Nico.

Yes. (Sorry to take so long to answer.)
Comment 20 Nicolas Salguero 2022-12-05 11:08:22 CET
Hi,

With hplip-3.22.10-2.mga9, I reverted back to the previous behaviour, which was the cause of bug 10072.  Does it works better?

Best regards,

Nico.
Comment 21 Thomas Andrews 2022-12-05 17:10:11 CET
With regard to the Deskjet 5650 and the Color Laserjet CP1215, the status in the HP Device Manager has returned to what it was before. If you boot with the devices turned on, they show up in the Device Manager as "idle." If you boot with them powered down, they both show a "communication error" which will switch to "idle" when the devices are powered on.

With regard to the Envy Photo 7858, results are mixed. In the real hardware install used for the test, somewhere along the line I had installed HP FAX, and that device shows in the device manager with the others. That device behaves as do the two above printers. The printer part of the 7858 is different. 

If you boot with the device powered up but in sleep mode, the DM status is "busy, powered down, or unplugged." Waking the device up does not change the status, and the DM cannot communicate with it for other functions.

If you boot with the device powered down, DM reports a communication error. Powering it up changes that to "idle" but when the printer drops into sleep mode it changes to busy, etc and will not change regardless of the actual status of the device. When it shows as "idle" the DM can get information with regard to ink levels, etc.

If you boot with the device powered up and awake, The DM shows the "busy, etc." status.

This is all with already-installed printers. I didn't think until just now to try removing the 7858 and re-installing it.
Comment 22 Thomas Andrews 2023-02-14 13:33:38 CET
I've been doing a lot of printing with M8 lately, and have forgotten a few times to switch off the printer when done with it that session. I am still using hplip-3.22.10-2. 

Somewhere along the way, the system has reverted to reporting a device communication error for the printer if you boot with it powered up, but not if you boot with the printer powered down and power it up once the boot is finished.

However, the occasional long boot is still gone, and the behavior is now consistent.
Comment 23 Morgan Leijström 2023-07-07 16:00:02 CEST
Still valid?

What to write in errata?

CC: (none) => fri

Comment 24 Thomas Andrews 2023-07-07 19:36:17 CEST
Mageia 9 is currently using hplip 3.22.10-4. I'm not seeing this issue any more with my two usb-only printers, a Deskjet 5650 and a Color Laserjet CP1215. 

My third HP printer, a Envy Photo 7858, is now connected to my network through wifi. Going by information from Bug 31623, if this printer were connected through usb, it might still show the issue unless the recommended-but-not-required ipp-usb package were removed, due to conflicts between hplip and ipp-usb for Airprint-capable printers.

If necessary, changing my hardware setup to test that speculation would be difficult, but not impossible.
Comment 25 Morgan Leijström 2023-07-07 20:06:22 CEST
OK thanks

Entered
https://wiki.mageia.org/en/Mageia_9_Errata#Printing

IF we find it not an issue anymore we can delete it later

Keywords: FOR_ERRATA9 => IN_ERRATA9

Nicolas Salguero 2023-10-19 10:21:05 CEST

Assignee: nicolas.salguero => pkg-bugs


Note You need to log in before you can comment on or make changes to this bug.