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

Proton compatibility layer suddenly missing on non-Steam games #672

Open
ghost opened this issue Feb 5, 2023 · 15 comments
Open

Proton compatibility layer suddenly missing on non-Steam games #672

ghost opened this issue Feb 5, 2023 · 15 comments

Comments

@ghost
Copy link

ghost commented Feb 5, 2023

Expected behavior

When configuring a game, I can choose any version of Proton currently installed by choosing in in the "Compatibility layer" drop-down menu, like I always did. Proton was usually the default.

Actual behavior

When configuring a game, only Retroarch and Wine 32 + 64 show up.

Steps to reproduce

I don't remember doing anything.

Version and environment
- GameHub
    Version: 0.16.1--
    Branch:  
- Environment
    Distro:  Linux Mint 21.1
    DE:      X-Cinnamon
    GTK:     3.24.33
    Themes:  Mint-Y-Dark-Blue | Mint-Y-Dark-Blue
@ghost
Copy link
Author

ghost commented Feb 20, 2023

Could someone point me in the right direction? In what folder should Proton be for Gamehub to detect it? In the settings, under Steam, I am still correctly authenticated and the installation directory is correct, but there is nothing under Proton.
I tried moving a Proton installation around, but to no avail. I even deleted .steam and reinstalled Steam and no success either.

@Proxycon
Copy link

Proxycon commented Mar 5, 2023

Same problem here. Would really like to use Proton as compatibility layer. Grateful for any advice.

@fyr77
Copy link

fyr77 commented Mar 21, 2023

I am having the same issue. I suspect Steam may have changed something about the VDF file format. At launch, GameHub logs [AppInfoVDF] Error reading '/home/jakob/.steam/steam/appcache/appinfo.vdf': Unknown node type: 0x85 (at 77).

I tried investigating this a bit. Right at startup, when trying to find proton versions, GameHub reads a Steam VDF file looking for Proton instances installed. This uses src/utils/BinaryVDF.vala, AppInfoVDF to be precise. I do not quite understand how to read VDF files, but it is clear that AppInfoVDF gets aborted at some point (line 77 of the VDF in my case?) which leads to proton never being found.

I sadly did not manage to fix this yet, but maybe this can provide some info to code a fix.

Edit: What is strange about this is that all my games seem to show up fine. Maybe this is not the actual issue after all.
Edit 2: According to this, the AppInfo format was changed in December 2022.

@ghost
Copy link
Author

ghost commented Mar 22, 2023

I'm glad you two could confirm that it isn't just me. This might finally spark some attention from the developer.

@Proxycon
Copy link

I fear this project is no longer maintained, considering the last dev activity was nearly a year ago. I don’t have any experience with vala and am not very confindent since @fyr77 (Amazing hint btw) already tried, but I try to look into this again, if I find the time.

@fyr77
Copy link

fyr77 commented Mar 22, 2023

A solution would perhaps be to not look for the proton versions in AppInfo, but instead use the regular path. We can detect the steam location without issue, normally they are found in compatibilitytools.d as far as I know?
So just scanning that directory (and other typical places) might work.

@Proxycon
Copy link

Proxycon commented Mar 22, 2023

With only looking at the code here on GitHub, my assumption would be, that the problem is happening before the AppInfoVDf is called. In the edit to the appinfo.vdf @fyr77 linked, it looks, like an additional entry (SHA1 checksum) is added an now in the spot where the BinaryVDF was listed before. So I could imagine, that instead of parsing the binary file, the AppInfoVDF Class is now given the SHA1 checksum as parameter, instead of the actual file. Maybe we should look into where the class gets called and how the parameters are chosen.

Edit: After reading a bit, it seems like in line 304 of BinaryVDF.vala „seek“ is used to skip the stream by 44 (bytes?). Afterwards the app ID is read from the stream. As this seems pretty hardcoded to me, it may be a fix to just skip/seek a bit further. This states, that the added checksum is 20 bytes long, so maybe just bumping the offset to 64 is enough??
Also today I learned: Vala is considered dead and documentation is pretty bad.

@fyr77
Copy link

fyr77 commented Mar 22, 2023

Update: I managed to implement using custom Proton versions in compatiblitytools.d fyr77@22e297b

This works fine for running games, but the problem with Steam's Proton versions still stands.

Edit: This is still kinda hacky, this was just a first attempt. I need to figure out how to get the Steam directory set in the app settings, currently I am just scanning user home.

@fyr77
Copy link

fyr77 commented Mar 22, 2023

so maybe just bumping the offset to 64 is enough??
@Proxycon

Oh wow, it is. That fixes everything. I will test a bit and then push to my fork in case you want to build from source and try it.

And yes, Vala doc is kinda bad.

@Proxycon
Copy link

Oh wow, it is. That fixes everything. I will test a bit and then push to my fork in case you want to build from source and try it.

Amazing! Thank you for testing.
And also adding support for custom Proton version is a often requested Feature, looking at the issues of this repo.
Glad we could contribute a bit.

@ghost
Copy link
Author

ghost commented Mar 22, 2023

Amazing work! Thank you so much @fyr77 and @Proxycon. I've had this issue for about two months now.
Now, could someone explain to a Github newbie how I can merge these changes without having to copy-paste the code @fyr77 posted directly into my local files like a caveman?

@fyr77
Copy link

fyr77 commented Mar 22, 2023

how I can merge these changes without having to copy-paste the code

Either you wait for this to be pulled into the main application, or you do the following:

  1. Uninstall your local installation of GameHub using your package manager.
  2. Follow these instructions to build it from source.

@ghost
Copy link
Author

ghost commented Mar 22, 2023

how I can merge these changes without having to copy-paste the code

Either you wait for this to be pulled into the main application, or you do the following:

  1. Uninstall your local installation of GameHub using your package manager.
  2. Follow these instructions to build it from source.

So kind of you. You made my day!

@fionnb
Copy link

fionnb commented Jan 5, 2024

Will this (proper) fix ever be merged?
The original problem of improperly parsed appinfo.vdf is still present in 0.16.3-9327885-master

@fyr77
Copy link

fyr77 commented Jan 5, 2024

@fionnb I fear that the project dev is no longer working on this. Nothing has happened on this repository in quite a while.

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

No branches or pull requests

3 participants