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

fix: Steam and Proton usage #2961

Merged
merged 5 commits into from
Aug 5, 2023
Merged

Conversation

koplo199
Copy link
Contributor

@koplo199 koplo199 commented Jul 12, 2023

Description

Fixes #2952
Fixes #2850

To completely fix those issues, Proton-GE runners manifests should be updated in the components repository. It is independent from this PR and will not require further Bottles code change.

I described what the issue is and how to fix it in the linked issues, pasting those comments for reference:

There is two bugs here.
The first one is on the component side and match what you described: there is a mismatch between the component name (lower-case) and the extracted component directory (which contains capitalized letters).
Concerning the fix: should we change the extracted folder name to lower-case, or the component name to include those capitalized letters? Capitalizing (e.g. ge-proton7-51 to GE-Proton7-51) will require the least changes/hacks, and would be more consistent with the upstream name, but I'll submit a PR there based on the decision of a maintainer.
The second bug is on the Bottles side and is actually identical to what's described in #2593, so the fix would be the same. What is happening is that the backed still uses the name of the component to decide if a runner is Proton or Wine, instead of what's included in its manifest. And it causes issues with Wine runners which contains [pP]roton in their name, like Kron4ek's wine-proton-8.0-1-amd64 or GloriousEggroll's Wine-GE-Proton7-43.

Originally posted by @koplo199 in #2850 (comment)

It's probably not a permission issue, I think there's two different causes to the bug.
First, in Bottles, the code responsible for detecting the proton path is not robust at all:

proton_path = lines[2].strip()[:-5]

It seems Bottles expect the third line to always end by /lib/, thus stripping those five characters to retrieve the path. But here, at least with the Proton-GE installed by flatpak, this line ends with /lib32/, which would be seven characters. Stripping only five would give Proton-GE/l and this is exactly what shows in the logs.
The Bottles code definitively needs a more reliable method for retrieving the path, but I strongly suspect using the lib32/lib folder structure instead of the regular lib/lib64 is also a bug on its own as it may be the source of other issues.
Somewhat related note: there is still other issues that needs to be fixed for a flawless steam experience, since the 8.0 version Proton is using the sniper runtime instead of the much older soldier one, but Bottles does not support it at the moment.

Originally posted by @koplo199 in #2952 (comment)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.
Provide instructions so we can reproduce.

  • Tested with flatpak build artifacts

@github-actions
Copy link
Contributor

github-actions bot commented Jul 12, 2023

