We do often include affiliate links to earn us some pennies. See more here.

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!

Article taken from GamingOnLinux.com.
Tags: NVIDIA, OpenGL, Unity
21 Likes
About the author -
author picture
I am the owner of GamingOnLinux. After discovering Linux back in the days of Mandrake in 2003, I constantly came back to check on the progress of Linux until Ubuntu appeared on the scene and it helped me to really love it. You can reach me easily by emailing GamingOnLinux directly. Find me on Mastodon.
See more from me
The comments on this article are closed.
9 comments

Eike Jan 16, 2019
View PC info
  • Supporter Plus
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.)
x_wing Jan 16, 2019
Weird that this problem doesn't affects Mesa if there is an error in the API usage by Unity.
YoRHa-2B Jan 16, 2019
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
Comandante Ñoñardo Jan 16, 2019
In the meantime, a new Nvidia Driver is here. the 415.27

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.
x_wing Jan 16, 2019
Quoting: YoRHa-2B
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.

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
14 Jan 17, 2019
View PC info
  • Supporter Plus
I'm happy to hear the green folks with have a better experience soon. :)
Gazoche Jan 17, 2019
View PC info
  • Supporter
Yay ! Thank you Liam ! Good job ! :)
Phlebiac Jan 17, 2019
With all the various Unity bugs, a wiki page listing them, with workarounds and games affected, could be quite useful info.
Raven Jan 26, 2019
Will this fix the weird graphical big I get where buttons and their hit boxes don't align?
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 ☹️
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
The comments on this article are closed.