ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
22.89k stars 1k forks source link

[Wiki Update Request] Permanently broken wine prefix after incorrect NTFS drive mounting #7646

Open Seneral opened 1 month ago

Seneral commented 1 month ago

I want to report an issue I faced and was able to fix, that I believe needs to be documented on the following wiki page: https://github.com/ValveSoftware/Proton/wiki/Using-a-NTFS-disk-with-Linux-and-Windows

If you first mount an NTFS drive incorrectly (not following the guide), then observe that your games won't launch, then search online to find links to that guide and fix the mounting accordingly, you will find that still, none of your games will launch. Furthermore, you will notice that these games will not launch anymore even after moving them back to a known-good linux filesystem where they worked previously (e.g. ext4 or btrfs).

Symptoms: The game will try to launch, but exit after a few seconds. Excerpts of the proton log (gathered using PROTON_LOG=1 %command%) include: err:wineboot:main Cannot set the dir to L"C:\\windows" or later wine: failed to open "c:\\windows\\system32\\steam.exe": Unfortunately I do not have any full logs anymore, if desired I can try to recreate the problem from scratch.

Verifying the integrity of the games files (including the compatibility tools) did not yield any problems.

The problem seems to be that the wine prefix is permanently corrupted, and deleting it to let proton recreate it did fix the issue. For cloud-synced games this should not be a problem, but for others, a backup of the save files should be created. For me, since I was using a flatpak, I simply deleted the appropriate folders from the compatdata directoy: ~/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/compatdata/ when not using a flatpak, it should be found in ~/.local/share/Steam/steamapps/compatdata/ or when the game is stored in a separate drive, accordingly under your storage path: STEAM_LIBRARY_PATH/steamapps/compatdata/ Again, be sure to make backups just in case.

Do note that some games require both a fresh wine prefix as well as fixing of corrupted files, so make sure to verify the integrity as well.

I believe this deserves to be added to the wiki, since it is not unreasonable that people will only look up the guide after already failing in their attempts to move their library to an NTFS drive. Optimally, the "Verify file integrity" feature would be updated to be able to fix wine prefixes that are broken in this manner.