Corruption in Scene view when using URP in OpenGL on Linux (2022.2.3f1, 2022.2.5f1, 2022.2.6f1)

I am running Unity on Ubuntu 22.04.1 LTS. The laptop’s graphics card is a nVidia 1050Ti. Until recently I have been able to develop in Unity without problems.

I recently attempted to upgrade Unity from 2022.2.3f1 to 2022.2.5f1, and then later to 2022.2.6f1. Both .5f1 and .6f1 showed a strange visual glitch where every time the frame updated, there would be a roughly 50/50 chance for a triangle covering the upper left corner of the viewport to be grey rather than fully rendered, like this:

This problem would only occur in the Scene view, and not the Game tab. Uninstalling the URP package would stop it. I tried installing HDRP, and it did not seem to have the bug.

In an attempt to fix this problem, I tried to upgrade my graphics drivers from nvidia-driver-515 to nvidia-driver 525. Unfortunately, this caused various problems on my system, so I rolled the driver back to nvidia-driver-515.

Since fiddling with the driver, the graphics problems have become much more severe, and the new problems affect 2022.2.3f1 as well. Now, the pixels alternate between bright red, and no red at all. In an existing project this creates a pattern of random lines:


If I create a new URP project with default settings, the red and blue pattern instead consists of random dots.

I have no idea what is causing this, or even how to begin to diagnose the problem. I have tried changing settings in Project Settings and the URP Asset to mostly no effect.

Both problems can be circumvented by changing the graphics API from OpenGL to Vulkan. So, I can continue development using Vulkan. However, since Unity’s default setting is to use OpenGL, and this seems like a significant (if potentially hard to reproduce) bug, I want to report the issue, and create a thread for other people with this issue to potentially find.

I am able to run glmark2 without issue, and run other 3D games, so I believe this is not a general problem with OpenGL on my system. Please tell me if there is any other diagnostic information I can provide.


After switching my NVidia PRIME settings to Performance mode and rebooting, I’ve been able to solve the blue and red pixels issue, but not the flickering grey triangle. Essentially it is back in the state it was before the attempt to update my drivers. I’m not sure whether the settings change or the reboot was the important part there.

On Manjaro linux with a Ryzen 5 2600 and a GeForce 1070 Ti, I get the same issue while using URP on any version >2022.2.3f1, including 2023.1.0b5.

Same issue on Ubuntu linux with an intel card. Had the red lines, but not the gray triangle. Switched to Vulkan and it seems to have fixed everything.

Can also confirm the grey triangle issue on Manjaro Linux KDE (using Nvidia driver). Switching to Vulkan (-force-vulkan) can fix the issue, but will also make Unity hang when switching to other app (e.g. Firefox).

Can confirm the flickingering grey triangle bug is still there in Unity 2022.2.14f1 / URP 14.0.7

Man any solutions to this? This bug is making working on my project impossible…

I’d like to point out the problem only exists when using the URP, when using unity’s default renderer the graphical artifacts does not occur.

Hey, thanks for reporting the issue. This is a known bug and has been fixed in 2023.2.0a10. Currently the fix is being backported to 2022.2 and hopefully will land soon.

Thanks for the update!
If you could post here when the 2022.2 fix version is known, that would be most appreciated.

Cheers,

The fix has landed in 2022.2.17f1, and it may take two weeks or so for that version to be released. Let us know if the issue still persists. Thanks!

Just wanted to say that 2022.2.17 has been made available yesterday, and that the bug is indeed fixed!
Thanks for your help @N7RX_Y

I’m using 2022.2.20 (issue also existed in 18 and 19, but I haven’t tried 17) and the problem is not fixed for me. Editor looks fine for non-URP, and game mode works fine too.

@N7RX_Y

Hi. Do you mean the grey triangle problem?

No, I’m having the red artifacts problem from the second picture, although my pattern looks a bit different.

Then I am afraid it is more likely a Linux driver bug, according to what is described in #2.

On a side note, OpenGL is slowly being phased out from Unity except for Android, so the maintenance resource on it is relatively thin.

i can confirm scene view red patterns bug, using unity 2022.3.3 on ubuntu 23.04. game view is fine on urp and everything is ok on non-urp projects.

I’d like to add to the discussion by confirming that the above mentioned cyan artifacts appear on an old mac computer with openGL 3.3 on Unity versions 2022.3.3f1 and 2023.1.0a18 (that I have installed) and 3d projects with URP pipeline (no bug with the built-in 3d core), but NOT on version 2022.1.23f1 which I had installed some months ago. What’s different between those versions that might cause the problem?
I also noticed that the glitch disappears when switching from shaded view to wireframe.

1- open unity hub, click on projects from left
2- right click on your project(or 3dots on right side) and select “Add command line args”
3- copy and paste this:
-force-vulkan
4- select save and open your project. that’s it.

last but not least unity should care more about linux, because many of developers consider using linux. nowdays even amateur users are using linux thanks to ubuntu and it’s community is going bigger and bigger.

Since I am currently using Mac OS, although similar systems to some extend, I don’t think Vulcan will do in my case. (I also just formatted my computer and it’s not yet available for testing). Moreover my graphics card does not support Metal, which is the alternative for macs. Apart of the general fact that OpenGL is becoming deprecated, I am curious what is that much different between versions 2022.1 and 2022.3 that generates this problem. Also why the glitch appears in scene view and not in play mode.

Other than that I fully agree with your sayings about Linux.

EDIT: The striked assumption of mine is not true after all. It is eventually a problem with mac os 10.15 (Catalin) to which I upgraded recently. Before that OS I had the 10.14 version and the issue was not present in Unity version 2022.1. Now, with Catalina, a tried a bunch of Unity versions and only version 2021.1.28 was fine with URP. So the remaining questions are: What’s the difference between scene view and play mode (although in one relatively big scene I had the cyan artifacts in play mode too) and one is glitched while the other is clean, and Why is it happening in URP and not Built-in.