flathub / flathub/com.valvesoftware.Steam

Native Linux games do not write saved games & user config to disk (so they are lost)

Open
#1,076 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
421
Forks
78
PR merge metrics
No merged PRs in 30d

Description

**Game information**
7 Days To Die
The Long Dark
(and probably other native Linux games - i.e. that don't use Proton)

**Distribution name and version where applicable**
Ubuntu 22.04

**Flatpak info**
Flatpak 1.12.7
nvidia-470-161-03
default
host

**Problem description**
These native games do not write save game data & user configuration to disk, so once Steam is quit & then restarted, those games will show no saved games (but beware the saved games are still visible if the game is restarted withOUT first quitting Steam). Also save game files copied to the expected location (from ~/.local/share/... to ~/.var/app/com.valvesoftware.Steam/.local/share/...) are not seen by the game.

From stracing the games, it appears that they try to load/save the files at /home/.local/share/... (i.e. missing username folder), so their save game files are never created when saving, nor found when loading.

Example of how I straced a game (or Steam just before starting the game):
`strace -f -e trace=open,openat -p 51544 2>&1 | tee temp.txt`
Example of what I found:
```
[pid 55356] openat(AT_FDCWD, "/home/.local/share/Hinterland/TheLongDark/Survival", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 90
[pid 55356] openat(AT_FDCWD, "/home/.local/share/Hinterland/TheLongDarkNoSync/Survival", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 90
[pid 55356] openat(AT_FDCWD, "/home/.local/share/Hinterland/TheLongDark/Survival", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 151
[pid 55356] openat(AT_FDCWD, "/home/.local/share/Hinterland/TheLongDark/Survival/profile_survival.113628", O_RDONLY) = 151
[pid 55356] openat(AT_FDCWD, "/home/.local/share/Hinterland/TheLongDark/Survival/sandbox1", O_RDONLY) = 151
[pid 55356] openat(AT_FDCWD, "/home/.local/share/Hinterland/TheLongDarkNoSync/Survival/settings_survival.113628", O_RDONLY) = 151
```
Another example:
```
[pid 58140] openat(AT_FDCWD, "/home/.local/share/7DaysToDie/Saves/profiles.sdf", O_RDWR|O_CREAT, 0666) = 109
[pid 58140] openat(AT_FDCWD, "/home/.local/share/7DaysToDie/Saves", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 109
[pid 58140] openat(AT_FDCWD, "/home/.local/share/7DaysToDie/Saves/Navezgane/My Game/gameOptions.sdf", O_RDWR|O_CREAT, 0666) = 109
[pid 58140] openat(AT_FDCWD, "/home/.local/share/7DaysToDie/Saves/Navezgane/My Game/blockmappings.nim", O_RDWR|O_CREAT, 0666) = 115
[pid 58140] openat(AT_FDCWD, "/home/.local/share/7DaysToDie/Saves/Navezgane/My Game/itemmappings.nim", O_RDWR|O_CREAT, 0666) = 115
[pid 58140] openat(AT_FDCWD, "/home/.local/share/7DaysToDie/Saves/Navezgane/My Game/ConfigsDump/materials.xml", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 115
```

**Does this issue reproduce with native Steam**
No, they work fine there.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.