Pylint result on modfied files:
************* Module bottles.backend.wine.wineserver
bottles/backend/wine/wineserver.py:26:14: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/wine/wineserver.py:44:14: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/wine/wineserver.py:74:8: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
************* Module bottles.backend.wine.winecommand
bottles/backend/wine/winecommand.py:267:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/winecommand.py:478:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/winecommand.py:478:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/winecommand.py:587:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/winecommand.py:587:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/winecommand.py:85:4: R0913: Too many arguments (11/5) (too-many-arguments)
bottles/backend/wine/winecommand.py:129:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:135:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:172:8: C0103: Variable name "ld" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:190:16: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:199:19: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:218:20: C0103: Variable name "ld" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:365:24: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:372:20: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:376:51: E1136: Value 'gpu['prime']['integrated']' is unsubscriptable (unsubscriptable-object)
bottles/backend/wine/winecommand.py:378:20: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:171:8: W0612: Unused variable 'is_nvidia' (unused-variable)
bottles/backend/wine/winecommand.py:422:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:431:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:478:32: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/wine/winecommand.py:487:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/wine/winecommand.py:487:49: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:494:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/wine/winecommand.py:494:49: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:498:16: C0103: Variable name "st" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:510:20: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:515:20: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:520:20: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:587:12: C0103: Variable name "s" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:589:12: C0103: Variable name "s" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:597:8: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/wine/winecommand.py:608:8: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/wine/winecommand.py:645:12: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
bottles/backend/wine/winecommand.py:683:8: C0103: Variable name "rv" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:685:12: C0103: Variable name "rv" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:691:12: C0103: Variable name "rv" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:662:23: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/wine/winecommand.py:711:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/wine/winecommand.py:711:41: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:715:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/wine/winecommand.py:715:41: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:717:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/wine/winecommand.py:717:41: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
************* Module bottles.backend.utils.steam
bottles/backend/utils/steam.py:18:0: C0410: Multiple imports on one line (os, subprocess) (multiple-imports)
bottles/backend/utils/steam.py:20:0: W0404: Reimport 'TextIO' (imported line 19) (reimported)
bottles/backend/utils/steam.py:45:30: C0103: Argument name "fp" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/utils/steam.py:60:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/utils/steam.py:60:12: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/utils/steam.py:60:12: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/utils/steam.py:81:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/utils/steam.py:81:12: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/utils/steam.py:81:12: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/utils/steam.py:18:0: W0611: Unused import subprocess (unused-import)
bottles/backend/utils/steam.py:19:0: W0611: Unused Union imported from typing (unused-import)
************* Module bottles.backend.managers.runtime
bottles/backend/managers/runtime.py:50:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/backend/managers/runtime.py:54:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/runtime.py:46:16: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/runtime.py:54:8: C0103: Variable name "ld" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/runtime.py:65:16: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/runtime.py:76:16: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/runtime.py:85:16: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/runtime.py:96:20: C0103: Variable name "d" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/runtime.py:95:16: W0612: Unused variable 'root' (unused-variable)
bottles/backend/managers/runtime.py:95:28: W0612: Unused variable 'files' (unused-variable)
bottles/backend/managers/runtime.py:128:8: C0415: Import outside toplevel (bottles.backend.managers.steam.SteamManager) (import-outside-toplevel)
************* Module bottles.backend.managers.steam
bottles/backend/managers/steam.py:314:0: C0325: Unnecessary parens after '=' keyword (superfluous-parens)
bottles/backend/managers/steam.py:315:0: C0325: Unnecessary parens after '=' keyword (superfluous-parens)
bottles/backend/managers/steam.py:97:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/steam.py:97:54: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:124:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/steam.py:124:66: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:157:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/steam.py:157:67: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:174:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/steam.py:174:49: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:188:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/steam.py:188:39: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:317:16: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:393:12: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:395:19: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:396:16: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:409:8: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/managers/steam.py:409:12: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:411:19: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:413:20: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:432:19: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:433:16: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:438:12: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:438:15: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:474:12: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:474:15: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:547:12: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:552:69: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:555:20: W0702: No exception type(s) specified (bare-except)
bottles/backend/managers/steam.py:561:65: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)

@koplo199
Copy link
Contributor Author

@pszabunko Could you confirm it fixes the issue for you? Please also submit log entries containing Steam or Proton.

The build artifact can be downloaded here, if I'm not mistaken it can be installed with a regular flatpak install bottles-x86_64.flatpak upon unzipping.

@pszabunko
Copy link

I did flatpak install bottles.flatpak and it changed Bottles to Bottles (Development), so I guess it did install correctly:

Official Package: true
Version: 51.6-d2f6b72
DE/WM: plasmawayland
Display:
    X.org: true
    X.org (port): :1
    Wayland: true
Graphics:
    vendors:
        amd:
            vendor: amd
            envs:
                DRI_PRIME: '1'
            icd: /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/radeon_icd.x86_64.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/radeon_icd.i686.json
    prime:
        integrated: null
        discrete: null
Kernel:
    Type: Linux
    Version: 6.1.0-10-amd64
Disk:
    Total: 16785047552
    Free: 16784887808
RAM:
    MemTotal: 31.3GiB
    MemAvailable: 27.3GiB
Bottles_envs: null

Unfortunately it doesn't work at all now, even for runners other than com.valvesoftware.Steam.CompatibilityTool.Proton-GE:

(process:2): Gtk-WARNING **: 20:02:50.658: Locale not supported by C library.
        Using the fallback 'C' locale.
20:02:51 (INFO) Bottles Started! 
20:02:51 (INFO) Performing Bottles checks… 
20:02:51 (INFO) Steam path doesn't exist, creating now. 
20:02:51 (INFO) Dxvks found:
         - dxvk-2.2
 
