ValveSoftware / SteamOS

SteamOS community tracker
1.55k stars 69 forks source link

Add a warning about possible save deletion when deleting proton game or changing proton version #836

Open rlach opened 2 years ago

rlach commented 2 years ago

Your system information

Please describe your issue in as much detail as possible:

When user deletes game that uses proton compatibility it also deletes saves. The same happens even when changing the proton version. It is not an issue for games with steam cloud, as those will just re-download the save, but for games without sync this operation can lead to loss of game progress.

This can be very unexpected for many users, as on windows doing such operation would preserve the saves, as they are usually in places different than the game folder.

SteamOS should show a warning before switching proton version and before uninstalling a game if any of this conditions is true:

The warning should explain that the save should be backed up before proceeding with the operation.

Steps for reproducing this issue:

  1. Install any game that has saves and no cloud sync.
  2. Play for 100 hours or more.
  3. Change proton version used for the game.
  4. Realise that you've just lost 100h of game progress and that any amount of time played would have be enough for replicating the issue.
TTimo commented 2 years ago

Hello @rlach - can you provide an example of a game you had this happen with, and which Proton versions you switched between? Would you say this is a new issue, e.g. recent Steam client changes, or it has always been like this?

rlach commented 2 years ago

I can't say for certain if this is new or old, but I know I only learned of it recently.

Here's much more specific steps: 1) Use The Textorcist as an example (because it has no save sync AND is very small AND has tolerable amount of boot logos for testing) (appid 940680) 2) Start the game after downloading on steam deck, it will use default compatibility. Play until you are in your house(after defeating tutorial enemy). You can skip dialogues and cutscenes by holding B. Press start/burger button to exit to main menu. You should see "Continue" option now in main menu. This means you have a save. 3) Exit the game. Change to use Proton Experimental. 4) Launch the game, observe that the save is still there, even though we changed from 7.0-4 to Experimental. 5) Exit the game again. Change from Experimental to 6.3-8. 6) Launch the game. You can see "Downloading content" while launching (if you're fast enough, it's a very small game). In my case it downloaded two contents - the game, and the new proton, since I've never used 6.3-8 before. 7) Launch the game. Notice you can now only start new game, Continue is nowhere to be seen.

You can continue going trough the versions. I went to 5.13-6 later, lost the save again(also downloaded a new proton ;)). Going back to previous version, which had save does not restore a save. For example I had created new save in 6.3-8. Went to 5.13-6, lost the save. Tried going back to 6.3-8 and the save did not recover.

I've also discovered/remembered another scary method of losing your save. 1) Have a save in Textorcist 2) Have memory card inserted 3) Go into Storage section in settings, find Textorcist, select "move content". Wait a few seconds. "All content has been moved" message appears. 4) Launch Textorcist. The save is gone.

I believe that steam, when moving games between storages cheats a bit and redownloads the game/recreates the wine folders, instead of copying them. Then just installs the game in the new location. This is smart, but unfortunately on proton it means you lose game progress, which is unexpected. This I'm confident is the behavior the steam had for year or more, since I lost mods in some games on PC when "moving" game to another folder. The mods were all texture replacement, so if the files were moved they would be kept, but instead I got vanilla game in the new location.

So, if you implement the save loss warning, moving the game should also have it.

TTimo commented 2 years ago

Proton supports upgrading prefixes from an older version to a newer one. From what you describe I think what's happening is that Proton deletes prefixes from newer versions it doesn't know about.

I don't think Proton will ever support downgrading prefixes. Maybe Steam should show a confirmation dialog rather than silently deleting the newer prefix. This would be similar to how cloud sync prompts you if there is a conflict.

rlach commented 2 years ago

This could very well be the reason why it sometimes keeps the save and sometimes doesn't, indeed.

From the very beginning I didn't expect a solution for most of those issues I've listed, since they are probably close to impossible to fix, but it's a request for a warning window before the loss of data happens.

Although for the copy between storages issue, this could be fixed, as it doesn't make sense to have a lossy copy.

Shaunathanz commented 1 year ago

Hello @rlach - can you provide an example of a game you had this happen with, and which Proton versions you switched between? Would you say this is a new issue, e.g. recent Steam client changes, or it has always been like this?

I didn't create this issue, but I did experience this recently with Dark Souls 3. I switched from the default Proton 7.0-4 to ProtonGE and my save data was gone. I figured it got wiped because DS3 does not support Steam Cloud save. I think it would be ideal for SteamOS to warn users about this prior to allowing the change at least, but ideally being able to detect where a game's save data is stored and avoid deleting it would be even better.

naim commented 1 year ago

Just experienced this as well with Project Zomboid, sort of. I was experimenting with different proton versions, and when I switched my save game, mods, and settings were all gone. When I switched back they returned. It was definitely unexpected though -- I don't think I've experienced this with other games so far though. Where on the file system do the game files tied to specific versions of proton reside?

Edit: I switched from no specific compatibility version selected to Proton7.0-5, then back to disabling the force option.

drew-stott commented 1 year ago

Just had this happen today with Horizon ZD. A Steam update forced the deck to update all my shaders and then it wasn't launching at all with Proton 8. So I rolled back to 7 because I supposedly have cloud saves. Nope. Save is gone. I'm definitely not starting this game over again for the third time. I bought it on the SD so I could finally finish it.

dominalien commented 9 months ago

I concur, a warning for Proton games which do not support cloud saves would be very welcome.

I lost my Dark Souls 3 saves twice now when trying to solve various small issues I had last year. Once because I deleted the Proton prefix, once because I was switching Proton versions. I don't think I'm going to start from the beginning a third time, which really sucks.

Even when one is aware data loss may occur, it's easy to forget when selecting a different Proton version that 1. the specific game doesn't support cloud saves and 2. that in some cases switching to a different Proton version may delete and recreate the prefix, erasing saves in the process.

Not losing progress is just about the most crucial thing in gaming.

AlexanderRevo commented 5 months ago

It's also easy to lose saves to this when trying to reinstall a game in case of troubleshooting some issues.

Steam also removes the proton prefix when removing a non-Steam game from the library - I lost my saves for a non-Steam game which I installed by running the installer through Steam and then switching the target to the game executable for playing. A warning in this scenario would be nice, too.

obct537 commented 5 months ago

This just happened to me in Dark Souls 3 as well, this is ridiculously bad UX. Switched from Proton latest to 8, and POOF, no more saves.

realmocaccino commented 4 months ago

Wish this was live. Just lost my progress in a game that doesn't use cloud save.

therealeldaria commented 1 month ago

This should be fixed, Maybe Steam could redirect the "users" folder in Steam to a path in the users home directory so it does not get deleted together with the rest of the prefix files. Many games saves in the Windows home directory, AppData or my documents, etc.. And not having that mapped to a folder in the Linux users home directory is dangerous. I was troubleshooting an issue with Cloud Sync for Baldurs Gate 3, so I disabled, re-enabled and disabled cloud sync a few times while troubleshooting. I also decided I would try and re-install the game. However I did this while cloud sync was disabled, and it wiped my saves. No warning, nothing. Hundreds of hours of playing lost.