Unity 2019.3.1f1 uses 100% CPU on 1 core when paused/background in empty project

Is it just me that gets 1 core at 100% CPU when paused in a brand new Unity project with Unity 2019.3.1f1 (and .0 before it IIRC)? (I’m using ‘legacy’ 3D – non-SRP profile in case that makes a difference).

I’m sure earlier 2019 builds and definitely 2018 would use ~0% CPU usage where pausing the game and/or switching windows with “don’t run in background” set.

I’ve attached a screenshot showing (my CPU has 8 cores). It’s easy to notice on my laptop where I can hear the fans whiring indicating something is amiss. Obviously it’s gobbling up my laptop’s battery and quietly killing the planet by spewing out extra CO2 for all the desktops!

I initially assumed it was caused by some of my Editor scripting but after investigating for a bit, I couldn’t figure it out since nothing seemed to show up in the Profiler. Of course then I tried a vanilla project!

I’ve logged a bug but not had any response after 3-ish working days so thought I’d ping here in case I was doing something ultra-dumb (it’s happened before :roll_eyes:)

Cheers for the help!

Maybe it is the rendering of the scene view window?

Reasonable hypothesis with 2 caveats:

  1. It wasn’t the case in earlier versions.
  2. It’s not the case now. I tried closing all ‘internal’ windows until I had only the Game view and same behaviour. Tried openning a Console and closing Game. Same. Oddly the Editor used less CPU while I was fiddling with the windows. Not sure what that means.

Can I infer from your question (without any intended scorn :wink: ) that either you don’t see this behaviour yourself or you haven’t checked / couldn’t check (lack of Process Monitor / Windows / whatever)? I’m only asking since it’s odd if it’s just me, no? :slight_smile:

Cheers

Where is it?

I have a similar problem with 2019.3 on Linux Mint, but it’s a lot more obvious when I load the Monodevelop (or VS Code for that matter) solution alongside Unity. Then my fans roar and my computer overheats, up to 87 C… The phenomenon is less obvious in play mode.

Edit: in fact Unity uses up to 100% of the CPU sometimes, even when it’s not in play mode and the solution is not loaded…

I saw massive CPU spikes in 2019.2 onwards - related to Unity incorrectly spamming some of the Inspector window update loops (I have no idea why - I have a few reproduction cases which 99% of the time trigger it, but can’t see the common thread. One of the easiest is certain Shaders if you select them in Project window, their inspectors go nuts).

But if you’re not seein this in 2019.2, then it’s presumably something different :).

Whoops, I’ve attached the missing screenshot – sorry. Good thing I kept it on the bug report :slight_smile:

Just had a response from Unity who’ve successfully reproduced it and logged in public bug-tracker as:

@ interesting point about Linux. I produced on Windows and the Unity person said it doesn’t produce on MacOS. I’d assume Linux would be more MacOS-like but it might be good to post your observations as a comment on the bug in case it helps? (p.s. good for you – I love Linux and wish I could work in it myself. Also “87C” – overclocker? :sunglasses:)

@a436t4ataf yeah you’re right – Inspector windows do seem to cause a lot of CPU load in some circumstances. I care about that too but you’re also right that it’s a different issue. At least there we can quiesce the CPU by unselecting things or closing Inspector windows. Have you logged what you have (if reproducible)? While UT doesn’t jump on every bug logged, I personally still feel it’s worthwhile reporting with the hope that visibility and weight of users’ concern can raise the priority of things.

Re: inspector bug - if/when I can narrow it down, yes. Until then, I already have some bugs that are much narrower, and yet UT support are struggling to reproduce when I’m able to reproduce them 100% of the time, so that’s where I’m focussing my attention!

Voted on the issue. Happens also on my machine. All cores are pinned at 100%.
WPA shows multiple threads doing some DirectX 10 work:

How bad is it? Well… for an empty scene, really bad :slight_smile:

It seems that the problem has been fixed in 2019.3.5f1. The task manager shows a very low CPU usage with Unity paused and Firefox, Thunderbird running.

5584483--576829--Screenshot_2020-03-13_10-18-50.jpg

1 Like

No it’s not, at least for me.

EDIT: Wait I just realized you had paused Unity. For me the issue only manifests when running an empty scene. No empty scene should consume 100% of all cores of your CPU :slight_smile: Maybe this is then something else.

Yep, that’s what the op said in his first post and in the title. :slight_smile:

In play mode, in a small project, Unity 2019.3.5f1 uses 13 % of the CPU; it seems that the problem is limited to Windows, at least until a Mac user comes here posting otherwise.

5586412--577099--Screenshot_2020-03-13_19-36-44.jpg

I opened a new clean project. And I had still same issue in 2019.3.11f1. My Unity was using %12 of my CPU on Editor Mode. Play mode was worse than this. I fixed it by clicking to this button:

My cache size was 19gb. I clicked clean cache and it fixed my over cpu usage problem. I don’t know what it is meaningfull connection with it, but it fixed my over cpu usage problem. I was have %12 cpu usage by unity. Now it is %0. Yes %0.

I can confirm this, for me it was using 10% CPU and after cleaning the GI cache (0.4GB) it uses 0.1% (I have a 6700K)
The problem is if unity is in the background it should not even render anything, so it is a bigger problem and should probably be reported as a bug

please i have the same problem
help me

e