Bug 1033952

Summary: hp-plugin works only till the printer is turned off
Product: [Fedora] Fedora Reporter: M. Kadanka <marast78>
Component: hplipAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 23CC: artem.astafyev, dominik, germano.massullo, icq, jones.peter.busi, jpopelka, marast78, mkasik, pdupre, rfv781, twaugh
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: hplip-3.15.11-3.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-14 10:20:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description M. Kadanka 2013-11-24 18:16:11 UTC
Description of problem:
After installation of my printer (HP Laserjet P1005) using 'hp-setup -i', the printer is successfully added and locally selected plugin loaded. Printer works fine till it's turned off. After turning it on again, plugin is not loaded and printer doesn't print.
Rebooting machine doesn't have any effect on the printer if I leave it turned on, it will still print fine. Only after the printer is turned off, it will not print after turning it on again, unless the plugin is reinstalled using hp-plugin.
I tried installing both, my local copy of the plugin and the automatically downloaded procedure, same results.


Version-Release number of selected component (if applicable):
hplip-3.13.11-2.fc20.x86_64

How reproducible:
Install printer using hp-setup utility, it will work.
Turn the printer off and on again, it will not print.

Steps to Reproduce:
1.use hp-setup to install printer, printer works.
2.turn off printer and turn it on again, printer doesn't work
3.install plugin again using hp-plugin, printer again works till turned off.

Actual results:
printer doesn't work if being turned off after plugin installation

Expected results:
printer should always work if turned on if the plugin was already installed

Additional info:

Comment 1 Jiri Popelka 2013-11-25 10:55:43 UTC
Looks like a problem with the proprietary plugin and/or the printer.
In any case not something we can fix.

Could you fill this bug at HPLIP upstream ?
https://bugs.launchpad.net/hplip/+filebug

Comment 2 M. Kadanka 2013-11-25 22:46:06 UTC
(In reply to Jiri Popelka from comment #1)
I saw a similar bug report on Launchpad before filing it here, although I'm not sure if it's the same one. It's also for older hplip version.
It's this one: https://bugs.launchpad.net/hplip/+bug/1196711

Original bug description doesn't sound exactly the same, but comment #4 (from the reporter of the bug) clearly describes my problem. Also, comment #8 describes the bug on Mint with my printer as well.

It says 'fix released' and no other comments are present, so I'm not sure if it's fixed or not.

Anyway, if you could please check? In case it will look like the same bug to your experienced eyes, I will gladly create an Launchpad account and comment on it.
In case I should create new report there, I will do that instead.


Thanks.

Comment 3 Tim Waugh 2013-11-26 10:03:56 UTC
I've filed a separate bug report which I think gets to the point of it.

Can you run "hp-firmware" instead of "hp-plugin"? Does that allow the printer to print again each time it is connected?

Comment 4 M. Kadanka 2013-11-26 16:47:51 UTC
Thank you.

I tried hp-firmware, same result as with hp-plugin.
Like with hp-plugin, after running hp-firmware, the plugin is loaded and I can print.
After turning printer off, plugin is not loaded and printing is not possible.

Comment 5 tgb 2014-08-25 06:23:58 UTC
Isn't the problem with this patch - hplip-udev-rules.patch, which removes udev rule intended to automatically load firmware?

Comment 6 Tim Waugh 2014-08-26 12:40:37 UTC
Unfortunately it isn't as simple as removing that patch, as hp-config_usb_printer needs to be shipped as well, but it pulls dependencies from the 'hplip' package into 'hplip-common'. Needs thinking about how best to split that.

Comment 7 tgb 2014-08-30 12:46:43 UTC
It is possible to use hp-firmware tool. Something like this:
SUBSYSTEM=="usbmisc", ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="2b17", RUN+="/usr/bin/hp-firmware -y3&"
works for me.

Comment 8 Tim Waugh 2014-10-02 10:49:15 UTC
*** Bug 1140807 has been marked as a duplicate of this bug. ***

Comment 9 Artem Astafyev 2015-04-09 09:52:56 UTC
hplip downloaded from http://hplipopensource.com works fine. Definitely the problem is in firmware is not being loaded on printer plug in. I examined udev rules in hpmud.rules and it seems that Fedora's rpm is missing the following string which actually loads firmware:

# This rule will check the smart install feature, plugin status and firmware download for the required printers.
ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c 'if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl --no-block start hplip-printer@$env{BUSNUM}:$env{DEVNUM}
.service; else /usr/bin/nohup /usr/bin/python /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM} ; fi &'"

Comment 10 Tim Waugh 2015-04-09 10:33:10 UTC
Right: but see comment #6.

