OptiScaler icon indicating copy to clipboard operation
OptiScaler copied to clipboard

OptiScaler 0.7.9 does not work in MechWarrior 5: Mercenaries (UE4, D3D11) on Windows 10 with DXVK

Open Digger1955 opened this issue 2 months ago • 6 comments

Greetings.

Game name and version:

Mechwarrior 5: Mercenaries Application Version: 1.1.361 - SteamDB 14135168 Application Engine: Unreal Engine 4.26.2 x64 3D API: D3D11 -> DXVK 2.6.2 with and without dxvk-nvapi 0.9.0 In-Game DLSS was updated manually to version 310.4.0 from TechPowerUp Link

Mods and mod versions used

OptiScaler 0.7.9 with and without fakenvapi v1.3.4

GPU

AMD Radeon RX 580

OS

Windows 10 21H1

Used automated or manual install?

  • [Y] Manual

If on AMD/Intel and Automated, used DLSS inputs? - Did not use Automated.

Did you check the Wiki and Compatibility List?

  • [Y] Yes

Please describe the issue and steps to reproduce it

Issue Description:

Without OptiScaler, DXVK is working properly on Mechwarrior 5: Mercenaries in D3D11 mode.

Without DXVK, using OptiScaler according to Manual Installation Guide on Mechwarrior 5: Mercenaries in D3D11 mode is working properly.

With DXVK, using OptiScaler according to Manual Installation Guide on Mechwarrior 5: Mercenaries in D3D11 mode leads to application not starting with active application process in Task Manager.

Solutions that already have not worked:

  1. Renamed OptiScaler.dll to dbghelp.dll and placed it at MechWarrior 5 Mercenaries\MW5Mercs\Binaries\Win64\ path, moved DXVK's dxgi.dll and d3d11.dll to MechWarrior 5 Mercenaries\MW5Mercs\Binaries\Win64\ - application not starting with active application process in Task Manager.
  2. Created plugins folder at MechWarrior 5 Mercenaries\MW5Mercs\Binaries\Win64\ path, moved DXVK's dxgi.dll and d3d11.dll to plugins folder, renamed OptiScaler.dll to dxgi.dll - application not starting with active application process in Task Manager.
  3. Renamed OptiScaler.dll to dbghelp.dll and replaced it at MechWarrior 5 Mercenaries\Engine\Binaries\ThirdParty\DbgHelp\ path with DXVK's dxgi.dll and d3d11.dll at the MechWarrior 5 Mercenaries\MW5Mercs\Binaries\Win64\ path - application not starting with active application process in Task Manager.
  4. Using solutions 1 and 2 with fakenvapi according to installation guide and Spoofing Guide - application not starting with active application process in Task Manager.
  5. Using solution 3 with dxvk-nvapi - application not starting with active application process in Task Manager.

I have attached

Nothing, since no log is created.

Is it possible at all to use OptiScaler in conjunction with DXVK on Windows? If yes, can you please provide a step-by-step guide?

Digger1955 avatar Oct 08 '25 20:10 Digger1955

We don't test DXVK combo on Windows, so compatibility is given as "if it works, it works".

Maybe try with Opti as winmm.dll/version.dll or just using the game on its own with -dx12 launch command.

TheRazerMD avatar Oct 09 '25 10:10 TheRazerMD

Is that the only UE4 game that has issues? I'm using dxvk 2.7.1 + Opti 0.7.9 (as winmm.dll) and can make Palworld and DRG work in DX11.

  • make sure you have Dx11Upscaler=auto set in the config, dx11on12 won't work on Windows.
  • make sure you have LogToFile=true and LogLevel=0 set in the config, in a reply please provide OptiScaler.log after trying to launch the game.
  • tinker with Dxgi=false/true, if false works but true doesn't then that's a clue.

FakeMichau avatar Oct 11 '25 20:10 FakeMichau

Greetings, @FakeMichau

Is that the only UE4 game that has issues?

It is the only UE4 game that I have to which I can apply OptiScaler - others do not have DLSS/FSR/XeSS.

make sure you have Dx11Upscaler=auto set in the config, dx11on12 won't work on Windows.

