kevinlekiller / reshade-steam-proton

Easy setup and updating of ReShade on Linux for games using wine or proton.
GNU General Public License v2.0
361 stars 19 forks source link

Reshade.ini keeps getting renamed to Reshade.ini_disabled on game launch #3

Closed Nano-Ocelot closed 2 years ago

Nano-Ocelot commented 2 years ago

Not sure if this is even the right place to ask about this issue, but there's a couple games I've tried out that every time they're launched cause reshade to rename the reshade.ini to reshade.ini_disabled then create a new reshade.ini causing me to have to reset all of the options and paths to get everything working as intended. I don't know if it's caused by the fact that the files are all symlinked and some games just don't respond well to that or what. I've tried searching everywhere for a fix but it doesn't seem like others have this issue.

kevinlekiller commented 2 years ago

The .ini files are managed by Reshade, only the .dll and .json files are linked, so I don't think this issue is caused by this script.

I haven't seen that issue myself, I'm wondering if it has to do with permissions?

Although I would like to have an option to link a Reshade.ini file, it would make it easier not having to set up the options on each game. It's something I'll look into in the future.

Nano-Ocelot commented 2 years ago

"Permissions." That's the only thing that would come up with my google searches too. They were all people on windows obviously but they kept talking about permissions, but I don't understand how a couple of game folders could have different permissions than others. They're all installed into the same steam library. Also according to the Linux side of things the game folders have the same exact permissions. So I don't know if it's something in the wine side of file directories. I don't even know how to go about checking that if so. I even tried to set reshade.ini to read only and reshade still renamed it and made a new one. I don't know how to overcome this bug. It's happening with Death Stranding currently. Anyway thanks for your help.

kevinlekiller commented 2 years ago

It could be caused by Steam's sandboxing (pressure-vessel), I'm looking at the Reshade source code, but I can't find anywhere where it appends "disabled" to a file name, so I don't think it's Reshade?

https://github.com/crosire/reshade/search?q=disabled&type=code

Very intriguing. I'll look at pressure-vessel to see if I can find anything.

kevinlekiller commented 2 years ago

Couldn't find anything there also.

I own Death Stranding, so will try testing that game to see.

Nano-Ocelot commented 2 years ago

Oooh, so I found a workaround. If I symlink the reshade.ini from a different reshade.ini file then it works fine. It no longer overwrites the file with a default file resulting in losing all the settings. So in other words if you do tinker with adding a symlinked 'global' reshade.ini to the script then that would fix the issue altogether anyway. I'm not sure exactly how that would work since every game needs to have it's own custom preset.ini set in the reshade.ini, but in the mean time I'll just symlink my own file for the games that don't work properly.

kevinlekiller commented 2 years ago

That's great, although it would be nice to fix the issue too.

I'll have to work on adding an option for a global Reshade.ini then.

FYI, if you do use Steam, if you add find ~/.local/share/Steam/steamapps/common -maxdepth 1 ! -path ~/.local/share/Steam/steamapps/common -type d ! -regex ".*/Proton.*" ! -name "SteamLinuxRuntime_soldier" ! -name "Steamworks Shared" at the top of function getGamePath(), the script will list all the games / their folders.

Like this: example

Nano-Ocelot commented 2 years ago

Oh, that's cool. Thanks for your help! This is an amazing tool.

kevinlekiller commented 2 years ago

Forgot to add the ReShade.ini file, added with ffc677d

What it does is download this ini file: https://github.com/kevinlekiller/reshade-steam-proton/blob/ini/ReShade.ini

Then it changes the paths for the Merged_Shaders folders in that ReShade.ini file.

Then it links the file to the game.

Although, you can replace that file in the ~/.reshade with your own ReShade.ini and it will link that instead.

kevinlekiller commented 2 years ago

For the original issue: I tested Death Stranding, but couldn't reproduce the issue of the appended "_disabled", exited / restarted the game a few times.

Using proton 6.3.7 Steam through Flatpak. Maybe Steam through Flatpak does something different?

Screenshot_20211110_210600