docs(troubleshooting): update note on AMD lowlatencyenc (Linux) (#3117)

Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
This commit is contained in:
Gilles Schintgen 2024-09-01 20:20:29 +02:00 committed by GitHub
commit 9d7e90ec2e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -143,25 +143,24 @@ often grub is used to load the kernel and set its command line.)
### AMD encoding latency issues ### AMD encoding latency issues
If you notice unexpectedly high encoding latencies (e.g. in Moonlight's If you notice unexpectedly high encoding latencies (e.g. in Moonlight's
performance overlay) or strong fluctuations thereof, this is due to performance overlay) or strong fluctuations thereof, your system's Mesa
[missing support](https://gitlab.freedesktop.org/drm/amd/-/issues/3336) libraries are outdated (<24.2). This is particularly problematic at higher
in Mesa/libva for AMD's low latency encoder mode. This is particularly resolutions (4K).
problematic at higher resolutions (4K).
Only the most recent development versions of mesa include support for this
low-latency mode. It will be included in Mesa-24.2.
In order to enable it, Sunshine has to be started with a special environment
variable:
Starting with Mesa-24.2 applications can request a
[low-latency mode](https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30039)
by running them with a special
[environment variable](https://docs.mesa3d.org/envvars.html#envvar-AMD_DEBUG):
```bash ```bash
AMD_DEBUG=lowlatencyenc sunshine export AMD_DEBUG=lowlatencyenc
``` ```
Sunshine sets this variable automatically, no manual
configuration is needed.
To check whether low-latency mode is being used, one can watch the `VCLK` and To check whether low-latency mode is being used, one can watch the VCLK and DCLK
`DCLK` frequencies in `amdgpu_top`. Without this encoder tuning both clock frequencies in amdgpu_top. Without this encoder tuning both clock frequencies
frequencies will fluctuate strongly, whereas with active low-latency encoding will fluctuate strongly, whereas with active low-latency encoding they will stay
they will stay high as long as the encoder is used. high as long as the encoder is used.
### Gamescope compatibility ### Gamescope compatibility
Some users have reported stuttering issues when streaming games running within Gamescope. Some users have reported stuttering issues when streaming games running within Gamescope.