-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hardware acceleration does not work without LD_LIBRARY_PATH hacks #454
Comments
/usr/lib/wsl/lib is symlinked into /run/opengl-driver/lib Can you run the same commands with strace to see if it searches the right directories? |
Here is the output of I can see many references to |
It is not searching for d3d12 in the right location.
|
hmm, libd3d12.so does exist in my nix store in from the wsl-lib and opengl-drivers packages:
I'm a good bit out of my depth here, but is there a way to add these packages as runtime dependencies for the mesa package? Setting any of these directories as the LD_LIBRARY_PATH does allow at least the Nvidia d3d12 adapter to work |
Thank you, you have given my enough information to discover the For |
Alright, for a minimal configuration.nix only snippet, I have the following:
The libedit package only proides libedit.so.5 and libedit.so.0. d3d12 is looking for .2, so for the time being, this will work around that. It seems to pull in all of the other required library files as well. |
how do i get my nvidia gpu to work |
Bug description
At this time, the WSL2/WSLg D3D12 hardware acceleration does not work out of the box due to library problems, even though the mesa.drivers package does have D3D12 support enabled by default.
I do not understand exactly what is going on. but there are a few ways to set LD_LIBRARY_PATH as a hack to fix it:
LD_LIBRARY_PATH=/run/opengl-driver/lib
works withMESA_D3D12_DEFAULT_ADAPTER_NAME=Nvidia
but notIntel
(My laptop has two GPUs)LD_LIBRARY_PATH=ub:/run/opengl-driver/lib
works with bothIntel
andNvidia
from above, where theub
folder has some basic library files copied from the WSL2 Ubuntu system - see below for contentsIn both examples above,
/run/opengl-driver/lib
can be swapped with/usr/lib/wsl/lib
. I'm not sure what the difference is here, other than that/usr/lib/wsl/lib
has many more files.I believe this could be two problems:
To Reproduce
With the following config:
Then run any of the following commands:
The ub folder I am using is: ub.tar.gz
Logs
Example of hardware acceleration working:
What happens without the LD_LIBRARY_PATH hack:
Where the ub folder has the following files:
WSL version
The text was updated successfully, but these errors were encountered: