Closed EntityinArray closed 1 year ago
We don’t currently support Proton, but this issue has come up enough that we’re probably going to have to look into it.
For now we recommend just using the Native Linux build for GMod.
I would also need this pretty badly. Apparently the linux version of gmod is a total buggy mess including problems with case sensitivity like in other games that got ported from windows to linux.
As a temporary workaround, using some symlinks and intuition you can get the Windows version of the CEF Codec Fix to run under Proton by running the following commands (not verbatim, you may have to edit some things to fit your setup if it's out of the ordinary, especially the Proton Version Here and path to codecfix, replace those with what you've got):
cd ~/.steam/steam/steamapps/compatdata/4000/pfx
ln -s $HOME/.steam/steam/config/loginusers.vdf "drive_c/Program Files (x86)/Steam/config/loginusers.vdf"
mkdir -p "drive_c/Program Files (x86)/Steam/appcache/"
ln -s $HOME/.steam/steam/appcache/appinfo.vdf "drive_c/Program Files (x86)/Steam/appcache/appinfo.vdf"
ln -s $HOME/.steam/steam/userdata "drive_c/Program Files (x86)/Steam/userdata"
STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.steam" STEAM_COMPAT_DATA_PATH="$HOME/.steam/steam/steamapps/compatdata/4000" WINEPREFIX=$PWD "$HOME/.steam/root/steamapps/common/Proton Version Here/proton" run /path/to/codecfix/here/GModCEFCodecFix-Windows.exe
However, currently on Proton Experimental with KDE Neon 20.04 using launch options
mesa_glthread=true RADV_PERFTEST=aco PROTON_USE_D9VK=1 gamemoderun %command% -novid -dxlevel 90 -high -console -threads 12 -nod3d9ex -nojoy -r_emulate_gl -heapsize "4194304"
the game crashes during startup due to Chromium not being able to start it's GPU process (for whatever reason).
As a temporary workaround, using some symlinks and intuition you can get the Windows version of the CEF Codec Fix to run under Proton by running the following commands (not verbatim, you may have to edit some things to fit your setup if it's out of the ordinary, especially the Proton Version Here and path to codecfix, replace those with what you've got):
cd ~/.steam/steam/steamapps/compatdata/4000/pfx
ln -s $HOME/.steam/steam/config/loginusers.vdf "drive_c/Program Files (x86)/Steam/config/loginusers.vdf"
mkdir -p "drive_c/Program Files (x86)/Steam/appcache/"
ln -s $HOME/.steam/steam/appcache/appinfo.vdf "drive_c/Program Files (x86)/Steam/appcache/appinfo.vdf"
ln -s $HOME/.steam/steam/userdata "drive_c/Program Files (x86)/Steam/userdata"
STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.steam" STEAM_COMPAT_DATA_PATH="$HOME/.steam/steam/steamapps/compatdata/4000" WINEPREFIX=$PWD "$HOME/.steam/root/steamapps/common/Proton Version Here/proton" run /path/to/codecfix/here/GModCEFCodecFix-Windows.exe
However, currently on Proton Experimental with KDE Neon 20.04 using launch options
mesa_glthread=true RADV_PERFTEST=aco PROTON_USE_D9VK=1 gamemoderun %command% -novid -dxlevel 90 -high -console -threads 12 -nod3d9ex -nojoy -r_emulate_gl -heapsize "4194304"
the game crashes during startup due to Chromium not being able to start it's GPU process (for whatever reason).
Crashes for me too on Fedora 37 Workstation in the same way, I coudn't figure it out, what a bummer.
[1217/160007.600:ERROR:sandbox_policy_base.cc(158)] Failed to add sandbox rule. error = 2, subsystem = 0
, semantics = 0, pattern = 'Z:\home\entityinarray\.var\app\com.valvesoftware.Steam\.local\share\Steam\st
eamapps\common\GarrysMod/chromium.log'
[1217/160007.600:ERROR:gpu_process_host.cc(984)] GPU process launch failed: error_code=2
[1217/160007.600:WARNING:gpu_process_host.cc(1337)] The GPU process has crashed 4 time(s)
I was able to get a build working with the following changes:
-DUSE_SANDBOX=off
resolves the gpu_process_host.cc
errors in a brute force sort of way, but at least doesn't require kernel.unprivileged_userns_clone
.msvproc.dll
is missing on Proton/Wine's DXVA2 impl. I made a PR in the other repository (solsticegamestudios/gmod-html#2) to disable the DXVA decoder and use the D3D11 one instead.I'm still testing it out, but so far it's pretty stable on my system (SteamOS + Proton Experimental).
Disabling the sandbox is non-ideal. Does it work with the sandbox enabled with kernel.unprivileged_userns_clone
+ your DXVA fix?
tl;dr: Setting launch options to PROTON_SET_GAME_DRIVE=1 %command%
in Steam allows CEF to work with the sandbox enabled.
Unfortunately SteamOS 3 doesn't use the patch that provides kernel.unprivileged_userns_clone
, so I'm not able to easily test changing it. However, after digging into the CEF/Chromium side of things, I believe my initial guess of what failed was incorrect.
After creating a build with debug logging enabled, I get the following in my bin/win64/debug.log
:
[0722/233451.998:ERROR:filesystem_policy.cc(96)] Check failed: false.
[0722/233451.998:ERROR:sandbox_policy_base.cc(215)] Check failed: false.
[0722/233451.998:ERROR:sandbox_policy_base.cc(192)] Failed to add sandbox rule. error = 2, subsystem = 0, semantics = 0, pattern = 'Z:\home\deck\.local\share\Steam\steamapps\common\GarrysMod\chromium.log'
The first check corresponds to this code in Chromium, and the other lines cascade from that point. Since /home
is a separate mount point on my Steam Deck, wine treats it as an NT reparse point, meaning Chromium doesn't consider any paths under Z:\home
as possible to sandbox.
The env var PROTON_SET_GAME_DRIVE=1
tells Proton to create an S: drive mapped to ~/.local/share/Steam/steamapps
, bypassing the mount point.
Okay, the script supports patching GMod in Proton as of https://github.com/solsticegamestudios/GModCEFCodecFix/commit/b9d121fcfd61de97503028ce132142f1bdb99b46
You'll have to set the launch option manually, but the tool should work now, problems with GMod/Proton/your OS notwithstanding.
It seems to be mostly functional on Steam Deck, except for missing emojis in CEF and some weird font rendering issues, but GMod outright crashes no matter what using Proton on Ubuntu 20.04. So YMMV
Closing since this technically works now. Please open separate issues for issues with Proton on specific distros
Closing since this technically works now. Please open separate issues for issues with Proton on specific distros
The installer doesn't work with Proton GE (same issue as above). Had to switch to Proton Experimental for it to start working. Proton GE is pretty popular though that's why I thought it might be worth mentioning it here. (You can easily install it using ProtonUp-Qt).
Closing since this technically works now. Please open separate issues for issues with Proton on specific distros
The installer doesn't work with Proton GE (same issue as above). Had to switch to Proton Experimental for it to start working. Proton GE is pretty popular though that's why I thought it might be worth mentioning it here. (You can easily install it using ProtonUp-Qt).
When did you experience this? There was a fix employed for this late last night but I didn't test it yet.
Closing since this technically works now. Please open separate issues for issues with Proton on specific distros
The installer doesn't work with Proton GE (same issue as above). Had to switch to Proton Experimental for it to start working. Proton GE is pretty popular though that's why I thought it might be worth mentioning it here. (You can easily install it using ProtonUp-Qt).
When did you experience this? There was a fix employed for this late last night but I didn't test it yet.
Yesterday.
Try again with the latest release
Try again with the latest release
Works now, thanks.
Hello, thank you for working on this amazing patch! I have a Windows version of Gmod installed, that i play through Proton. I apply the patch, but it throws an error that it cannot find hl2.sh
Basically, when program sees that the platform is Linux, it makes a wrong assumption that Gmod install is also for Linux, which is not always the case. Is there a way to patch Windows version of Gmod on Linux?