20:02:51 (INFO) Vkd3ds found:
         - vkd3d-proton-2.9
 
20:02:51 (INFO) Nvapis found:
         - dxvk-nvapi-v0.6.3
 
20:02:51 (INFO) Latencyflexs found:
         - latencyflex-v0.1.1
 
20:02:51 (INFO) Runners found:
         - soda-7.0-9
         - caffe-7.20
         - wine-ge-proton8-10
         - GE-Proton8-6
         - sys-wine-8.0
 
20:02:51 (INFO) Bottles found:
         - Battle.net
 
20:02:51 (ERROR) /home/piotr/.var/app/com.valvesoftware.Steam/.local/share/Steam/compatibilitytools.d/GE-Proton8-3/files/share/fonts/
         is not a valid Steam Proton path
 
20:02:52 (WARNING) A Steam prefix was found, but there is no Proton for it: 548430, skipping… 
20:02:52 (ERROR) /home/piotr/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Proton - Experimental/files/share/fonts/
         is not a valid Steam Proton path
 
20:02:52 (INFO) Catalog installers loaded 
20:02:52 (INFO) Catalog dependencies loaded 
20:02:52 (INFO) Catalog components loaded 
20:02:52 (WARNING) A Steam prefix was found, but it is a Proton one: 1493710, skipping… 
20:02:52 (ERROR) /home/piotr/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Proton 8.0/dist/share/fonts/
         is not a valid Steam Proton path
 
20:02:52 (WARNING) A Steam prefix was found, but it is a Proton one: 2348590, skipping… 
20:02:52 (ERROR) /app/share/steam/compatibilitytools.d/Proton-GE/share/fonts/
         is not a valid Steam Proton path
 
20:02:52 (WARNING) A Steam prefix was found, but there is no Proton for it: 39510, skipping… 
20:02:52 (ERROR) /home/piotr/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Proton 7.0/dist/share/fonts/
         is not a valid Steam Proton path
 
20:02:52 (WARNING) A Steam prefix was found, but it is a Proton one: 1887720, skipping… 
20:02:53 (WARNING) A Steam prefix was found, but there is no Proton for it: 548430, skipping… 
20:02:53 (WARNING) A Steam prefix was found, but it is a Proton one: 1493710, skipping… 
20:02:53 (WARNING) A Steam prefix was found, but it is a Proton one: 2348590, skipping… 
20:02:53 (WARNING) A Steam prefix was found, but there is no Proton for it: 39510, skipping… 
20:02:53 (WARNING) A Steam prefix was found, but it is a Proton one: 1887720, skipping… 

When I downgraded Bottles to official package only com.valvesoftware.Steam.CompatibilityTool.Proton-GE was not found:

(process:2): Gtk-WARNING **: 20:12:58.466: Locale not supported by C library.
        Using the fallback 'C' locale.
20:12:58 (INFO) Bottles Started! 
20:12:59 (INFO) Performing Bottles checks… 
20:12:59 (INFO) Dxvks found:
         - dxvk-2.2
 
20:12:59 (INFO) Vkd3ds found:
         - vkd3d-proton-2.9
 
20:12:59 (INFO) Nvapis found:
         - dxvk-nvapi-v0.6.3
 
20:12:59 (INFO) Latencyflexs found:
         - latencyflex-v0.1.1
 
20:12:59 (INFO) Runners found:
         - soda-7.0-9
         - caffe-7.20
         - wine-ge-proton8-10
         - GE-Proton8-6
         - sys-wine-8.0
 
20:12:59 (INFO) Bottles found:
         - Battle.net
 
20:12:59 (ERROR) /app/share/steam/compatibilitytools.d/Proton-GE/l is not a valid Steam Proton path 
20:12:59 (WARNING) A Steam prefix was found, but there is no Proton for it: 39510, skipping… 
20:12:59 (INFO) Catalog dependencies loaded 
20:12:59 (INFO) Catalog installers loaded 
20:12:59 (WARNING) A Steam prefix was found, but there is no Proton for it: 39510, skipping… 
20:12:59 (INFO) Catalog components loaded 

