The docs show that there are Windows/Mac options for using a specific graphics device. How can I do the same with Linux?
My use-case is running it in an Ubuntu Docker container which is exposing the host’s Nvidia GPU. However, Unity is not detecting the Nvidia GPU automatically.
As far as I can tell only Metal on OSX has the command line switch for a graphics device. For the other platforms you have to make do with the tools made available by the platforms themselves.
So in 2019.3 we have added support for all platforms to be able to specify which GPU you can target, for Linux it would be Vulkan only support since on openGL there is not a clear way to make this happen without vendor specific ext or creating a X session for each window and then a context for each window etc… which is not something Unity supports.
force-device-index would be the commandline for that.
Awesome, thanks!
For anyone else who is looking in the mean-time: set the DISPLAY environment variable your GPU-accelerated display and Unity should be able to pick it up from there.