qt.qpa.xcb: QXcbConnection: XCB error: on Raspberry Pi 3B
-
Hi,
Did you install everything from the package manager ?
-
Thanks for respond. Everything was installed on fresh copy of Raspberry Pi OS by commands below
sudo apt-get install qt5-default sudo apt-get install python3-pyqt5 sudo apt-get install pyqt5-dev-tools
then Project folder is copyed to:
/home/vlado/Project
in Project folder we call main.py to execute an app ...
-
Do you have the same issue if you just show a simple widget ?
-
Yes, on the begining of this post is posted small example of python code for login in, which perfectly demonstrate the problem.
-
What I meant is to run something that is really minimal just to ensure it's not something in your code that might do strange stuff.
Your code sample contains free functions that access an object created under the
__main__
which is not the cleanest of design. -
Ok, I will put together a simple example with only QT5 involved...
-
Here we are, I had SD card with fresh Raspbian OS installed (desctop version).
Only QT5 (version 5.15.2) installed with commands posted above and smallest possible code example.import sys from PyQt5.QtWidgets import QApplication, QWidget if __name__ == "__main__": app = QApplication(sys.argv) w = QWidget() w.resize(300,300) w.setWindowTitle("QT5 example") w.show() sys.exit(app.exec_())
Warning messages (2):
libEGL warning: DRI2: failed to authenticate qt.qpa.xcb: QXcbConnection: XCB error: 148 (Unknown), sequence: 191, resource id: 0, major code: 140 (Unknown), minor code: 20
-
Hi, just tried your example on my Raspberry Pi 4 and it works fine (I get a small blank window with the title "Qt5 example").
Don't know if it's relevant, but I'm still on Debian 10 (Buster) where the default distro Qt version is 5.11.3:
henry@tungware1:~ $ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster henry@tungware1:~ $ sudo apt-get install qt5-default Reading package lists... Done Building dependency tree Reading state information... Done qt5-default is already the newest version (5.11.3+dfsg1-1+rpi1+deb10u4). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. henry@tungware1:~ $ sudo apt-get install python3-pyqt5 Reading package lists... Done Building dependency tree Reading state information... Done python3-pyqt5 is already the newest version (5.11.3+dfsg-1+rpi1+b3). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I connect to my Raspberry PU using an old Samsung 22" monitor with just one HDMI connector and 1920x1080 resolution.
-
Well, you have an old release of Raspbian (10 Buster) and qt5 version 5.11.3 in my case Raspbian is the newest release 11 - Bullseye and qt5 version 5.15.2.
-
I don't have any monitor connected to RPi, I am working over VNC ... and with buster OS and qt5-5.11.3 no warning messages were appeared...
-
@SGaist said in qt.qpa.xcb: QXcbConnection: XCB error: on Raspberry Pi 3B:
Do you have the same issue if you just show a simple widget ?
Any news about this topic?
-
Can you give the full explanation of your work setup ?
You started with issues related to Xorg but now you wrote that you are connecting to your Pi through VNC.
How did you setup everything ?
Is it the exact same setup as with Debian 10 ? -
Thanks for your collaboration. I usualy did installation over ssh and everything worked ok until last update of raspbian. I did follow sugestions of yours and start fresh installation without enabled ssh and vnc. This time I got only one warning message shown below:
libEGL warning: DRI2: failed to authenticate
Is this one solvable, couse everything else works ok now?
Thanks for help,Vlado
-
This RaspberryPI Stack Exchange thread might help.
-
Update to topic: it seems that warning message below happends on RPi3B, but not on RPi3B+
qt.qpa.xcb: QXcbConnection: XCB error: 148 (Unknown), sequence: 191, resource id: 0, major code: 140 (Unknown), minor code: 20
I just took SD card with my app from my hardware system where RPi3B is heart of it and I put it into my test RPi3B+ and I noticed no such a warning message appeared in terminal...so it's strange...
For warning message:
libEGL warning: DRI2: failed to authenticate
I will do complete new SD software installation and result will be posted here...
Regards, Vlado