Proton: Option to slow game down

Created on 25 Sep 2019  ·  9Comments  ·  Source: ValveSoftware/Proton

Feature Request

I confirm:

  • [] that I haven't found another request for this feature.
  • [] that I have checked whether there are updates for my system available that
    contain this feature already.

Description

Some old game like Commandos runs too fast on modern Linux PC.
These games often relay on empty loops to delay.
It is better to have an option to slow down the virtual CPU and make those empty loops as slow as an old, like a 486DX chip.

The option can be relative, like 1/2, 1/3, 1/10 of the host CPU speed.
I do NOT need it to be precisely some CPU chip models like 486DX100.

Justification [optional]

Wine is not designed for old games. And slow the virtual CPU down is not needed for normal windows applications.

Risks [optional]

References [optional]

Feature Request

Most helpful comment

I don't feel that's actually something for Wine/Proton to do.

The goal of Proton is to get games to run same as Windows but on Linux. They fill in the parts to complete the game and get it working as it would today. This cpu issue should be the same on any OS.

You don't need Proton to slow down the game, you can do that by eg underclocking the cpu, etc. In any case, its also not up to Proton to essentially fix code choices on the part of game's devs. _To clarify, using a for loop for a delay can be done but stuff like this, unnecessary cpu usage, etc is why it shouldn't and its not up to Valve to fix problems as a result of that._

All 9 comments

Possible duplicate of #1347.

It is not about FPS. It is about CPU speed.

For example, you can write for (double i=1;i<100000.0;i++) {} with gcc -O0 to achieve a 1 second delay on an old CPU. May be 386SX in this case.
But if you run the game in the future CPUs like Core i7-8700, the delay will not be 1 second, but much shorter.

I want Proton to offer an option to make it slow down to 1 second, or maybe 2 second.


Since a game should not attempt to modify windows system files to achieve empty-loop-delay, we can skip slowing down the windows drivers like the vxd files, skip the disk IO, skip GDI/DirectX and skip slowing down audio device.
Only the game itself need to be slowing down.

I don't feel that's actually something for Wine/Proton to do.

The goal of Proton is to get games to run same as Windows but on Linux. They fill in the parts to complete the game and get it working as it would today. This cpu issue should be the same on any OS.

You don't need Proton to slow down the game, you can do that by eg underclocking the cpu, etc. In any case, its also not up to Proton to essentially fix code choices on the part of game's devs. _To clarify, using a for loop for a delay can be done but stuff like this, unnecessary cpu usage, etc is why it shouldn't and its not up to Valve to fix problems as a result of that._

Proton is to provide game experience to Linux users. And game should include old style games.

For older DOS games, DOSBox offers options to slow games down as https://www.dosbox.com/wiki/Configuration:CPU.

It is not good for programmers to use for loop for a delay, but players cannot modify those games.

_Commandos_ is still being sold on Steam, and it is too fast now as reported by other players at https://steamcommunity.com/app/6800/discussions/0/864978835490388953/.
There seems to be a patch according to that thread, but both links are dead now.
It seems there is not official patch now.
From https://www.gog.com/forum/commandos_series/game_speed_too_high, there are windows tools to slow down games, but those tools should be difficult to use on Linux together with Steam client. I cannot even figure out how to run two windows apps within one proton session.

We are players but not hackers, thus we are not supposed to crack into a game and patch it.
If the original game developer does not help, how can we enjoy a game that still on Steam ?

Valve as a platform provider, should do sth. to help players to get fun from games without the need of hacking them.

@galaxy001

There seems to be a patch according to that thread, but both links are dead now.

https://pcgamingwiki.com/wiki/Commandos:_Behind_Enemy_Lines#Steam_.22Ultimate_Fix.22

Did you try with taskset?

We are players but not hackers, thus we are not supposed to crack into a game and patch it.
If the original game developer does not help, how can we enjoy a game that still on Steam ?

Valve as a platform provider, should do sth. to help players to get fun from games without the need of hacking them.

Does not valid make. Valve is not the developer, they do not fix eg crashes for devs unless its on Valve's side. This is not on their side. Valve could do more strict rules about how many crashes a game can have, how well it plays, etc and then remove games based on that but it is not for them to fix stuff. The dev of the game should be the one to do it.

You're trying to get Valve to do something that is not theirs to fix. Community, other 3rd party stuff is something completely different and often it is that 3rd section of people that fix things in games for devs when possible because devs cannot or will not. That's the party of people you're wanting here, not Valve. You cannot place everything on Valve.

I know I am requesting an extra function on Proton, which is only relevant to games and that is why I think it might not be needed in Wine.

Talking about gaming experience, it always better if Proton can do more.

For those historic games, I hope Proton can do something to save them.

Value can also earn more acceptance from players if he can take this responsibility.

From gog.com/forum/commandos_series/game_speed_too_high, there are windows tools to slow down games, but those tools should be difficult to use on Linux together with Steam client.

Don't really need any special tool, the standard cpulimit might work. Has anyone tried it here?

If you are on an ubuntu style system install it (if not already) via:

$ sudo apt-get update
$ sudo apt-get install cpulimit

Then start the game, get it's pid or use it's process name, for this example I'll use a PID of 1234, then to slow it down to, say, 25% of one single CPU core only then in a terminal run cpulimit -p 1234 -l 25, or slower if you need.

I know this doesn't resolve the issue, but it could at least help 'for now' unless/until steam/proton adds something to do it (would better belong in steam I'd think as this isn't purely a windows issue but rather an improper coding issue that can happen for any platform). Someone enterprising could create a script that potentially detects the clock speed of the system and estimates an appropriate slowdown value based on that, which could then be added to the command launch script in steam for a game, wouldn't be hard to do at all actually. cpulimit might make the game a bit jerky, but maybe enough to at least still play?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shaphanpena1 picture shaphanpena1  ·  3Comments

AwesamLinux picture AwesamLinux  ·  3Comments

matou68 picture matou68  ·  3Comments

lumni1968 picture lumni1968  ·  3Comments

kforney picture kforney  ·  3Comments