Skip to content
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 3D acceleration does not seem to work/be enabled #5

Closed
2 of 4 tasks
Speak2Erase opened this issue May 2, 2023 · 11 comments
Closed
2 of 4 tasks

Hardware 3D acceleration does not seem to work/be enabled #5

Speak2Erase opened this issue May 2, 2023 · 11 comments

Comments

@Speak2Erase
Copy link

Requirements

  • Yes
  • No

WSL Version

  • WSL 2
  • WSL 1

Version

Microsoft Windows [Version 10.0.22621.1555]

Kernel Version

5.15.90.1-microsoft-standard-WSL2

Repro Steps

Follow normal installation

Expected Behavior

To see decent performance with 3D acceleration

Actual Behavior

GUI works fine, I can run GUI apps, but they're extremely slow, and as far as I can tell, not using my graphics card?

I tried using glxgears as a benchmark, and would get ~120fps on my computer, but on my laptop that runs Manjaro, I get ~40000fps. My computer that I'm testing this on has a 1080 ti vs a shoddy integrated GPU in my laptop, so this doesn't stack up? I would've tried more benchmarks, but most crashed.
When I check task manager running GUI apps I also see my CPU usage spike, and don't see any GPU usage?

Anyway, I checked neofetch and lspci, and both tell me that my GPU is a 0b26:00:00.0 Microsoft Corporation Basic Render Driver, which I suspect is some kind of software fallback?
Strangely enough, the GL Vendor is set to NVIDIA GeForce GTX 1080 Ti.

OpenGL 4.2
D3D12 (NVIDIA GeForce GTX 1080 Ti): Microsoft Corporation
GLSL version: 4.2
@sileshn
Copy link
Owner

sileshn commented May 2, 2023

@Speak2Erase
Copy link
Author

OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce GTX 1080 Ti)
OpenGL core profile version string: 4.2 (Core Profile) Mesa 23.0.2
OpenGL core profile shading language version string: 4.20
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.2 (Compatibility Profile) Mesa 23.0.2
OpenGL shading language version string: 4.20
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 23.0.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

@sileshn
Copy link
Owner

sileshn commented May 3, 2023

You are using the correct D3D12 driver. Only thing left to check is your Nvidia driver version. It has to be 526.47 and above.

https://devblogs.microsoft.com/commandline/d3d12-gpu-video-acceleration-in-the-windows-subsystem-for-linux-now-available/

@Speak2Erase
Copy link
Author

I double checked, and my Nvidia driver is 531.79.
I created an Ubuntu instance and followed the guide you linked, and it failed here:

lily@void:~$ sudo vainfo --display drm --device /dev/dri/card0
[sudo] password for lily:
libva info: VA-API version 1.14.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
vaInitialize failed with error code -1 (unknown libva error),exit

Maybe whatever is causing this is the problem?

@sileshn
Copy link
Owner

sileshn commented May 3, 2023

Installed mesa-va-drivers?

For manjaro, follow steps here for your graphics card. Also install libva-utils. Then see if the situation gets better.

Screenshot 2023-05-03 075501

Both bother about my fps values. I have a crappy GPU.

@sileshn
Copy link
Owner

sileshn commented May 3, 2023

@Speak2Erase
Copy link
Author

Speak2Erase commented May 3, 2023

I'm getting this now: (this is in manjaro)

[lily@void ~]$ vainfo
Trying display: wayland
libva error: /usr/lib/dri/d3d12_drv_video.so init failed
vaInitialize failed with error code 18 (invalid parameter),exit

If I try with --display drm I get this:

[lily@void ~]$ vainfo --display drm --device /dev/dri/card0
Trying display: drm
Failed to open the given device!

@sileshn
Copy link
Owner

sileshn commented May 3, 2023

Use sudo

@Speak2Erase
Copy link
Author

Speak2Erase commented May 3, 2023

Yep that worked, I'm getting this now:

Trying display: drm
Xlib:  extension "DRI2" missing on display ":0".
vainfo: VA-API version: 1.18 (libva 2.17.1)
vainfo: Driver version: Mesa Gallium driver 23.0.2 for D3D12 (NVIDIA GeForce GTX 1080 Ti)
vainfo: Supported profile and entrypoints
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

Is this good?

@sileshn
Copy link
Owner

sileshn commented May 3, 2023

After looking into the issues on the wslg github page that I linked earlier, it seems that software rendering using llvmpipe is still faster. Why I don't know. You'll have to google this and find out more as I am out of ideas why it doesn't work as expected.

@Speak2Erase
Copy link
Author

Alright, thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants