profiles/graphic_drivers: Return workaround for RTD3 #149
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since #148 has been merged, we can bring back some of problematic hooks in the past, such as RTD3 workaround, since they are still relevant. Moreover, I can now say that this workaround is needed not only for GNOME, but in general for all Wayland compositors.
The issue here is that every time some application using EGL is started, the loader starts loading all the drivers specified in
/usr/share/glvnd/egl_vendor.d/
at once, which always causes the NVIDIA dGPU to wake up from its sleep state. This can be easily checked viawatch -n 1 cat /sys/class/drm/card0/device/power_state
(substitute your card number instead of card0 if it is different, in my case the dGPU always takes the number 0).Running any application takes it from
D3cold
toD0
state. Using this environment variable, however, allows dGPU not to wake up when it shouldn't. This does not affect running an application withnvidia-offload
/switcheroo-control
, because then dGPU is activated anyway.Another additional benefit is the slightly lower memory consumption and speeds up the launch of applications, as now any application does not load the NVIDIA EGL driver into its process. For example:
As for MUX configurations, they should not be broken because of validation with which the variable export is done. We have previously looked into this and found that when MUX mode is set to NVIDIA-only, the class id of the dGPU changes to
0300
. When it is set to Offload-compatible mode it becomes0302
, so we should be protected against these situations.References: