Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certain Games will not launch via Proton If you have a high CPU Thread Count but will on native Windows #5927

Open
ChaosBlades opened this issue Jun 23, 2022 · 26 comments

Comments

@ChaosBlades
Copy link

I am opening this issue to track all the games that will not launch specifically on high thread count systems with Proton but launch on native Windows without issue. The commands taskset and numactl will not work. It has to be WINE_CPU_TOPOLOGY. The specific issue threads listed below seem to already have plenty of logs pertaining to this issue.

Far Cry 4 (#2143)
Will not launch if you have more than 31 threads.
WINE_CPU_TOPOLOGY=31:0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30 %command%

Warhammer 40,000: Space Marine (#934)
Will not launch if you have more than 26 threads.
WINE_CPU_TOPOLOGY=26:0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25 %command%

Lara Croft and the Guardian of Light (#249)
Will not launch on high thread count systems. I am not certain of the exact thread count it breaks at but it will launch on 12 threads but not on 26 threads.
WINE_CPU_TOPOLOGY=12:0,1,2,3,4,5,6,7,8,9,10,11 %command%

@ChaosBlades
Copy link
Author

Warhammer 40,000: Dawn of War II (Issue Thread Needed)
Warhammer 40,000: Dawn of War II - Chaos Rising (Issue Thread Needed)
Linux Native versions never launch. Windows Version will launch to a Black Screen you can't close forcing you to force reset the entire PC. Mouse cursor theme never changes. Due to how annoying the crash is I did not narrow down exactly how many threads cause this issue. Otherwise the game seems to run without issue once threads are limited.
WINE_CPU_TOPOLOGY=4:0,1,2,3 %command%

Warhammer 40,000 Dawn of War II - Retribution (#2517)
Same as above but I am still getting the black screen everyone else is getting. I can hear the intro playing and menus when I move my mouse once threads are limited. I also see the mouse cursor theme change. Can also force close the game.
WINE_CPU_TOPOLOGY=4:0,1,2,3 %command%

I am also noticing that Proton Versions 5 and below do not support WINE_CPU_TOPOLOGY.
I will continue to go through my Steam library looking for this issue.

@ChaosBlades
Copy link
Author

Far Cry 2 (#775)
Same as Far Cry 4 except this game does NOT use Ubisoft Connect.
WINE_CPU_TOPOLOGY=31:0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30 %command%

Far Cry 3 (#727)
Crashes when it tries to go fullscreen. Limiting threads and game seems to work without issue. Limited to 29 threads.
---Blood Dragon fails to launch for a different reason for me. So I can't test that.
WINE_CPU_TOPOLOGY=29:0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28 %command%

I don't own Far Cry 5 or 6. Also don't own Primal. So I can't test those. Far Cry 1 does work. Also tested several Assassins Creed games and none of them had the issue.

The Witcher 2: Assassins of Kings Enchanced Edition (#2309)
You will get stuck on the Wolf logo after you click 'Launch Game' from the launcher forever if you have more than 31 threads.
WINE_CPU_TOPOLOGY=31:0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30 %command%

I think that covers more or less all of my Steam library.

Forgot to mention, I have a 5950X which is 32 thread. If you have a CPU with more threads more games might be effected by this issue.

@seanjseymour
Copy link

@ChaosBlades I have Far Cry Primal (and have been trying all sorts of reported fixes to try to get it to launch)...I can verify that the Far Cry 2 & 4 CPU topology fix also works perfectly for Primal. Thank you and @Blisto91 for your awesome work!!! Also, for what it's worth Far Cry 5 and 6 work with Proton right out of the box, no launch options needed. And my CPU is an AMD Ryzen 9 5950X.

@ivyl
Copy link
Collaborator

ivyl commented Feb 21, 2023

Hi. I've checked some games mentioned here. My findings (Ryzen 5950X 16c/32t):

  1. Far Cry 4 - There's a ProcessorCountLie 28 enabled on Windows.
  2. Far Cry 2 doesn't launch on Windows, works after enabling ProcessorCountLie 31 or less.
  3. The Witcher 2 - doesn't work on Windows unless I enable ProcessorCountLie 31.
  4. Lara Croft and the Guardian of Light - doesn't work on Windows unless I enable ProcessorCountLie 24.
  5. WH 40K: Dawn of War II - doesn't work on Windows without ProcessorCountLie 15. There are community dlls that provide similar features.
  6. Doesn't work on Windows at all even with ProcessorCountLie. Requires a community-created DLL that hooks into more things to lie about CPU. WINE_CPU_TOPOLOGY is good enough though.

I'm yet to test FC3, FC Primal but that's the same engine as other Far Cries.

Since those are game bugs that require workarounds even on their native OS we'll have to start overriding the topology. I'm working on implementing this in a way that's topology-aware.

@Megalomaniak
Copy link

Megalomaniak commented Mar 6, 2023

Where can I find documentation for how to use WINE_CPU_TOPOLOGY? I wanted to replay fallout 3 but it being developed with at most dual core systems in mind and mine being a 6 core 12 thread ryzen 5 1600 is a real pain...

I honestly find wine & proton to be really badly documented overall, but I'd happy to be proven wrong in general not just in regards to WINE_CPU_TOPOLOGY.

@ChaosBlades
Copy link
Author

If the game is developed for dual core but it still launches and runs on higher core count systems then WINE_CPU_TOPOLOGY isn't going to do anything for you. The game will just use 2 of your 6 cores. Looking at protondb the game seems to run without issue as long as you don't have an issue with the launcher. The games listed here will not launch at all without tricking the translation layer into thinking the CPU has less cores. For example Crysis 1 is designed for dual core systems and runs without issue for me. It just maxes out 2 cores and my GPU is left underutilized. First gen Ryzen isn't known for high single thread performance. That may be your issue.

If you really want to try it would be WINE_CPU_TOPOLOGY=2:0,1 %command% The 2 is how many cores and the 0,1 are the cores you want to assign it to starting at 0 for the first core. If you had one of those new Intel chips with P and E cores you would want to assign the cores to the P cores. That is all there is too it.

@Megalomaniak
Copy link

If the game is developed for dual core but it still launches and runs on higher core count systems then WINE_CPU_TOPOLOGY isn't going to do anything for you. The game will just use 2 of your 6 cores.

Except it's a gamebryo fork further busted up by Bethesda and the engine is absolute garbage as a result...

If you really want to try it would be WINE_CPU_TOPOLOGY=2:0,1 %command% The 2 is how many cores and the 0,1 are the cores you want to assign it to starting at 0 for the first core.

But are they logical cores or physical cores? On a ryzen cpu with 2 CCX that can make a pretty big difference...

@Blisto91
Copy link

Blisto91 commented Mar 7, 2023

But are they logical cores or physical cores?

Logical

@RipleyTom
Copy link

RipleyTom commented Apr 6, 2023

Replying to #5927 (comment)

To add to that since I did a bit of testing, Warhammer 40,000: Dawn of War II(AppID:15620) breaks at 32 cores, WINE_CPU_TOPOLOGY=31:0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30(ie 31 cores) does work.

I suspect Warhammer 40,000: Dawn of War II: Chaos Rising(AppID:20570) is the exact same as both are basically the same game(DoW II shows Chaos Rising main menu when launched).

@kisak-valve
Copy link
Member

Hello @RipleyTom, please be explicitly clear with which game you are referring to.

@Blisto91
Copy link

Blisto91 commented May 22, 2023

Adding another to the pile.
I have to limit Tomb Raider: Underworld (8140) and it's demo (8150) to 24 for them to able to launch properly.

I checked out both Tomb Raider: Anniversary and Tomb Raider: Legend while i was at it but they both work fine with my default 32.

@netborg-afps
Copy link

Dirt Rally fails to start with WINE_CPU_TOPOLOGY=16:0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 but runs with 15 cores.

@Blisto91
Copy link

Exclamation

image

I have to set Dino D-Day to 28 or it will crash when trying to load in to a map.
WINE_CPU_TOPOLOGY=28:0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27

@basso
Copy link

basso commented Sep 19, 2023

Cyberpunk 2077 (#4450)
Game will render at 10-14 fps on a 6950XT, no matter the resolution or setting.
When the issue is present the menu fps will hover around 40, and not 100+.
Tried 32, 28, then finally 16 and it seemed to fix the issue.

Kingdom Come
Will not launch, set it to 16 and it started up fine.

@rvdbergh
Copy link

rvdbergh commented Dec 4, 2023

Dirt Rally fails to start with WINE_CPU_TOPOLOGY=16:0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 but runs with 15 cores.

On my Ryzen 9 3950X PC running Ubuntu 23.10, I was only able to get the game working with a maximum of 14 cores using: WINE_CPU_TOPOLOGY=14:0,1,2,3,4,5,6,7,8,9,10,11,12,13 %command%

@Leopard1907
Copy link

Leopard1907 commented Dec 15, 2023

Posting here as well for more visibility.

#468 (comment)

Game ( Burnout Paradise Ultimate Box) needs cpu topology set to 4, otherwise it doesn't launch.

@Root-Core
Copy link

Root-Core commented Jan 8, 2024

I have compiled some games that are mentioned to be fixed by taskset or WINE_CPU_TOPOLOGY.
It would have been nice to find that some engines struggle in all games, but it is a rather complex issue.

There is also some work in GloriousEggroll/protonfixes#167, which could help to fix these games comfortably. The only problem is, I don't have access to all of this games to test and it is no fix that would be officially upstreamed to Proton.

The data suggests that there are engines, that would benefit from a general gamefix.

I'm unsure, if the issue(s) are fixed in some newer (engine) version - eg. Sons Of The Forest had a good performance for me, while The Forest was unplayable without the topology fix.


Unity Engine:

UnrealEngine 4:

Dunia Engine:

Frostbite Engine:

Anvil:

Essence Engine:

REDengine:

Crystal Engine:

Titanium Engine:

PhyreEngine:

EGO Engine:

Dagor Engine:

Chrome Engine:

Crystal Tools Engine:

Diesel Engine:

MT Framework (MT = Multi-Thread, how ironic):

CryEngine:

RenderWare:

Source Engine:

Phoenix Engine:

Snowdrop Engine:

ForgeLight Engine:

Amazon Lumberyard Engine:

LEAD Engine:

OROCHI Engine:

Slayer Engine:

Naughty Dog Game Engine:

Eclipse Engine (Bioware):

IRISZOOM Engine:

LORE Engine:

Housemarque Engine:

HexaDrive Engine:

The Sims 3 Engine:

DreamFactory Engine:

???? (Granny 3D?):

Other:

@digitalcircuit
Copy link

digitalcircuit commented Jan 20, 2024

@Root-Core Of note, the VRChat 40 thread limit is only for the legacy EasyAntiCheat 32-bit bootstrapper that they still ship with. If they update to the February 2023 or newer start_protected_game.exe, the friend who ran into issues had no trouble with 128 threads (at least as of half a year ago).

I think it's worthwhile having a section just for games using an older EasyAntiCheat bootstrapper.

@Blisto91
Copy link

Blisto91 commented Jan 20, 2024

Probably also worth sorting them a bit more than that e.g so the unity games that just have bad performance on high core counts are distinct from games that doesn't work. Though some are already semi sorted by engine, noting what the issue is with a game might be nice.
Originally the issue just tracked games that couldn't start with a high core count.

@Root-Core
Copy link

@digitalcircuit Yes, that was a goal... but lacking the hardware and licences to test the games, I wasn't able to do so.
Valve, feel free to sponsor me/us. :)

The real question is, is there any benefit to giving games more than X cores?
These older ones will not make use of them, I suppose.
So would all Unity games released prior to 202X profit from a limit, or all 32bit versions..?
It would be nice to find a pattern here, as these games will not see any update - unlike VRChat.

The problem is also present on Windows, so it could be an argument for Linux gaming.

@Blisto91 True, the (some?) performance issues seem to be related to SMT. I'm not sure if the crashes are purely the core count or also SMT or multiple CCX etc. Some kind of spreadsheet could help with sorting.. I'm not sure, if it's worth yet.

@Ruedii
Copy link

Ruedii commented Mar 20, 2024

Some games simply have autodetection issues on very high CPU or CPU-Thread count, in which case the best option is to lie to them about the count, then use affinity to prefer the use of the same threads when possible.

Efficiency cores should typically always be set to be ignored and core affinity should be removed.

I have not experienced issues with The Sims 3 on this, myself, but I'm sure others have.

As a note, many games need to default to having V-Sync turned on as well, to implement a second throttling method. This is of major concern on games like The Sims 3 that desynchronize their game tick from their display tick and have quite a few shaders that can spin out of control generating several thousand fps of sparkles.

@Megalomaniak
Copy link

generating several thousand fps of sparkles.

You mean several thousand milliseconds(of frametime) worth of particles?

@ivyl
Copy link
Collaborator

ivyl commented Mar 29, 2024

We've added an override for some of the games discussed here:

https://github.com/ValveSoftware/Proton/blob/experimental_9.0/proton#L1148

You can also use WINE_CPU_TOPOLOGY=$NUM without providing the core mapping. It should do the right thing.

We'll keep going through games behaving badly with too many cores and keep on adding them to the list after confirming it's a game issue and not a different Proton bug.

@digitalcircuit
Copy link

@ivyl If there's any way I can help with determining where the fault lies with the legacy EasyAntiCheat launch error (32-bit bootstrapper launching 64-bit Windows app with 64-bit Linux EAC module), let me know! I've still got the absolute-minimum sample project I created for EOS' Developer Support to recreate the problem.

That said, it looks like VRChat has finally switched to the 64-bit bootstrapper with the latest update, so it's no longer a problem for a friend. But I've let them know they can shorten the workaround launch option to WINE_CPU_TOPOLOGY=40 %command% if they need it in the future (VRChat has rolled back to the 32-bit bootstrapper in the past).

I've also reconfirmed with them that the old 32-bit bootstrapper still causes the launch error, even with Proton Experimental (9.0).

@poisonsnak
Copy link

I noticed you have Death end re;Quest (990050) in your list. The sequel Death end re;Quest 2 (1266220) has the same issue as the original.

In these two games it isn't a failure to launch but really bad performance and stuttering. The GPU load and clock is very low so it's almost like it doesn't realize it needs to clock up and get to work. The bug #2705 you referenced starts out with failures launching in 2019 but those seem to be resolved and then it shifts to the performance/stuttering issues and the first mention of adding WINE_CPU_TOPOLOGY=2:0,1 in 2023 . I still had a few stutters with that but found WINE_CPU_TOPOLOGY=1 to be pretty much perfect.

@Root-Core
Copy link

@ivyl This is a good start, there are certainly a lot of games in the list that could benefit from this.

Games like The Forest (and some other Unity games) could benefit even more from a non-static value, like in my SMT fix. It is quite hard to check all these games without licences and an expensive CPU though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests