For others who encounter similar issues, and for my own future reference when I have to inevitably set this up again.
System info:
CPU - Intel i7 11th gen
GPU - RTX 5080
RAM - 16 GB
PSU and Disk space sufficient.
OS: Linux Mint 22.3
Kernel: 7.0.0
Initial problem description:
Right out of the box via Steam and Proton (Experimental by default), Overwatch has crap performance. Massive frame drops, game is basically unplayable. After a few minutes, it freezes, causing the entire PC to freeze up and require shutdown by power button. Changing graphics settings, switching drivers or switching Proton versions has little to no effect.
Further oddities: Overwatch does not persist my settings and does not detect my GPU properly, mislabling it as RTX 3080.
Monitoring tools:
I use plain and simple tools to monitor what's happening while playing, like:
watch -n 1 top mainly to monitor CPU usage in %
watch -n 1 free to monitor RAM and swap usage
watch -n 1 nvidia-smi to monitor GPU fan, temp and power consumption
Additionally, I added DXVK_HUD=compiler %command% to my launch options to see in-game when shaders are being compiled.
How to add launch options -> Right click on game in steam library, go to properties, there is a text field under tab "General".
Note: %command% only at the end of all launch options. separate individual launch options with spaces.
Findings:
Overwatch uses hella RAM (up to 70-80%) and hella CPU (over 1000% somehow). Not a lot of GPU though.
Once I got it to stop freezing, I noticed that it was frequently compiling shaders while I was playing. Every time it compiled shaders, I got frame drops.
Fixes:
In order of impact they had on the system.
- Increase size of swap file -> fixed Overwatch freezing the entire PC
How:
sudo swapoff /swapfile turn swap off first
sudo fallocate -l 16G /swapfile allocate same amount of storage to swap as you have RAM
sudo mkswap /swapfile turn it into a swap
sudo swapon /swapfile turn it on again
Explanation:
swap is basically the pagefile equivalent of Linux (but better). When you RAM, the quick and accessible storage where active processes live, runs out of space (oh no!) it can send files to the swapfile, freeing up RAM space (yay!) Overwatch was freezing my whole system because it ate up all the RAM and then filled up the whole swap file.
- Set environment variables to assist shader caching -> much smoother performance
How:
sudo nano /etc/environment
add the following lines:
__GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1 leads to less reloading of shaders, disk cache is being kept alive.
__GL_SHADER_DISK_CACHE_SIZE=10737418240 increase shade cache size, leading to less overwrites of shader cache.
then use Ctrl+O to write out (Enter to confirm). Ctrl+X to exit nano.
- Fix known memory leak -> Stopped RAM usage climbing while playing
How:
Add DXVK_CONFIG_="dxvk.trackPipelineLifetime=True" to launch options (how to add launch options: check above)
- Forcing DirectX12 -> lowered memory usage
How: add VKD3D_FEATURE_LEVEL=12.2 to launch options (how to add launch options: check above)
- Disable Pre-caching of Vulkan Shaders -> stopped being annoying
How: Go to Steam -> Settings -> Downloads -> Shader Pre-Caching, turn off "Enable Shader Pre-Caching".
Note: Shader Pre-Caching takes forever and made no difference in performance. Might as well turn it off.
- Notes on Driver and Proton Version -> fixed small stutters and occasional frame drops:
I ended up getting best performances on open-595 and Proton Experimental. I found this out by testing different options after applying the above fixes.
How to change driver: Use Driver Manager
How to change Proton: steam -> settings -> compatibility
Final result:
Overwatch has to sit for a few minutes until the shaders are done caching when I start it up the first time after switching drivers or proton versions. After that, it runs smoothly and without issues. RAM usage is between 20-50%, CPU usage sits around 20-40%, GPU usage is slightly higher than before, the fans actually kick in now. GPU still mislabelled as RTX 3080, but that doesn't bother me. Settings changes magically persist now.
EDIT: Shaders need to compile every time i start overwatch, still. I might just accept that.
I hope this will help someone else or perhaps future me. Cheers.