Linux Build with CPU at 100% but in Editor is at ~20%

I remember the 100% CPU in editor bug that we had in the first Unity Linux Editor builds.
Then the problem got fixed, thank you by the way :). But now that i’m doing some testing with special features for a linux build its seems that the build puts the CPU at 100% no matter what i do. Even with no v-sync, low quality settings, empty scene, traget frame rate at 5fps and minized windows (Vulkan or openGL), it still has 100% of my CPU. And the fun part is that runing the same scene in the editor (the normal one, not the empy one) has only ~20% of the CPU.

So, you guys managed to fix the 100% CPU for the Editor, could you look in to the 100% CPU on the linux builds too? It might be related.

Thanks,
keep up the good work!

What drivers are you using?

Vsync on would be good.

I’ve heard also that the Nvidia drivers sometimes don’t have vblank on by default all of the time, I’ve had this issue on radeon too.

I’m using mesa 17.2.2 on Intel hardware.

I’m also did some extra tests.

It seems that when the windows is minimized it uses 100% of one CPU. And when the window is focused it uses more than one CPU. Here is the profiler output for the empty scene.

I’m running the same hardware but using the intel official drivers.

run uname -r please and tell me the output, also you could try the one I’m using.

Intel official tool to make sure everything is configured properly:
https://01.org/linuxgraphics/downloads/intel-graphics-update-tool-linux-os-v2.0.6

If your kernel version from uname -r
is less than this one
4.13.13-300.fc27.x86_64

I’d recommend installing the newer kernel if you’ve done it before. Lots of GPU related changes have been distributed in 4.9-4.13 so if you’re using Ubuntu/Debian it’s probably 4.9.

The latest stable kernel is:
4.13 as far as I’m aware, I have had a far smoother experience with 4.13 rather than 4.9.

Well i’m using Ubuntu 17.10 that uses Wayland. Could that be the reason?

this is the output for uname -r:
4.13.0-17-generic

And the intel graphics update tool doesn’t support ubuntu 17.10.
But its included in intel-gpu-tools package, but when i run it, this is the output:

Unable to init server: Could not connect: Conexión rehusada
(intel-graphics-update-tool:9245): Gtk-WARNING **: cannot open display: :1.0

Thanks for the help.

Ah that sucks, yeah probably is the wayland thing.

I just moved from Ubuntu to Fedora and have had a lot less issues with the OS functionally.

I assume it’s not working because you have to run it as root to make it work.

Try:
sudo su;
export DISPLAY = :0
then run it again from the terminal using
./thegputool
or
thegputool

I don’t know the application name unfortunately so just replace thegputool with the name of the intel graphics tool.

Nop, just the same thing. I think is because they dont support 17.10.

A focused Unity application without vsync enabled is expected to use 100% CPU. However, it looks like our Linux player has no concept of minimized/shaded, so I’ll add that to the backlog. I’m curious to see the player use ~140% though. What CPU do you have?

Well, it uses 100% of the CPU with or without the vsync.

My CPU is an Intel(R) Core™ i7-6500U CPU @ 2.50GHz by the way.

Cheers.