Using OpenGL results in libEGL warning: DRI2: failed to authenticate


I am trying to start to use OpenGL with wxPython on Linux.

For testing I use this script:

After installing PyOpenGL and necessary dependancies (libgl1-mesa-dev, libglu1-mesa-dev and libegl1-mesa-dev) listed in:
(sudo apt install /package/)

I am able to start the script. The frame appears but i get an error “libEGL warning: DRI2: failed to authenticate”.

This problem occurs on my PC with Debian 10 Buster based system and wxPython 4.1.1.

On my Raspberry with wxPython 4.2.0 problem does not occure. On another Raspberry with wxPython 4.1.1 problem does not occure as well, I didn’t even install dependencies mentioned in wxwidgets page and code works fine (both rpis have Debian 11 Bullseye based OS).

What am I missing?