protonscr

[Max Payne 2] The game ignores dxvk.conf configuration file (Windows, Nvidia, DXVK 2.7.1, d3d8)

dxvkclosed windowsnot a bug
doitsujin/dxvk#5299 · opened 2025-10-28 by rrPKrr · updated 2025-10-28 · 8 comments · github
3 matching comments, n / p to jump
RrrPKrr 2025-10-28 github

For some reason the game ignores any custom settings in dxvk.conf file.

For example dxvk.hud = full doesn't show dxvk overlay. At the same time environmental variable DXVK_HUD set to full works properly. Just to be clear, it's not limited to that particular variable. All custom settings added to dxvk.conf get ignored by the game.

maxpayne2_d3d8.log

warn: D3D8Device::SetRenderState: Unimplemented render state D3DRS_PATCHSEGMENTS

maxpayne2_d3d9.log

info: Game: maxpayne2.exe
info: DXVK: v2.7.1
info: Build: x86 gcc 15.1.0
info: Found config file: dxvk.conf
info: Effective configuration:
info: dxvk.hud = full
info: dxvk.allowFse = True
info: d3d9.maxFrameLatency = 3
info: Vulkan: Found vkGetInstanceProcAddr in vulkan-1.dll @ 0x6b861760
info: Extension providers:
info: Platform WSI
info: OpenVR
info: OpenVR: could not open registry key, status 2
info: OpenVR: Failed to locate module
info: OpenXR
info: Enabled instance extensions:
info: VK_EXT_surface_maintenance1
info: VK_KHR_get_surface_capabilities2
info: VK_KHR_surface
info: VK_KHR_win32_surface
info: Found device: NVIDIA GeForce GTX 1080 (NVIDIA 580.97.0)
info: D3D9: VK_FORMAT_D16_UNORM_S8_UINT -> VK_FORMAT_D24_UNORM_S8_UINT
info: Process set as DPI aware

KK0bin maintainer 2025-10-28 github

info: Found config file: dxvk.conf
info: Effective configuration:
info: dxvk.hud = full
info: dxvk.allowFse = True
info: d3d9.maxFrameLatency = 3

Looks like it has correctly picked up your config option. Spelling and the general names of the options look correct too.

Keep in mind that the DXVK_HUD environment variable takes precedence over the dxvk.hud option in a config file. So make sure you get rid of that first if you wanna use the config file option (and perhaps reboot because you're on Windows).

info: d3d9.maxFrameLatency = 3

That's the default btw. No need to configure that. It's not gonna be noticable in an old game like Max Payne 2 anyway because it requires the CPU to run ahead of the GPU. But the visuals of old games are very simple. GPU performance gains since the release of that game have been orders of magnitude higher than the CPU performance gains. So in practice the GPU spends a lot of time idle, just waiting for the CPU and thus the CPU can't run ahead anyway.

info: dxvk.allowFse = True

As for that one, idk how noticable that is.

RrrPKrr 2025-10-28 github

info: Found config file: dxvk.conf
info: Effective configuration:
info: dxvk.hud = full
info: dxvk.allowFse = True
info: d3d9.maxFrameLatency = 3

Looks like it has correctly picked up your config option. Spelling and the general names of the options look correct too.

Keep in mind that the DXVK_HUD environment variable takes precedence over the dxvk.hud option in a config file. So make sure you get rid of that first if you wanna use the config file option (and perhaps reboot because you're on Windows).

I know. It still doesn't work though.

info: d3d9.maxFrameLatency = 3

That's the default btw. No need to configure that. It's not gonna be noticable in an old game like Max Payne 2 anyway because it requires the CPU to run ahead of the GPU. But the visuals of old games are very simple. GPU performance gains since the release of that game have been orders of magnitude higher than the CPU performance gains. So in practice the GPU spends a lot of time idle, just waiting for the CPU and thus the CPU can't run ahead anyway.

Thanks for the tip. I did not know that.

info: dxvk.allowFse = True

As for that one, idk how noticable that is.

On Windows you can easily verify whether it is working or not by changing sound volume. When exclusive fullscreen is enabled and working properly, the volume overlay doesn't show over the game window, but when it's not the volume slider appears over the game window.

But there is something fishy about this game. As you can see from my edits I am not so sure whether it is a d3d8 or d3d9 game, and the reason is that weirdly dxvk partially works if you don't install d3d8 dll. Not sure what's going on, but I'll keep troubleshooting.

RrrPKrr 2025-10-28 github

That's weird. When you install d3d9.dll alone (without d3d8.dll), dxvk creates an empty shader cache for the game. IIRC if you install the wrong version of dxvk, that usually doesn't happen. DXVK_HUD environmental variable doesn't work though.

RrrPKrr 2025-10-28 github

I have tried another game called Enclave, which is clearly a Directx 8 game. dxvk.conf works properly there. 🤔

EDIT: Yeah, as I said, when you use a non compatible version of DXVK, it doesn't create any shader caches nor dxvk logs. That's the case for Enclave. If I add d3d9.dll without d3d8.dll the game ignores dxvk completely. In case of Max Payne 2 however both d3d8 and d3d9 "work". Partially.

BBlisto91 2025-10-28 github

The config thing seems to be because the games exe switches around its working directory a bit.
The log file that appears in the main directory is from the pre game config window which it launches via the same exe. This loads the dxvk DLLs but doesn't actually render using d3d. Probably just to check for DirectX support and detect resolutions and such.
When you then hit play the exe changes its working directory to the e2driver folder. You should see another dxvk log in there. This is also from where it would then correctly pick up the dxvk config for usage ingame if placed there.

RrrPKrr 2025-10-28 github

Case solved. When I put dxvk.conf in e2driver folder everything works properly.

BBlisto91 2025-10-28 github

One way to make sure that a config is always picked up could be to point DXVK_CONFIG_FILE to a file you have placed somewhere on your system. If the env var is set globally you could then in the file set options to only apply for specific exe's like so

[testapp.exe]
dxvk.bla = 1

[maxpayne2.exe]
dxvk.bla = 2
RrrPKrr 2025-10-28 github

@Blisto91 Mind blown actually. I mean, I have read wiki articles and I know about this variable, but it never occurred to me that there could be a good reason to use global config file instead of multiple ones other than an ease of access...
2+2

Launch options

DLLs