# Is there a workaround when GL is not working?

**URL:** <https://discourse.slicer.org/t/is-there-a-workaround-when-gl-is-not-working/41056>\
**Category:** Support\
**Created:** [January 13, 2025, 11:48am UTC](https://discourse.slicer.org/t/is-there-a-workaround-when-gl-is-not-working/41056 "2025-01-13T11:48:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ferhue](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ferhue/32/82557_2.png) [@ferhue](https://discourse.slicer.org/u/ferhue)\
**Post date:** [January 13, 2025, 11:48am UTC](https://discourse.slicer.org/t/is-there-a-workaround-when-gl-is-not-working/41056/1 "2025-01-13T11:48:46Z")

</div>

In my Ubuntu 22.04 computer, I have an old computing GPU and a display GPU, both of them NVIDIA. [Long story](https://askubuntu.com/questions/1442001/cuda-8-and-gcc-5-on-ubuntu-22-04-for-tesla-c2070) 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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [January 13, 2025, 3:55pm UTC](https://discourse.slicer.org/t/is-there-a-workaround-when-gl-is-not-working/41056/2 "2025-01-13T15:55:42Z")

</div>

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](https://github.com/pieper/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).

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [January 13, 2025, 10:04pm UTC](https://discourse.slicer.org/t/is-there-a-workaround-when-gl-is-not-working/41056/3 "2025-01-13T22:04:51Z")

</div>

Sometimes `export "LIBGL_ALWAYS_INDIRECT=1"` helps.

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