Fixing PERPheads on Linux: The Complete Performance & Stutter Guide (NVIDIA / AMD / Intel)

Messages
24
Reaction score
69
Points
90
Fixing PERPheads on Linux: The Complete Performance & Stutter Guide (NVIDIA / AMD / Intel)

Before I start, I don't exactly know how helpful this will be to users, and I don't know if people even play perp on linux, but I had alot of issues so here it is :3

If you’ve tried running PERPheads on Linux , you’ve probably ran into the exact same issues I did: the game locking up when joining the server, FPS freezing when going into the baz, or the game crashing during asset downloads/ lua downloads.

Because GMod’s native Source engine is getting old and PERP relies on hundreds of custom vehicle models, high-res skins, and heavy Lua scripts, the default ootb Linux config just doesn't work.

I spent the last couple days testing different engine flags, Mesa drivers, and launch parameters across NVIDIA, AMD, and Intel hardware. Here is the full breakdown to get it running smoothly.


---

1. The Core Requirement: x86-64 Chromium Branch

Do NOT skip this. The default 32-bit branch caps GMod at ~3.5 GB of RAM usage. When PERPheads tries to mount all server content, you will hit an Out Of Memory (OOM) crash before you even spawn at the Transit Center.

How to switch:
1. Open Steam -> Right click Garry's Mod -> Properties
2. Click the Betas tab.
3. Under Beta Participation, select:
Code:
x86-64 - Chromium + 64-bit binaries
4. Let Steam download the ~1.2 GB update.

---

2. GPU Launch Options (Pick Yours)

Go to Garry's Mod Properties -> General -> Launch Options and paste the corresponding string for your graphics card.

NVIDIA GPUs (Proprietary Drivers)
NVIDIA’s OpenGL driver on Linux performs fine, but its thread management is disabled by default for GMod, causing severe micro-stutters when driving past dense areas like Suburbs or Business Square.

Code:
__GL_THREADED_OPTIMIZATIONS=1 __GL_SHADER_DISK_CACHE=1 gamemoderun %command% -novid -nojoy -high +gmod_mcore_test 1

Additional NVIDIA fix:
Open your NVIDIA Settings control panel from your terminal/app menu, go to PowerMizer, and set it to "Prefer Maximum Performance". On Linux, NVIDIA GPUs love downclocking to lowest power states during Source engne loading screens, which causes massive hang times.

---

AMD GPUs (Mesa RADV / ACO)

Mesa’s open-source drivers are incredible, but OpenGL pipeline compilation stutters hard whenever new vehicle shaders load in. Forcing Mesa's GL threading and the ACO compiler fixes this completely.

Code:
RADV_PERFTEST=aco mesa_glthread=true gamemoderun %command% -novid -nojoy -high +gmod_mcore_test 1

AMD / Wayland Tip:
If you are on Wayland (KDE or GNOME) and experience weird floaty mouse lag or click misalignment on the F1 menu, add `m_rawinput 1` into your in-game console or force Xwayland.

---

Intel iGPU & Arc Graphics

Intel GPUs struggle heavily with Source 1’s memory allocation overhead. Pushing pinned memory allocations directly into system VRAM keeps your frametimes steady.

Code:
mesa_glthread=true -gl_amd_pinned_memory gamemoderun %command% -novid -nojoy -low +gmod_mcore_test 1

Intel In-Game Video Settings:
* Model Detail: Medium
* Shadow Detail: Low
* Water Detail: Simple Reflections

---

3. Setting up autoexec.cfg for Permanent Multithreading

Source likes to reset multi-core commands back to single-core every time you change a video setting or reconnect to the server. Forcing them via `autoexec.cfg` makes them stay enabled.

1. Navigate to your GMod config directory:
* Standard Steam:
Code:
~/.local/share/Steam/steamapps/common/GarrysMod/garrysmod/cfg/
* Flatpak Steam*:
Code:
~/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/GarrysMod/garrysmod/cfg/
I highly recommend using Standard steam over flatpak.

