feat(linux/glad): implement EGL_IMG_context_priority#4857
feat(linux/glad): implement EGL_IMG_context_priority#4857ReenigneArcher merged 1 commit intoLizardByte:masterfrom
Conversation
|
Pinging @inkatail to test a possible alternative to async_depth modification. Vulkan encoding won't be affected by this PR, but it may help resolve VAAPI encoder throttling during high GPU usage. |
Bundle ReportBundle size has no change ✅ |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4857 +/- ##
==========================================
- Coverage 18.50% 18.46% -0.04%
==========================================
Files 107 107
Lines 22448 22477 +29
Branches 9970 9990 +20
==========================================
- Hits 4153 4151 -2
- Misses 14360 15008 +648
+ Partials 3935 3318 -617
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@psyke83 Unfortunately, this PR doesn't seem to improve it at least for me, logs seem to report that the Priority is HIGH but in games the performance is still weird |
|
Thanks for testing. I'll convert this to draft until I can test some more. @inkatail I happen to have the same GPU as you; can you suggest the exact in-game settings that can reproduce the issue in ETS2? I have the game but never played it, so I might need some guidance on what scenario to load, etc. |
|
Could you help me with the problem? GPU performance drop tied to stream framerate on Linux #4567 |
|
I refreshed the PR to try setting realtime priority as well. I can't test this as the AMD drivers don't support this extension, but you could give it a try. I'm not sure how the nvenc encoder pipeline interacts with EGL. If you don't see |
@psyke83 All I changed in graphics settings was using the Ultra preset, then for testing I were just driving around cities cause they are pretty intensive to run, I were also testing in the Driving Academy (which is basically a tutorial for ETS). |
|
@inkatail Please retest the latest version that adds CAP_SYS_NICE support. I was able to reproduce the lag in ETS2 that's now fixed by the PR, but only under specific conditions:
Basically, VAAPI + KMS is currently the only confirmed working case on AMD. The NVIDIA drivers might not need CAP_SYS_NICE to increase the priority, so Flatpak, AppImage and Portal may work/benefit from this change as well as the distro packages. |
|
@psyke83 I will wait to merge until I get the go-ahead from you. |
@psyke83 Did another test, now with CAP_SYS_NICE on VA-API + KMS and it indeed seems to fix the issue properly now. |
I think we should get some feedback from NVIDIA users. It may be risky to set realtime due to the risk of hangs. Aside from that, I'm investigating whether it's possible to make this work with Portal, but I suppose that can be refined in a later PR. |
1879f4e to
fd9d3ae
Compare
Doesn't look like there were any volunteers on discord |
|
To be safe, I'll partially revert the realtime changes and just try setting HIGH for everyone. I'm also still investigating ways to make this work with Portal. Will update the PR soon. |
Resolves encoding throttling during high GPU usage: * Try to create EGL context with high priority if supported. * Set CAP_SYS_NICE capability (needed for AMDGPU/NVIDIA drivers at minumum). * This will not work for Flatpak, AppImage or Portal capture due to the CAP_SYS_NICE capability not being available.
|
|
This should be good to go. |



Description
Resolves encoding throttling during high GPU usage:
CAP_SYS_NICE capability not being available.
Currently has no effect on AMDGPU with Flatpak, AppImage and/or with
Portal capture. Other GPUs may behave differently.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage