protonscr

Wiki NTFS edit: alternative to compatdata symlink

protonopen
ValveSoftware/Proton#7034 · opened 2023-08-21 by Artoria2e5 · updated 2023-08-21 · 1 comments · github
AArtoria2e5 2023-08-21 github

This edit concerns the "Preventing NTFS Read Errors" section, which is actually very terribly named because it's a write error! Replace it with the following:


## Preventing compatdata creation error

Windows applies [restrictions to file names](https://docs.microsoft.com/windows/win32/fileio/naming-a-file#naming-conventions) that is not present on NTFS proper. `udisks` 2.8.2 has decided to enabled the `windows_names` option to prevent the creation of Windows-incompatible names.  This causes an issue with `:` (colon) character in filenames that Proton creates on the NTFS disk.

If you check Steam's console output, you're likely to see `OSError: [Errno 22] Invalid argument: '../drive_c'`. There are two ways to fix this (ONLY use one at the same time):

* Turn off `windows_names`.
* Use a symlink to redirect `/compatdata` elsewhere.

### Turning off `windows_names`

Simply follow the instructions in [Create a Mount Point][#Create a Mount Point] above to make a permanent fstab entry for your game drive. The recommended fstab line in the above tutorial does not have `windows_names`, so it will work.

If you do not wish to create your own `fstab` entry, you can disable the new udisks behavior by writing the following to `/etc/udisks2/mount_options.conf`:

```ini
[defaults]
ntfs:ntfs_defaults=uid=$UID,gid=$GID
```

Fstab is the better option because it is more selective and can co-exist with other options, such as case insensitivity (see section below).

Doing any one of the above will allow windows-incompatible file names to be created. Windows will not have any trouble with the files until it accesses it, which results in a clean failure in recent Windows versions. Windows `chkdsk` will, however, move badly-named files into hidden folders named `\found.nnn`. Proton can recreate the symlinks just fine, but you may want to go through the `found` folders once in a while and clean them out.

### Symlinking
**THERE HAS BEEN A REPORT THAT THIS MAY CAUSE DATA LOSS**

Create the `compatdata` folder on the mounted NTFS disk as a symlink that points to a folder on a Linux partition.

Creating the symlink:
```
$ mkdir -p ~/.steam/steam/steamapps/compatdata
$ ln -s ~/.steam/steam/steamapps/compatdata /media/gamedisk/Steam/steamapps/
```
*If the `/compatdata` folder already exists on the mounted disk BEFORE the symlink, DELETE IT!*
AArtoria2e5 2023-08-21 github

In addition, the "Turning off case-sensitivity in file names" section misses the ONE THING you came to lowntfs-3g for: the ignore_case option. Replace fstab line with

UUID=38CE9483CE943AD8 /media/gamedisk lowntfs-3g uid=1000,gid=1000,rw,user,exec,umask=000,ignore_case 0 0

Nothing extracted yet.