lutris icon indicating copy to clipboard operation
lutris copied to clipboard

[Feature Request] LatencyFlex

Open BrandowLucas opened this issue 2 years ago • 4 comments

I don't know if someone already answered this question before but it would be great if Lutris had an toggle on options for LatencyFlex which greatly improves latency in some games i tested. I know about some risks people say about anticheat and etc but it could be hidden in advanced options and disabled by default, just would be really cool to already have this feature shipped with Lutris.

EDIT: I don't think DXVK async will no longer be necessary on newer MESA RADV drivers due to GPL.

Sorry if i am misunderstood in something or i said something wrong, i am a completely noob on that matter. Thanks

BrandowLucas avatar Mar 17 '23 18:03 BrandowLucas

I'd be interested too. This is a general V1 implementation proposal.

Pre-requisites:

  1. Some files must be installed at OS level. We could take care of this, or let the responsability to distro specific packages like LatencyFlex arch package. I advise we install this files when Lutris is installed into the system. Reasons for this:
  • The package is currently only available on arch AUR.
  • The package in not in a good maintenance state.
  • The less dependencies we have the better.
  • Better cross distro support.
  1. Then, it requires us to install a custom LatencyFlex DXVK fork into the prefix. This files can be fould in the [tar.gz file in LatencyFlex GitHub release page.

Proton/wine installation:

Assuming the pre-requisites are fulfilled.

  1. Create a dxvk.conf in the prefix with the next content:

    dxgi.nvapiHack = False dxgi.customVendorId = 10de # If running on non-NVIDIA GPU

  2. Add the next env vars when the game is launched with LatencyFlex enabled:

    PROTON_ENABLE_NVAPI=1 DXVK_NVAPI_DRIVER_VERSION=49729 DXVK_NVAPI_ALLOW_OTHER_DRIVERS=1 LFX=1 %command%

GUI Implementation

The best way to implement this is probably to have a checkbox.

  • Checked: DXVK-NVAPI is injected into the prefix. (See Pre-requisites step 2 + Proton/wine installation).
  • Unchecked: Use the prefix's original DXVK.

Extra info

  • There is also a MangoHud fork that allows to see what LatencyFlex does underhood. Pretty cool, but I would totally forget about this for now.
  • It would be important to notify our users that while using LatencyFlex, their selected DXVK version will be ignored.

Zeioth avatar Mar 24 '23 01:03 Zeioth

V2 implementation

I personally would't implement V2. Reasons:

  1. Direct hooking (UE4 hook) can trip the game's integrity check and directly get you banned.
  2. Likely the same for the (Unity Hook)

If we decide to do it anyway

Zeioth avatar Mar 24 '23 01:03 Zeioth

Update: LatencyFlex2 starts its development.

screenshot_2023-03-24_03-01-42_368602906

We might want to wait a bit, as there is no documentation yet about possible breaking changes.

Zeioth avatar Mar 24 '23 02:03 Zeioth

TODOS

LatencyFlex is still in alpha stage and it's likely to remain like that for a long time. For now we are just experimenting with the technology.

Zeioth avatar Apr 16 '23 03:04 Zeioth