config_info for game using com.valvesoftware.Steam.CompatibilityTool.Proton-GE installed from flathub:

cat ~/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/compatdata/39510/config_info
GE-Proton8-6
/app/share/steam/compatibilitytools.d/Proton-GE/share/fonts/
/app/share/steam/compatibilitytools.d/Proton-GE/lib32/
/app/share/steam/compatibilitytools.d/Proton-GE/lib/
/home/piotr/.var/app/com.valvesoftware.Steam/.local/share/Steam
1689037492.0
1689037494.0
1516738214.0
/app/share/steam/compatibilitytools.d/Proton-GE/share/default_pfx/
0.0
False
True
d3dcompiler_*.dll,d3dcsx*.dll,d3dx*.dll,x3daudio*.dll,xactengine*.dll,xapofx*.dll,xaudio*.dll,xinput*.dll,devenum.dll,amstream.dll,qasf.dll,qcap.dll,qdvd.dll,qedit.dll,quartz.dll,dplay.dll,dplaysvr.exe,dplayx.dll,dpmodemx.dll,dpnaddr.dll,dpnet.dll,dpnlobby.dll,dpnhpast.dll,dpnhupnp.dll,dpnsvr.exe,dpwsockx.dll,dpvoice.dll,dmband.dll,dmcompos.dll,dmime.dll,dmloader.dll,dmscript.dll,dmstyle.dll,dmsynth.dll,dmusic.dll,dmusic32.dll,dsound.dll,dswave.dll,atl1*.dll,concrt1*.dll,msvcp1*.dll,msvcr1*.dll,vcamp1*.dll,vcomp1*.dll,vccorlib1*.dll,vcruntime1*.dll,api-ms-win-crt-conio-l1-1-0.dll,api-ms-win-crt-heap-l1-1-0.dll,api-ms-win-crt-locale-l1-1-0.dll,api-ms-win-crt-math-l1-1-0.dll,api-ms-win-crt-runtime-l1-1-0.dll,api-ms-win-crt-stdio-l1-1-0.dll,ucrtbase.dll,ntdll.dll,vulkan-1.dll,dispex.dll,jscript.dll,scrobj.dll,scrrun.dll,vbscript.dll,cscript.exe,wscript.exe,wshom.ocx,9SeriesDefault.wmz,9SeriesDefault_.wmz,9xmigrat.dll,advpack.dll,asferror.dll,blackbox.dll,CEWMDM.dll,Compact.wmz,control.xml,custsat.dll,drm.cat,drm.inf,DRMClien.dll,DrmStor.dll,drmv2clt.dll,dw15.exe,dwintl.dll,engsetup.exe,eula.txt,fhg.inf,iexpress.inf,l3codeca.acm,LAPRXY.DLL,logagent.exe,migrate.dll,migrate.exe,MP43DMOD.DLL,MP4SDMOD.DLL,MPG4DMOD.DLL,mpvis.DLL,msdmo.dll,msnetobj.dll,msoobci.dll,MsPMSNSv.dll,MsPMSP.dll,MSSCP.dll,MSWMDM.dll,mymusic.inf,npdrmv2.dll,npdrmv2.zip,NPWMSDrm.dll,PidGen.dll,Plylst1.wpl,Plylst10.wpl,Plylst11.wpl,Plylst12.wpl,Plylst13.wpl,Plylst14.wpl,Plylst15.wpl,Plylst2.wpl,Plylst3.wpl,Plylst4.wpl,Plylst5.wpl,Plylst6.wpl,Plylst7.wpl,Plylst8.wpl,Plylst9.wpl,plyr_err.chm,qasf.dll,QuickSilver.wmz,Revert.wmz,roxio.inf,rsl.dll,setup_wm.cat,setup_wm.exe,setup_wm.inf,skins.inf,skinsmui.inf,unicows.dll,unregmp2.exe,w95inf16.dll,w95inf32.dll,wm1033.lng,WMADMOD.DLL,WMADMOE.DLL,WMASF.DLL,wmburn.exe,wmburn.rxc,wmdm.cat,wmdm.inf,WMDMLOG.dll,WMDMPS.dll,wmerror.dll,wmexpack.cat,wmexpack.inf,WMFSDK.cat,WMFSDK.inf,wmidx.dll,WMNetMgr.dll,wmp.cat,wmp.dll,wmp.inf,wmp.ocx,wmpasf.dll,wmpband.dll,wmpcd.dll,wmpcore.dll,wmpdxm.dll,wmplayer.adm,wmplayer.chm,wmplayer.exe,wmploc.DLL,WMPNS.dll,wmpns.jar,wmpshell.dll,wmpui.dll,WMSDMOD.DLL,WMSDMOE2.DLL,WMSPDMOD.DLL,WMSPDMOE.DLL,WMVCORE.DLL,WMVDMOD.DLL,WMVDMOE2.DLL
False

