Giter VIP home page Giter VIP logo

protonfixes's Introduction

protonfixes

Build Status

Screenshot

A module for applying fixes at runtime to unsupported games with Steam Proton without changing game installation files. The idea is to include separate fixes that are only loaded when a game matching that ID is run. This should keep the individual game fixes from affecting any other games. Applying the fixes at runtime should also get them to persist after game updates.

A list of current fixes, guide for writing game fixes, and details on game fix utilities can be found on the Wiki. Sources for gamefixes can be found in the protonfixes/gamefixes directory.


Installation

Optional Requirements

Winetricks

If you want to be able to use fixes with winetricks it must be installed and be in your $PATH. Fixes that do not use winetricks will still work without winetricks being installed.

Winetricks can take a long time to run

Wine

If you want to use a win32 (32bit) prefix, you need to have wine installed and be in your $PATH. Currently creating a 32bit prefix with Proton wine doesn't work because the wineserver is already running by the time user_settings.py is loaded.

Progress Dialog / Splashscreen

If Steam is in big picture mode, protonfixes will try to launch a similarly themed splash dialog using kivy (pictured above). zenity or kdialog can also be used but need to be enabled manually via config. If Steam is not in big picture mode, it will try kdialog, then zenity.
The progress bar or splashscreen can help let you know that protonfixes is running a long task, for example installing dotnet35.

For the progress dialog to work, you need to have zenity or kdialog installed on your system, the steam-runtime version of zenity is broken.
It can probably be installed using your distro's package manager.

For the big screen splashscreen to work, you need to have kivy installed. It can be installed via your distro's package manager (python3-kivy on debian-based distros and python-kivy on Arch-based ones)

Install With PIP

Make sure to use the version of pip that matches the version of Python that Proton is running. Proton should be running on python3. Use pip to install from the GitHub repository, the PyPI package is not being maintained at the moment.

If pip3 is not installed, it can be installed with your distribution's package manager: the package is python3-pip on Ubuntu/Debian-based distributions, python-pip in many others.

To install the latest version from Github:

#  pip3 install git+https://github.com/simons-public/protonfixes

Upgrade from PIP

To upgrade to the latest version on Github:

# pip3 install --upgrade git+https://github.com/simons-public/protonfixes

Install using setuptools

# python3 setup.py install

Enabling protonfixes in Proton

Protonfixes includes a script install_protonfixes that, when run, will automatically install protonfixes in all Proton installations.
A manual installation is possible by browsing <Steam installation>/steamapps/common/Proton* and adding this line to user_settings.py

import protonfixes

If there is no user_settings.py file, make a copy of the user_settings.sample.py file included with Proton.


Contributing

Pull requests are welcome! If you're not comfortable doing pull requests, send your fixes to me by any other means and you will be credited in the comments.

protonfixes's People

Contributors

alisonjenkins avatar basxto avatar blueboxware avatar bmaupin avatar daniel-j avatar dreamer avatar faalagorn avatar gloriouseggroll avatar jamartin9 avatar joshuafern avatar junglerobba avatar lucki avatar marc-pierre-barbier avatar mrjackv avatar mthsk avatar noxphasma avatar pchome avatar pobega avatar qdevpl avatar sifiro avatar simons-public avatar sirmentio avatar soredake avatar springwurm avatar techtonik avatar tgurr avatar thisnekoguy avatar torvitas avatar vansoest avatar wleoncio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

protonfixes's Issues

[379720] Doom 2016 ChromaSDK

Hello I just want to mention that Doom 2016 normally needs more than vcrun2015 to run without a problem. As far as I can tell your project does not support downloading and replacing things, so that needs to be tackled, if you want to support this kind of fix.

Here is the Lutris installer script and my Proton issue about it:
Lutris script
Proton issue

I don't really mind, if you dislike the idea of downloading things and just close the issue.
Kind regards,
Riesi

Invalid syntax error for the user_settings.py

Hello,
I'm very sorry to bother you for such a stupid question, but whats the right syntax for the 'import protonfixes' line in 'user_settings.py'? I'm totally not into programming, I installed protonfixes and added the line, but the log says

Proton: ************************************************
Proton: THERE IS AN ERROR IN YOUR user_settings.py FILE:
Proton: invalid syntax (user_settings.py, line 21)
Proton: ************************************************

Could anybody help me here? I'm trying to play "Styx: Master of shadows" with Proton 3.16-4 and Mint 18.2

Typo in the Mafia 2 DE fix

protonfixes/gamefixes/1030830.py line 14.
dotnet542 supposed to be dotnet452

Sorry I don't really know how to use git or github.

Hat in time crashed because of this

Is your feature request related to a problem? Please describe.
Yep, before hat in time ran out of the box, and now with protonfixes it won't run

Describe the solution you'd like
Disable protonfixes for this game. Is there a way to do it?

Support native linux games

Not really an "Feature request", but rather a question.

Describe the solution you'd like
An possibility to use the same approach for native linux games launched from Steam.

The key feature of protonfixes is winetricks support, but there is some features may be useful for "regular" games. Like 'env vars', 'command args', 'file installation' and so on.

