RetroArch
RetroArch copied to clipboard
[SteamOS / Flatpak] Can't stack shader presets due to path mismatch
Description
On Steam Deck Linux, using the Flatpak build of RetroArch 1.15.1, load any shader preset and then attempt to append or prepend any other preset. The operation will fail.
Actual behavior
The log reveals the problem:
[WARN] [Shaders]: Could not read root preset: "/app/share/libretro/shaders/retroarch.slangp".
There is no retroarch.slangp present in that location. The stock presets are stored there, but retroarch.slangp is actually located at /home/deck/.var/app/org.libretro.RetroArch/config/retroarch/config/retroarch.slangp. Symlinking the latter to the former has been tested and seems to rectify the problem.
Expected behavior
RetroArch should locate the file without me having to symlink it after every update.
Steps to reproduce the bug
See above.
Version/Commit
- RetroArch: 1.15.1 (Installed from Flathub via the Steam OS Discover app)
Environment information
- OS: Steam Deck OS 3.4.8
Still an issue. Can append or prepend presets to loaded one on Steamdeck.
The issue seems to be that RetroArch's append/prepend code assumes it can read/write that file regardless of the folder permissions.
I have RetroArch installed through Arch Linux's package manager so my shaders are located in /usr/share/libretro/shaders.
I've experimented with manually creating /usr/share/libretro/shaders/retroarch.slangp and giving it global read/write access and it worked.
I don't know what the proper solution would be here, maybe the path of retroarch.slangp should be separately configurable and default to an user-writable folder (like ~/.config/retroarch/shaders) when there's a permission failure?
Anyway if someone runs into this issue you can work around this by using these commands (at your own risk, I'll not help you if you brick your device):
sudo mkdir -p /usr/share/libretro/shaders
sudo touch /usr/share/libretro/shaders/retroarch.cfg
sudo chmod a+rw /usr/share/libretro/shaders/retroarch.cfg
Probably not doable on SteamOS without unlocking root first.
Edit:
Alternatively, you could create a symlink to the shaders_slang folder inside your home folder like so:
mkdir -p ~/.config/retroarch/shaders
ln -sfT /usr/share/libretro/shaders/shaders_slang ~/.config/retroarch/shaders/shaders_slang
Then you can just set the shaders path in RetroArch to ~/.config/retroarch/shaders.
(~ is a terminal shorthand for your user folder, just in case, such as /home/deck in a Steam Deck)