WSLG doesn't release unused GPUs and doesnt autoshutdown #492
-
(Sorry that this is a bit long) So here are the issue in short:
Is this expected behaviour, or is it something wrong with my installation? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 10 replies
-
I think I found a solution: force software rendering in WSL system distro by adding LIBGL_ALWAYS_SOFTWARE=1 in .wslgconfig Also, now I can start gui apps from within the wsl terminal using the intel GPU and not kick start the Nvidia one after exporting MESA_D3D12_DEFAULT_ADAPTER_NAME="INTEL" . I don't know if this is actually a good solution, or what all other implications this have. Also, it would be really nice to have this setting (MESA_D3D12_DEFAULT_ADAPTER_NAME) in .wslconfig and get it to work. |
Beta Was this translation helpful? Give feedback.
-
Found how to make it work for apps launched from start menu too. You have to modify the profile file for your shell and add |
Beta Was this translation helpful? Give feedback.
-
I have a similar problem. My GPU does not get released either but even worse, I cant update my Mesa higher than 20.3.4 so I am stuck with software rendering. Even so, I too get that "System" process on my GPU and it does not get released until I shutdown WSL. Its such a pain because my Linux gui apps are not only consuming lots of power but are also still just using software rendering via llvmpipe |
Beta Was this translation helpful? Give feedback.
-
Seems like your GPUs are detected, but wsl isn't using it at all... Seems really strange. |
Beta Was this translation helpful? Give feedback.
-
I found the Problem!!! There was a dependency on my installation AMDGPU driver which prevented the newest LibGL mesa version from being used. I can now access the hardware accelarated GPUS. However, my performance is strangly bad 30fps on glxgears |
Beta Was this translation helpful? Give feedback.
I think I found a solution: force software rendering in WSL system distro by adding LIBGL_ALWAYS_SOFTWARE=1 in .wslgconfig
So I assume the system distro is connecting to and acting as a keepalive for the GPU, eventhough the renderer actually being used by my user distro is the intel one. (Maybe it keeps alive all the GPUs it enumerated?)
(Wouldn't it be better if it kept alive only the preferred renderer/the one last used, rather than all the GPUs?)
Also, now I can start gui apps from within the wsl terminal using the intel GPU and not kick start the Nvidia one after exporting MESA_D3D12_DEFAULT_ADAPTER_NAME="INTEL" . I don't know if this is actually a good solution, or what all other imp…