Skip to content

Instantly share code, notes, and snippets.

@ha7ilm
Last active March 5, 2023 16:47
Show Gist options
  • Save ha7ilm/9b51300967d85c1594b51b60cb08763a to your computer and use it in GitHub Desktop.
Save ha7ilm/9b51300967d85c1594b51b60cb08763a to your computer and use it in GitHub Desktop.
Fix Qt related Viber crash on Ubuntu

I was getting the following error message while trying to run Viber on Ubuntu:

Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile) 
[1]    929803 abort (core dumped)  /opt/viber/Viber

Solved by running:

QT_QUICK_BACKEND="software" /opt/viber/Viber

...this disables hardware acceleration though, but I don't really care that much. I want to use it to type text and send it to people, not for advanced 3D stuff. 😉

You can test glxgears though, if it doesn't work, there is something with the graphics driver probably.

@EmilPi
Copy link

EmilPi commented Mar 5, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment