Bug 950285

Summary: hp-setup as root fails with "BadAccess (attempt to access private resource denied)" it works with "export QT_X11_NO_MITSHM=1"
Product: [openSUSE] openSUSE Tumbleweed Reporter: Flavio Castelli <fcastelli>
Component: OtherAssignee: E-mail List <bnc-team-screening>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: jsmeix
Version: Current   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 42.1   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Flavio Castelli 2015-10-14 07:35:24 UTC
Running hp-setup via YaST or even from the command line (xdg-su -u root -c hp-setup) results in a totally empty window to appear.

Running hp-setup as non-root user works fine, but of course it's not possible to change the system configuration.

These are the error messages printed to the stderr:

X Error: BadAccess (attempt to access private resource denied) 10
  Extension:    130 (MIT-SHM)
  Minor opcode: 1 (X_ShmAttach)
  Resource id:  0x16c
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 5 (X_ShmCreatePixmap)
  Resource id:  0xf9
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x3c00011
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x3c00011
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x3c00011


After googling a bit ([1] and [2]) I found that setting QT_X11_NO_MITSHM=1 solves the issue:

export QT_X11_NO_MITSHM=1
xdg-su -u root -c hp-setup


This happens both with tumbleweed and openSUSE leap milestone #2

[1] https://bbs.archlinux.org/viewtopic.php?id=187234
[2] https://bugs.archlinux.org/task/42030?project=5
Comment 1 Johannes Meixner 2015-10-14 09:33:01 UTC
Issues related to X11 or Qt do not belong to the "Printing"
component in Bugzilla.

There is nothing what I can do for X11 or Qt related issues.
I am not at all a sufficient X11 or Qt expert to debug or
even fix it when something does not work there.

As far as I see the issue is not specific for openSUSE
but a generic issue that must be fixed at HPLIP upstream.

In general regarding HPLIP:

We (i.e. openSUSE) distribute HP's HPLIP software
but we do not develop it.

In case of issues with HPLIP please report them directly to HP via
http://hplipopensource.com/hplip-web/support.html

Preferably post an URL to your upstream issue report here
as reference.


FWIW:

In
https://bugs.archlinux.org/task/42030?project=5
I found at "Comment by sin3t (sin3t) - Friday, 09 January 2015, 20:35 GMT"
link to
https://www.raspberrypi.org/forums/viewtopic.php?f=33&t=78672
which again provides links to some openSUSE issues in particular
bug#807781 which seems to show same kind of error messages.

I do not know if an automated "export QT_X11_NO_MITSHM=1"
could be a security issue?
I think there is a reason why it does no longer "just work".
Comment 2 Johannes Meixner 2015-10-14 10:01:03 UTC
FYI:

https://bugs.launchpad.net/backintime/+bug/1493020
reads (excerpt):
-----------------------------------------------------------------------
The reason is an bug in Qt4
-----------------------------------------------------------------------

If this is correct, it is an issue in Qt4 that must be fixed there
and not at HPLIP upstream (but I am not at all a sufficient expert
in this areas to make a sound statement here).
Comment 3 Flavio Castelli 2015-10-14 14:47:43 UTC
Thanks a lot for the new link.

I'll mark this bug as a duplicated of bnc#807781.

*** This bug has been marked as a duplicate of bug 807781 ***