Tried - auto and fsr31, which is Native DX11, as stated in the OptiScaler.ini

make sure you have LogToFile=true and LogLevel=0 set in the config, in a reply please provide OptiScaler.log after trying to launch the game.

I have tried additionally:

  1. Renamed OptiScaler.dll to winmm.dll and placed it at MechWarrior 5 Mercenaries\MW5Mercs\Binaries\Win64\ path, with DXVK's dxgi.dll and d3d11.dll at the MechWarrior 5 Mercenaries\MW5Mercs\Binaries\Win64\ path - application not starting with active application process in Task Manager.

  2. Using solution 1 with Dx11Upscaler=auto and Dx11Upscaler=fsr31 - application not starting with active application process in Task Manager.

  3. Using solution 1 and solution 2 with Dxgi=false and Dxgi=true - application not starting with active application process in Task Manager.

  4. Using soulutions 1,2,3 with fakenvapi according to installation guide and Spoofing Guide - application not starting with active application process in Task Manager.

Log file is the same in every attempt:

OptiScaler.log

Without DXVK, in D3D11:

  1. Dxgi=false leads to DLSS being unavailable since I have AMD GPU.

  2. Dxgi=true or Dxgi=auto work properly.

Log of D3D11 launch without fakenvapi:

OptiScaler.log

Logs of D3D11 launch with fakenvapi:

OptiScaler.log

fakenvapi.log

I found a difference in logs with and without DXVK:

With DXVK in OptiScaler.log running routine is:

...
[17:09:27.943956] [D] CheckWorkingMode Check for dxgi
[17:09:27.943964] [D] CheckWorkingMode dxgi.dll already in memory
[17:09:27.975489] [I] CheckForGPU Adapter: Radeon RX 580 Series, VRAM: 7936 MB

and then log file ends.

Curious thing is that, even if in dxvk.conf will be specified:

dxgi.customVendorId = 10de
dxgi.hideAmdGpu = True
dxgi.hideNvidiaGpu = False
dxgi.customDeviceId = 2684
dxgi.customDeviceDesc = "NVIDIA GeForce RTX 4090"

OptiScaler.log still shows:

...
[18:03:07.551852] [D] CheckWorkingMode Check for dxgi
[18:03:07.551859] [D] CheckWorkingMode dxgi.dll already in memory
[18:03:07.582769] [I] CheckForGPU Adapter: Radeon RX 580 Series, VRAM: 7936 MB

Without DXVK in OptiScaler.log running routine is:

...
[17:34:29.869735] [D] CheckWorkingMode Check for dxgi
[17:34:29.869742] [D] CheckWorkingMode dxgi.dll already in memory
[17:34:29.869849] [D] HookDxgiForSpoofing 
[17:34:29.869899] [D] HooksDx::HookDxgi 
[17:34:29.869932] [D] KernelHooks::HookBase 
[17:34:29.869950] [D] CheckWorkingMode Check for d3d12
[17:34:29.869960] [D] CheckWorkingMode d3d11.dll already in memory
[17:34:29.869966] [D] HooksDx::HookDx11 
[17:34:29.869979] [D] HooksDx::HookDx11 Hooking D3D11CreateDevice methods
...

and continues.

I guess that with DXVK, something works differently when checking/spoofing GPU is happening. And I guess it works on Linux/Wine, but it does not on Windows 10.

Update:

Another thought about difference between Linux-DXVK and Windows-DXVK:

On Linux/Wine there are 2 dxgi.dll:

  1. dxgi.dll that is inside Wine's system32 folder, which is replaced by DXVK dxgi.dll and
  2. OptiScaler.dll, which can be renamed to dxgi.dll, acts as a dxgi.dll spoofer.

On Linux/Wine OptiScaler dxgi.dll hooks to DXVK dxgi.dll - everything works properly.

On Windows there are 3 dxgi.dll:

  1. dxgi.dll that is inside Windows system32 folder;
  2. DXVK dxgi.dll, which loads instead of Windows dxgi.dll; and
  3. OptiScaler.dll, which can be renamed to dxgi.dll, acts as a dxgi.dll spoofer.

I guess, on Windows, DXVK replaces dxgi.dll, OptiScaler should hook to dxgi.dll of DXVK. Maybe OptiScaler still tries to load Windows dxgi.dll and not DXVK dxgi.dll in the game folder? It could explain why game runs, but nothing happens - this may be a symptom of DXVK d3d11.dll executing without DXVK dxgi.dll.

Update_2:

I have checked another Unreal Engine 4 game with DXVK and OptiScaler on Windows 10 - System Shock Remake (Unreal Engine 4.27.2 x64, D3D11) - same behaviour.

Digger1955 avatar Oct 12 '25 15:10 Digger1955

Hi @Digger1955, if you are still interested, maybe you can try the latest build in discord server and set DisableOverlays=true. I had a similar issue and log as what you posted here with a Unity game. I turned off every overlay before running the game, I don't know why this option matters but somehow it worked

M1ssing-N0 avatar Nov 11 '25 16:11 M1ssing-N0

Greetings, @M1ssing-N0

I'll wait for next release build of OptiScaler to check it out, thanks for information.

Digger1955 avatar Nov 11 '25 18:11 Digger1955

I tried OptiScaler_v0.9.0-pre5_20251122, which I downloaded from OptiScaler Github Actions, on System Shock Remake (Unreal Engine 4.27.2 x64, D3D11).

fakenvapi 1.3.4 is necessary for proper functioning - without it game runs, but I have lower performance and constant log messages in OptiScaler.log (20 MB file size in 1 minute):

[07:25:23.614608] [D] LibraryLoadHooks::LoadNvApi 
[07:25:23.614614] [D] LibraryLoadHooks::LoadNvApi Load nvapi64.dll
[07:25:23.614622] [I] LibraryLoadHooks::LoadNvApi nvapi64.dll loaded from L:\System Shock Remake\SystemShock\Binaries\Win64\nvapi64.dll
[07:25:23.614640] [D] hkCreateDXGIFactory1 Caller: nvapi64.dll
[07:25:23.614647] [D] hkCreateDXGIFactory Caller: WINMM.dll
[07:25:23.614773] [D] DxgiFactoryHooks::HookToFactory 
[07:25:23.614788] [D] DxgiFactoryHooks::HookToFactory 
[07:25:23.615311] [I] LibraryLoadHooks::LoadLibraryCheckW Overrided nvapi64.dll call!
[07:25:23.615323] [D] LibraryLoadHooks::LoadNvApi 
[07:25:23.615328] [D] LibraryLoadHooks::LoadNvApi Load nvapi64.dll
[07:25:23.615336] [I] LibraryLoadHooks::LoadNvApi nvapi64.dll loaded from L:\System Shock Remake\SystemShock\Binaries\Win64\nvapi64.dll
[07:25:23.615354] [D] hkCreateDXGIFactory1 Caller: nvapi64.dll
[07:25:23.615361] [D] hkCreateDXGIFactory Caller: WINMM.dll
[07:25:23.615487] [D] DxgiFactoryHooks::HookToFactory 
[07:25:23.615500] [D] DxgiFactoryHooks::HookToFactory 
[07:25:23.616060] [I] LibraryLoadHooks::LoadLibraryCheckW Overrided nvapi64.dll call!

OptiScaler configuration that have worked for System Shock Remake:

  • OptiScaler.dll renamed to winmm.dll;
  • fakenvapi 1.3.4 nvapi64.dll used;
  • OptiScaler.ini settings that were changed:
Dx11Upscaler=fsr31
Dx12Upscaler=fsr31
VulkanUpscaler=fsr31
LogToFile=true
OverrideNvapiDll=true

In conjunction with fakenvapi 1.3.4 OptiScaler_v0.9.0-pre5_20251122 works on Windows 10 with DXVK - game runs, I can change DLSS Preset in game settings and quality/performance changes accordingly.

But OptiScaler OverlayMenu does not open when Insert key is pressed and there is no OptiScaler startup splash screen. DXVK HUD works properly, I tried to open OptiScaler OverlayMenu with and without DXVK HUD - no changes.

OptiScaler Log File from successful startup with fakenvapi 1.3.4 Link:

OptiScaler.log

Digger1955 avatar Nov 23 '25 06:11 Digger1955