Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does using Xvfb to run OpenGL effects version?

I'm trying to run OpenGL on headless ubuntu server.

  • GPU / Driver : NVIDIA Geforce GTX 1080Ti / version 418.67
  • Using freeglut (installed by running apt install freeglut3-dev)
  • Using Xvfb (Since it is a headless server.)

When I run glxinfo | grep "OpenGL version", it says OpenGL version string: 3.1 Mesa 19.2.8. So, I am unable to run a code that requires OpenGL 3.3.

Since driver 418.67 is not latest, I could consider updating the driver, but I wanted to make sure if this could do something with Xvfb. Can using Xvfb can effect the driver and the OpenGL version it supports when I make a gl context with Xvfb running? Or it has nothing to do with it and only thing I can do is updating the driver?

like image 223
tink Avatar asked Oct 24 '25 15:10

tink


1 Answers

Xvfb is an X server which whole purpose is to provide X11 services without having dedicated graphics hardware (i.e. a GPU). So it's the exact opposite of what you want.

Either don't use X11 at all and create a headless EGL OpenGL context: https://devblogs.nvidia.com/egl-eye-opengl-visualization-without-x-server/

Or use the "regular" Xorg server on the GPU without a display and input devices attached (you actually might want to disable automatic input device attachment in the configuration).

Personally I'd go with headless EGL.

like image 188
datenwolf Avatar answered Oct 26 '25 06:10

datenwolf



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!