Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Editor very slow on M1 Macbook Pro

Discussion in 'macOS' started by xxsemb, Feb 5, 2021.

  1. xxsemb

    xxsemb

    Joined:
    Feb 4, 2021
    Posts:
    49
    Hi all even with a brand new empty project it maxes out around 40ish fps. It seems the cpu is flying up for no good reason.

    Any ideas? I have disabled all extra apps on the mac. It should not be this slow. Using the latest Unity version (release) on the latest version of Big Sur. VSYNC is also off.

     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,503
    Which Unity version is this? We have not seen this locally. What does the profiler say?
     
  3. xxsemb

    xxsemb

    Joined:
    Feb 4, 2021
    Posts:
    49
    Hi this is 2020.2.3f1
     
    Last edited: Feb 5, 2021
  4. xxsemb

    xxsemb

    Joined:
    Feb 4, 2021
    Posts:
    49
    I installed version 2020.1.17f1 and it is over 2500 fps, it is a bug with 2020.2.3f1 for me, m1 macbook pro latest big sur. The rendering in the editor looked slightly different also - in the new version the transparency was more 'solid' - possible that something is being thrown off in that version? not using metal? (says it is)
     
    Last edited: Feb 5, 2021
    BlasinRee likes this.
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,503
    Regarding the profiler: can you show the timeline view? That graph is not useful in determining where the issue lies.
     
  6. xxsemb

    xxsemb

    Joined:
    Feb 4, 2021
    Posts:
    49
    yeah sure here you go.

    This is a blank project, it works fine in 2020.1.17f1, the moment it comes into the latest - boom. down to almost 40ish fps.
     
  7. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,503
    Can you switch the profiler to the "Editor" mode? Looks like the game itself runs fast (frame completes in 0.23 ms translates to like 5000 fps), but the rest of the editor for some reason is very slow. upload_2021-2-5_14-18-50.png
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,503
    Also, we tried Unity 2020.2.3f1 on three of our Apple M1 machines, and could NOT reproduce what you're seeing :confused:.
     
    Last edited: Feb 6, 2021
    Polyfemos likes this.
  9. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,503
    Another idea: could you try changing the editor interaction mode preference and see whether that helps at all?

    upload_2021-2-5_15-43-26.png
     
  10. xxsemb

    xxsemb

    Joined:
    Feb 4, 2021
    Posts:
    49
    unfortunately same result, gets locked to around 40ish fps on average, I will post up an image of the editor profiler mode tomorrow. as soon as I go back to that other version its absolutely normal and fine.
     
  11. xxsemb

    xxsemb

    Joined:
    Feb 4, 2021
    Posts:
    49
    Here is the editor profile. 40ish fps, blank scene again. Latest version (release) - something is very wrong in this one I lose over 2000 fps with no changes apart from new version.

     
    Last edited: Feb 6, 2021
  12. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,159
    Hi,
    could you try using the Standalone Profiler (Window -> Analysis -> Profiler (Standalone Process)) for this? That frame just shows the cost of drawing the Timeline view of the Profiler Window itself.
     
  13. xxsemb

    xxsemb

    Joined:
    Feb 4, 2021
    Posts:
    49
    No problem here you go.
     
  14. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,159
    Thanks, that's looking way cleaner. Could you please drag the splitter between the main and the render thread down a bit and zoom in so we can see what's going on in that PlayerLoopController sample? And also show a bit more of the Render thread for that same stretch of time? Looks like something in there is waiting on the Render thread which is preparing a render target.

    Do you happen to have both the Game View and the Scene View open at the same time? And are they on the same monitor?
     
  15. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,159
    Also, could you please check your Game View's resolution drop down to see if it is set to vSync. And your projects Quality Settings too.
     
  16. xxsemb

    xxsemb

    Joined:
    Feb 4, 2021
    Posts:
    49
    Hey thanks, so I added a few more here for you: https://imgur.com/a/8MyCNmr

    It happens no matter what quality setting (vsync set to off) or project complexity, can be an empty project fresh from creating it or my own project imported in. Something seemed to have changed with how opacity was rendered in the main scene view with this version - I was not sure if I imagined it but then I noticed this problem. I have the scene open and game view open at the same time.

    It helps slightly when the game view is maximised.

    They are also on the same monitor (even tried disconnecting my external and using it just on the macbook pro but same thing.

    Only thing that makes it return to normal is to use the older version and then i get thousands of fps no sweat.

    edit: so I just tried to enable vsync in game view and it hits a solid 60 cap. As soon as I disable vsync, it goes back down to 40ish fps. So this version seems to hate it when vsync is off... in the game view? very odd issue here.

    Edit 2: it seems to have started around version 2020.2.1f1 while 2020.1.17f1 is absolutely fine. This also happens in the 2021 beta, this is unusable if it carries on without a fix. This is also a fresh and brand new M1 Macbook Pro, updated to the latest big sur patch.
     
    Last edited: Feb 6, 2021
    BlasinRee likes this.
  17. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,159
    Well, in the screenshots it looks like it it first waits for the last frame to hit a vBlank, then renders it purely on the main thread and waits for the next one. Is multithreaded rendering on? Also I think it's around both game and scene view being open at the same time and maybe turning on vSync gets them to be in sync and not miss that vBlank?

    Also, please ignore the FPS counter in the game view for performance comparisons over the 2020.1 to 2020.2 version transition as in 2020.2 we changed that to be actually accurate and include EditorLoop time, instead of artificially calculating it out.
     
  18. xxsemb

    xxsemb

    Joined:
    Feb 4, 2021
    Posts:
    49
    Well this is on 'desktop' so I cannot set multithreaded to anything else afaik. The whole editor is sluggish after I hit a 2020.2 update - Just tested on a windows machine and the same does not happen.
     
  19. TumTumTree

    TumTumTree

    Joined:
    Mar 16, 2015
    Posts:
    5
    I was able to reproduce the issue with 2020.2.3 on a M1 Mac Book Pro 16 GB (BigSur 11.2.1) in a new universal render pipeline project. (Interaction Mode set to No Throttling)
    With just either the scene view or the game view open the performance seems ok (80 - 120 fps) but as soon as both are open at the same time the performance drops to 35 - 45 fps.

    Another thing I've observed is that in both cases the performance seems inconsistent. With just one view the frame rate would sit comfortably at around 120 fps for a while and then drop to around 80 for a while seemingly completely randomly but that might be a hardware throttling thing.

    After some more testing I discovered that the issue only seems to occur when both the scene view and the game view are on the same monitor. If the game view is in a separate window on a separate monitor everything seems fine. Definitely looking like a V-Sync issue.
     
    Last edited: Feb 17, 2021
  20. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,503
    Can you report a bug on this?
     
  21. TumTumTree

    TumTumTree

    Joined:
    Mar 16, 2015
    Posts:
    5
    I have submitted a bug report.
     
    MartinTilo likes this.
  22. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,503
  23. a63657120

    a63657120

    Joined:
    Oct 13, 2018
    Posts:
    1
    I reproduce the issue too, the unity version is 2020.2.6. open scene view and game view in editor, only 30FPS. And it keeps 60 fps when I open the vsync option
     
  24. Deleted User

    Deleted User

    Guest

    On 2020.3.3f1 if I have Scene View and Game View visible I get around 60 fps and sometimes 30 fps but if I hide Scene View I get around 120 fps.
     
  25. TumTumTree

    TumTumTree

    Joined:
    Mar 16, 2015
    Posts:
    5
    enhawk likes this.
  26. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    376
    To post an update to this, Macbook Pro 2016 (not M1)

    2020.3.19f1 and 2020.3.20f1 causes my gameview to feel like its running at 1 FPS
    Unity 2019 is totally fine.

    Ive tried a lot of things, over an hours worth, and what made it 'better' for me, was Changing Interaction Mode, frame throttling to custom 33.
     

    Attached Files:

  27. YamyStudio

    YamyStudio

    Joined:
    Jan 28, 2021
    Posts:
    2
    Still continues with 2020.3.20f1, also in editor mode scene is so lagging.
     
  28. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,159
    You two are likely being hit by a known regression on Mac for which a fix exists and the backport is in progress, also see this thread and my post in it for details.
     
    alkannyunus likes this.
  29. ZaphodBeeblebrox21

    ZaphodBeeblebrox21

    Joined:
    Apr 17, 2020
    Posts:
    3
    2020 M1 MacBook Air here on Unity 2020.3.25f1.

    Had the same issue. Solution that worked for me was switching the Interaction Mode under Preferences --> General from "Default" to "Monitor Refresh Rate". Now I have stable 60 FPS on my 60Hz monitor.
     
    saadoardati likes this.
  30. Cato11

    Cato11

    Joined:
    Jan 5, 2021
    Posts:
    193
    I am also experiencing similar issues as the topic creator. I have a new 2021 MacBook Pro M1 (Pro) and I am seeing terrible lag.

    When the game is playing in the editor with the scene view and game view visible, it is incredibly jerky and laggy. But as soon as I set play mode to full screen, it is a lot smoother. It's as if it struggles to render both scene and game view in parallel. Do we have a fix for this?

    UPDATE:

    I have just seen this ticket - https://issuetracker.unity3d.com/is...s-scene-view-and-game-view-open-in-the-editor

    It states that framerate drops are expected when rendering two views. However, I did not experience such issues when running Unity on my 5 year old Windows Laptop with literally half the horsepower of my M1 Pro. So I do not believe it is as simple as it is being portrayed. Furthermore, my scene is virtually empty with three simple primitives moving around, and it lags like hell! This surely cannot be right..
     
    Last edited: Jan 10, 2022
  31. CosmicStud

    CosmicStud

    Joined:
    Jun 13, 2017
    Posts:
    55
  32. teamheartcode

    teamheartcode

    Joined:
    Dec 21, 2021
    Posts:
    2

    Can only agree and confirm the same issue.