ishitatsuyuki / LatencyFleX

Vendor agnostic latency reduction middleware. An alternative to NVIDIA Reflex.
Apache License 2.0
810 stars 22 forks source link

No longer working in latest release of Apex Legends #19

Closed KyleGospo closed 2 years ago

KyleGospo commented 2 years ago

Not sure if this is a me problem or a game problem, broke suddenly without any changes to my environment, and I can confirm it's still broken even after updating to a newer ProtonGE and copying in/symlinking the latencyflex files.

DXVK_NVAPI_DRIVER_VERSION is set to '49729', reporting driver version 497.29
222.024:0134:0138:trace:loaddll:build_module Loaded L"C:\\windows\\system32\\latencyflex_layer.dll" at 00000000878E0000: builtin
222.025:0134:0138:trace:loaddll:free_modref Unloaded module L"C:\\windows\\system32\\latencyflex_layer.dll" : builtin
222.025:0134:0138:fixme:virtual:NtQueryVirtualMemory (0xffffffffffffffff,0x878e0000,info_class=3,0x7cd3c0,48,(nil)) Unknown information class
Loading latencyflex_layer.dll failed with error code: 1114
NvAPI_Initialize: OK
NvAPI_QueryInterface (0x33c7358c): Unknown function ID
NvAPI_QueryInterface (0x593e8644): Unknown function ID
NvAPI_D3D_SetSleepMode: No implementation
ishitatsuyuki commented 2 years ago

Can't test right now but can you put the full log? Loading latencyflex_layer.dll failed with error code: 1114 is typically associated with some message from the Wine bridge but due to DllMain weirdness they tend to be put at the end of the log.

ishitatsuyuki commented 2 years ago

Actually I wonder if it's some build system change messing up the calling conventions. Just in that case, please upload your

x86_64-unix/latencyflex_layer.so
x86_64-windows/latencyflex_layer.dll

so I can analyze them. Thanks!

KyleGospo commented 2 years ago

requested_files.zip

Let me know if there's anything else I can get you

DadSchoorse commented 2 years ago

@ishitatsuyuki You have to update https://github.com/ishitatsuyuki/LatencyFleX/blob/589afdb01e8db336f68c1b427a289a81d0e31278/layer/layer.json.in#L7 for Vulkan 1.3.

ishitatsuyuki commented 2 years ago

@DadSchoorse I guess that makes sense but does that have anything to do with the module load failing? It likely means that trying to dlopen latencyflex_layer.so fails.

@KyleGospo By any chance can you disable the container runtime and see if that works? You can do that by opening the Proton installation directory, and replace the toolmanifest.vdf's contents with https://github.com/ValveSoftware/Proton/blob/proton_7.0/toolmanifest_noruntime.vdf.

KyleGospo commented 2 years ago

@DadSchoorse No difference with that change applied.

@ishitatsuyuki Still greyed out with that change, but 1114 error no longer appears in log. New log attached. steam-1172470.log

My launch options in Steam are: PROTON_ENABLE_NVAPI=1 DXVK_NVAPI_DRIVER_VERSION=49729 DXVK_NVAPI_ALLOW_OTHER_DRIVERS=1 LFX=1 DXVK_ASYNC=1 %command%

VelorumS commented 2 years ago

The "api_version": "1.3" fixed it for me. I just edited the /usr/share/vulkan/implicit_layer.d/latencyflex.json file.

nvapi from fa9a2c4, launch options: PROTON_ENABLE_NVAPI=1 DXVK_NVAPI_ALLOW_OTHER_DRIVERS=1 LFX=1 gamemoderun %command% +fps_max unlimited

KyleGospo commented 2 years ago

Tested api_version 1.3 w/ the toolmanifest.vdf change at the same time, still greyed out.

I am using an AMD GPU so I have to use DXVK_NVAPI_DRIVER_VERSION, @ChipmunkV can you send me your Nvidia driver version just in case that also needs updating?

VelorumS commented 2 years ago

Nvidia driver 515.65.01.

cyberphantom52 commented 2 years ago

Tested api_version 1.3 w/ the toolmanifest.vdf change at the same time, still greyed out.

I am using an AMD GPU so I have to use DXVK_NVAPI_DRIVER_VERSION, @ChipmunkV can you send me your Nvidia driver version just in case that also needs updating?

Working for me without editing anything on Fedora 37 and using your copr, ProtonGE-7-36, NVIDIA driver version 515.65.01. launch command DXVK_ASYNC=1 PROTON_ENABLE_NVAPI=1 DXVK_NVAPI_ALLOW_OTHER_DRIVERS=1 LFX=1 %command% -novid

KyleGospo commented 2 years ago

This issue resolved itself for me after updating ProtonGE and reinstalling LatencyFleX in the new version. Not sure why it broke in the first place but that should at least confirm it's not an issue with Apex, or is no longer.

