Skip to content

Passing driver settings

Jens Peters edited this page Feb 23, 2025 · 18 revisions

DRS Settings

DXVK-NVAPI newer than Commit c13ab33 allows to pass driver settings to an application; when requested by an application. Those driver settings are set with environment variables.

DXVK_NVAPI_DRS_SETTINGS allows providing custom values for arbitrary driver settings with keys and values of DWORD (u32) types. Format is setting1=value1,setting2=value2,… where both settingN and valueN are unsigned 32-bit integers and can be prefixed with 0x or 0X to parse them as hexadecimal numbers. Additionally, several well known settings are supported in their named/text form, for both keys and values. Each supported named setting can also be configured with a dedicated environment variable. The name of said environment variable is case-sensitive, the value is not. If a setting is set via both DXVK_NVAPI_DRS_SETTINGS and its own dedicated environment variable, the latter takes precedence.

Well known settings

Override DLSS mode to be DLAA

  • Key: NGX_DLAA_OVERRIDE
  • Values:
    • DLAA_DEFAULT
    • DLAA_ON
    • DEFAULT

Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlaa_override=dlaa_on

Example 2: DXVK_NVAPI_DRS_NGX_DLAA_OVERRIDE=dlaa_on

Override DLSSG multi-frame count

  • Key: NGX_DLSSG_MULTI_FRAME_COUNT
  • Values:
    • <VALUE>
    • MIN
    • MAX
    • DEFAULT

Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlssg_multi_frame_count=3

Example 2: DXVK_NVAPI_DRS_NGX_DLSSG_MULTI_FRAME_COUNT=3

Enable DLSS-FG override

  • Key: NGX_DLSS_FG_OVERRIDE
  • Values:
    • OFF
    • ON
    • DEFAULT

Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlss_fg_override=on

Example 2: DXVK_NVAPI_DRS_NGX_DLSS_FG_OVERRIDE=on

Override DLSS-RR performance mode

  • Key: NGX_DLSS_RR_MODE
  • Values:
    • PERFORMANCE
    • BALANCED
    • QUALITY
    • SNIPPET_CONTROLLED
    • DLAA
    • ULTRA_PERFORMANCE
    • CUSTOM
    • DEFAULT

Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlss_rr_mode=dlaa

Example 2: DXVK_NVAPI_DRS_NGX_DLSS_RR_MODE=dlaa

Override DLSS performance mode to be ultra-perfomance

  • Key: NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS
  • Values:
    • NONE
    • PERF_TO_9X
    • DEFAULT

Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlss_override_optimal_settings=none

Example 2: DXVK_NVAPI_DRS_NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS=none

Enable DLSS-RR override

  • Key: NGX_DLSS_RR_OVERRIDE
  • Values:
    • OFF
    • ON
    • DEFAULT

Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlss_rr_override=on

Example 2: DXVK_NVAPI_DRS_NGX_DLSS_RR_OVERRIDE=on

Override DLSS-RR preset

  • Key: NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION
  • Values:
    • OFF
    • RENDER_PRESET_A
    • RENDER_PRESET_B
    • RENDER_PRESET_C
    • RENDER_PRESET_D
    • RENDER_PRESET_E
    • RENDER_PRESET_F
    • RENDER_PRESET_G
    • RENDER_PRESET_H
    • RENDER_PRESET_I
    • RENDER_PRESET_J
    • RENDER_PRESET_K
    • RENDER_PRESET_L
    • RENDER_PRESET_M
    • RENDER_PRESET_N
    • RENDER_PRESET_O
    • RENDER_PRESET_LATEST
    • DEFAULT

Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlss_rr_override_render_preset_selection=render_preset_latest

Example 2: DXVK_NVAPI_DRS_NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION=render_preset_latest

Override DLSS-SR performance mode

  • Key: NGX_DLSS_SR_MODE
  • Values:
    • PERFORMANCE
    • BALANCED
    • QUALITY
    • SNIPPET_CONTROLLED
    • DLAA
    • ULTRA_PERFORMANCE
    • CUSTOM
    • DEFAULT

Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlss_sr_mode=dlaa

Example 2: DXVK_NVAPI_DRS_NGX_DLSS_SR_MODE=dlaa

Enable DLSS-SR override

  • Key: NGX_DLSS_SR_OVERRIDE
  • Values:
    • OFF
    • ON
    • DEFAULT

Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlss_sr_override=on

Example 2: DXVK_NVAPI_DRS_NGX_DLSS_SR_OVERRIDE=on

Override DLSS-SR presets

  • Key: NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION
  • Values:
    • OFF
    • RENDER_PRESET_A
    • RENDER_PRESET_B
    • RENDER_PRESET_C
    • RENDER_PRESET_D
    • RENDER_PRESET_E
    • RENDER_PRESET_F
    • RENDER_PRESET_G
    • RENDER_PRESET_H
    • RENDER_PRESET_I
    • RENDER_PRESET_J
    • RENDER_PRESET_K
    • RENDER_PRESET_L
    • RENDER_PRESET_M
    • RENDER_PRESET_N
    • RENDER_PRESET_O
    • RENDER_PRESET_LATEST
    • DEFAULT

Example 1: DXVK_NVAPI_DRS_SETTINGS=ngx_dlss_sr_override_render_preset_selection=render_preset_latest

Example 2: DXVK_NVAPI_DRS_NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION=render_preset_latest

NGX snippet updates and preset overrides

Applying driver settings does not override NGX snippets/dlls. Use PROTON_ENABLE_NGX_UPDATER=1 (See ngx.html from the NVIDIA driver documentation) for automatic snippets updates and then add the DRS settings that enable DLSS overrides:

  • NGX_DLSS_RR_OVERRIDE=on
  • NGX_DLSS_SR_OVERRIDE=on
  • NGX_DLSS_FG_OVERRIDE=on

Overriding DLSS snippets for all three mentioned NGX features and force latest preset for DLSS-SR and DLSS-RR looks like this with a one liner suitable for e.g. launch options:

  • PROTON_ENABLE_NGX_UPDATER=1 DXVK_NVAPI_DRS_SETTINGS=NGX_DLSS_RR_OVERRIDE=on,NGX_DLSS_SR_OVERRIDE=on,NGX_DLSS_FG_OVERRIDE=on,NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION=render_preset_latest,NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION=render_preset_latest

or like this with separate environment variables:

  • PROTON_ENABLE_NGX_UPDATER=1
  • DXVK_NVAPI_DRS_NGX_DLSS_RR_OVERRIDE=on
  • DXVK_NVAPI_DRS_NGX_DLSS_SR_OVERRIDE=on
  • DXVK_NVAPI_DRS_NGX_DLSS_FG_OVERRIDE=on
  • DXVK_NVAPI_DRS_NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION=render_preset_latest
  • DXVK_NVAPI_DRS_NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION=render_preset_latest

or like this when putting those options into Proton's user_settings.py:

{
    "PROTON_ENABLE_NGX_UPDATER": "1",
    "DXVK_NVAPI_DRS_NGX_DLSS_RR_OVERRIDE": "on",
    "DXVK_NVAPI_DRS_NGX_DLSS_SR_OVERRIDE": "on",
    "DXVK_NVAPI_DRS_NGX_DLSS_FG_OVERRIDE": "on",
    "DXVK_NVAPI_DRS_NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION": "render_preset_latest",
    "DXVK_NVAPI_DRS_NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION": "render_preset_latest"
}

Note that PROTON_ENABLE_NGX_UPDATER had some issues before R570 driver release and there's still some chance that it won't work in all titles. If you start seeing games quietly failing to launch, this variable may be the cause.

DXVK-NVAPI logging shows which settings have been provided from the environment and, more important, which settings have been requested from an application.

As a side note, NGX offers registry settings for enabling graphical indicators for DLSS and DLSSG. Those can be used to validate a different snippet or preset. For convenience, those registry settings can be set with a DXVK-NVAPI tweak: DXVK_NVAPI_SET_NGX_DEBUG_OPTIONS=DLSSIndicator=1024,DLSSGIndicator=2 for showing indicators and DXVK_NVAPI_SET_NGX_DEBUG_OPTIONS=DLSSIndicator=0,DLSSGIndicator=0 for hiding the indicators. Be aware, this tweak permanently modifies the registry. The NGX indicators are only active when DLSS is active, which usually means that entering in-game is needed. Once activated, it looks like this:

image

(Bottom left and top left)