CachyProton ENV's & low latency

this is likely a silly question, but…

GamingOnLinux released this article re. CachyOS building the Korthos low latency layer into their fork of Proton

kinda new to Linux, so this is probably where things get silly

the Korthos github states this can be added as a ENV variable for globally enabling, or per game via Steam launch param’s

i’m running Hyprland, so guessing this means adding hl.env("LOW_LATENCY_LAYER", "1") to hyprland.lua?

really this is a question about ENV var’s in general

when a package loads, does it check ENV var’s for anything applicable?

I haven’t used Hyprland, so I don’t know about their lua scripting integration. But if you want something applied globally you can place the environment variable (envvar) in /etc/environment.

However, you are better off using a more local scope by simply making a shell script that exports that envvar or add it to your Steam launch settings or whatever.

I mainly just use normal system Wine and write my own shell scripts for custom configs used by each game.

For the Korthos LLL to even work you need to have a couple of things in place:

For DX11 games you need DXVK’s d3d11.dll and dxgi.dll.

For DX12 you need the amdxc64.dll shim (packaged with Proton, but works with normal Wine too) along with DXVK’s dxgi.dll and VKD3D-Proton’s d3d12.dll and d3d12core.dll. Some D3D12 games (like Diablo II Resurrection) will also require DXVK’s d3d11.dll to be present to launch correctly.

For Vulkan native games with AntiLag2 support, you only need to add export LOW_LATENCY_LAYER=1 to your script or runLOW_LATENCY_LAYER=1 wine /path/to/game.exe

Of course you need libVkLayer_KORTHOS_LowLatency.so and low_latency_layer.json placed in the correct locations:

When building from the github project, they go to /usr/local/*:

/usr/local/lib/libVkLayer_KORTHOS_LowLatency.so
/usr/local/share/vulkan/implicit_layer.d/low_latency_layer.json

As an alternative, you can use, or compare against, the Mesa AntiLag implementation by using ENABLE_LAYER_MESA_ANTI_LAG=1. It is currently off by default and must be manually enabled via this envvar. Don’t enable both at the same time. Just do one or the other.

Personally, I’ve only seen worse frame time behavior (as in large ass spikes) with the Korthos LLL Vulkan layer. Hopefully you see better results than me.