Possible CPU leak on Linux (Ubuntu). 100% usage in main menu.

Started by Roolo, January 07, 2018, 04:08:51 AM

Previous topic - Next topic

Roolo

Rimworld constantly uses 100% of one core on my Ubuntu machine, even while in the main menu. I understand that while playing the game a lot of calculations have to take place, but just a static menu shouldn't use so much processing power so I suspects it's a CPU leak. This is not an issue on my Windows machine.

Edit: this is also the case without any mods loaded. 


Calahan

So just to confirm, you are launching the game, the main menu is appearing, and one of your CPU's is using 100% for RimWorld. Correct?

Can you also please confirm which version of Ubuntu you are using, as well as confirming if you are using the Steam or DRM-free version of RimWorld.


@ Others/All - Can any other Ubuntu users check and/or verify the above CPU usage?

Roolo

Quote from: Calahan on January 10, 2018, 06:14:36 AM
So just to confirm, you are launching the game, the main menu is appearing, and one of your CPU's is using 100% for RimWorld. Correct?

Can you also please confirm which version of Ubuntu you are using, as well as confirming if you are using the Steam or DRM-free version of RimWorld.


@ Others/All - Can any other Ubuntu users check and/or verify the above CPU usage?

Yes, that's correct. I'm using Ubuntu 16.04.3, and the steam version.
Thanks for looking into this!

yves72

Hi,

I'm also noticing the same when I launch the game. One thread is at 100% and it is definitely coming from rimworld. I'm also using the latest version on steam.
I don't think it is the cpu that can't handle the menu layout :D

I don't know if you need system info:
ubuntu 16.04 (64bit)
i7-7700HQ
GTX 1050 Ti

Giselbaer

Can't confirm this. After loading the game, in the main menu, RimWorld takes a constant 19.8% of one core.

When I'm in the game, on a 300x300 map, currently ~20 colonists, I need between 80% and 130% core, mainly depending on how far I zoom in/out.

HOWEVER, when the game is backgrounded, no matter if main menu or while playing, it always uses exactly 100% CPU. This is what top shows:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND     
24352 gbl       20   0 4385792 1,919g 116372 R 100,0  8,2 254:23.80 RimWorldLi+

I have two monitors, and had the terminal running "top" on one while playing on the other, so I was able to see what happens to the CPU. But I guess anyone who uses one monitor and alt-tabs to the terminal window will always see the 100% "background" CPU usage.

System: Ubuntu 16.04, 64 bit, Core i5-2500, Nvidia 660 (native drivers), Steam version of Rimworld

Btw, when I'm stracing the backgrounded, 100%, rimworld process, I get endless repeats of

select(7, [6], NULL, NULL, {0, 0})      = 0 (Timeout)
select(28, [27], NULL, NULL, {0, 0})    = 0 (Timeout)
recvmsg(6, 0x7ffdf9ef0fc0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
select(7, [6], NULL, NULL, {0, 0})      = 0 (Timeout)
select(28, [27], NULL, NULL, {0, 0})    = 0 (Timeout)
recvmsg(6, 0x7ffdf9ef0fc0, 0)           = -1 EAGAIN (Resource temporarily unavailable)

Looks very much like the game keeps trying to get a message from the X server when there isn't any, and doesn't set a timeout when doing so (the {0,0} parameter to select() is the timeout value), so instead of telling the system "wake me up when something interesting is going on", it just keeps asking "have something? No? And now? And now? And now?". Reminds me of my dog when it wants to play when I'm busy with something.

Of course, that may be a "feature" of Unity that the game developer has zero control over.