So, there is actually two questions:

  • is it worth ?
    Currently I don't know how to make this work the same way as for Proton, so the obvious way is to set e.g. steamfixes.py %command% in Steam's "Launch options" for every game.
  • is it possible to hook ?
    Steam using bash(sh?), . "${PATH_TO}/custom.sh somewhere should work, but it's hard for python script to take control on env vars, or command args.

Describe alternatives you've considered
Steam's "Launch options", or custom script which replacing real game's executable name, Feral's config/extra-environment.sh scripts.

Additional context
https://wiki.archlinux.org/index.php/Steam/Game-specific_troubleshooting

Add support for non-Steam games

I have some non-Steam Windows games that I'd like to make fixes-scripts for, in case I lose the proton prefix for that game, or mess it up. It's also so that others can set up same game with fixes applied.

Right now I use protontricks to do this manually. It can search for non-Steam games by name (to get the generated appid).

Describe the solution you'd like
I'd like that protonfixes detect what non-Steam game I'm launching and load a protonfixes script for it.

Describe alternatives you've considered
Use the name/title of a game to identify it is the most straightforward solution, since non-Steam games don't get predictive appids. I am unsure if the code exists in Proton or protonfixes to get the name of the game today. Alternatively, an environment variable could be used in launch arguments. For example PROTONFIXES_GAME=Journey %command%. This env var could also be set to an appid to run a fix-script for a Steam game (for example if you got a game from GOG that's also on Steam).

Exceptions not getting raised when using splash

Describe the bug
The splash context manager is blocking exceptions from being logged to stdout which makes troubleshooting difficult

To Reproduce
Make a local gamefix that includes raise

Expected behavior
The splash should close and the traceback should appear in the log

Age of Empires II does not need fixes anymore

The proton 3.16 release corrected the error with the DLL that was not letting Age of Empires II (221380) start.

Operating System:

  • Distro and Version: Arch Linux
  • Proton Version: 3.16

Game (if applicable):

  • Game Name: Age of Empires II
  • Game ID: 221380

Add functions to change OS and overwrite loading of libraries.

Would be great if you could add functions so it's possible to change the OS on runtime. Default is Windows 7 but some installer need to run as XP. Another feature which would be really helpful is to overwrite how libraries are loaded.

For example, Little Nightmares needs xact installed but also set xaudio2_6 and xaudio2_7 to native. Another example is that some games need .net and then set mscoree to builtin.

util.protontricks does not work on first run

Describe the bug
I am developing a gamefix for Valiant Hearts, which needs corefonts installed (as all Uplay titles do) and found out, that util.protontricks('corefonts') does not work for me.

What is interesting: it never works on on first run, but always on second one - but it's not good enough, because Uplay won't show any interface without corefonts installed, thus user won't be able to log in to start the game.

Any ideas how to proceed?

Rise of Nations needs SkipIntroMovies=1 in rise2.ini

When installing Rise of Nations: Extended Edition on my cousin's new Linux installation via Steam Family Sharing, I noticed that Rise of Nations has some introduction movies that are not playing, which causes a long pause at start with a black screen.

Rather than fix the introduction movies, it is possible to disable them entirely by putting SkipIntroMovies=1 ~/.local/share/Steam/steamapps/compatdata/287450/pfx/drive_c/users/steamuser/Application Data/Microsoft Games/Rise of Nations/rise2.ini. That file won't exist until first run, but in theory, the game should add any missing entries during first run, so it should be okay to create with just SkipIntroMovies=1 in it. This of course needs testing.

I don't have time to test out ideas to fix the protontricks script until the weekend, but I wanted to report this sooner rather than later.

Implement wine registry edit

One more useful feature. util.regedit_add('key_name', 'value_name', 'data', type=None) ?
Can be used for e.g.

  • force Nvidia GPU vendor in newer Proton versions ;)
  • overriding dlls separately for a Launcher.exe and Game.exe
  • etc.

Describe the solution you'd like
This function should call $ wine reg add $key_name$ /v $value_name$ /d $data$ /f.

Describe alternatives you've considered
More complex alternative is to use $ wine regedit /S and import a fix.reg file.

Additional context
$ wine reg /?

Usage:
  REG [operation] [parameters]

Supported operations:
  ADD | DELETE | IMPORT | EXPORT | QUERY

For help on a specific operation, type:
  REG [operation] /?

$ wine reg add /?

REG ADD key_name [/v value_name | /ve] [/t type] [/s separator] [/d data] [/f]

$wine reg add 'HKEY_CURRENT_USER\Software\Wine\AppDefaults\Launcher.exe\DllOverrides' /v msvcp110 /d native /f

Update game list generation script

for i in protonfixes/gamefixes/*.py;do head -q -n1 "$i" |\
sed \
-e 's/"""//g' \
-e 's/\s\?Game fix\( for\)\?\s//' \
-e 's/\s\?([0-9]\+)//' \
-e "s/$/ \($(basename "$i" .py)\)/"
done | sed 's/^/- /' | sort

Do setting os.environ from gamefix actually work?

Previously was discussed a bit starting here: #1 (comment) and further.

To get sure I tried with os.environ["DXVK_HUD"] = "fps", but no FPS counter shows up.
So, this won't work, because Proton overwrites these variables in the proton file.

I'm not familiar with Python, and maybe there is some magic when os.environ changed, but:

  • Proton overrides many env vars and collects them in env[]
  • Proton using env=env to path changed environment values
  • protonfixes manipulating os.environ values which wouldn't be used (Proton already using env[])

To Reproduce
os.environ['DISPLAY'] = ':1' or any non-used display number

Expected behavior
With incorrect DISPLAY number wine should produce error:

0009:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0009:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.

Logs
See above.

Operating System:

  • Distro and Version: not applicable
  • Proton Version: Proton 3.7 Beta

Game (if applicable):

  • Game Name: any
  • Game ID: any

Additional Information

winetricks does not install dotnet40 (Proton 3.16 only)

Describe the bug
Winetricks refuses to install dotnet40.
I'm testing this with One Finger Death Punch. Should be easy, install dotnet40 and it will run but instead nothing happens and protonfixes is trying to install dotnet40 on every launch.

I'm able to install dotnet40 manually with

  • WINEPREFIX=/path/to/pfx winetricks dotnet40 + manual clicking through the installer
  • LC_ALL=C WINEPREFIX=/path/to/pfx winetricks --unattended dotnet40

but it does not work with

  • WINEPREFIX=/path/to/pfx winetricks --unattended dotnet40

However, there's also this line in the log: /mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/dist/bin//wine cmd.exe /c echo '%ProgramFiles%' returned empty string
Running the command manually WINEPREFIX=/path/to/pfx /mnt/Games/Steam_Windows/steamapps/common/Proton\ 3.16/dist/bin/wine cmd.exe /c echo '%ProgramFiles%' returns the correct answer: C:\Program Files (x86)

To Reproduce
Create a minimal example and use it.

""" Game fix for One Finger Death Punch
"""

# pylint: disable=C0103

from protonfixes import debug
from protonfixes import util
from protonfixes.logger import log


def main():
    """ Uses winetricks to install dotnet40
    """

    log('Applying fixes for One Finger Death Punch')

    # If not already installed, install dotnet40
    util.protontricks('dotnet40')

Expected behavior
Winetricks installs dotnet40 and the game starts like it does when I manually install dotnet40 with winetricks.

Logs

ProtonFixes[24377] INFO: Checking if winetricks dotnet40 is installed
ProtonFixes[24377] INFO: Installing winetricks dotnet40
ProtonFixes[24377] DEBUG: Using winetricks command: ['/usr/bin/winetricks', '--unattended', '--force', 'dotnet40']
ProtonFixes[24377] DEBUG: Deleting syswow64
ProtonFixes[24377] DEBUG: ['/mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/proton', 'waitforexitandrun', '/mnt/Games/Steam_Windows/steamapps/common/One Finger Death Punch/One Finger Death Punch.exe']
ProtonFixes[24377] DEBUG: ['/mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/proton', 'waitforexitandrun', '/mnt/Games/Steam_Windows/steamapps/common/One Finger Death Punch/One Finger Death Punch.exe']
ProtonFixes[24377] INFO: Using winetricks verb dotnet40
saving roaming config store to 'sharedconfig.vdf'
roaming config store 2 saved successfully
[following 3 lines many times:]
pid 24401 != 24379, skipping destruction (fork without exec?)
ERROR: ld.so: object '/home/lucki/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
>>> Adding process 24397 for game ID 264200
[…]
------------------------------------------------------
/mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/dist/bin//wine cmd.exe /c echo '%ProgramFiles%' returned empty string, error message "ERROR: ld.so: object '/home/lucki/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/lucki/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored." 
------------------------------------------------------
ERROR: ld.so: object '/home/lucki/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/lucki/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ProtonFixes[24377] DEBUG: Killing hanging wine processes
ProtonFixes[24377] INFO: Winetricks complete

Operating System:

  • Distro and Version: Arch Linux
  • Proton Version: 3.16-3 Beta

Game (if applicable):

Additional Information
Non-default Steam Library folder on ntfs in /mnt/Games/Steam_Windows.
German system locale.

Batman™: Arkham Knight raises UnicodeDecodeError on start

Describe the bug
When Batman™: Arkham Knight starts, Python raises a UnicodeDecodeError error, which would prevent the fix to be applied. This happens even there is no fix file available. Something seems to be wrong with Protonfixes and this game (there might more games). When I remove Protonfixes from the config file, no error appears.

To Reproduce

  • Install protonfixes
  • run Batman™: Arkham Knight

Expected behavior
There shouldn't be an error and the protonfix, if available, should be applied.

Logs
https://gist.github.com/NoXPhasma/70eea75d4d6326a255a242de14f51d69

Operating System:

  • Distro and Version: Linux Mint 19
  • Proton Version: Proton 3.16-4 Beta

Game (if applicable):

  • Game Name: Batman™: Arkham Knight
  • Game ID: 208650

Additional Information
Add any other information [i.e. Modified Proton, Non-default Steam Library folder, etc] that might be useful in troubleshooting.

crashing running protonfixes for Soulcalibur6

Describe the bug
ProtonFixes[9295] INFO: Running checks
ProtonFixes[9295] INFO: All checks successful
ProtonFixes[9295] INFO: Using protonfix for "SOULCALIBUR VI" (544750)
ProtonFixes[9295] INFO: Checking if winetricks mf_install is installed
ProtonFixes[9295] INFO: Installing winetricks mf_install
ProtonFixes Traceback (most recent call last):
File "/mnt/daten/Home/.local/share/Steam/compatibilitytools.d/Proton-4.15-GE-1/protonfixes/init.py", line 19, in
fix.main()
File "/mnt/daten/Home/.local/share/Steam/compatibilitytools.d/Proton-4.15-GE-1/protonfixes/fix.py", line 118, in main
run_fix(game_id())
File "/mnt/daten/Home/.local/share/Steam/compatibilitytools.d/Proton-4.15-GE-1/protonfixes/fix.py", line 79, in run_fix
game_module.main()
File "/mnt/daten/Home/.local/share/Steam/compatibilitytools.d/Proton-4.15-GE-1/protonfixes/gamefixes/544750.py", line 9, in main
util.protontricks('mf_install')
File "/mnt/daten/Home/.local/share/Steam/compatibilitytools.d/Proton-4.15-GE-1/protonfixes/util.py", line 204, in protontricks
env = dict(protonmain.env)
AttributeError: module 'main' has no attribute 'env'

To Reproduce
Start SC6

Expected behavior
media framework gets installed

Logs
Please post debug logs to help identify the problem (Preferably on Gist). Steam logs can be found at /tmp/dumps/$USER_stdout.txt. Debug info can be enabled by adding from protonfixes import debug to your user_settings.py file:

from protonfixes import debug
import protonfixes

Operating System:

  • Distro and Version: Gentoo
  • Proton Version: 4.15-GE1

Game (if applicable):

  • Game Name: SOULCALIBUR 6
  • Game ID: 544750

Additional Information
Add any other information [i.e. Modified Proton, Non-default Steam Library folder, etc] that might be useful in troubleshooting.

A Hat in Time and Rise of Nations are missing fixes

For Rise of Nations:

ValveSoftware/Proton#298 (comment)

The crypt32 workaround is no longer needed as of 3.16-3. However, you need to set sound=alsa (when using PulseAudio), install directmusic and set overrides for dmime, dmsynth, dmusic, dsound, dswave and l3codecx in addition to bypassing the launcher to get it to work.

For A Hat In Time:

ValveSoftware/Proton#173

You need to install xact. There is some minor graphical corruption in act 3 of the first chapter, but aside from that, it seems to work fine.

No module named 'protonfixes'

Describe the bug
"No module named 'proton fixes'" in logs when running games via steamplay

To Reproduce

  • pip3 install protonfixes
  • edit user_settings.py - add line import protonfixes
  • run a steam game via steamplay

Operating System:

  • Distro and Version:
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal
$ cat /proc/version
Linux version 5.4.0-51-generic (buildd@lcy01-amd64-020) (gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)) #56-Ubuntu SMP Mon Oct 5 14:28:49 UTC 2020

All my partitions are encrypted via ubuntu's fde if thats relevant

  • Proton Version: Proton 5.13

logs below contains information about modules and executable

user_settings.py

import sys
print(sys.executable)
print(sys.modules)

#Settings here will take effect for all games run in this Proton version.

import protonfixes
user_settings = { ....

Logs: https://gist.github.com/NeumimTo/566c00390f175d183e21671da74748d9

Protontricks seems to be installed correctly in my system, I can import protontricks module from python3 console

$ python3
Python 3.8.5 (default, Jul 28 2020, 12:59:40) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import protontricks
>>> protontricks.
protontricks.COMMON_STEAM_DIRS                 protontricks.find_steam_runtime_path(          protontricks.run_command(
protontricks.SteamApp(                         protontricks.get_custom_proton_installations(  protontricks.select_steam_app_with_gui(
protontricks.create_wine_bin_dir(              protontricks.get_runtime_library_path(         protontricks.steam
protontricks.find_appid_proton_prefix(         protontricks.get_steam_apps(                   protontricks.util
protontricks.find_proton_app(                  protontricks.get_steam_lib_paths(              protontricks.winetricks
protontricks.find_steam_path(                  protontricks.get_winetricks_path(              
protontricks.find_steam_proton_app(            protontricks.gui                               
>>> protontricks.COMMON_STEAM_DIRS
['.steam/steam', '.local/share/Steam']
>>> exit()

Activate game fix from runner options

Describe the solution you'd like
An environment variable in runner option, for enable fixes by game.
For example: PROTONFIXES_ENABLE=1 %command%

Describe alternatives you've considered
May be an wrapper script or PROTONFIXES_DISABLE=1 environment variable.

[Feature Request] Return Proton version

Now with Proton 3.16-5 we have FAudio support, which fixes most xact problems. Means that those fixes wouldn't be needed in most cases if a Version of 3.16-5 or higher is been used. And we will most probably hit much more upstream fixes in the future.

Now it would be nice to have a function to give back the version in use. However, best would be to give it back as list, like [3, 16, 5]. In that case it would be easy to check for that.

Smite Gamefix

Hi can you please add Smite gamefixes?
I cannot code so Iam asking.

You would need to add:

  • protontricks 386360 dotnet40 physx vcrun2010 vcrun2012 vcrun2013 vcrun2015
  • protontricks 386360 winecfg change Windows version to Windows XP
    -Add these as (native, buildin): dxgi d3d9 d3d10 d3d10core d3d11 d3dx9_43 d3dx10_43 d3dx11_43
  • set Launch options to "PROTON_USE_WINED3D=1 PROTON_NO_ESYNC=1 %command%"

About the EAC I dont know if this is possible to also add you need the files from paladins.

(From the Paladins/Binaries/EasyAntiCheat/ folder copy everything except for the Certificates and Launcher folder to the Steam/steamapps/common/SMITE/Binaries/EasyAntiCheat/ folder copy both EasyAntiCheat dll files in the EasyAntiCheat folder to Steam/steamapps/common/SMITE/Binaries/Win32/EasyAntiCheat/and Steam/steamapps/common/SMITE/Binaries/Win64/EasyAntiCheat/)

Thank You

How to install ?

Im on manjaro x64 but is not work ?

Have copy and rename user_settings.sample.py to user_settings.py in folder :
/home/pc/.steam/steam/steamapps/common/Proton 3.16/

Have install sudo pip install cefpython3 & sudo pip install protonfixes
And have add import protonfixes on user_settings.py & user_settings.sample.py

For what not work is not ok ?

Best Regards

Implement automated game name logging

Many gamefixes contains log('Applying fixes for $MyGameName$'). This can be automated.

Describe the solution you'd like
You can cut game installation path (util.get_game_install_path()) to just /path/to/library/SteamApps and use appmanifest_$GameId$.acf file to read name field.

Describe alternatives you've considered
Good enough alternative is to keep using log() in game fixes.

Additional context

cd /path/to/library/SteamApps
grep '"name"' *.acf

Age of Empires III is broken

When helping out my cousin setup Age of Empires III on his new Linux installation, I discovered that the protontricks compatibility fix for it are broken. Steam did not like the 32-bit prefix and the 32-bit prefix itself is entirely unnecessary, as I had installed it in a 64-bit prefix using proton tricks:

ValveSoftware/Proton#17 (comment)

I don't have time to test out ideas to fix the protontricks script until the weekend, but I wanted to report this sooner rather than later.

To be clear, he was using Proton 3.7-8.

Hardlinking of corefonts breaks games on different partitions/drives

Describe the bug
The Corefonts functionality added in e34bfc6 breaks games when those are on a different partition/drive as the home partition/drive. This happens due the fact that no hard links are allowed between different devices.

To Reproduce

  • Install game on a different partition/drive as the home
  • add protonfixes to user_settings.py
  • launch the game

Expected behavior
Games shouldn't stop launching and symlinks should be symbolic or fonts should be copied.

Logs
Steam stdout, no Proton log will be created.
https://gist.github.com/NoXPhasma/e8c3f50c9c8287ff026f1254cfd47003

Operating System:

  • Linux Mint 19
  • Proton Version: 3.16-3

Game (if applicable):
Not game dependant.

Additional Information
Add any other information [i.e. Modified Proton, Non-default Steam Library folder, etc] that might be useful in troubleshooting.

Space Engineers support

Is your feature request related to a problem? Please describe.
Space Engineers support is currently missing from prontofixes.

Describe the solution you'd like
These are the steps required to get the game to work:

  1. protontricks 244850 --force -q dotnet472 vcrun2015 faudio d3dcompiler_47
  2. Edit the XML file $HOME/.local/share/Steam/steamapps/common/SpaceEngineers/Bin64/SpaceEngineers.exe.config and set gcServer to be enabled: <configuration><runtime><gcServer enabled = "true"/></runtime></configuration>
  3. Rename the intro video file so it does not load (it prevents the game from starting): $HOME/.local/share/Steam/steamapps/common/SpaceEngineers/Content/Videos/KSH.wmv

Describe alternatives you've considered
As of right now, the SpaceEngineersLinuxPatches project is the only way to apply the fixes in a semi-automated way. It still requires manual steps by using an interactive GUI. This would make more sense to be integrated directly into protonfixes.

Handle Proton 3.16 regressions

Describe the bug
After updating to Proton 3.16 I noticed multiple issues that were not present in 3.7

**Examples: **

  • XBOX 360/Steam controller trigger axis being treated as joystick axis in some games (FFIX)
  • dotnet40 winetrick not installing properly (affects Styx)

Additional Information
Added util.protonversion() as a start, but this only gives the major/minor version of Proton, more work is needed in finding out why some things have regressed.

The dotnet40 issue is with wine 3.16 has some information here

doesn't find wine bin if protondir is in a non-default directory

Traceback (most recent call last):
  File "/mnt/data/newdisk/Steam4T/steamapps/common/Proton 3.7/proton", line 142, in <module>
    import user_settings
  File "/mnt/data/newdisk/Steam4T/steamapps/common/Proton 3.7/user_settings.py", line 2, in <module>
    import protonfixes
  File "/home/rene/.local/lib64/python3.4/site-packages/protonfixes/__init__.py", line 9, in <module>
    from . import fix
  File "/home/rene/.local/lib64/python3.4/site-packages/protonfixes/fix.py", line 49, in <module>
    run_fix(game_id())
  File "/home/rene/.local/lib64/python3.4/site-packages/protonfixes/fix.py", line 37, in run_fix
    game_module.main()
  File "/home/rene/.config/protonfixes/localfixes/35140.py", line 13, in main
    util.protontricks('dotnet40')
  File "/home/rene/.local/lib64/python3.4/site-packages/protonfixes/util.py", line 47, in protontricks
    env['WINESERVER'] = os.path.join(protondir(), 'dist/bin/wine')
  File "/home/rene/.local/lib64/python3.4/site-packages/protonfixes/util.py", line 29, in protondir
    'steamapps/common/Proton*'))[0]
IndexError: list index out of range

I added this to a local gamefix before the protontricks call:

for k,v in os.environ.items():
    if 'STEAM' in k:
        print(k,v)

which gave me:

Steam Env:
STEAMSCRIPT /usr/bin/steam
SDL_GAMECONTROLLER_ALLOW_STEAM_VIRTUAL_GAMEPAD 1
STEAMVIDEOTOKEN 000000
XXXXXXX

STEAMSCRIPT_VERSION 100054
STEAM_RUNTIME /home/rene/.local/share/Steam/ubuntu12_32/steam-runtime
STEAM_CLIENT_CONFIG_FILE /home/rene/.local/share/Steam/steam.cfg
STEAM_COMPAT_CLIENT_INSTALL_PATH /home/rene/.local/share/Steam
STEAM_COMPAT_DATA_PATH /mnt/data/newdisk/Steam4T/steamapps/compatdata/35140
STEAM_RUNTIME_LIBRARY_PATH /home/rene/.local/share/Steam/ubuntu12_32/steam-runtime/pinned_libs_32:/home/rene/.local/share/Steam/ubuntu12_32/steam-runtime/pinned_libs_64:/usr/lib32/opengl/nvidia/lib:/usr/lib64/opengl/nvidia/lib:/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/32:/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0:/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/32:/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0:/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/32:/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4:/usr/lib32/OpenCL/vendors/nvidia:/usr/lib64/OpenCL/vendors/nvidia:/usr/lib/llvm/5/lib32:/usr/lib/llvm/5/lib64:/usr/lib/llvm/4/lib32:/usr/lib/llvm/4/lib64:/usr/lib32/qt4:/usr/lib64/qt4:/lib64:/usr/lib64:/usr/local/lib64:/lib32:/usr/lib32:/usr/local/lib32:/opt/nvidia-cg-toolkit/lib32:/opt/nvidia-cg-toolkit/lib64:/usr/games/lib64:/usr/local/cuda/lib:/opt/cuda/lib64:/opt/cuda/nvvm/lib64:/usr/lib64/fltk:/usr/lib64/tls:/usr/lib32/tls:/home/rene/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu:/home/rene/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib:/home/rene/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu:/home/rene/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib:/home/rene/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu:/home/rene/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib:/home/rene/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu:/home/rene/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib

Implement gamefix groups for common gamefixes

Instead of having multiple similar fixes in xxxxx.py files, it would be better to add games to some fix-group.

E.g. dotnet40 and/or noesync groups, then corresponding fixes should be applied for GameId.

Data for e.g. noesync group can be collected from esync issues or Proton issues

Also nolauncher group with "from,to" parameters support would be great.

POC: Launcher/Configurator

The idea is simple: hold Left Ctrl key during game launch to spawn an program where one can add/modify PF options.

I hacked this as two parts: a simple keypress detector, to avoid additional dependencies (except it depends on X11), and a patch.

is_ctrl_key.c

#include <X11/Xlib.h>
#include <X11/keysym.h>

int main() {
  char keys_return[32];

  Display *dpy    = XOpenDisplay(NULL);
  KeyCode keycode = XKeysymToKeycode(dpy, XK_Control_L);

  XQueryKeymap(dpy, keys_return);
  XCloseDisplay(dpy);

  return !!(keys_return[keycode >> 3] & (1 << (keycode & 7))) ? 0 : -1;
}

patch

diff --git a/protonfixes/fix.py b/protonfixes/fix.py
index b026a31..16bacec 100755
--- a/protonfixes/fix.py
+++ b/protonfixes/fix.py
@@ -5,6 +5,7 @@ from __future__ import print_function
 import io
 import os
 import re
+import subprocess
 import sys
 from importlib import import_module
 from protonfixes.splash import splash
@@ -133,6 +134,28 @@ def main():

     log.info('Running protonfixes')

+    try:
+        # Check if Left Ctrl key pressed
+        subprocess.run(os.path.expanduser('~/.local/bin/is_ctrl_key'), shell=True, check=True)
+
+        lpf_file = os.path.expanduser('~/.config/protonfixes/localfixes/' + game_id() + '.py')
+
+        # Create local gamefix file
+        if not os.path.isfile(lpf_file):
+            lpf_template = ''
+            lpf_template += 'from protonfixes import util' + "\n\n"
+            lpf_template += 'def main():' + "\n"
+            lpf_template += '    """ game: ' + game_name() + "\n"
+            lpf_template += '    """' + "\n"
+            lpf_template += '    #util.set_environment("PROTON_USE_WINED3D11", "1")' + "\n"
+            lpf_template += '    '
+            subprocess.run('echo \''+ lpf_template +'\' >> ' + lpf_file, shell=True, check=True)
+
+        #subprocess.run('xdg-open ' + lpf_file, shell=True, check=True)
+        subprocess.run('kate ' + lpf_file, shell=True, check=True)
+    except subprocess.CalledProcessError:
+        pass
+
     if config.enable_splash:
         with splash():
             run_fix(game_id())

When LCtrl pressed, PF will check for existing local gamefix or will create a new one from template. Then (in this example) will open it with the text editor (kate). After closing editor session PF will continue it's work and should load modified gamefix as usual.

Could be changed to an GUI program with most common proton switches to select, if any do/will exist.

Winetricks does not always create wintricks.log causing re-installs to happen

Is your feature request related to a problem? Please describe.
I can see in the logs that every time you run a game with protonfixes script that has a winetricks command it in. That it will always run the winetricks command, before the game starts. Which makes the start up much slower then it should be.

Describe the solution you'd like
Have a check whenever a winetricks is installed or not before it runs the command.

Describe alternatives you've considered
Not 100% sure how, maybe there is a check in winetricks.

[RFC] Deprecating cefpython

I'm writing this issue in order to spark a discussion regarding the use of cef in this project.
While cef allows the use of html+css+js to create an appropriately themed splash screen for
big picture mode, it has some drawbacks:

  • The project has been going at a snail's pace for the last year and a half with no new releases past v66 (chromium is currently on v78)
  • cefpython is not packaged in any linux distribution, and needs to be installed manually via pip
  • The python wheel bundles the spotify build of chromium, which might not be pleasing for the more security-oriented linux users (then again steam is a giant ball of binary blobs 🤷‍♂️ )
  • Even with some stripping, an installation of cefpython is around 200MB
  • Building cefpython with any version of python > 3.7 (e.g. Arch or Ubuntu Focal) is really hard
  • Spawining an entire browser in order to show a progress bar seems a bit excessive

The options for a replacement are multiple (pySide, pyGobject, kivy and others).
IMHO I would pick kivy among the contenders as it has the following advantages:

  • Low footprint both in terms of computing power and in terms of required dependencies (basically sdl2)
  • An interface similar to cef can be written in a few hundred lines
  • Does not use a desktop-oriented toolkit (e.g. gtk/qt) and therefore it is easier to write a borderless splash that does blend well with big picture mode

I'm eager to know what others think on the matter.

Race condition with win32 prefixes

protonfixes has to delete the syswow64 directory when running in a win32 prefix because winetricks determines that the prefix is 64bit if syswow64 exists. Then the syswow64 directory gets recreated so that Proton doesn't crash when running. But if proton runs multiple commands when a game launches, it can cause the game not to launch the first time it is selected.

Subsequent launches of the game will not have the same issue because winetricks will only run if the verb hasn't already been installed.

autoimport (most) of your gamefixes into my stl

Hi,
I'm the author of the Steam wrapper tool SteamTinkerLaunch (or short stl)
which is started directly as Steam startoption stl %command% and offers a wide range of extra features for the launched game.
One of them is that required configurations get auto applied to get a game working ootb.
Currently I'm planning to implement "autotweaks" - a function to (optionally) search for required tweaks on different platforms
and think it would be great to implement an "importer" for your gamefixes as well.
Basically stl would clone/pull protonfixes and when a game is launched it would check if a matching "$SteamAppId.py" file exists and would extract the tweaks from there (at least winetricks packages, exe overrides, commandline parameters, registry entries, env variables, maybe later also custom scripts)
I opened an issue for myself, to gather some ideas already here

Would be great if this is ok for you, else I would just write a quick offline script which parses your gamefixes once and creates static stl "tweak files" for bundling with my project (which I guess should not be a problem, right?)
cheers!

ModuleNotFoundError: No module named 'protonfixes'

Not sure if this is the right way to do report this kind of fault. But i need some help, im not an expert when it comes the Python language.

But i follow your small guide, i used the pip installation and installed the stuff i needed to finish it.

I added the line "import protonfixes" in user_settings.py (after #!/usr/bin/env python)

But when i try to launch the game Final Fantasy IX nothing happens, but when i check the error.log in .steam folder. I see the following line:

ModuleNotFoundError: No module named 'protonfixes'

Im missing something?

EDIT: Just side information, my steamapps folder is not under ~/.steam, but in a total diffrent folder and harddriver.

EDIT 2: Im using Linux Mint 19

kdialog splash not working

Describe the bug
Kdialog splash is not working, and no fixes installed. If i install python-cef python-kivy kdialog is working and fixes installed.

To Reproduce
Install arch, install kdialog, try launch game with fixes.

Expected behavior
Kdialog wokring.

Logs
kdialog.log

from protonfixes import debug
import protonfixes

Operating System:

  • Distro and Version: ArchLinux
  • Proton Version: Protonfixes 5.0-5

Game (if applicable):

  • Game Name: Collapse
  • Game ID: 289620

Additional Information
Add any other information [i.e. Modified Proton, Non-default Steam Library folder, etc] that might be useful in troubleshooting.

Wiki is outdated

As the title states the wiki is quite outdated.
Things that need updating:

  • Remove Installation or reference it in README.md (it doesn't make sense to have the same instructions in 2 places or discordant instructions)
  • List of Fixes hasn't been updated in 2 years
  • The Gamefix utilities section of Writing Gamefixes is a bit outdated, some new commands have been included in utils and download that might be nice documenting
  • There is wiki/Gamefix-Utilities which is linked from README.md and wiki/Writing-Gamefixes#gamefix-utilities which is shown in the main page of the wiki

Proton copies 64bit libraries into system32

Proton copies 64bit libraries into system32 because system32 on a 64bit system holds the 64bit libraries normally and proton only knows about 64bit prefixes. Proton copies the 32bit libraries into syswow64

Symlinking syswow64 to system32 doesn't work because the 64 bit libraries are copied after the 32bit libraries and share the same name. This affects dxvk, wined3d11, vrclient and openvr_api_dxvk.

Have a check if user is on Big Picture Mode

Is your feature request related to a problem? Please describe.
Not a problem with protonfixes itself, but problem with companies that uses launchers in their games. Take a example, Batman Arkham Asylum here you need to use keyboard / mouse in order to move forward and launch the game. Hence breaks the Console Experience with SteamBox.

Describe the solution you'd like
Have a check in gamefix-script when user uses Big Picture Mode and use "util.replace_command" to skip launcher.

Like
if util.protonbigpicture('SteamTenfoot') # Skip the launcher if using BPM for more Console Experience util.replace_command('Binaries/BmLauncher.exe', 'Binaries/BmStartApp.exe')

Inline script and styles in Splash Screen

Currently javascript and styles are fetched from CloudFlare CDN
https://github.com/simons-public/protonfixes/blob/master/static/index.html

Which (IMHO) would not work correctly w/o network or CloudFlare access (e.g. Steam offline mode and network disconnected).

Describe the solution you'd like
Inline those files contents. Or better drop cefpython3 dependency.

Describe alternatives you've considered
Possible native solution: zenity, kdialog, libnotify, ...
E.g. sleep 2 | zenity --progress --pulsate --auto-close
works for me using https://stackoverflow.com/questions/13332268/python-subprocess-command-with-pipe#13332300 example.

Additional context
Not applicable.

Implement protonfixes option to install "Media Foundation" dlls

Is your feature request related to a problem? Please describe.
A lot of games require the "Media Foundation" dlls to run properly, otherwise they render black screens or dont render movies or some other parts of the game properly A small sample of games affected by this are:
Monster Hunter World
Blaz Blue Central Fiction
GRIS
Breathedge
FINAL FANTASY TYPE-0 HD
Car Mechanic Simulator 2018
PC Building Simulator
American Fugitive
Dauntless
Remnant: From the Ashes

Describe the solution you'd like
The most popular workaround is to use the solution provided by this repo:

https://github.com/z0z0z/mf-install

It would be really useful to be able to have the repo as part of the project, and to execute the install script on the prefix based on a 'protonfixes' option that can be specified.

Describe alternatives you've considered
I may be able to code this myself and submit a PR, but my time is limited between my job and side projects. If you or someone is able to get to it before me it would be awesome and helpful.

Implement game config file edit

Probably useful feature. util.set_game_option('section', 'option', 'value', 'file')?

Describe the solution you'd like
Similarly to util.set_dxvk_option() we can use /path/to/pfx/drive_c/users/steamuser/My Documents/GameName/config.file to modify game's INI configuration file.

Additional context
Not sure if there is any game requires modification of game's config to be launched, but it could be useful for local gamefixes to take more control in one place.

Also we know more about system, so some system specific options could be modified.
E.g. common Unreal Engine fixes, like PoolSize (https://pcgamingwiki.com/wiki/Engine:Unreal_Engine_3#Stuttering_and_texture_.22popping.22)

I'll probably implement this by myself one day, but if anyone like/want this now -- here is the idea.

Typo in Mafia 2 DE fix

protonfixes/gamefixes/1030830.py line 14.
dotnet542 supposed to be dotnet452

Sorry I don't really know how to use git or github.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.