No changes to my environment variables from my first post.

ishitatsuyuki commented 2 years ago

I just published v0.1.1 with the api_version fix, so I'll close this for now. If there's still any issue with the layer loading or the container runtime, comment and I'll reopen.

Ann1kaB commented 2 years ago

it still doesn't work for me :/

ishitatsuyuki commented 2 years ago

Make sure you have went through the troubleshooting guide, and please attach logs and other information if it still doesn't work.

Ann1kaB commented 2 years ago

Make sure you have went through the troubleshooting guide, and please attach logs and other information if it still doesn't work.

steam-1172470.log

ishitatsuyuki commented 2 years ago

Can you try disabling the runtime as stated in https://github.com/ishitatsuyuki/LatencyFleX/issues/19#issuecomment-1207317761?

Ann1kaB commented 2 years ago

Can you try disabling the runtime as stated in #19 (comment)?

it didn't work steam-1172470.log

ishitatsuyuki commented 2 years ago

Where did you put your latencyflex_layer.{so,dll} files? Does it match your Proton installation directory?

Ann1kaB commented 2 years ago

Where did you put your latencyflex_layer.{so,dll} files? Does it match your Proton installation directory?

[^ ^] ~/.l/s/S/c/GE-Proton7-37> ls -lah /usr/lib{,64}/wine/x86_64-windows/latencyflex_*
-rwxr-xr-x 1 root root 102K Oct  8 21:57 /usr/lib64/wine/x86_64-windows/latencyflex_layer.dll*
-rw-r--r-- 1 root root 2.4K Oct  8 21:57 /usr/lib64/wine/x86_64-windows/latencyflex_layer.dll.a
-rwxr-xr-x 1 root root  56K Oct  8 21:57 /usr/lib64/wine/x86_64-windows/latencyflex_wine.dll*
-rw-r--r-- 1 root root 1000 Oct  8 21:57 /usr/lib64/wine/x86_64-windows/latencyflex_wine.dll.a
-rwxr-xr-x 1 root root 102K Oct  8 21:57 /usr/lib/wine/x86_64-windows/latencyflex_layer.dll*
-rw-r--r-- 1 root root 2.4K Oct  8 21:57 /usr/lib/wine/x86_64-windows/latencyflex_layer.dll.a
-rwxr-xr-x 1 root root  56K Oct  8 21:57 /usr/lib/wine/x86_64-windows/latencyflex_wine.dll*
-rw-r--r-- 1 root root 1000 Oct  8 21:57 /usr/lib/wine/x86_64-windows/latencyflex_wine.dll.a
[^ ^] ~/.l/s/S/c/GE-Proton7-37> ls -lah /usr/lib{,64}/wine/x86_64-unix/latencyflex_layer.so
-rwxr-xr-x 1 root root 82K Oct  8 21:57 /usr/lib64/wine/x86_64-unix/latencyflex_layer.so*
-rwxr-xr-x 1 root root 82K Oct  8 21:57 /usr/lib/wine/x86_64-unix/latencyflex_layer.so*
[^ ^] ~/.l/s/S/c/GE-Proton7-37> ls files/lib{,64}/wine/x86_64-windows/latencyflex_*
files/lib64/wine/x86_64-windows/latencyflex_layer.dll*
files/lib64/wine/x86_64-windows/latencyflex_wine.dll*
[^ ^] ~/.l/s/S/c/GE-Proton7-37> ls files/lib{,64}/wine/x86_64-unix/latencyflex_layer.so
ls: cannot access 'files/lib/wine/x86_64-unix/latencyflex_layer.so': No such file or directory
files/lib64/wine/x86_64-unix/latencyflex_layer.so*
[^ ^] ~/.l/s/S/c/GE-Proton7-37> ls -lah ~/.local/share/Steam/steamapps/compatdata/1172470/pfx/drive_c/window
s/system32/latencyflex_*
lrwxrwxrwx 1 annika annika 50 Oct  9 03:45 /home/annika/.local/share/Steam/steamapps/compatdata/1172470/pfx/drive_c/windows/system32/latencyflex_layer.dll -> /usr/lib/wine/x86_64-windows/latencyflex_layer.dll*
lrwxrwxrwx 1 annika annika 49 Oct  9 03:46 /home/annika/.local/share/Steam/steamapps/compatdata/1172470/pfx/drive_c/windows/system32/latencyflex_wine.dll -> /usr/lib/wine/x86_64-windows/latencyflex_wine.dll*

I'm pretty sure everything is in the correct location...

ishitatsuyuki commented 2 years ago

If you're using symlinks, try copying instead. There are reports that Wine sometimes fails to resolve symlinks.

Ann1kaB commented 2 years ago

If you're using symlinks, try copying instead. There are reports that Wine sometimes fails to resolve symlinks.

that was the solution thank you!