Make native Linux Garry's Mod playable and fast.
wget -q https://raw.githubusercontent.com/ret-0/gmod-linux-patcher/master/gmod-linux-patcher.sh && sh gmod-linux-patcher.sh
- Right-click on Garry's Mod in Steam -> Properties -> Betas -> Select 'x86_64 - Chromium + 64-bit binaries'.
- Download and apply GModCEFCodecFix.
- Set heap size and filesystem_max_stdio_read in garrysmod/cfg/valve.rc.
mem_min_heapsize 256
mem_max_heapsize [memory allocation in megabytes, e.g. 8192 for 8 GiB]
mem_max_heapsize_dedicated [same as above]
filesystem_max_stdio_read [ulimit -Hn]
- Replace
ulimit -n 2048
in hl2.sh withulimit -n [Output of ulimit -Hn]
- Add
export mesa_glthread=true
before game execution in hl2.sh. - Find
exec ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
and replace it withexec ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} -malloc=system -swapcores -dxlevel 98 -vulkan "$@"