Failed to make OpenGL context current. Cannot query OpenGL information.

When I run manually-compiled versions of Ovito, I get the following error:

Failed to make OpenGL context current. Cannot query OpenGL information.

This issue is also reported by others downstream in the comments of the Ovito package on the Arch User Repository, with someone remarking that this issue happened with the update of mesa to version 21.3.5.

Interestingly, the provided pre-built binaries of Ovito work fine, without this error.

System info:

Operating System: Arch Linux
Qt Version: 5.15.2
Graphics Platform: Wayland
Mesa: 21.3.6

Edited by Lars Veldscholte