config_info for game using proton-8.3 installed by protonup-qt:

cat ~/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/compatdata/548430/config_info
GE-Proton8-3
/home/piotr/.var/app/com.valvesoftware.Steam/.local/share/Steam/compatibilitytools.d/GE-Proton8-3/files/share/fonts/
/home/piotr/.var/app/com.valvesoftware.Steam/.local/share/Steam/compatibilitytools.d/GE-Proton8-3/files/lib/
/home/piotr/.var/app/com.valvesoftware.Steam/.local/share/Steam/compatibilitytools.d/GE-Proton8-3/files/lib64/
/home/piotr/.var/app/com.valvesoftware.Steam/.local/share/Steam
1689037492.0
1689037494.0
1516738214.0
/home/piotr/.var/app/com.valvesoftware.Steam/.local/share/Steam/compatibilitytools.d/GE-Proton8-3/files/share/default_pfx/
1683754187.0
False
True
d3dcompiler_*.dll,d3dcsx*.dll,d3dx*.dll,x3daudio*.dll,xactengine*.dll,xapofx*.dll,xaudio*.dll,xinput*.dll,devenum.dll,amstream.dll,qasf.dll,qcap.dll,qdvd.dll,qedit.dll,quartz.dll,dplay.dll,dplaysvr.exe,dplayx.dll,dpmodemx.dll,dpnaddr.dll,dpnet.dll,dpnlobby.dll,dpnhpast.dll,dpnhupnp.dll,dpnsvr.exe,dpwsockx.dll,dpvoice.dll,dmband.dll,dmcompos.dll,dmime.dll,dmloader.dll,dmscript.dll,dmstyle.dll,dmsynth.dll,dmusic.dll,dmusic32.dll,dsound.dll,dswave.dll,atl1*.dll,concrt1*.dll,msvcp1*.dll,msvcr1*.dll,vcamp1*.dll,vcomp1*.dll,vccorlib1*.dll,vcruntime1*.dll,api-ms-win-crt-conio-l1-1-0.dll,api-ms-win-crt-heap-l1-1-0.dll,api-ms-win-crt-locale-l1-1-0.dll,api-ms-win-crt-math-l1-1-0.dll,api-ms-win-crt-runtime-l1-1-0.dll,api-ms-win-crt-stdio-l1-1-0.dll,ucrtbase.dll,ntdll.dll,vulkan-1.dll,dispex.dll,jscript.dll,scrobj.dll,scrrun.dll,vbscript.dll,cscript.exe,wscript.exe,wshom.ocx,9SeriesDefault.wmz,9SeriesDefault_.wmz,9xmigrat.dll,advpack.dll,asferror.dll,blackbox.dll,CEWMDM.dll,Compact.wmz,control.xml,custsat.dll,drm.cat,drm.inf,DRMClien.dll,DrmStor.dll,drmv2clt.dll,dw15.exe,dwintl.dll,engsetup.exe,eula.txt,fhg.inf,iexpress.inf,l3codeca.acm,LAPRXY.DLL,logagent.exe,migrate.dll,migrate.exe,MP43DMOD.DLL,MP4SDMOD.DLL,MPG4DMOD.DLL,mpvis.DLL,msdmo.dll,msnetobj.dll,msoobci.dll,MsPMSNSv.dll,MsPMSP.dll,MSSCP.dll,MSWMDM.dll,mymusic.inf,npdrmv2.dll,npdrmv2.zip,NPWMSDrm.dll,PidGen.dll,Plylst1.wpl,Plylst10.wpl,Plylst11.wpl,Plylst12.wpl,Plylst13.wpl,Plylst14.wpl,Plylst15.wpl,Plylst2.wpl,Plylst3.wpl,Plylst4.wpl,Plylst5.wpl,Plylst6.wpl,Plylst7.wpl,Plylst8.wpl,Plylst9.wpl,plyr_err.chm,qasf.dll,QuickSilver.wmz,Revert.wmz,roxio.inf,rsl.dll,setup_wm.cat,setup_wm.exe,setup_wm.inf,skins.inf,skinsmui.inf,unicows.dll,unregmp2.exe,w95inf16.dll,w95inf32.dll,wm1033.lng,WMADMOD.DLL,WMADMOE.DLL,WMASF.DLL,wmburn.exe,wmburn.rxc,wmdm.cat,wmdm.inf,WMDMLOG.dll,WMDMPS.dll,wmerror.dll,wmexpack.cat,wmexpack.inf,WMFSDK.cat,WMFSDK.inf,wmidx.dll,WMNetMgr.dll,wmp.cat,wmp.dll,wmp.inf,wmp.ocx,wmpasf.dll,wmpband.dll,wmpcd.dll,wmpcore.dll,wmpdxm.dll,wmplayer.adm,wmplayer.chm,wmplayer.exe,wmploc.DLL,WMPNS.dll,wmpns.jar,wmpshell.dll,wmpui.dll,WMSDMOD.DLL,WMSDMOE2.DLL,WMSPDMOD.DLL,WMSPDMOE.DLL,WMVCORE.DLL,WMVDMOD.DLL,WMVDMOE2.DLL
False

@koplo199
Copy link
Contributor Author

koplo199 commented Jul 12, 2023

Ah my bad, I forgot the .strip() method change before commiting, that is why the Proton path is not detected correctly, it should be fine now.

Thanks for the logs, it seems the new method for detecting a Proton prefix is working correctly.

Last thing to check is that the Steam runtime is now chosen accordingly to what's defined in the toolmanifest.vdf, what we're looking for here is the following line in the logs: Using Steam runtime [...], maybe a game should be started to trigger it?

The new build artifact should be available soon here.

@pszabunko
Copy link

pszabunko commented Jul 12, 2023

It's back to the original probem: working for runners installed manually or with protonup-qt and not working for com.valvesoftware.Steam.CompatibilityTool.Proton-GE from flatpak.

(process:2): Gtk-WARNING **: 00:26:15.291: Locale not supported by C library.
        Using the fallback 'C' locale.
00:26:15 (INFO) Bottles Started! 
00:26:16 (INFO) Performing Bottles checks… 
00:26:16 (INFO) Steam path doesn't exist, creating now. 
00:26:16 (INFO) Dxvks found:
         - dxvk-2.2
 
00:26:16 (INFO) Vkd3ds found:
         - vkd3d-proton-2.9
 
00:26:16 (INFO) Nvapis found:
         - dxvk-nvapi-v0.6.3
 
00:26:16 (INFO) Latencyflexs found:
         - latencyflex-v0.1.1
 
00:26:16 (INFO) Runners found:
         - soda-7.0-9
         - sys-wine-8.0
 
00:26:16 (WARNING) A Steam prefix was found, but it is a Proton one: 1493710, skipping… 
00:26:16 (WARNING) A Steam prefix was found, but it is a Proton one: 2348590, skipping… 
00:26:16 (ERROR) /app/share/steam/compatibilitytools.d/Proton-GE is not a valid Steam Proton path 
00:26:16 (WARNING) A Steam prefix was found, but there is no Proton for it: 39510, skipping… 
00:26:16 (WARNING) A Steam prefix was found, but it is a Proton one: 1887720, skipping… 
00:26:16 (WARNING) A Steam prefix was found, but it is a Proton one: 1493710, skipping… 
00:26:16 (WARNING) A Steam prefix was found, but it is a Proton one: 2348590, skipping… 
00:26:16 (WARNING) A Steam prefix was found, but there is no Proton for it: 39510, skipping… 
00:26:16 (WARNING) A Steam prefix was found, but it is a Proton one: 1887720, skipping… 
00:26:16 (INFO) Catalog installers loaded 
00:26:16 (INFO) Catalog dependencies loaded 
00:26:16 (INFO) Catalog components loaded 

