Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug Editor FPS dropped low than 1 when x11 fractional scale enabled.

Discussion in 'Linux' started by Ca2didi, Dec 24, 2023.

  1. Ca2didi

    Ca2didi

    Joined:
    Sep 8, 2019
    Posts:
    16
    Issue:
    - Recently I'm trying to change my OS to Linux. Now I'm using Ubuntu 22.04.
    - I have a monitor which running at 4k with fractional scale setting to 175% (it's virtual resolution is 4388x2491)
    - Maximum window or Big window(which nearly covers 70% pixel on screen): When game is not playing, editor fps will dropped to 1 when I clicked on assets sometimes, but after I clicked play, specifically when enabled game objects count becomes higher, game fps and editor fps will drop to 1 which make this totally unplayable.
    - using 200% scale or small window: No fps dropping.
    - A same project in the same hardware on Windows has never behaving like this.
    - I guess that maybe rendering resolution is too high, so I set monitor to 2560x1440 with 150% scale(virtual resolution is 3413x1920, that is lower that 4k), the issue still same.
    - Use Profile to diagnose and find out that GUIView.RepaintAll.PlayerLoopController is the reason why fps dropping: It consumed up to 1014ms in a frame.

    Environment:
    - CPU: AMD RYZEN 5 5600X
    - RAM: 32G 4000mhz dual channel
    - GPU: AMD RX6700XT 12G OC + Drivers from amdgpu-install
    - OS: Ubuntu 22.04 LTS + kernel 6.2
    - DE: X11 + Gnome 42.9
     
    Last edited: Dec 24, 2023
  2. Ca2didi

    Ca2didi

    Joined:
    Sep 8, 2019
    Posts:
    16
    Image_1703437698569.png

    I capture Profile again.
     
  3. Ca2didi

    Ca2didi

    Joined:
    Sep 8, 2019
    Posts:
    16
    upload_2023-12-25_13-43-9.png
    upload_2023-12-25_13-45-30.png
    enable deep profile to diagnose
     
  4. ChiwTheNeko

    ChiwTheNeko

    Joined:
    Mar 24, 2022
    Posts:
    144
    Merry Christmas!

    So, if I understand correctly, your issue is not caused by fractional scaling. It's just that when you are rendering at a resolution that is too high you get poor performances. Is that correct? Like, if you set your screen to 4K with 100% scaling and game full screen, do you get good performances?
     
  5. Ca2didi

    Ca2didi

    Joined:
    Sep 8, 2019
    Posts:
    16
    Merry Christmas!

    Actually it not a problem of game itself, it's an editor issue. But I already fix that by remove amdgpu-driver from AMD official site.
    But I think bug is still there, I just trying to ignore that.
     
    Last edited: Dec 27, 2023
  6. Ca2didi

    Ca2didi

    Joined:
    Sep 8, 2019
    Posts:
    16
    On 4k 100% and 4K 200%, everything runs smoothly.
     
  7. Ca2didi

    Ca2didi

    Joined:
    Sep 8, 2019
    Posts:
    16
    I had guessed that resolution is too high when I met this issue, but as I mentioned before, when enable fractional scale to 150% on 2560x1440, the issue still same even if the actual render resolution is lower that 4k 100%.

    So I don't believe that this is caused by resolution.
     
  8. tylerinthezoo

    tylerinthezoo

    Unity Technologies

    Joined:
    Jun 15, 2022
    Posts:
    97
    it might be related to you are using fractional scaling.

    Therefore, fractional scaling on GNOME uses oversampling, which means rendering at a higher resolution, then scaling down with integer scaling, and is true for both Wayland and Xorg sessions. This brings higher GPU and CPU (since GTK is not fully hardware accelerated) usage, more power consumption, and in some cases significantly slower responsiveness, particularly noticeable in Xorg. If it is necessary to avoid these problems, consider switching to a Qt based desktop environment.
     
  9. Ca2didi

    Ca2didi

    Joined:
    Sep 8, 2019
    Posts:
    16
    Now with no amdgpu-driver from AMD, this issue goes away even if no fractional scale changed.