2. Create a text file named autoexec.cfg (if it doesn't exist) and paste this block:

Code:
// PERP Linux Multi Core Optimization
gmod_mcore_test 1
mat_queue_mode 2
cl_threaded_bone_setup 1
cl_threaded_client_leaf_system 1
r_threaded_renderables 1
r_threaded_particles 1
r_queued_ropes 1
fps_max 144

---

4. Essential System Tweaks

1. Install Feral GameMode

If you haven't installed GameMode, your CPU will drop its governor frequency when idle in a building.
* Ubuntu/Debian/Mint:
Code:
sudo apt install gamemode
* Arch/Manjaro:
Code:
sudo pacman -S gamemode
* Fedora:
Code:
sudo dnf install gamemode
*(This is why we have `gamemoderun` included in the launch options above).*

2. Watch out for Disk Space on Root
(/)
GMod caches gigabytes of server downloads. If your `/` partition runs out of space, the game won't throw an explicit error. It will just hang at the joining screen indefinitely or in some instances not even allow you to boot steam, apps, or games.
Keep an eye on `df -h`.

---

If anyone needs support, just reply with your distro and preferably your specs and I will get back to you <3

- A Linux Perp User
 
What is your recommendation on game capturing software? OBS is problematic for me on CachyOS, can't set up hotkeys for replay buffer and generally just trash compared to the Windows build which I find weird

ryzen 5 5600x
3080 10gb
16gb ddr4 3200mt/s
 
What is your recommendation on game capturing software? OBS is problematic for me on CachyOS, can't set up hotkeys for replay buffer and generally just trash compared to the Windows build which I find weird

ryzen 5 5600x
3080 10gb
16gb ddr4 3200mt/s
OBS On linux is fantastic, im assuming the issue you are running into is due to running wayland?
If you really need an alternative i'd use GPU Screen Recorder
Code:
sudo pacman -S gpu-screen-recorder-gtk

But the actual way to fix obs is by fixing wayland issues that you are almost definitely seeing here
You actually have 2 options, a system bound key, or just installing the wayland plugin.

Option 1:
Install the OBS Wayland Hotkeys plugin (available as obs-wayland-hotkeys in Arch/CachyOS)

Or you could alternatively run a command to get it system wide.
1. Install obs-cli

Open your terminal and install the CLI tool to control OBS:

Code:
sudo pacman -S obs-cli

2. Enable WebSocket in OBS

  1. Launch OBS Studio.
  2. Go to Tools -> obs-websocket Settings.
  3. Check Enable WebSocket server.
  4. (Optional) Set a server password or disable authentication for local connections.
3. Create the Custom Shortcut in CachyOS

For KDE Plasma:


  1. Open System Settings -> Shortcuts -> Command / Application.
  2. Click Add New -> Command.
  3. Name it Save OBS Replay Buffer.
  4. In the Command field, enter:
    Code:
    obs-cli replaybuffer save
  5. Click Add Shortcut and press your desired key combination.
  6. Click Apply.
For Hyprland (hyprland.conf):

  1. Open ~/.config/hypr/hyprland.conf in a text editor.
  2. Add your keybind using exec:
    Code:
    bind = $mainMod, F10, exec, obs-cli replaybuffer save
  3. Save the file.


    post - Seeing as there are the alternatives such as gpu screen recorder, and if you're not wanting to use obs at this point in time, just use the alternative.
    But obs is absolutely fantastic on linux, and super easy to work with once you get it goin.

    Hope this helps!
 
OBS On linux is fantastic, im assuming the issue you are running into is due to running wayland?
If you really need an alternative i'd use GPU Screen Recorder
Code:
sudo pacman -S gpu-screen-recorder-gtk

But the actual way to fix obs is by fixing wayland issues that you are almost definitely seeing here
You actually have 2 options, a system bound key, or just installing the wayland plugin.

Option 1:
Install the OBS Wayland Hotkeys plugin (available as obs-wayland-hotkeys in Arch/CachyOS)

Or you could alternatively run a command to get it system wide.
1. Install obs-cli

Open your terminal and install the CLI tool to control OBS:

Code:
sudo pacman -S obs-cli

2. Enable WebSocket in OBS

  1. Launch OBS Studio.
  2. Go to Tools -> obs-websocket Settings.
  3. Check Enable WebSocket server.
  4. (Optional) Set a server password or disable authentication for local connections.
3. Create the Custom Shortcut in CachyOS

For KDE Plasma:


  1. Open System Settings -> Shortcuts -> Command / Application.
  2. Click Add New -> Command.
  3. Name it Save OBS Replay Buffer.
  4. In the Command field, enter:
    Code:
    obs-cli replaybuffer save
  5. Click Add Shortcut and press your desired key combination.
  6. Click Apply.
For Hyprland (hyprland.conf):

  1. Open ~/.config/hypr/hyprland.conf in a text editor.
  2. Add your keybind using exec:
    Code:
    bind = $mainMod, F10, exec, obs-cli replaybuffer save
  3. Save the file.


    post - Seeing as there are the alternatives such as gpu screen recorder, and if you're not wanting to use obs at this point in time, just use the alternative.
    But obs is absolutely fantastic on linux, and super easy to work with once you get it goin.

    Hope this helps!
Thank you this is great, I will look into this whenever I boot into cachy!
@Ethem I know you were having some problems in the past, this might or might not be relevant to you
 
Thank you this is great, I will look into this whenever I boot into cachy!
@Ethem I know you were having some problems in the past, this might or might not be relevant to you
Thank you for the ping, However, I just switched to Windows 11 IoT Enterprise LTSC haha.

It's not because I like Windows, but I started having so many problems that I unfortunately couldn't fix, I tried a few different distros, but the problems persisted... So I just switched to Windows for now.

But I'll keep this in mind. Thank you!
 
Thank you this is great, I will look into this whenever I boot into cachy!
@Ethem I know you were having some problems in the past, this might or might not be relevant to you
Absolutely!
Another way I failed to mention (I am updating the post)
Is that proton experimental runs SIGNIFICANTLY better than the native linux build :p
 
Thank you for the ping, However, I just switched to Windows 11 IoT Enterprise LTSC haha.

It's not because I like Windows, but I started having so many problems that I unfortunately couldn't fix, I tried a few different distros, but the problems persisted... So I just switched to Windows for now.

But I'll keep this in mind. Thank you!
Awh sad to see you go !
 
OBS On linux is fantastic, im assuming the issue you are running into is due to running wayland?
If you really need an alternative i'd use GPU Screen Recorder
Code:
sudo pacman -S gpu-screen-recorder-gtk

But the actual way to fix obs is by fixing wayland issues that you are almost definitely seeing here
You actually have 2 options, a system bound key, or just installing the wayland plugin.

Option 1:
Install the OBS Wayland Hotkeys plugin (available as obs-wayland-hotkeys in Arch/CachyOS)

Or you could alternatively run a command to get it system wide.
1. Install obs-cli

Open your terminal and install the CLI tool to control OBS:

Code:
sudo pacman -S obs-cli

2. Enable WebSocket in OBS

  1. Launch OBS Studio.
  2. Go to Tools -> obs-websocket Settings.
  3. Check Enable WebSocket server.
  4. (Optional) Set a server password or disable authentication for local connections.
3. Create the Custom Shortcut in CachyOS

For KDE Plasma:


  1. Open System Settings -> Shortcuts -> Command / Application.
  2. Click Add New -> Command.
  3. Name it Save OBS Replay Buffer.
  4. In the Command field, enter:
    Code:
    obs-cli replaybuffer save
  5. Click Add Shortcut and press your desired key combination.
  6. Click Apply.
For Hyprland (hyprland.conf):

  1. Open ~/.config/hypr/hyprland.conf in a text editor.
  2. Add your keybind using exec:
    Code:
    bind = $mainMod, F10, exec, obs-cli replaybuffer save
  3. Save the file.


    post - Seeing as there are the alternatives such as gpu screen recorder, and if you're not wanting to use obs at this point in time, just use the alternative.
    But obs is absolutely fantastic on linux, and super easy to work with once you get it goin.

    Hope this helps!
GPU Screen Recorder has quite a few graphical issues, at least in my experience. The cursor freezes, sometimes the entire desktop freezes, and so on.

Could it be related to Wayland? It might depend on which version of the app you're using, but the new UI seems a bit problematic.
 
Awh sad to see you go !
I'll be back in a week when Windows blocks me from deleting a file probably... My biggest fear just started, **distro hopping**...

I might try Kubuntu or Debian possibly, or maybe a switch to pure Arch.
 
GPU Screen Recorder has quite a few graphical issues, at least in my experience. The cursor freezes, sometimes the entire desktop freezes, and so on.

Could it be related to Wayland? It might depend on which version of the app you're using, but the new UI seems a bit problematic.
Honestly, OBS is the best and there is no alternative as good as it.
I don't like GPU Screen Recorder but its okay as it is.
There is this program called Vice that is pretty similar to Medal.tv, might try that out!
 
I'll be back in a week when Windows blocks me from deleting a file probably... My biggest fear just started, **distro hopping**...

I might try Kubuntu or Debian possibly, or maybe a switch to pure Arch.
I am a purist, I have used mint for like EVER
 
Honestly, OBS is the best and there is no alternative as good as it.
I don't like GPU Screen Recorder but its okay as it is.
There is this program called Vice that is pretty similar to Medal.tv, might try that out!
Yeah I know Vice, probably the only one that worked properly overall. OBS is good, but I was personally unable to make it work, all the videos had graphical issues and more issues like that. İt's also pretty heavy.

GPU Screen Recorder is the best clipping/recording software in existence, only if it didn't have the bugs... İt's incredibly lightweight too.
 
Yeah I know Vice, probably the only one that worked properly overall. OBS is good, but I was personally unable to make it work, all the videos had graphical issues and more issues like that. İt's also pretty heavy.

GPU Screen Recorder is the best clipping/recording software in existence, only if it didn't have the bugs... İt's incredibly lightweight too.
The only reason I recommended GPU Screen Recorder is that I personally haven't used vice, I will be testing it now.
 
Very helpful guide!!!!! unfortunately as you are a furry trans linux user i must make fun of you for being a stereotype.
 
Back
Top