However, it looks like it gets proton from flatpak directory right this time /app/share/steam/compatibilitytools.d/Proton-GE, but it checks for it on my system instead of com.valvesoftware.Steam.CompatibilityTool.Proton-GE flatpak or however com.valvesoftware.Steam flatpak checks this.

I don't know what exactly is going on with Steam runtime, but here's what I did: I created new bottle with a game, picked GE-Proton8-6 runner, checked "Steam runtime" option and ran the game.

cat ./data/bottles/runners/GE-Proton8-6/toolmanifest.vdf
"manifest"
{
  "version" "2"
  "commandline" "/proton %verb%"
  "require_tool_appid" "1628350"
  "use_sessions" "1"
  "compatmanager_layer_name" "proton"
}
00:49:08 (INFO) Launching an executable… 
00:49:08 (INFO) Using Steam runtime scout
00:49:08 (INFO) Using EasyAntiCheat runtime 
00:49:08 (INFO) Using BattlEye runtime 

@koplo199
Copy link
Contributor Author

koplo199 commented Jul 13, 2023

This revision should finally fix the flatpak Proton-GE detection, however I'm more intrigued by the Using Steam runtime scout line. Given the toolmanifest.vdf you linked, it should clearly uses the sniper runtime, not scout.

Does the path ~/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/common/SteamLinuxRuntime_sniper exists? If not, then this is "normal" (well, not really since Steam is supposed to download any runtime its components need but at least it isn't an issue within Bottles), and hopefully downloading it with flatpak run com.valvesoftware.Steam steam://install/1628350 should make it use it on the next run.

@pszabunko
Copy link

flatpak run com.usebottles.bottles 
bwrap: Can't mkdir parents for /app/share/steam/compatibilitytools.d: Read-only file system
error: ldconfig failed, exit status 256

@koplo199
Copy link
Contributor Author

Sorry, it was once again a one-liner not commited, the missing part was:
- mkdir -p /app/share/steam/compatibilitytools.d in the manifest.

Could you confirm it is now correctly working on your end too?

Note: I reverted the update of the runtime to keep this PR entirely focused on the fix.

@pszabunko
Copy link

Where do I download new version?

@koplo199
Copy link
Contributor Author

It can be downloaded here.

@pszabunko
Copy link

It runs now, but still cannot find com.valvesoftware.Steam.CompatibilityTool.Proton-GE

20:38:22 (ERROR) /app/share/steam/compatibilitytools.d/Proton-GE is not a valid Steam Proton path 

@koplo199
Copy link
Contributor Author

koplo199 commented Jul 13, 2023

It seems the flatpak version, unlike its official counterpart, does not define compatmanager_layer_name in its manifest, which
was used for the Proton detection. I added another check using the commandline entry, which is that time defined in the flatpak manifest.

Looking at that manifest, it also don't define require_tool_appid, and thus defaults to scout for its runtime as it should. The manifest is clearly misconfigured, Proton version >= 8.0 are built and meant to be run under the sniper runtime.

Edit: bundle available for download here.

@pszabunko
Copy link

pszabunko commented Jul 13, 2023

It shows all the Steam prefixes, and there are no errors during the startup.

@koplo199
Copy link
Contributor Author

That is nice to hear, thank you @pszabunko for helping debugging these issues.

This should be ready for review.

@TheEvilSkeleton TheEvilSkeleton added this to the 52.0 milestone Jul 29, 2023
@mirkobrombin mirkobrombin merged commit d8e142d into bottlesdevs:main Aug 5, 2023
5 checks passed
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

Successfully merging this pull request may close these issues.

[Bug]: Invalid Steam Proton path [Bug]: Inconsistent capitialization can lead to broken/missing runners
4 participants