Comment 11 Jiri Popelka 2015-04-14 16:01:38 UTC
(In reply to Tim Waugh from comment #6)
> Unfortunately it isn't as simple as removing that patch, as
> hp-config_usb_printer needs to be shipped as well, but it pulls dependencies
> from the 'hplip' package into 'hplip-common'.

What about not removing the udev rule (mentioned in comment #9),
but moving it into separate udev file that would be shipped (along with hp-config_usb_printer) in the main package ?
Then it might work provided the main package is installed.

Comment 12 Tim Waugh 2015-04-16 16:19:44 UTC
Jiri: yes, that seems like a good approach. It will still mean that people without the main package installed will see this issue, though, so I wonder whether the hpijs sub-package should just be folded into the main package eventually. In other words, I don't think HPLIP is designed to allow the GUI parts to be separated out -- or to be used remotely.

Also, that rule looks pretty clumsy, I guess because of wanting to run on non-systemd systems. Maybe instead of the check for systemctl, we could re-write it to use ENV{SYSTEMD_WANTS}+=hplip-printer*.service. What do you think?

Comment 13 Jiri Popelka 2015-04-17 12:05:04 UTC
(In reply to Tim Waugh from comment #12)
> so I wonder
> whether the hpijs sub-package should just be folded into the main package
> eventually.

What is the reason why we have hplip and hpijs separated ?
I understand it as separation of data (hpijs) and control (hplip).
But since bug #1194186 fix we've had PDDs in both packages.
Also many of the printers which have ppd/drv in hpijs require running hp-plugin from hplip.
So I lean to merging those two together.

> In other words, I don't think HPLIP is designed to allow the GUI
> parts to be separated out -- or to be used remotely.

What GUI parts do you mean ? I don't see any in hplip/hpijs, only in hplip-gui.

> Also, that rule looks pretty clumsy, I guess because of wanting to run on
> non-systemd systems. Maybe instead of the check for systemctl, we could
> re-write it to use ENV{SYSTEMD_WANTS}+=hplip-printer*.service. What do you
> think?

That looks like the proper way, yes.

Comment 14 Tim Waugh 2015-04-17 13:06:56 UTC
Let's just merge them then. I don't now remember why hpijs was initially split out, and it seems to be causing more problems than it's solving.

Comment 15 Fedora End Of Life 2015-05-29 09:50:37 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 16 Jiri Popelka 2015-07-29 16:57:31 UTC
(In reply to Jiri Popelka from comment #11)
> What about not removing the udev rule (mentioned in comment #9),
> but moving it into separate udev file that would be shipped (along with
> hp-config_usb_printer) in the main package ?
> Then it might work provided the main package is installed.

http://pkgs.fedoraproject.org/cgit/hplip.git/commit/?id=188cf820f01f9ce4a6cfd54b74d8083f7ab18587

(In reply to Tim Waugh from comment #12)
> Also, that rule looks pretty clumsy, I guess because of wanting to run on
> non-systemd systems. Maybe instead of the check for systemctl, we could
> re-write it to use ENV{SYSTEMD_WANTS}+=hplip-printer*.service. What do you
> think?

I'm staying with 'systemctl --no-block start hplip-printer@.service' [1] to not diverge from upstream too much, but I suggested the change in https://bugs.launchpad.net/hplip/+bug/1479431

[1] https://bbs.archlinux.org/viewtopic.php?id=181080

(In reply to Tim Waugh from comment #14)
> Let's just merge them then. I don't now remember why hpijs was initially
> split out, and it seems to be causing more problems than it's solving.

http://pkgs.fedoraproject.org/cgit/hplip.git/commit/?id=2ef869366f07cbddb2d5a9d91b5b3ac80a62a5a6

Comment 17 Fedora Update System 2015-07-30 09:03:59 UTC
hplip-3.15.7-3.fc23 has been submitted as an update for Fedora 23.
https://admin.fedoraproject.org/updates/hplip-3.15.7-3.fc23

Comment 18 Fedora Update System 2015-07-30 17:30:04 UTC
Package hplip-3.15.7-3.fc23:
* should fix your issue,
* was pushed to the Fedora 23 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hplip-3.15.7-3.fc23'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-12379/hplip-3.15.7-3.fc23
then log in and leave karma (feedback).

Comment 19 Fedora Update System 2015-08-15 02:12:40 UTC
hplip-3.15.7-3.fc23 has been pushed to the Fedora 23 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 20 Jiri Popelka 2015-12-10 13:36:02 UTC
Yesterday I was notified that this still doesn't work, so this time I'm [1]:

- moving 56-hpmud.rules into main package completely
  - leaving hp-config_usb_printer in main package
- removing hplip-printer@.service as the 56-hpmud.rules doesn't call
systemctl --no-block start hplip-printer@$env{BUSNUM}:$env{DEVNUM}.service
anymore as it did few versions ago, but calls directly
/usr/bin/nohup /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM}'
(see also https://bugs.launchpad.net/hplip/+bug/147943)

Result is that hplip-udev-rules is now very minimalistic so it's not prone to breaking anytime upstream changes the rules file (which has been quite often).

[1] http://pkgs.fedoraproject.org/cgit/hplip.git/commit/?h=f23&id=6a8ce90c340d94960d3ee15400e98695f47c7616

Comment 21 Jiri Popelka 2015-12-10 13:37:46 UTC
(In reply to Jiri Popelka from comment #20)
> (see also https://bugs.launchpad.net/hplip/+bug/147943)

https://bugs.launchpad.net/bugs/1479431

Comment 22 Fedora Update System 2015-12-10 13:58:40 UTC
hplip-3.15.11-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-641840267e

Comment 23 Jiri Popelka 2015-12-10 14:01:28 UTC
*** Bug 1251751 has been marked as a duplicate of this bug. ***

Comment 24 Fedora Update System 2015-12-11 06:01:35 UTC
hplip-3.15.11-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update hplip'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-641840267e

Comment 25 Ignacio Casal Quinteiro (nacho) 2015-12-13 18:50:15 UTC
This new version is a huge step for me. So now when I plug the printer I get asked by software to install a firmware, out of memory was some package starting with foo2qxq? Right after the printer is detected and installed, in control center the printer will not show still any firmware. Also it will not work properly.
Instead if after this, I remove the printer from the control center and add it again, then I am able to choose the firmaware and it will work properly.

Comment 26 Fedora Update System 2015-12-14 10:20:40 UTC
hplip-3.15.11-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.