[SOLVED] QmlProfiler : Plugin initialization failed: Cannot create OpenGL context

Issue

I use Qt 6.2.2 in ubuntu 20.04 and I install OpenGL like this:

sudo apt install libgl1-mesa-dev

After I install my graphics card driver (NVDI 470.86) I get this error each time I open QtCreator IDE.

why did this happen and how can I fix this?

I cant compile examples that use qt quick like Qt Quick 3D – Custom Materials Example

QML debugging is enabled. Only use this in a safe environment.
qt.quick3d.general: Unable to find ideal GL version. QGLXContext:
Failed to create dummy context QRhiGles2: Failed to create temporary
context QRhiGles2: Failed to create context Failed to create RHI
(backend 2) Failed to initialize graphics backend for OpenGL.

output pictures:

picture error 1

picture error 2

output from glxinfo | egrep -i version

enter image description here

Solution

Had the same problem since this morning. Not sure why this worked (any contribution is appreciated), but I solved it by adding my user to the video group and rebooting:

sudo usermod -a -G video *username*

Answered By – merosss

Answer Checked By – Clifford M. (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *