protontricks icon indicating copy to clipboard operation
protontricks copied to clipboard

Protontricks fails with Proton 5.13

Open therealfumbles opened this issue 4 months ago • 2 comments

Describe the bug Running protontricks and selecting a game that uses Proton 5-13 results in protontricks exiting before providing the option to choose a prefix. As such, can't use it to install required fonts.

To Reproduce Steps to reproduce the behavior:

  1. Run command protontricks
  2. Protontricks exits unable to select the game's prefix.

Expected behavior Dialog box to choose default prefix for game should appear.

System (please complete the following information):

  • Distro: debian sid
  • Protontricks installation method: pipx
  • Protontricks version: 1.12.1
  • Steam version: 1751405894 (Stable)
  • Latest commit of winetricks from Github.

Additional context

Verbose output leading to error:

protontricks -v --gui
/home/me/.local/share/pipx/venvs/protontricks/lib/python3.13/site-packages/protontricks/util.py:11: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  import pkg_resources
protontricks (INFO): Found Steam directory at /home/me/.local/share/Steam
protontricks (INFO): Using default Steam Runtime at /home/me/.local/share/Steam/ubuntu12_32/steam-runtime
protontricks (INFO): WINETRICKS environment variable is not available. Searching from $PATH.
protontricks (INFO): Found 1 Steam library folders
protontricks (INFO): Currently logged-in Steam user: me
protontricks (INFO): Couldn't find custom shortcuts. Maybe none have been created yet?
protontricks (INFO): Using 'zenity' as GUI provider
protontricks (INFO): User has configured app Proton version (CompatToolMapping): proton_513
protontricks (INFO): User has configured default Proton version (CompatToolMapping): proton_experimental
protontricks (INFO): Found active compatibility tool: Proton 5.13
protontricks (INFO): Active compatibility tool is a Proton installation
protontricks (INFO): Using 'bwrap = True' as default value
protontricks (INFO): Using separately installed Steam Runtime: Steam Linux Runtime 2.0 (soldier)
protontricks (INFO): Running Steam Runtime using bwrap containerization.
If any problems arise, please try running the command again using the `--no-bwrap` flag and make an issue report if the problem only occurs when bwrap is in use.
protontricks (INFO): Created Steam Runtime Wine binary directory at /home/me/.cache/protontricks/proton/Proton 5.13/bin
protontricks (INFO): WINE environment variable is not available. Setting WINE environment variable to Proton bundled version.
protontricks (INFO): WINESERVER environment variable is not available. Setting WINESERVER environment variable to Proton bundled version
protontricks (INFO): Starting bwrap launcher process: /home/me/.cache/protontricks/proton/Proton 5.13/bin/bwrap-launcher
protontricks - bwrap-launcher 108626: Following directories will be mounted inside container: /boot /build /etc /home /lib32 /lost+found /media /mnt /opt /root /sbin /srv /tmp
protontricks - bwrap-launcher 108626: Using temporary directory: /tmp/protontricks-exdbwx5p
pressure-vessel-wrap[108626]: W: Not sharing path --filesystem="/etc" with container because "/etc" is reserved by the container framework
pressure-vessel-wrap[108626]: W: Not sharing path --filesystem="/lib32" with container because "/lib32" is reserved by the container framework
pressure-vessel-wrap[108626]: W: Not sharing path --filesystem="/sbin" with container because "/sbin" is reserved by the container framework
protontricks (INFO): bwrap launcher started
protontricks (INFO): Attempting to run command ['/usr/bin/winetricks', '--gui']
Executing cd /usr/bin
winetricks GUI enabled, using zenity 4.1.90
------------------------------------------------------
warning: Your version of wine 5.13-789-gc14054e6923 is no longer supported upstream. You should upgrade to 8.x
------------------------------------------------------
------------------------------------------------------
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
------------------------------------------------------
WINEPREFIX INFO:
Drive C: total 36
drwxrwxr-x  9 me me 4096 Aug  6 18:26 .
drwxrwxr-x  4 me me 4096 Aug  9 19:23 ..
drwxrwxr-x  6 me me 4096 Aug  6 18:26 Program Files
drwxrwxr-x  7 me me 4096 Aug  6 18:26 Program Files (x86)
drwxrwxr-x  3 me me 4096 Aug  6 18:24 ProgramData
drwxrwxr-x  2 me me 4096 Aug  7 22:42 openxr
drwxrwxr-x  4 me me 4096 Aug  6 18:24 users
drwxrwxr-x  3 me me 4096 Aug  6 18:24 vrclient
drwxrwxr-x 21 me me 4096 Aug  7 22:42 windows

