protonscr

Deleted Proton prefix

protonopen
ValveSoftware/Proton#4774 · opened 2021-04-23 by class101 · updated 2024-11-08 · 6 comments · github
Cclass101 2021-04-23 github

I don't have the steps to reproduce but today I uninstalled a few Proton games and the Proton prefix has been deleted too, I lost a few settings and saves stores in the prefixes

I think Steam should never remove the proton prefix, I lost several hours worth of configurations, and lost local save files :(

What i remember doing today

  • Uninstalling Proton games
  • Switching between Windows/Linux native version for testing
Steam Client Beta
Proton 6.3-2
-------------- 
OS: Arch Linux x86_64 
Kernel: 5.11.16-zen1-1-zen 
Uptime: 47 mins 
Packages: 1096 (pacman) 
Shell: bash 5.1.4 
Resolution: 1920x1080 
DE: Cinnamon 4.8.6 
WM: Mutter (Muffin) 
WM Theme: Mojave-dark (Mojave-dark) 
Theme: Mojave-dark [GTK2/3] 
Icons: McMojave-circle-blue [GTK2/3] 
Terminal: guake 
CPU: Intel i7-4770K (8) @ 3.900GHz 
GPU: NVIDIA GeForce GTX 980 
GPU: NVIDIA GeForce GTX 980 
Memory: 2361MiB / 15937MiB

Note to readers: If you are looking to protect your proton prefix here is a possible workaround to prevent Steam from deleting it, this will create a .protected file in each folders and the directory will be undeletable until you unprotect it.

#-----------------------------------------------------------------------------------------
# *** Steam prefix protect
#-----------------------------------------------------------------------------------------
sudo find /path/to/prefix -type d -exec touch "{}"/.protected \; -exec chattr +i "{}"/.protected \;

#-----------------------------------------------------------------------------------------
# *** Steam prefix unprotect
#-----------------------------------------------------------------------------------------
sudo find /path/to/prefix -name .protected -type f -exec chattr -i "{}" \; -exec rm "{}" \;
Aaeikum 2021-04-26 github

For better or worse, this is by design. The Steam client deletes the game's compatdata directory when you uninstall the game. For most games, your save files should be uploaded to the Steam cloud on uninstall and then restored when re-installed, but not all games support this.

Cclass101 2021-04-26 github

I don't think this is a good idea deleteing other things than binary files because there are always some part not saved on cloud like the game settings, keybinding, any customization.

If leaving the prefix behind is a problem, maybe a proper solution would be to use a single prefix.

Here I setup once a prefix "0" symlinked to all the gameid with every SteamWorks Common Redist installed and mono removed, like that m yprefix is ready for everything and contains all the common redist files, and all the game files are in one place, like a normal Windows system

Well I will work around by not forgetting to delete the symlink before uninstalling a game, but a warning would have been welcome, or maybe a "Warn before deleting the proton prefix" option in the SteamPlay settings by default to off, so users can enable it if needed.

Ffrostworx 2021-04-27 github

I like the fact that a wineprefix is removed automatically when the game is uninstalled,
but an official option to back up at least steamuser before would be nice as well.

You might like this backup function in steamtinkerlaunch. A recover function is not implemented and probably won't, but the backup works seamlessly and fine for me.

CCaedael 2022-03-10 github

A Simple option to link the steamuser appdata gamefolder to a local path would be great, and a warning that the uninstall from the game remove the prefix is important.

Bberniyh 2022-12-03 github

A Simple option to link the steamuser appdata gamefolder to a local path would be great, and a warning that the uninstall from the game remove the prefix is important.

Not as an option, it should be standard. Actually, I absolutely hate that the savegames and configuration are stored in the prefix.
Of course, you can create the link yourself (and I did that for some games), but it really should not be optional.
I lost about 300h of RDR2 gameplay, because of this stupid behavior.
RDR2 supports cloud saves, but I don't know what happened to the cloud saves, there is definitely nothing there anymore. Maybe uploading to the cloud didn't work or I deactivated it, no idea. In any case, the local user data should never be removed unless the user does this explicitly.
This is also the behavior for native Windows, Steam doesn't mess with the users documents folder.

Ttwoda5h 2024-11-08 github

i like having to do workarounds for modding every time i sneeze at a game, personally.

my proton prefixes keep getting reset, and now i know why. can we have an explicit warning or option for this, or just back it up (the prefix) in an archive somewhere from steam optionally?

Proton versions