steam-runtime icon indicating copy to clipboard operation
steam-runtime copied to clipboard

Proton games can't access external drive

Open Sultech opened this issue 3 years ago • 6 comments

Your system information

  • Steam client version (build number or date): 10/05/21
  • Distribution: Manjaro
  • Opted into Steam client beta?: Yes
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

Proton is protecting external drives and other certain directories from even being visible if a game/application ran through it gives you the option to browse for a file. Proton is set up like most Wine versions are, where you have access to system root directory ( / ) on Z:, but opening this from a file browser in a game/application will only show certain directories (bin, etc, home, lib, lib32, lib64, overrides, run, sbin, tmp, usr, var). One important one (among others, but this is the important one), /media and /mnt, is missing, so access to external drive/media files is not possible. When I install origin, it cannot locate my games because they are on an external hard drive mounted at mnt. This happens with any type of drive (ext4, ntfs)

Steps for reproducing this issue:

  1. Add a non steam game and select origin exe
  2. Force proton compatibility layer
  3. In launch options use --proton
  4. Once origin is installed try to locate a game and you will not be able to see the mnt directory.

Sultech avatar Oct 05 '21 18:10 Sultech

Hello @Sultech, starting with Proton 5.13, Proton is run inside the Steam Linux Runtime - Soldier container environment, and that container is not expected to have unlimited access to the host system.

This was previously discussed in #393 and you should be able to set the game's launch options to STEAM_COMPAT_MOUNTS=/path/to/unexpected/folder %command% to get the behavior you're looking for..

kisak-valve avatar Oct 05 '21 19:10 kisak-valve

Does not work for non steam games this is what I have put in launch options (STEAM_COMPAT_MOUNTS=/mnt %command% --proton) and the mnt directory does not show up. Also when trying to use gamemode with non steam games it does not work. I dont think these commands work if the game is a non steam game. Screenshot from 2021-10-05 21-23-57

Sultech avatar Oct 05 '21 20:10 Sultech

That sounds like https://github.com/ValveSoftware/steam-for-linux/issues/6046 interfered with your testing. You can completely close Steam, then try running something like STEAM_COMPAT_MOUNTS=/path/to/unexpected/folder steam from a terminal.

Unrelated, why are you passing --proton as a launch option?

kisak-valve avatar Oct 05 '21 20:10 kisak-valve

That has fixed it but will this issue ever be fixed for non steam games, and I use --proton because when I add a non steam game without the command it does not start for some reason.

I just tried to add a non steam game and start the game without --proton and it worked I guess I dont need that command

Sultech avatar Oct 05 '21 20:10 Sultech

Starting from pressure-vessel version 0.20220803.0 in today's "Steam Linux Runtime - soldier" and "Steam Linux Runtime - sniper" betas, more top-level directories are available to games by default, reducing the need to use STEAM_COMPAT_MOUNTS.

If you want to try using a beta version, the procedure to opt-in to a beta is the same as for any Steam game, except instead of looking for a game in your Steam library, you'd look for "Steam Linux Runtime - soldier" and choose the client_beta branch. If this version works well, the change will be copied into the default branch at some point in the future (I can't make any promises about timing, but it's usually 1 or 2 months between updates). Please report any regressions to the Steam Runtime issue tracker.

The affected paths are the typical paths for removable media:

  • /media: FHS parent directory for removable media mount points
  • /mnt: FHS traditional/legacy temporary mount point
  • /run/media: widely-used alternative to /media

and some FHS locations where people often put the mount points for non-removable but non-OS drives and partitions, such as a secondary SSD or HDD:

  • /home: FHS parent directory for home directories
  • /opt: FHS directory for self-contained third-party software
  • /srv: FHS directory for site-specific services' data

Custom top-level directories like the /data mentioned in this issue are not shared by default, and still require use of STEAM_COMPAT_MOUNTS, because we can't automatically classify unknown top-level directories into things you would expect to be shared (/storage, /games, /large-disk-drive) and things you would not expect to be shared (future OS components, /lost+found, /corporate-secrets).

However, the paths you're talking about in this issue are covered by this change, so with this change you shouldn't need STEAM_COMPAT_MOUNTS any more.

Technical details

smcv avatar Aug 04 '22 18:08 smcv

will [ValveSoftware/steam-for-linux/issues/6046] ever be fixed for non steam games

The Steam Runtime maintainers don't control the update schedule of the Steam client, but as it happens, the answer is yes: non-Steam games can use `%command% in their launch options since March 2022.

smcv avatar Aug 04 '22 18:08 smcv

Starting from pressure-vessel version 0.20220803.0 in today's "Steam Linux Runtime - soldier" and "Steam Linux Runtime - sniper" betas, more top-level directories are available to games by default, reducing the need to use STEAM_COMPAT_MOUNTS.

This change was promoted from beta to the default branch today.

smcv avatar Aug 25 '22 15:08 smcv

Closing as resolved.

kisak-valve avatar Sep 30 '22 18:09 kisak-valve