Recently, I highlighted an issue in multiple Unity games where the graphics were distorted on Linux with using an NVIDIA GPU and I offered some workarounds. I now have an update on the issue to share from both Unity and NVIDIA.
Firstly, on the Unity side at least some of it was a confirmed bug in Unity's handling of OpenGL. The bug report that was opened as a result of my chats with Unity, has noted that it's now solved in Unity 2019 and the fix should also be landing in Unity 2018.3.2f1.
However, until developers using the Unity game engine upgrade it's still going to be a problem. While there are workarounds (like forcing Vulkan or a specific OpenGL version), they might not always work or end up causing other issues. To help with this, NVIDIA told me today they will be including a new environment variable in future driver releases. It's not in a driver yet (to be clear), but in future you will be able to set this environment variable "__GL_IgnoreInvalidateFramebuffer=1" to have the NVIDIA driver completely ignore the bad calls from Unity.
NVIDIA said they don't want to make specific application profiles, however if the community is willing to create them they could ship them with their driver to give a better experience out of the box. To make them, you can do so in the NVIDIA control panel and it looks simple enough to do. However, here's an example that you would find in your "/home/username/.nv/nvidia-application-profiles-rc" file to give you an idea:
{ "profiles" : [ { "name" : "IgnoreInvalidateFramebuffer", "settings" : [ "IgnoreInvalidateFramebuffer", 1 ] } ], "rules" : [ { "pattern": "Nine Nines.x86", "profile" : "IgnoreInvalidateFramebuffer" }, { "pattern": "Nine Nines.x86_64", "profile" : "IgnoreInvalidateFramebuffer" } ] }
To talk more about it with NVIDIA, you can do so in this post on the NVIDIA forum.
Good to see both NVIDIA and Unity work towards solutions!
QuoteNVIDIA said they don't want to make specific application profiles, however if the community is willing to create them they could ship them with their driver to give a better experience out of the box.
Sounds like something that should be setup on Github (or the like) today. (I won't have the time, though.)
Quoting: x_wingWeird that this problem doesn't affects Mesa if there is an error in the API usage by Unity.Mesa does not implement glInvalidateFramebuffer (except the error handling bits). That's okay since this function doesn't *need* to have any observable side effects.
The other way around isn't exactly uncommon either (stupid shit running fine on Nvidia but not Mesa, like Divinity Original Sin). People are going to blame drivers either way though.
Last edited by YoRHa-2B on 16 January 2019 at 3:09 pm UTC
QuoteAdded support for the following GPU:
GeForce RTX 2060
Added a new kernel module parameter, NVreg_RestrictProfilingToAdminUsers, to allow restricting the use of GPU performance counters to system administrators only.
Quoting: YoRHa-2BQuoting: x_wingWeird that this problem doesn't affects Mesa if there is an error in the API usage by Unity.Mesa does not implement glInvalidateFramebuffer (except the error handling bits). That's okay since this function doesn't *need* to have any observable side effects.
The other way around isn't exactly uncommon either (stupid shit running fine on Nvidia but not Mesa, like Divinity Original Sin). People are going to blame drivers either way though.
Thanks for the clarification.
I think that the other way around it's more common because Nvidia is more relaxed with the OGL API and because the majority of the devs only use Nvidia proprietary driver for QA. But well, once in a while Nvidia users feels the devs bad support pain :P
Last edited by x_wing on 16 January 2019 at 4:09 pm UTC
For example, on xcom 2, I have to click below the menu buttons to get them to work. Happened on Tomb Raider too but a flip between windowed and full screen used to fix that one. Not on xcom though ☹️
See more from me