How do I fix a MESA-LOADER error while running pyqt5 on raspbian 9 stretch?

0

I want to ensure that pyqt5 is working properly on my raspberry pi. When I try to run a tutorial producing a simple window, the code produces the desired results but an error message is thrown. The tutorial in question is from http://zetcode.com/gui/pyqt5/firstprograms/. The tutorial code is included at the end of this post.

The error message I get is

MESA-LOADER: device is not located on the PCI bus
MESA-LOADER: device is not located on the PCI bus
MESA-LOADER: device is not located on the PCI bus
qt5ct: using qt5ct plugin
inotify_add_watch("/home/pi/.config/qt5ct") failed: "No such file or directory"

The operating system is “Raspbian GNU/Linux 9 (stretch)" on which I have installed “Qt version 5.7.1”. The IDE is “Thonny” on which I am running “Python 3.5.3”.

I installed pyqt5 by running the following code:

sudo apt-get update
sudo apt-get install qt5-default pyqt5-dev pyqt5-dev-tools

Here is what I have tried.

The sources https://raspberrypi.stackexchange.com/questions/84703/qcamera-get-error-mesa-loader-failed-to-retrieve-device-information and https://github.com/RPi-Distro/repo/issues/89 suggested to update the libdrm.

I updated libdrm using these instructions https://github.com/anholt/mesa/wiki/VC4-complete-Raspbian-upgrade#libdrm. I ignored the instructions before the libdrm section. I was able to update libdrm without error messages. The result was changing the error message to the one listed above. Before updating libdrm, the error message was:

MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
qt5ct: using qt5ct plugin
inotify_add_watch("/home/pi/.config/qt5ct") failed: "No such file or directory"

Therefore, updating libdrm changed “failed to retrieve device information” to “device is not located on the PCI bus”.

I wanted to update Mesa to the newest version. For that, I wanted to check the currently installed Mesa version using the following terminal input:

glxinfo | grep "OpenGL version"

The output was:

libGL error: MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
OpenGL version string: 2.1 Mesa 13.0.6

This showed me that I am running Mesa version 13.0.6, while the most recent version is 19.0.0. I tried updating Mesa using these instructions: https://github.com/anholt/mesa/wiki/VC4-complete-Raspbian-upgrade#mesa. I ignored the instructions before the Mesa section. The code executed without error messages up to the “make” command, where the following error message was thrown:

make: *** No targets specified and no makefile found.  Stop.

Even knowing where to dig deeper would be a big help for me. Should I look into reinstalling pyqt5 or focus mainly on Mesa?

Code:

#!/usr/bin/python3
# -*- coding: utf-8 -*-

import sys
from PyQt5.QtWidgets import QApplication, QWidget

if __name__ == '__main__':

    app = QApplication(sys.argv)

    w = QWidget()
    w.resize(250, 150)
    w.move(300, 300)
    w.setWindowTitle('Simple')
    w.show()

    sys.exit(app.exec_())

Leon K.

Posted 2019-02-05T10:09:46.723

Reputation: 1

No answers