Registry info:
/home/me/.local/share/Steam/steamapps/compatdata/687260/pfx/system.reg:#arch=win64
/home/me/.local/share/Steam/steamapps/compatdata/687260/pfx/user.reg:#arch=win64
/home/me/.local/share/Steam/steamapps/compatdata/687260/pfx/userdef.reg:#arch=win64
------------------------------------------------------
------------------------------------------------------
warning: /home/me/.cache/protontricks/proton/Proton 5.13/bin/wine cmd.exe /c echo '%AppData%' returned empty string, error message "protontricks - wine 110625: Found Steam Runtime launch client at /home/me/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier/pressure-vessel/bin/steam-runtime-launch-client
protontricks - wine 110625: Checking for running wineserver instance
protontricks - wine 110625: Found running wineserver instance with PID 110581
protontricks - wine 110625: Copying env var from running wineserver: WINEESYNC=1
protontricks - wine 110625: Starting Wine process using 'pressure-vessel-launch'
protontricks - wine 110779: Starting Wine process inside the container
protontricks - wine 110779: Appending to LD_LIBRARY_PATH: /home/me/.local/share/Steam/steamapps/common/Proton 5.13/dist/lib:/home/me/.local/share/Steam/steamapps/common/Proton 5.13/dist/lib64:
esync: up and running." 
------------------------------------------------------
protontricks (INFO): Terminating launcher process 108626
protontricks (INFO): Launcher process terminated

The line /home/me/.cache/protontricks/proton/Proton 5.13/bin/wine cmd.exe /c echo '%AppData%' doesn't have quotes enclosing the path and there is a space in the Proton prefix folder. Perhaps this is an issue? Running it with quotes gives:

protontricks - wine 111393: Checking for running wineserver instance
protontricks - wine 111393: Setting default env: WINEFSYNC=1
protontricks - wine 111393: Setting default env: WINEESYNC=1
Unknown PROTONTRICKS_STEAM_RUNTIME value

Running with --no-bwrap results in same error.

therealfumbles avatar Aug 09 '25 18:08 therealfumbles

I tested running Proton 5.13 and Proton 10.0 binaries directly without going through Protontricks. This is generally a "wrong" way of doing things due to compatibility concerns, but should suffice for simple testing and ruling Protontricks out as the culprit.

Winetricks uses the cmd.exe /c "chcp 65001 > nul & echo %$1%" stanza to figure out the path to several system/user directories. The stdout result in Proton 5.13 seems to get lost somehow when it's piped due to the chcp 65001 > nul code page setting that was added in Winetricks?

For Proton 5.13:

$ cd "/mnt/LinuxDataSSD_B/SteamLibrary/steamapps/common/Proton 5.13/dist/bin"

# When stderr is filtered but the result is not piped, the stdout is correct
# When result is piped through `tee`, there's nothing in stdout
$ ./wine cmd.exe /c "chcp 65001 > nul & echo %AppData%" 2>/dev/null
C:\users\steamuser\AppData\Roaming
$ ./wine cmd.exe /c "chcp 65001 > nul & echo %AppData%" 2>/dev/null | tee

For Proton 10.0

$ cd "~/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/common/Proton 10.0/files/bin"

# Both scenarios work here
$ ./wine cmd.exe /c "chcp 65001 > nul & echo %AppData%" 2>/dev/null
C:\users\steamuser\AppData\Roaming
$ ./wine cmd.exe /c "chcp 65001 > nul & echo %AppData%" 2>/dev/null | tee
C:\users\steamuser\AppData\Roaming

When this is changed to cmd.exe /c "echo %$1%" things work just fine. Seems to be a change in behavior in Wine when a non-interactive terminal is detected? The chcp 65001 > nul part is a fairly recent addition to Winetricks., see the commit here. It seems to work fine in Proton 8.0 and up.

Anyway, this would be good to confirm in upstream Wine 5.13 to rule out Proton-specific patches as a cause.

Matoking avatar Aug 11 '25 10:08 Matoking

Thanks Matoking. I had already posted about this over at winetricks but when you have two projects that work together like these it's hard to figure out where the fault lies when a bug crops up.

I made that change to winetricks and now it's working with 5-13. I'll post this update over there and see how things go.

therealfumbles avatar Aug 11 '25 10:08 therealfumbles