Does using Xvfb to run OpenGL effects version?
Asked Answered
G

1

3

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?

Gastropod answered 4/3, 2020 at 8:18 Comment(0)
H
3

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.

Hoodoo answered 5/3, 2020 at 9:24 Comment(3)
The code I want to run uses glut. (python OpenGL.GLUT). Is it possible to use headless EGL context easily with the code written with glut? Or could you point me to more information about the second option (regular Xorg server without display and input devices) ? Thank you for your response!Gastropod
What do I do if I don't have a GPU for a game?Sinistrad
@Sinistrad I think I don't fully understand your question. Normally you'd want to run a game on a screen – and not in a headless environment at Xvfb is creating. If your remark is about running games without a GPU, then this the wrong question to address. Xvfb is meant for providing a graphical environment on systems that don't have display attach to at all (think servers, cloud VMs, stuff like that).Hoodoo

© 2022 - 2024 — McMap. All rights reserved.