Webots headless in Docker on AWS g4dn falls back to Mesa instead of NVIDIA GPU when using Xvfb #6921
QuangPhamSTEAMforVietNam
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Why does Webots running headless inside Docker on AWS g4dn fall back to Mesa software rendering instead of using the NVIDIA GPU, even though the simulation loads successfully and clients can connect?
I am running Webots headless inside Docker on an AWS EC2 g4dn instance. The container starts correctly, Xvfb is initialized on display :99, the Webots world loads successfully, and remote clients are able to connect to the simulation without issues. However, Webots always detects the GPU vendor as Mesa/X.org and falls back to software rendering, even though the instance is equipped with an NVIDIA GPU.
This behavior is fully reproducible by running Webots headless with Xvfb inside Docker on a g4dn instance. In this setup, Webots runs via Qt using the xcb platform plugin, and OpenGL is initialized through Mesa instead of NVIDIA. As a result, Webots reports that the system is below the minimal requirements and automatically disables shadows, anti-aliasing, global ambient occlusion, and reduces texture quality. There is no crash; the simulation continues to run and stream normally, but without GPU acceleration.
Based on similar reports (for example: https://robotics.stackexchange.com/questions/24174/headless-mode-with-gpus

), this appears to be related to Xvfb not supporting NVIDIA hardware OpenGL, which forces Qt/OpenGL applications to fall back to Mesa software rendering. I would like to confirm whether this behavior is expected in headless Docker environments using Xvfb, and whether there is a recommended or supported way to run Webots headless with GPU acceleration on AWS, or if software rendering is the only viable option in this architecture.
Beta Was this translation helpful? Give feedback.
All reactions