Bug 1196237 - hp-plugin does not work in Fedora 22
Summary: hp-plugin does not work in Fedora 22
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: hplip
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1213610 (view as bug list)
Depends On: qt4-no-root
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-25 14:40 UTC by Dennis Gilmore
Modified: 2015-10-12 11:20 UTC (History)
13 users (show)

Fixed In Version: 3.15.7-5.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-23 16:40:06 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1185893 None None None Never
Red Hat Bugzilla 1212180 None None None Never
Red Hat Bugzilla 1219284 None None None Never
Launchpad 1434224 None None None Never

Internal Links: 1185893 1212180 1219284

Description Dennis Gilmore 2015-02-25 14:40:25 UTC
Description of problem:
[root@anubis ~]# hp-plugin --gui

HP Linux Imaging and Printing System (ver. 3.15.2)
Plugin Download and Install Utility ver. 2.1

Copyright (c) 2001-15 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

error: Install the hplip-gui package for graphical support.
warning: Qt/PyQt 4 initialization failed.
error: hp-plugin requires GUI support (try running with --qt3). Try using interactive (-i) mode.
[root@anubis ~]# hp-plugin -i

HP Linux Imaging and Printing System (ver. 3.15.2)
Plugin Download and Install Utility ver. 2.1

Copyright (c) 2001-15 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

(Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)


-----------------------------------------
| PLUG-IN INSTALLATION FOR HPLIP 3.15.2 |
-----------------------------------------

  Option      Description                                       
  ----------  --------------------------------------------------
  d           Download plug-in from HP (recomended)             
  p           Specify a path to the plug-in (advanced)          
  q           Quit hp-plugin (skip installation)                

Enter option (d=download*, p=specify path, q=quit) ? d

-------------------
| DOWNLOAD PLUGIN |
-------------------

Checking for network connection...
Downloading plug-in from: 
Downloading plug-in: [\                                                                                                                                                                                                                                  ] 0% Receiving digital keys: /bin/gpg --homedir /root/.hplip/.gnupg --no-permission-warning --keyserver pgp.mit.edu --recv-keys 0xA59047B9
 

----------------------
| INSTALLING PLUG-IN |
----------------------

Creating directory plugin_tmp
Verifying archive integrity... All good.
Uncompressing HPLIP 3.15.2 Plugin Self Extracting Archive...............................
Error importing HPLIP modules.  Is HPLIP installed?
error: Python gobject/dbus may be not installed

Done.



hplip-gui-3.15.2-2.fc22.x86_64
hplip-3.15.2-2.fc22.x86_64

Comment 1 Dennis Gilmore 2015-03-19 13:35:12 UTC
I think this is due to the port to python3 not being complete. but it prevents me from using my printer on any Fedora 22 machine

Comment 2 Dennis Gilmore 2015-03-19 15:57:03 UTC
I rebuilt hplip-3.15.2-6.fc22 using python2 and not python3 and it is working fine. Please revert python3 support in f22 and fix things in rawhide

Comment 3 Tim Waugh 2015-03-19 17:02:47 UTC
Obviously we'd rather have the Python3 build working if possible. It looks like it might just be incomplete dependencies due to the plugin bringing in ones we can't know about, e.g. "error: Python gobject/dbus may be not installed"

Could you see whether installing e.g. python-gobject, or python-dbus, or both, fixes it?

Comment 4 Dennis Gilmore 2015-03-19 17:25:57 UTC
they were all already installed. it changes nothing.

Comment 5 Tim Waugh 2015-03-19 18:37:02 UTC
OK, looking at this, it seems that the problem is with hpmudext only being a python3 module, and the downloaded plugin installer being python2.

Reported upstream:
  https://bugs.launchpad.net/hplip/+bug/1434224

Comment 7 Tim Waugh 2015-03-23 16:49:08 UTC
As a work-around, we'll add a new hplip-compat-libs sub-package for the Python 2 module.

Comment 8 Fedora Update System 2015-03-23 17:42:50 UTC
hplip-3.15.2-8.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/hplip-3.15.2-8.fc22

Comment 9 Dennis Gilmore 2015-03-23 19:32:44 UTC
after installing the update hp-plugin still fails to install the plugin, there is something still missing.

Installed:
  hplip-compat-libs.x86_64 3.15.2-8.fc22                                                                                                                                                                                                                                       

