Search Unity

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

Discussion in 'Universal Render Pipeline' started by canmom, Feb 13, 2023.

  1. canmom

    canmom

    Joined:
    Nov 6, 2022
    Posts:
    7
    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:
    Screenshot from 2023-02-12 22-38-24.png

    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:

    Screenshot from 2023-02-13 00-09-37.png
    If I create a new URP project with default settings, the red and blue pattern instead consists of random dots.
    Screenshot from 2023-02-13 00-48-27.png
    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.
     

    Attached Files:

  2. canmom

    canmom

    Joined:
    Nov 6, 2022
    Posts:
    7
    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.
     
  3. yvbenn

    yvbenn

    Joined:
    Oct 13, 2017
    Posts:
    1
    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.
     
  4. TheTheGreat

    TheTheGreat

    Joined:
    Dec 17, 2022
    Posts:
    1
    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.
     
  5. mockolate

    mockolate

    Joined:
    Feb 12, 2023
    Posts:
    1
    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).
     
    GilberM likes this.
  6. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Can confirm the flickingering grey triangle bug is still there in Unity 2022.2.14f1 / URP 14.0.7
     
  7. bkosten

    bkosten

    Joined:
    Mar 3, 2023
    Posts:
    2
    Man any solutions to this? This bug is making working on my project impossible...
     
  8. bkosten

    bkosten

    Joined:
    Mar 3, 2023
    Posts:
    2
    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.
     
  9. N7RX_Y

    N7RX_Y

    Unity Technologies

    Joined:
    Jun 29, 2020
    Posts:
    9
    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.
     
    frbrz and ph_ like this.
  10. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Thanks for the update!
    If you could post here when the 2022.2 fix version is known, that would be most appreciated.

    Cheers,
     
    N7RX_Y likes this.
  11. N7RX_Y

    N7RX_Y

    Unity Technologies

    Joined:
    Jun 29, 2020
    Posts:
    9
    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!
     
    ph_ likes this.
  12. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    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
     
    N7RX_Y likes this.
  13. Zoodinger

    Zoodinger

    Joined:
    Jul 1, 2013
    Posts:
    43
    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
     
  14. N7RX_Y

    N7RX_Y

    Unity Technologies

    Joined:
    Jun 29, 2020
    Posts:
    9
    Hi. Do you mean the grey triangle problem?
     
  15. Zoodinger

    Zoodinger

    Joined:
    Jul 1, 2013
    Posts:
    43
    No, I'm having the red artifacts problem from the second picture, although my pattern looks a bit different.
     
  16. N7RX_Y

    N7RX_Y

    Unity Technologies

    Joined:
    Jun 29, 2020
    Posts:
    9
    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.
     
  17. afshin_a_1

    afshin_a_1

    Joined:
    Apr 26, 2015
    Posts:
    51
    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.
     
    TEMPE5T likes this.
  18. dot_entity

    dot_entity

    Joined:
    Nov 2, 2012
    Posts:
    86
    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.
     
  19. afshin_a_1

    afshin_a_1

    Joined:
    Apr 26, 2015
    Posts:
    51
    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.
     
  20. dot_entity

    dot_entity

    Joined:
    Nov 2, 2012
    Posts:
    86
    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.
     
    Last edited: Jul 6, 2023
  21. TEMPE5T

    TEMPE5T

    Joined:
    Jul 5, 2023
    Posts:
    1
    The editor crashes soon after it starts in my case; running on Iris XE Graphics, no dedicated card. Should I switch editor version?
     
  22. wwWwwwW1

    wwWwwwW1

    Joined:
    Oct 31, 2021
    Posts:
    767
    Have you tried upgrading the graphics driver version?
     
  23. frbrz

    frbrz

    Joined:
    May 10, 2016
    Posts:
    76
    i think It makes more sense using linux than windows as a developer point of view, since cross-platform windows/linux/mac is guaranteed to work well when you develop on linux, so this includes Valve's new console and multiplayer servers. besides, the best ide for C# right now is rider, so you're not losing anything.

    Try with the latest 2021.3 LTS. I didn't have this problem with opengl when I used 2021.3.27f1.

    In my case it didn't make a difference. Using the latest nvidia 535.



    Just for the record, forcing vulkan worked for me.
     
    Mimasd likes this.
  24. wwWwwwW1

    wwWwwwW1

    Joined:
    Oct 31, 2021
    Posts:
    767
    If it's (confirmed to be) a driver issue related to OpenGL, you can report this to Nvidia (your GPU vendor) and they might fix this.

    Anyway, I suggest switching to Vulkan if possible because AFAIK URP + OpenGL doesn't support:
    • Deferred rendering path
    • Rendering Layers (Light + Decal Layers)
    • Decals
    • Other modern graphics features
     
    frbrz likes this.
  25. frbrz

    frbrz

    Joined:
    May 10, 2016
    Posts:
    76
    I didn't know that. Thank you!
     
    wwWwwwW1 likes this.
  26. figueiredo_igor

    figueiredo_igor

    Joined:
    Aug 18, 2022
    Posts:
    1
    This worked for me, thank youuu
     
    lightenlion likes this.
  27. ALherbier

    ALherbier

    Joined:
    Sep 1, 2020
    Posts:
    8
    Forcing Vulkan instead of OpenGL worked for me too ! Thanks for the workaround
     
  28. CyberErik

    CyberErik

    Joined:
    Nov 10, 2017
    Posts:
    1
    I am experiencing the same problems as the OP. I am encountering the same red artifacts in the scene view while using the Universal Render Pipeline (URP). I am also facing the issue of a grey triangle appearing across the screen, but this only occurs when scrolling webpages through any browser, not so much noticeable in Unity.

    I have attempted various solutions, including using Unity versions ranging from 2022.3.x to 2023.1.10f1. I have also updated my drivers, launched the program with the "-force-vulkan" command, and tried nearly all the suggestions mentioned in this discussion thread.

    For reference, here are my system specifications:
    Code (CSharp):
    1. inxi -Fxz
    2. System:
    3.   Kernel: 6.2.0-31-generic x86_64 bits: 64 compiler: N/A Desktop: Xfce 4.18.1
    4.     Distro: Linux Mint 21.2 Victoria base: Ubuntu 22.04 jammy
    5. Machine:
    6.   Type: Laptop System: HP product: HP ZBook Fury 15 G7 Mobile Workstation
    7.     v: N/A serial: <superuser required>
    8.   Mobo: HP model: 8783 v: KBC Version 16.4F.00 serial: <superuser required>
    9.     UEFI: HP v: S92 Ver. 01.14.00 date: 06/28/2023
    10. Battery:
    11.   ID-1: BAT0 charge: 69.2 Wh (100.0%) condition: 69.2/94.1 Wh (73.5%)
    12.     volts: 16.8 min: 15.4 model: Hewlett-Packard Primary status: Full
    13. CPU:
    14.   Info: 8-core model: Intel Core i9-10885H bits: 64 type: MT MCP
    15.     arch: Comet Lake rev: 2 cache: L1: 512 KiB L2: 2 MiB L3: 16 MiB
    16.   Speed (MHz): avg: 1921 high: 2400 min/max: 800/5300 cores: 1: 850 2: 2400
    17.     3: 2400 4: 2400 5: 834 6: 2400 7: 2400 8: 2400 9: 2400 10: 900 11: 2400
    18.     12: 854 13: 900 14: 2400 15: 2400 16: 2400 bogomips: 76800
    19.   Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
    20. Graphics:
    21.   Device-1: Intel CometLake-H GT2 [UHD Graphics] vendor: Hewlett-Packard
    22.     driver: i915 v: kernel bus-ID: 00:02.0
    23.   Device-2: Luxvisions Innotech HP HD Camera type: USB driver: uvcvideo
    24.     bus-ID: 1-7:3
    25.   Display: x11 server: X.Org v: 1.21.1.4 driver: X: loaded: modesetting
    26.     unloaded: fbdev,vesa gpu: i915 resolution: 1: 1920x1080~60Hz
    27.     2: 1920x1080~60Hz 3: 1920x1080~60Hz
    28.   OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa
    29.     23.3~git2309040600.6b4d21~oibaf~j (git-6b4d213 2023-09-04 jammy-oibaf-ppa)
    30.     direct render: Yes
    31. Audio:
    32.   Device-1: Intel Comet Lake PCH cAVS vendor: Hewlett-Packard
    33.     driver: sof-audio-pci-intel-cnl bus-ID: 00:1f.3
    34.   Device-2: HP USB Audio type: USB driver: hid-generic,snd-usb-audio,usbhid
    35.     bus-ID: 5-1.3.5:12
    36.   Sound Server-1: ALSA v: k6.2.0-31-generic running: yes
    37.   Sound Server-2: PulseAudio v: 15.99.1 running: yes
    38.   Sound Server-3: PipeWire v: 0.3.48 running: yes
    39. Network:
    40.   Device-1: Intel Comet Lake PCH CNVi WiFi driver: iwlwifi v: kernel
    41.     bus-ID: 00:14.3
    42.   IF: wlp0s20f3 state: up mac: <filter>
    43.   Device-2: Intel Ethernet I219-LM vendor: Hewlett-Packard driver: e1000e
    44.     v: kernel port: N/A bus-ID: 00:1f.6
    45.   IF: enp0s31f6 state: down mac: <filter>
    46.   Device-3: Realtek RTL8153 Gigabit Ethernet Adapter type: USB
    47.     driver: r8152 bus-ID: 6-1.3.3:10
    48.   IF: enxc85acf8dfa98 state: up speed: 1000 Mbps duplex: full mac: <filter>
    49.   IF-ID-1: br-2579a725341d state: up speed: 10000 Mbps duplex: unknown
    50.     mac: <filter>
    51.   IF-ID-2: docker0 state: down mac: <filter>
    52.   IF-ID-3: vethda4c6f4 state: up speed: 10000 Mbps duplex: full
    53.     mac: <filter>
    54. Bluetooth:
    55.   Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8
    56.     bus-ID: 1-14:5
    57.   Report: hciconfig ID: hci0 rfk-id: 0 state: up address: <filter>
    58.     bt-v: 3.0 lmp-v: 5.2
    59. Drives:
    60.   Local Storage: total: 1.84 TiB used: 364.94 GiB (19.4%)
    61.   ID-1: /dev/nvme0n1 vendor: Western Digital
    62.     model: PC SN730 SDBPNTY-1T00-1006 size: 953.87 GiB temp: 36.9 C
    63.   ID-2: /dev/nvme1n1 vendor: Samsung model: SSD 980 PRO 1TB
    64.     size: 931.51 GiB temp: 24.9 C
    65. Partition:
    66.   ID-1: / size: 753.4 GiB used: 182.42 GiB (24.2%) fs: ext4
    67.     dev: /dev/nvme0n1p5
    68.   ID-2: /boot/efi size: 256 MiB used: 101.2 MiB (39.5%) fs: vfat
    69.     dev: /dev/nvme0n1p1
    70. Swap:
    71.   ID-1: swap-1 type: file size: 2 GiB used: 0 KiB (0.0%) file: /swapfile
    72. Sensors:
    73.   System Temperatures: cpu: 51.0 C pch: 44.0 C mobo: 25.0 C
    74.   Fan Speeds (RPM): N/A
    75. Info:
    76.   Processes: 419 Uptime: 26m Memory: 30.68 GiB used: 7.39 GiB (24.1%)
    77.   Init: systemd runlevel: 5 Compilers: gcc: 11.4.0 Packages: 2902 Shell: Zsh
    78.   v: 5.8.1 inxi: 3.3.13
    79.  
     
    Last edited: Sep 4, 2023
  29. samokatin

    samokatin

    Joined:
    Feb 24, 2022
    Posts:
    1
    Still experiencing the same issue on 2022.3.x when using URP. This does not occur on default renderer. Switching to vulkan fixes the corrupted red dots issue, however whenever you select an object on edit scene, the editor crashes, so using URP becomes pretty much unusable.