Skip to content

Configuring lsfg‐vk

strokesws edited this page Aug 13, 2025 · 17 revisions

After installing lsfg-vk, you can configure it either with the graphical configuration editor (lsfg-vk-ui) or manually by editing the configuration file. You may also choose to use pure environment variables.

The first two approches are hot-reloadable, meaning that if lsfg-vk is activated when the game is started, any changes to the configuration will apply immediately.

Using the configuration editor

If you installed lsfg-vk-ui, launch it from your application menu or by running lsfg-vk-ui in a terminal. The appearance may vary depending on your GTK theme.

  • Profiles: On the left, select or create profiles. Each profile matches a game or application by its command name or executable. You may also specify .exe files launched through proton or wine.
  • Lossless.dll Path: If Lossless Scaling is installed in a non-default location, set the path at the top using the file picker.
  • Profile Name/Process Picker: Use the picker button to select a running process and automatically set the profile name. Make sure the game is running in the background.
  • Settings: Adjust options like multiplier, flow scale, and performance mode. Changes apply in real time if the profile exists before launching the game.

Tip

If a game uses a launcher or injecting through the .exe file didn't work, try launching your game with LSFG_PROCESS=custom_name, which will override the detected process name and use the respective profile.

Using the configuration file

lsfg-vk uses a TOML config file at ~/.config/lsfg-vk/conf.toml. You can override the path with the LSFG_CONFIG environment variable. You may delete the configuration file and launch any Vulkan app to generate a new one.

The configuration is split in two parts, a global configuration and a game-specific configuration:

Global Settings

The global section is used for setting up the layer as a whole. These are the properties you can set there:

Property Type Description
dll path If you didn't install Lossless Scaling into traditional directories, you can override the path to the Lossless.dll file using this property.
no_fp16 boolean (develop branch only!) On some older NVIDIA cards, specifically the 1000-series and older, FP16 acceleration is known to be much slower than traditional FP32. If you are on one of those cards, set this property to true. DO NOT TOUCH ON AMD SYSTEMS OR YOU WILL SLASH PERFORMANCE.

Game-specific Settings

The game section is where you configure behavior for specific games.

Property Type Description
exe string The executable name to match. This can be a fractional path to the executable, Windows executable (develop branch only!) or the command name.
multiplier integer The frame generation multiplier (e.g., 2, 3, 4). You can go as high as you want. Setting this value to 1 temporarily disables lsfg-vk.
flow_scale float (0.25 to 1.0) Lowers the resolution of the internal image used for motion estimation. This can improve performance, although performance_mode is preferred.
performance_mode boolean Switches to a lighter frame generation model. This can massively improve performance (2x to 8x faster) with a slight quality loss.
hdr_mode boolean Switches the shaders to HDR mode (scRGB not supported). Only set this to true when using HDR.
experimental_present_mode enum (fifo, mailbox, immediate) Overrides the present mode without altering synchronization logic. Very experimental. (Note: fifo and vsync are the same thing)

Finding the Correct exe Value

The exe property matches the end of the running program's path or its process name. The process name is not always the exact filename; it may be a variation (e.g. MyGame, MyGame.exe, MyGame.ex).

To find the process name, run the following script in a terminal while your game is running:

for pid in /proc/[0-9]*; do
    owner=$(stat -c %U "$pid" 2>/dev/null)
    if [[ "$owner" == "$USER" ]]; then
        if grep -qi 'vulkan' "$pid/maps" 2>/dev/null; then
            procname=$(cat "$pid/comm" 2>/dev/null)
            if [[ -n "$procname" ]]; then
                printf "PID %s: %s\n" "$(basename "$pid")" "$procname"
            fi
        fi
    fi
done

Alternatively, set any name you like and launch the game with LSFG_PROCESS=<custom_name>.

Please note that the development version of lsfg-vk allows you to specify the Windows executable directly, making the above script pointless.

Using environment variables

You may use these environment variables to enable lsfg-vk as well. Please note that launching a game with LSFG_LEGACY=1 will fully disable the configuration system.

Variable Example Value Description
LSFG_LEGACY 1 Use environment variables instead of config file
LSFG_DLL_PATH /path/to/Lossless.dll Override Lossless.dll location
LSFG_MULTIPLIER 2, 3, 4 FPS multiplier
LSFG_FLOW_SCALE 1.0 Lower for better performance
LSFG_PERFORMANCE_MODE 1 or 0 Enable fast frame generation
LSFG_HDR_MODE 1 Enable HDR mode
LSFG_EXPERIMENTAL_PRESENT_MODE fifo, vsync, mailbox, immediate Override present mode

Clone this wiki locally