Panda does not pass on the environment variables to the Python program in the .p3d environment, which is why setting LIBGL_DEBUG is not doing anything. This may actually be part of the problem - it might be possible that your OpenGL driver requires a certain environment variable to be set in order to work properly, and the fact that Panda’s not setting it is what makes it fail. This is why I asked for the ‘env’ output.
The “OPENGL_PROFILE=xorg-x11” variable sounds like a good candidate. Can you run OpenGL apps such as glxgears after first unsetting this variable? If that fails with the same issue, we know that we should let Panda pass this variable to the child process. If not, then you could try unsetting various env vars that seem related until you can reproduce the problem in a simple OpenGL app such as glxgears.
Perhaps a “locate r600” or “locate swrast” may give us some clue about where it’s trying to load the driver from.