XCB Error when using X-forwarding
I'm developing a Qt5-based application for data analysis on a remote RHEL7 machine, and I'm having problems with XCB not properly detecting the screen, resulting in crashes and odd window/widget behavior. I'm connecting via PuTTY from a Windows 7 machine using Xming, however I've confirmed this problem also exists when remoting from a Ubuntu 14.04 machine. When I run my application (compiled with cmake), these messages come up just before the window appears:
When connecting from Windows 7:
failed to get the current screen resources
QXcbConnection: XCB error: 170 (Unknown), sequence: 161, resource id: 90, major code: 146 (Unknown), minor code: 20
When connecting from Ubuntu 14.04:
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: i965
In both cases, the application runs and I can interact with the window, but it occasionally crashes - seems random when interacting with combo boxes, input fields, etc - and it also doesn't update/repaint properly, so sometimes I resize the window and it doesn't draw portions of it. I believe this has something to do with the configuration of the RHEL7 server rather than a bug in Qt itself, but it's hard for me to pinpoint.
Some background: I'm using the Qt5.5 libraries, which I installed via the instructions here: https://wiki.qt.io/Building_Qt_5_from_Git#Getting_updates
I did this about a week ago (June 2, 2015) so I should be using the newest, or close to the newest, version of the source.
I found this related bug, which almost exactly describes the behavior I'm seeing: https://bugreports.qt.io/browse/QTBUG-31389
However, this was resolved a few months ago and should no longer be an issue in Qt5.5.0.
I confirmed that I'm actually using the Qt5.5 libraries - when I run make, this is shown in the output:
/usr/bin/c++ -W -Wall -pedantic -fPIC -pthread -m64 -std=c++11 CMakeFiles/GIAnalysis.dir/bin_src/GIAnalysis.cc.o CMakeFiles/GIAnalysis.dir/GIAnalysis_automoc.cpp.o -o GIAnalysis -rdynamic lib/libgialib.so lib/libanalib.so -L/da ta/nmdc/gammaImaging/root/lib -lGui -lCore -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic /data/nmdc/gammaImaging/qt5/qtbase/lib/libQt5Core.so.5.5.0 /data/nmdc/gammaImaging/qt5/qtbase/lib/libQt5Widgets.so.5.5.0 /data/nmdc/gammaImaging/qt5/qtbase/lib/libQt5Gui.so.5.5.0 /data/nmdc/gammaImaging/qt5/qtbase/lib/libQt5Core.so.5.5.0 -m64 -Wl,-rpath,/data/nmdc/gammaImaging/analib-bu ild/lib:/data/nmdc/gammaImaging/qt5/qtbase/lib
I'm not really sure where to go from here. Other applications (ie. ROOT, the libraries of which I'm compiling against above) work fine over the X-forwarding. This seems to be specifically a problem with Qt/XCB and the way it's handling the screens. Obviously, my $DISPLAY is set properly because other applications work:
$ echo $DISPLAY
Maybe it's a settings problem? Here's the output of xrandr:
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 3840 x 1080, current 3840 x 1080, maximum 3840 x 1080
default connected 3840x1080+0+0 0mm x 0mm
I've looked around quite a bit online but haven't been able to find anything on this specific issue. If anyone has any ideas for troubleshooting steps I can take, please help! Thanks for your time, your assistance is appreciated.
I'm having a similar problem, but not exactly the same. I'm using FastX 1.0.39 to connect remotely to a linux machine with Red Hat 7.1 that has Qt 5.5 on it. Qt works fine when I am using the Linux machine in person, but when I'm connected remotely I get the following error when a program opens:
QXcbConnection: XCB error: 146 (Unknown), sequence: 163, resource id: 0, major code: 139 (Unknown), minor code: 20
The initial window in my program opens, but the when the program tries to open a second window, the program freezes. I found a bug report that was closed in March also concerns remote connections, xcb errors, and screen problems:
Did you solve your problem, nakedmind? Has anyone else found a fix to a similar bug? I just installed 5.5 last week: would that include the bug fix listed in the link above (which refers to 5.5.0 Beta)? If not, how would I install the Beta version to see if that addressed my problem?
PS. I'm new on this forum, so please let me know if I should be addressing this elsewhere, or if I need to make a bug report of some kind.
Any one knows how to fix that? I have the same problem with Qt5.8.