Is there a workaround when GL is not working?

In my Ubuntu 22.04 computer, I have an old computing GPU and a display GPU, both of them NVIDIA. Long story short: I had to set the driver display to “nouveau” instead of “NVIDIA”, and as a consequence, glxgears / glxinfo does not work. Other than that, everything else in my Xwayland Ubuntu desktop works, web browsers too, Office, etc.
Now I downloaded 3DSlicer, and when opening it, splashscreen shows fine, but later, it just produces an empty screen. I can click on the dialogs to open/close File, but everything inside is transparent, I see my desktop instead.
The terminal keeps showing this error infinitely:

QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
composeAndFlush: makeCurrent() failed

Is there a way to define an environment variable to make 3D Slicer work in this type of situation, bypassing the need for GL?

Thanks in advance.

Yes, there are fallback options but there’s no easy recipe for configuring linux drivers (lots of forums with questions and answers that sometimes work and sometimes don’t). Probably the easiest in my experience would be to use software rendering in Docker (the SlicerDockers should still work fine. They haven’t been updated to the latest Slicer, but it’s easy to install once you have the environment running).

Sometimes export "LIBGL_ALWAYS_INDIRECT=1" helps.

But as @pieper said there are some many variables it is hard to find a consistent recipe.