Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Resolved 2020.X high idle cpu

Discussion in 'Linux' started by JooleanLogic, Aug 23, 2020.

  1. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    Below are my idle cpu usage graphs for Unity 2019.3 and 2020.1 with a new blank project. The same high cpu also occurs in 2020.2.
    Seems something changed in the 2020 versions (for me at least).

    unity-cpu-2019.png

    unity-cpu-2020.1.png
    I'm currently using mint 20 which is ubuntu 20 based but had same issue on mint 19 which was ubuntu 18 based.
    I'm just interested if anyone using the Unity 2020 versions on the official ubuntu 18.04 has normal idle cpu usage like the 19.3 version above? That way I'll know if it's just mint (or my own comp) that has the problem.
     
  2. judgementAlex

    judgementAlex

    Joined:
    Sep 9, 2013
    Posts:
    28
    same issue here, Fedora 32, NVIDIA 450.66.
    as some have pointed out, setting Application.targetFrameRate to a low value eases the usage in play mode, but upon returning to edit mode it ramps up again. I've noticed that in the Game view in edit mode the stats show >3000 FPS even though vsync is enabled in quality settings.
    This happens in both OpenGL and Vulkan
     
  3. senkal_

    senkal_

    Joined:
    May 22, 2018
    Posts:
    86
  4. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    I'm on nvidia 440.100. Same for me about vsync. Doesn't seem to affect anything so I use the targetFrameRate to slow it down. This is unrelated to the high cpu usage issue though.
    I'm on mint which isn't supported so no. I really just want to know if anyone on official ubuntu 18.04 has the same problem. If users never looked at sys monitor, they wouldn't know as the cpu usage isn't such that it affects the performance of the editor. It's high enough to stop me using it though as it's simply burning/heating pointlessly.
     
    HaiderBassim04 likes this.
  5. senkal_

    senkal_

    Joined:
    May 22, 2018
    Posts:
    86
    @jooleanlogic I am on Ubuntu 18.04 so will try to find some time and test it.
    I am on 2019.x but will try the new one.
    When you start new project, which render pipeline do you use, 3D/Universal/High?
     
  6. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    Thanks senkal_.
    I'm actually just using 2D but I've tried all modes and the idle cpu usage is the same whether 2D, 3D, URP or HDRP.
    Also cpu usage remains the same even if Unity is minimised.
     
    HaiderBassim04 and senkal_ like this.
  7. coltoneakins

    coltoneakins

    Joined:
    Feb 23, 2020
    Posts:
    2
    I am having the same problem: high CPU usage with any 2020.X release. I did submit a bug report. But I will also paste my report below:

    1. What happened
    I am running Ubuntu 18.04. I am using a modern, high-performance laptop with a Nvidia GPU. I am using Nvidia's official driver (nvidia-driver-435).
    Both of the lastest 2020.X releases of Unity (2020.1.1.f1 AND 2020.1.3.f1) are consuming too much of my CPU compared to earlier Unity versions.
    Interestingly, 2020.X releases are causing the 'Unity' process and 'Xorg' (a.k.a. X11 display server) both to consume too much CPU:
    - The 'Unity' process averages at 75% of one core.
    - The 'Xorg' process averages at 60% of one core.
    On the other hand, 2019.X releases (the latest for example, 2019.3.2.f1) just have one process labeled 'Main Thread' which averages at about 20% of one core.
    This minor testing was done with a fresh, empty 3D scene (set up through Unity Hub's wizard). No changes were made.
    2. How we can reproduce it using the example you attached
    1. Run Ubuntu 18.04.
    2. Download Unity Hub and Unity Version 2020.1.3.f1, for example.
    3. Create a new '3D' project using Unity Hub.
    4. Open this project in Unity.
    5. Notice the high CPU usage of the 'Unity' process and high CPU usage of the 'Xorg' process (using a Linux command line program like 'top').
    6. Now, compare CPU usage with any 2019.X release of Unity. Notice that the CPU usage is very high for the 2020.X release.
    3. Here is misc. information about my system:

    Output of "inxi -Fz":
    ====================================
    ceakins@parlance:~$ inxi -Fz
    System: Host: parlance Kernel: 5.4.0-42-generic x86_64 bits: 64 Desktop: Gnome 3.28.4
    Distro: Ubuntu 18.04.5 LTS
    Machine: Device: laptop System: Acer product: Nitro AN515-53 v: V1.19 serial: N/A
    Mobo: CFL model: Freed_CFS v: V1.19 serial: N/A UEFI: Insyde v: V1.19 date: 07/13/2018
    Battery BAT1: charge: 44.9 Wh 100.0% condition: 44.9/48.9 Wh (92%)
    CPU: Quad core Intel Core i5-8300H (-MT-MCP-) cache: 8192 KB
    clock speeds: max: 4000 MHz 1: 3934 MHz 2: 3900 MHz 3: 3900 MHz 4: 3900 MHz 5: 3899 MHz 6: 3899 MHz
    7: 3900 MHz 8: 3900 MHz
    Graphics: Card-1: Intel Device 3e9b
    Card-2: NVIDIA GP107M [GeForce GTX 1050 Ti Mobile]
    Display Server: x11 (X.Org 1.19.6 ) drivers: nvidia FAILED: modesetting Resolution: 1920x1080@60.02hz
    OpenGL: renderer: GeForce GTX 1050 Ti/PCIe/SSE2 version: 4.6.0 NVIDIA 435.21
    Audio: Card-1 NVIDIA GP107GL High Definition Audio Controller driver: snd_hda_intel
    Card-2 Intel Cannon Lake PCH cAVS driver: snd_hda_intel
    Sound: Advanced Linux Sound Architecture v: k5.4.0-42-generic
    Network: Card-1: Intel Wireless-AC 9560 [Jefferson Peak] driver: iwlwifi
    IF: wlp0s20f3 state: up mac: <filter>
    Card-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169
    IF: enp7s0f1 state: down mac: <filter>
    Drives: HDD Total Size: 736.2GB (14.9% used)
    ID-1: /dev/nvme0n1 model: INTEL_SSDPEKKW256G7 size: 256.1GB
    ID-2: /dev/sda model: KINGSTON_SA400S3 size: 480.1GB
    Partition: ID-1: / size: 430G used: 94G (23%) fs: ext4 dev: /dev/sda2
    ID-2: swap-1 size: 10.10GB used: 0.00GB (0%) fs: swap dev: /dev/sda1
    RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
    Sensors: System Temperatures: cpu: 67.0C mobo: N/A gpu: 49C
    Fan Speeds (in rpm): cpu: N/A
    Info: Processes: 418 Uptime: 44 min Memory: 5291.3/15854.5MB Client: Shell (bash) inxi: 2.3.56
    ====================================​


    Output of "inxi -r":
    ====================================
    ceakins@parlance:~$ inxi -r
    Repos: Active apt sources in file: /etc/apt/sources.list
    deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
    deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
    deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
    deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
    deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
    deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
    deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
    deb http://security.ubuntu.com/ubuntu bionic-security main restricted
    deb http://security.ubuntu.com/ubuntu bionic-security universe
    deb http://security.ubuntu.com/ubuntu bionic-security multiverse
    deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
    Active apt sources in file: /etc/apt/sources.list.d/graphics-drivers-ubuntu-ppa-bionic.list
    deb http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic main
    Active apt sources in file: /etc/apt/sources.list.d/inkscape_dev-ubuntu-stable-bionic.list
    deb http://ppa.launchpad.net/inkscape.dev/stable/ubuntu bionic main
    Active apt sources in file: /etc/apt/sources.list.d/kelleyk-ubuntu-emacs-bionic.list
    deb http://ppa.launchpad.net/kelleyk/emacs/ubuntu bionic main
    Active apt sources in file: /etc/apt/sources.list.d/lunarg-vulkan-1.2.131-bionic.list
    deb https://packages.lunarg.com/vulkan/1.2.131 bionic main
    deb-src https://packages.lunarg.com/vulkan/1.2.131 bionic main
    Active apt sources in file: /etc/apt/sources.list.d/microsoft-prod.list
    deb [arch=amd64] https://packages.microsoft.com/ubuntu/18.04/prod bionic main
    Active apt sources in file: /etc/apt/sources.list.d/mikhailnov-ubuntu-pulseeffects-bionic.list
    deb http://ppa.launchpad.net/mikhailnov/pulseeffects/ubuntu bionic main
    Active apt sources in file: /etc/apt/sources.list.d/mono-official-stable.list
    deb https://download.mono-project.com/repo/ubuntu stable-bionic main
    Active apt sources in file: /etc/apt/sources.list.d/regolith-linux-ubuntu-release-bionic.list
    deb http://ppa.launchpad.net/regolith-linux/release/ubuntu bionic main
    Active apt sources in file: /etc/apt/sources.list.d/syncthing.list
    deb https://apt.syncthing.net/ syncthing release
    Active apt sources in file: /etc/apt/sources.list.d/vivaldi-snapshot.list
    deb http://repo.vivaldi.com/snapshot/deb/ stable main
    Active apt sources in file: /etc/apt/sources.list.d/vscode.list
    deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main
    Active apt sources in file: /etc/apt/sources.list.d/wavebox-core.list
    deb [arch=amd64] https://download.wavebox.app/core/linux/deb/ amd64/
    ====================================​


    P.S. If a member of the Unity team wants to contact me in order to troubleshoot this issue, I welcome it. I would love to help.
     
    HaiderBassim04 and JooleanLogic like this.
  8. coltoneakins

    coltoneakins

    Joined:
    Feb 23, 2020
    Posts:
    2
    For others experiencing this problem, this is the response I got from the Unity QA team regarding the bug:

    Thanks for getting in touch, we actually know about this issue. Unfortunately, it does not have a public Issue Tracker link. At the moment, the issue is fixed in 2020.2.0a21 and a fix should be coming to 2020.1 shortly.

    Please reach out to me if I can answer any questions or be of further help.
    So, the fix should be coming soon! In the meantime, if your project allows, try using the last 2019 release.
     
    Last edited: Sep 2, 2020
    JooleanLogic and senkal_ like this.
  9. senkal_

    senkal_

    Joined:
    May 22, 2018
    Posts:
    86
    Thanks @coltoneakins
    For me this is not an issue but can imagine it's annoying for somebody on 2020.
    It just shows that, despite Linux was planned earlier to be officially supported, it is still a long way to go.
     
  10. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    Awesome, thanks coltoneakins.
    Glad it wasn't just mint. The problem is fixed in 2020.2.0b1.
    Unfortunately the 10fps bug (#1271213) still exists.
     
  11. AndreiMarian

    AndreiMarian

    Joined:
    Jun 9, 2015
    Posts:
    77
    I'm using 2020.3.32f1 Windows 10 and still happening. Please, resolve this issue, even with Unity editor not playing and minimized, after 3 min. my PC cooler fan spins like it's breaking. Anybody else having the issue?
     
    Pnvanol and HaiderBassim04 like this.
  12. halfpasttense

    halfpasttense

    Joined:
    May 30, 2020
    Posts:
    21
    I was having the same issue and it turned out to be caused by the ProBuilder window being open and docked specifically in the bottom left corner of the editor layout. CPU usage dropped back down to normal as soon as I closed it or moved it to any other place in the editor layout. Really weird.
     
    A1win likes this.
  13. HaiderBassim04

    HaiderBassim04

    Joined:
    Mar 4, 2016
    Posts:
    4
    I am using Unity 2022.3.4f1 Win10, and the issue is still happening, even when the editor is minimized. The issue occurs even on a new empty project.

    My laptop fans are frying, pls help.

    upload_2023-8-16_2-38-52.png
     
  14. ChiwTheNeko

    ChiwTheNeko

    Joined:
    Mar 24, 2022
    Posts:
    150
    Try going to Edit > Preferences > General and change the Interaction Mode setting.
     
    HaiderBassim04 likes this.
  15. HaiderBassim04

    HaiderBassim04

    Joined:
    Mar 4, 2016
    Posts:
    4
    I did it, the CPU usage is now lower hovering around 8-14% when the editor is minimized, any more things I can do ?