Upgraded:
  hpijs.x86_64 1:3.15.2-8.fc22              hplip.x86_64 3.15.2-8.fc22              hplip-common.x86_64 3.15.2-8.fc22              hplip-gui.x86_64 3.15.2-8.fc22              hplip-libs.x86_64 3.15.2-8.fc22              libsane-hpaio.x86_64 3.15.2-8.fc22             

Complete!
[root@anubis ~]# hp-plugin 

HP Linux Imaging and Printing System (ver. 3.15.2)
Plugin Download and Install Utility ver. 2.1

Copyright (c) 2001-15 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Checking for network connection...                                                                                                                                                                                                                                            Downloading plug-in from:                                                                                                                                                                                                                                                   Receiving digital keys: /bin/gpg --homedir /root/.hplip/.gnupg --no-permission-warning --keyserver pgp.mit.edu --recv-keys 0xA59047B9                                                                                                                                            Creating directory plugin_tmp
Verifying archive integrity... All good.
Uncompressing HPLIP 3.15.2 Plugin Self Extracting Archive...............................
warning: CUPSEXT could not be loaded. Please check HPLIP installation.
error: Python gobject/dbus may be not installed
error: Plug-in install failed.

Done.

Comment 10 Tim Waugh 2015-03-23 23:21:50 UTC
Sorry, my fault.

Comment 11 Fedora Update System 2015-03-26 22:09:28 UTC
Package hplip-3.15.2-9.fc22:
* should fix your issue,
* was pushed to the Fedora 22 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.2-9.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-4741/hplip-3.15.2-9.fc22
then log in and leave karma (feedback).

Comment 12 Adam Williamson 2015-04-11 21:53:21 UTC
Still doesn't work. In GUI mode it displays a grey dialog and a bunch of errors:

X Error: BadAccess (attempt to access private resource denied) 10
  Extension:    130 (MIT-SHM)
  Minor opcode: 1 (X_ShmAttach)
  Resource id:  0x130
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 3 (X_ShmPutImage)
  Resource id:  0x280000b
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 3 (X_ShmPutImage)
  Resource id:  0x280000b
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 3 (X_ShmPutImage)
  Resource id:  0x280000b

in 'interactive' mode it repeatedly does this when you tell it to download the plugin:

Checking for network connection...
Downloading plug-in from: 
Downloading plug-in: [\                                   ] 0%     
error: /root/.hplip/hplip-3.15.2-plugin.run file does not match its checksum. File may have been corrupted or altered

Comment 13 Jiri Popelka 2015-04-16 14:55:30 UTC
(In reply to awilliam@redhat.com from comment #12)
> Still doesn't work. In GUI mode it displays a grey dialog and a bunch of
> errors:
> 
> X Error: BadAccess (attempt to access private resource denied) 10
>   Extension:    130 (MIT-SHM)
>   Minor opcode: 1 (X_ShmAttach)
>   Resource id:  0x130

Yes, I can see this with all hp-* commands that are supposed to be run as root and that have any graphical output. Even with older hplip-3.14.10. Seems to be some Qt/PyQt problem.

> in 'interactive' mode it repeatedly does this when you tell it to download
> the plugin:
> 
> Checking for network connection...
> Downloading plug-in from: 
> Downloading plug-in: [\                                   ] 0%     
> error: /root/.hplip/hplip-3.15.2-plugin.run file does not match its
> checksum. File may have been corrupted or altered

I haven't been able to figure out what's the culprit, but it seems to be ok with 3.15.4 (http://koji.fedoraproject.org/koji/taskinfo?taskID=9493349).

Comment 14 Tim Waugh 2015-04-16 16:14:05 UTC
Note: I don't think any of the graphical HPLIP tools are meant to run as root, are they? The way it's supposed to work is that a udev rule grants the console user an ACL on the USB device node.

Comment 15 Adam Williamson 2015-04-16 16:16:36 UTC
er, yeah, they are, hp-plugin explicitly tells you to run it as root if you try and do anything else:

[adamw@adam Beta_RC3]$ hp-plugin 

HP Linux Imaging and Printing System (ver. 3.15.2)
Plugin Download and Install Utility ver. 2.1

Copyright (c) 2001-15 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

error: You must be root to run this utility.

Comment 16 Tim Waugh 2015-04-16 16:21:31 UTC
Ah, OK, I guess that one's special because it wants to write to root-owned directories.

I think I was getting confused with hp-toolbox, which shouldn't need to run as root.

Comment 17 Adam Williamson 2015-04-20 14:27:56 UTC
Thanks to Andrew Travneff, the graphical-app-shows-up-grey part of this bug is likely https://bugzilla.redhat.com/show_bug.cgi?id=1185893 .

Comment 18 Hans de Goede 2015-04-20 14:52:53 UTC
Hi,

About this being related to bug 1185893, this has been discussed on the xorg-devel list and we do not consider this an Xorg bug, the problem is lack of proper error checking of the MIT SHM extension related X calls in the app / toolkit. This actually is a feature because people are now getting proper protection of unauthorized accesses to their shared memory segments where before anyone could access them (as the X-server was doing the accessing and it ran as root).

Also gui apps should really not run as root, ever. I realize this is sometimes easiest, but we should not ship anything setup this way ootb and/or depending on this (running as root).

Note I've also discussed this with the some qt people and it is fixed in qt5, and currently there are no plans to fix this for qt4, there answer to this problem is: Do not run gui apps as root.

Note that there is a workaround  for qt4 described in bug 1185893:

kcalc --graphicssystem native

So this can be worked around by making the hplip utilities to the same from code, and / or modifying the launchers. This is a workaround though and in the long run the need to run gui code as root should really be dropped.

Regards,

Hans

Comment 19 Olivier Crête 2015-04-20 22:44:01 UTC
*** Bug 1213610 has been marked as a duplicate of this bug. ***

Comment 20 Fedora Update System 2015-04-21 19:07:23 UTC
hplip-3.15.2-9.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 21 Adam Williamson 2015-05-06 23:18:31 UTC
It now works OK as 'hp-plugin -i', but it still has the X problem in graphical mode. I'll file a new bug for that.

Comment 22 Sandro Bonazzola 2015-06-06 08:15:39 UTC
Reopening since it's still not working with hplip-3.15.2-9.fc22.x86_64. 

hplip-3.15.4-1.fc22.x86_64 works from command line in interactive mode, it's built in koji but not pushed to the repos.

Comment 23 Fedora Update System 2015-06-06 15:11:12 UTC
hplip-3.15.4-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/hplip-3.15.4-1.fc22

Comment 24 Fedora Update System 2015-06-07 16:01:32 UTC
Package hplip-3.15.4-1.fc22:
* should fix your issue,
* was pushed to the Fedora 22 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.4-1.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-9592/hplip-3.15.4-1.fc22
then log in and leave karma (feedback).

Comment 25 Fedora Update System 2015-06-24 16:05:35 UTC
hplip-3.15.6-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 26 amturnip 2015-07-18 22:01:21 UTC
hp-plugin still says "file does not match its checksum" and fails to install the "plugin" that would allow the printer to actually work.

$ rpm -q hplip
hplip-3.15.6-1.fc22.x86_64

$ sudo /usr/bin/hp-plugin -i 10.10.73.58

HP Linux Imaging and Printing System (ver. 3.15.6)
Plugin Download and Install Utility ver. 2.1

[...]

Do you wish to download and re-install the plug-in? (y=yes*, n=no, q=quit) ?   Option      Description                                       
  ----------  --------------------------------------------------
  d           Download plug-in from HP (recomended)             
  p           Specify a path to the plug-in (advanced)          
  q           Quit hp-plugin (skip installation)                

Enter option (d=download*, p=specify path, q=quit) ? 
-------------------
| DOWNLOAD PLUGIN |
-------------------

Checking for network connection...
Downloading plug-in from: 
Downloading plug-in: [\                                   ] 0%     error: Plugin download failed with error code = 8
error:  file does not match its checksum. File may have been corrupted or altered

Comment 27 Adam Williamson 2015-07-18 23:16:39 UTC
It worked for me, several times.

Comment 28 Jiri Popelka 2015-07-21 14:42:35 UTC
(In reply to amturnip from comment #26)
> Downloading plug-in: [\                                   ] 0%     error:
> Plugin download failed with error code = 8
> error:  file does not match its checksum. File may have been corrupted or
> altered

I can see several similar upstream reports, with a reply that Sourceforge site is down and to download & install the plugin manually.

https://bugs.launchpad.net/hplip/+bug/1475980
https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/1476011
https://bugs.launchpad.net/hplip/+bug/1476528

Comment 29 Robert Kuska 2015-08-18 10:16:29 UTC
I've contacted a HP and they claim that such bug is fixed already since 3.15.4 release of hplip, it should be safe now to drop hp-compat-lib package from hplip.

Quoting HP:
> This is fixed a few releases back, in 3.15.4 release. This bug was marked as duplicate of https://bugs.launchpad.net/bugs/1422004 , so you can see all the updates there.

Comment 30 Fedora Update System 2015-08-18 12:55:35 UTC
hplip-3.15.7-5.fc23 has been submitted as an update for Fedora 23.
https://admin.fedoraproject.org/updates/hplip-3.15.7-5.fc23

Comment 31 Fedora Update System 2015-08-19 07:57:17 UTC
Package hplip-3.15.7-5.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-5.fc23'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-13633/hplip-3.15.7-5.fc23
then log in and leave karma (feedback).

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

Comment 33 markusN 2015-09-07 19:41:35 UTC
Since I have the same issue on F22, I created a F22 RPM with copr (https://copr.fedoraproject.org/coprs/neteler/hplip/) using the SRPM from http://koji.fedoraproject.org/koji/packageinfo?packageID=205

Still there is a dependency issue:

dnf copr enable neteler/hplip
dnf update

hp-doctor
Saving output in log file: /tmp/hp-check.log

HP Linux Imaging and Printing System (ver. 3.15.7)
Dependency/Version Check Utility ver. 15.1
[...]
 Kernel: 4.1.6-200.fc22.x86_64 #1 SMP Mon Aug 17 19:54:31 UTC 2015 GNU/Linux
 Host: oboe.localdomain
 Proc: 4.1.6-200.fc22.x86_64 #1 SMP Mon Aug 17 19:54:31 UTC 2015 GNU/Linux
 Distribution: fedora 22
 Bitness: 64 bit
[...]

-------------------------
|  General Dependencies |
-------------------------

error: python3-notify2 Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL        -               -               MISSING    'python3-notify2 needs to be installed'

[...]

Hewlett-Packard-HP-LaserJet-Professional-P1102w
-----------------------------------------------
Type: Printer
Device URI: hp:/net/HP_LaserJet_Professional_P1102w?zc=hpcasa_a_frank
PPD: /etc/cups/ppd/Hewlett-Packard-HP-LaserJet-Professional-P1102w.ppd
PPD Description: HP LaserJet Professional P 1102w, hpcups 3.15.7, requires proprietary plugin
Printer status: printer Hewlett-Packard-HP-LaserJet-Professional-P1102w is idle.  enabled since Mon 07 Sep 2015 09:06:59 PM CEST
warning: plug-in status: Version mismatch
Communication status: Good

[...]
Missing Required Dependencies
-----------------------------
None

Missing Optional Dependencies
-----------------------------
error: 'PKG_FROM_PIP:notify2' package is missing/incompatible 

Plug-in Status
--------------
error: Plug-ins need to be installed
Total Errors: 1
Total Warnings: 3

Run 'hp-doctor' command to prompt and fix the issues. 
Done.

What am I missing?

Comment 34 Paulo Fidalgo 2015-10-11 11:12:39 UTC
Any chance to get the hplip-3.15.7-5 in FC22?

I cannot install the plugin... and so cannot use the printer

Comment 35 Jiri Popelka 2015-10-12 11:01:54 UTC
(In reply to markusN from comment #33)
> -------------------------
> |  General Dependencies |
> -------------------------
> 
> error: python3-notify2 Python libnotify - Python bindings for the libnotify
> Desktop notifications OPTIONAL        -               -              
> MISSING    'python3-notify2 needs to be installed'
> 
> What am I missing?

https://bugs.launchpad.net/hplip/+bug/1431880

(In reply to Paulo Fidalgo from comment #34)
> I cannot install the plugin... and so cannot use the printer

Maybe you are seeing bug #1249414 ?

Comment 36 Paulo Fidalgo 2015-10-12 11:20:15 UTC
I still can't find what is going on, because I was able to install on another FC22 computer.


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