[SOLVED] CW3 Ubuntu 18.04 Gnome via Steam poor performance.

Started by radix_s, November 30, 2018, 08:59:44 AM

Previous topic - Next topic

radix_s

Hello all,

I was hoping you can help me with a problem I have with my favorite game that I used to play in the background as I work but cannot do that anymore. It runs very slow on my Ubuntu 18.04 via Steam.

What I mean by 'slow' - well it feels like it was being ran on a veeery slow machine - you can see tearing, lagging like it was having problems in keeping up a decent FPS.

Funny thing is every other program runs smoothly up until I turn CW3 on, I can see for example in htop cpu usage jumping from 3-10% to 100%. It also seems to be spawning multiple processes named ./CW3.x86_64 (two high on CPU (150% and 50%) and several other with low CPU usage). I have attached an image with first 4 rows in htop, there are several other processes not displayed with low cpu usage. When CW3 is running everything else slows down because CW3 is eating up all CPU power (and I can hear the laptop fan going into rage mode).

I had this problem when I was using 16.04 but it was rather marginal - it was smooth enough to be playable, under 18.04 it is not playable.

Another funny thing is that when I have tried to download a windows version and launch it using wine it ran smoothly as hell - just like it does when I switch to Windows (I have a dual boot arrangement). So it is not related to my machine being too slow on specs, since it runs far better with windows version via wine than with native linux version... on linux. I would use the wine method but it has another problem there - menu clicks are not working - I can only click on the 'EXIT' button, nothing else seems to be working.

Games like Surviving Mars or Stellaris work just fine on my HD620 via Steam. But they are not built with unity. On the other hand browser based games in unity work smoothly - including 3d heavy games.

My machine setup is:
memory 15,6 GiB
cpu Intel® Core™ i7-7500U CPU @ 2.70GHz × 4
graphics Intel® HD Graphics 620 (Kaby Lake GT2) (plus gtx950 via prime, but I have it turned off at all times)
gnome 3.28.2

Log file is attached, I hope somebody can help.

If it cannot be fixed maybe there is another option - windows only version of the game - then it can be played using steam's proton (steam play) which so far I have discovered to be working extremely well with most of the games (fast and smooth). At the moment one cannot use it because CW3 has linux native version. If it runs well maybe you can then drop linux version altogether and save time on having to support native linux version?

knucracker

Have you tried disabling the steam overlay?  That might be affecting rendering performance.  Just a total guess....

radix_s


knucracker

You might also try observing the cpu load at different times. 
- Sitting on the main menu.
- Sitting in a very simple and small mission while the game is paused. (like a blank map)
- Sitting in a  very simple and small mission while the game is NOT paused.
- Sitting in a large mission while paused.
- Sitting in a large mission while NOT paused.

Let it sit for a few minutes in each state and note if CPU usage is always high.  The size of the game window (or even fullscreen) can also make a difference.  All of this would be to help identify where the bottleneck is and what the game might be doing when the CPU is high.

I know very little about changed from version to version of any linux distribution, but I have seen a few reports from folks that mention thermal throttling being different in ubuntu 18 (presumably because of the kernel version and some change).  If for some reason thermal throttling is kicking in that effectively makes apparent CPU usage go really high and everything seem to slow down.  Anyway just another thought based on your description and that the problem seemed to be present, just much less noticeable, in ubuntu 16.

radix_s

I did some testing and it is impossible to tell what is causing the high load. It starts the moment I open up the game, it does not matter if I am in the menu, or playing a map. Even when you see the initial logo - the knuckle being cracked it is already stuttering.

There is another solution. Steam Play + Proton. It works incredibly well and it might work with CW3 too. Trouble is since CW3 is set as having a native linux version Steam Play will not open it in compatibility mode - native mode is always being picked up. Is it a big problem to also add a game option CW3 windows only? That way Stem Play will be able to start CW3 with proton and it is quite possible the problem will go away.

If that works you could use the same for CW4 and not bother making a native version.

There is a game Osiris: New Dawn that recently added another option with (Behind the scenes experiences) - it just popped into my game list, maybe you can do the same with CW3 windows if that is a very little effort?

knucracker

Unless I'm missing something (and I usually do), as of the time I wrote this (Jam 10, 2019) there isn't a way to force allow 'steam play' (which is the emulator for linux, also known as Proton).  The only way to make it easily runnable via steam play is to remove the native linux version of the game from steam.  I don't want to do that since I have no doubt I'd get about 1000 angry email.

It would be nice if steam would allow a player to decide whether to run the native linux version (if any), or use steam play.

I did find this discussion on how to manually go about it, though it isn't just a simple checkbox and run solution:
https://www.reddit.com/r/SteamPlay/comments/99z9o9/running_games_standalone_via_proton/

radix_s

No, of course removing the linux version is out of the question. What I was suggesting is adding another one into the game list - one CW3 like it is and another CW3 (windows only) with linux option turned off - so it would automatically launch via proton.

I have no idea how much work that is and if it costs extra to do that. Some games have options like that - Osiris: New Dawn, or Starbound (they have an extra option for Unstable builds).

knucracker

For Starbound (just took a look at it in my game list) it looks like they created a totally different "product" to get that separate game "unstable" in the list.  I could in theory do the same for CW3, but for just creating a version that doesn't have a linux build.  Once Steam gets around to letting you choose proton even when there is a steam build, that "product" would no longer be needed and I'd probably have to remove it.

Now I'm not sure if that violates the steam terms, or intent of the terms, for publishers.... so I'm reluctant to go that route.  What I'd of course prefer (everyone would) is that you could choose to run under proton even if there is a native linux build available.

radix_s

Yeah, I totally agree. There is a whole thread here https://github.com/ValveSoftware/steam-for-linux/issues/5638 with people whining about making proton available also for games that have native linux versions. Is has been sitting there in limbo since Aug 22 2018 with no comment from Valve so far. So it is a big unknown at the moment.

Oh well, if you think it might be against some terms then I guess don't bother with it. No point in risking anything for just one dude :) I only hope that CW4 will run smoothly on my laptop once it is out. Are you planning on adding linux support for CW4 by the way? Or it's going to be proton/windows only?

knucracker

I don't know yet....
The native linux version is about 99% working currently (at least on opengl, have not tried vulkan yet).  I'd like to see how the proton version will work and should have some time to do that in the next few weeks.

CW4 requires DX11 on windows and as a consequence seems to require Vulkan to work under proton on linux.  Out of curiosity, do you have vulkan drivers working on your linux box?

radix_s

#10
RAWR: https://steamcommunity.com/groups/SteamClientBeta#announcements/detail/1703951108827819236

'Added the ability to force-enable Steam Play in per-title properties, including for native games'

Looks like our whinery produced some results.

I have triewd to run Dota 2 using vulkan drivers and it seems to run properly. But I have not installed vulkan drivers directly, steam handled it for me.

EDIT: Just tested this, installed steam beta and forced CW3 to run windows version via proton and... it's smooth sailing again. Runs perfectly, like the nightmare had never happened. Wheee