Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Unable to get GPU acceleration for GUI applications#463

Unanswered
McBride-SallyJoeBob asked this question inQ&A
Discussion options

__Hello guys I am pretty new here and to WSL in general. I recently upgraded to the Windows 11 preview 22000.194 and upgraded my ubuntu 20.04 LTS WSL for WSLG capabilities. I was able to run the NVIDIA examples for CUDA compute workloadshere without any problems. I was clearly seeing GPU activity in task manager. However, for GUI applications such as google-chrome, I do not get any GPU acceleration. I am running a Notebook PC with an AMD apu and NVIDIA RTX 2060 maxq (using NVIDIA optimus). Strangely when a GUI application is opened, even though there is no GPU acceleration, It seems like my GPU gets "activated" according to the "NVIDIA GPU Activity" windows application. Hopefully someone here knows how to fix that so I can run gui applications with gpu rendering. I will try to post as much relevant lnfo/logs here

~$ nvidia-smi+-----------------------------------------------------------------------------+| NVIDIA-SMI 510.00       Driver Version: 510.06       CUDA Version: 11.6     ||-------------------------------+----------------------+----------------------+| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC || Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. ||                               |                      |               MIG M. ||===============================+======================+======================||   0  NVIDIA GeForce ...  On   | 00000000:01:00.0 Off |                  N/A || N/A   47C    P8     3W /  N/A |    174MiB /  6144MiB |     N/A      Default ||                               |                      |                  N/A |+-------------------------------+----------------------+----------------------++-----------------------------------------------------------------------------+| Processes:                                                                  ||  GPU   GI   CI        PID   Type   Process name                  GPU Memory ||        ID   ID                                                   Usage      ||=============================================================================||  No running processes found                                                 |+-----------------------------------------------------------------------------+
~$ glxinfo -Bname of display: :0display: :0  screen: 0direct rendering: YesExtended renderer info (GLX_MESA_query_renderer):    Vendor: Mesa/X.org (0xffffffff)    Device: llvmpipe (LLVM 11.0.1, 256 bits) (0xffffffff)    Version: 20.3.4    Accelerated: no    Video memory: 7660MB    Unified memory: no    Preferred profile: core (0x1)    Max core profile version: 4.5    Max compat profile version: 3.1    Max GLES1 profile version: 1.1    Max GLES[23] profile version: 3.2OpenGL vendor string: Mesa/X.orgOpenGL renderer string: llvmpipe (LLVM 11.0.1, 256 bits)OpenGL core profile version string: 4.5 (Core Profile) Mesa 20.3.4OpenGL core profile shading language version string: 4.50OpenGL core profile context flags: (none)OpenGL core profile profile mask: core profileOpenGL version string: 3.1 Mesa 20.3.4OpenGL shading language version string: 1.40OpenGL context flags: (none)OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.3.4OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
~$ inxi -FxSystem:    Host: $COMPUTER_NAME Kernel: 5.10.43.3-microsoft-standard-WSL2 x86_64 bits: 64 compiler: N/A           Desktop: N/A Distro: Ubuntu 20.04.3 LTS (Focal Fossa)Machine:   Message: No machine data: try newer kernel. Is dmidecode installed? Try -M --dmidecode.Battery:   ID-1: BAT1 charge: 4.0 Wh condition: 5.0/5.0 Wh (100%) model: Microsoft Hyper-V Virtual BatterVirtual           status: Not chargingCPU:       Topology: 8-Core model: AMD Ryzen 9 4900HS with Radeon Graphics bits: 64 type: MT MCP arch: Zen rev: 1           L2 cache: 4096 KiB           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 95819           Speed: 2994 MHz min/max: N/A Core speeds (MHz): 1: 2994 2: 2994 3: 2994 4: 2994 5: 2994 6: 2994 7: 2994           8: 2994 9: 2994 10: 2994 11: 2994 12: 2994 13: 2994 14: 2994 15: 2994 16: 2994Graphics:  Device-1: Microsoft driver: dxgkrnl v: N/A bus ID: 56ef:00:00.0           Device-2: Microsoft driver: dxgkrnl v: N/A bus ID: e178:00:00.0           Display: wayland-0 server: Microsoft Corporation X.org 1.20.11 driver: dxgkrnl           resolution: 1920x1080~60Hz, 1920x1080~60Hz           OpenGL: renderer: llvmpipe (LLVM 11.0.1 256 bits) v: 4.5 Mesa 20.3.4 direct render: YesAudio:     Message: No Device data found.Network:   Message: No Device data found.           IF-ID-1: bond0 state: down mac: 7a:23:e1:26:14:a5           IF-ID-2: bonding_masters state: N/A speed: N/A duplex: N/A mac: N/A           IF-ID-3: docker0 state: down mac: 02:42:6a:d7:d3:1d           IF-ID-4: dummy0 state: down mac: 26:a9:f0:ce:5a:b2           IF-ID-5: eth0 state: up speed: 10000 Mbps duplex: full mac: 00:15:5d:cb:ea:21           IF-ID-6: sit0 state: down mac: 00:00:00:00           IF-ID-7: tunl0 state: down mac: 00:00:00:00Drives:    Local Storage: total: 512.33 GiB used: 382.89 GiB (74.7%)           ID-1: /dev/sda model: Virtual Disk size: 256.00 GiB           ID-2: /dev/sdb model: Virtual Disk size: 339.7 MiB           ID-3: /dev/sdc model: Virtual Disk size: 256.00 GiBPartition: ID-1: / size: 250.98 GiB used: 28.40 GiB (11.3%) fs: ext4 dev: /dev/sdcSensors:   Message: No sensors data was found. Is sensors configured?Info:      Processes: 9 Uptime: 1h 30m Memory: 7.48 GiB used: 536.1 MiB (7.0%) Init: N/A Compilers: gcc: 9.3.0           Shell: bash v: 5.0.17 inxi: 3.0.38APTOP-2P2RHP26:~$ inxi -FxSystem:    Host: LAPTOP-2P2RHP26 Kernel: 5.10.43.3-microsoft-standard-WSL2 x86_64 bits: 64 compiler: N/A           Desktop: N/A Distro: Ubuntu 20.04.3 LTS (Focal Fossa)Machine:   Message: No machine data: try newer kernel. Is dmidecode installed? Try -M --dmidecode.Battery:   ID-1: BAT1 charge: 4.0 Wh condition: 5.0/5.0 Wh (100%) model: Microsoft Hyper-V Virtual BatterVirtual           status: Not chargingCPU:       Topology: 8-Core model: AMD Ryzen 9 4900HS with Radeon Graphics bits: 64 type: MT MCP arch: Zen rev: 1           L2 cache: 4096 KiB           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 95819           Speed: 2994 MHz min/max: N/A Core speeds (MHz): 1: 2994 2: 2994 3: 2994 4: 2994 5: 2994 6: 2994 7: 2994           8: 2994 9: 2994 10: 2994 11: 2994 12: 2994 13: 2994 14: 2994 15: 2994 16: 2994Graphics:  Device-1: Microsoft driver: dxgkrnl v: N/A bus ID: 56ef:00:00.0           Device-2: Microsoft driver: dxgkrnl v: N/A bus ID: e178:00:00.0           Display: wayland-0 server: Microsoft Corporation X.org 1.20.11 driver: dxgkrnl           resolution: 1920x1080~60Hz, 1920x1080~60Hz           OpenGL: renderer: llvmpipe (LLVM 11.0.1 256 bits) v: 4.5 Mesa 20.3.4 direct render: YesAudio:     Message: No Device data found.Network:   Message: No Device data found.           IF-ID-1: bond0 state: down mac: 7a:23:e1:26:14:a5           IF-ID-2: bonding_masters state: N/A speed: N/A duplex: N/A mac: N/A           IF-ID-3: docker0 state: down mac: 02:42:6a:d7:d3:1d           IF-ID-4: dummy0 state: down mac: 26:a9:f0:ce:5a:b2           IF-ID-5: eth0 state: up speed: 10000 Mbps duplex: full mac: 00:15:5d:cb:ea:21           IF-ID-6: sit0 state: down mac: 00:00:00:00           IF-ID-7: tunl0 state: down mac: 00:00:00:00Drives:    Local Storage: total: 512.33 GiB used: 382.89 GiB (74.7%)           ID-1: /dev/sda model: Virtual Disk size: 256.00 GiB           ID-2: /dev/sdb model: Virtual Disk size: 339.7 MiB           ID-3: /dev/sdc model: Virtual Disk size: 256.00 GiBPartition: ID-1: / size: 250.98 GiB used: 28.40 GiB (11.3%) fs: ext4 dev: /dev/sdcSensors:   Message: No sensors data was found. Is sensors configured?Info:      Processes: 9 Uptime: 1h 30m Memory: 7.48 GiB used: 536.1 MiB (7.0%) Init: N/A Compilers: gcc: 9.3.0           Shell: bash v: 5.0.17 inxi: 3.0.38

image

You must be logged in to vote

Replies: 2 comments

Comment options

From whatever digging I found out, the WSL system distro connects to and keeps alive the dedicated GPU (or whatever GPU it finds out?) even though it may not be the default renderer/the renderer being used. From your glxinfo output, it seems that software rendering is being used.
I'm not really sure, but it is worth a try to install the latest version of MESA (try using kisak ppa). It has options to select GPU under WSL. You can then export the env variable MESA_D3D12_DEFAULT_ADAPTER_NAME="NVIDIA" and try to run chrome from the wsl shell.

You must be logged in to vote
0 replies
Comment options

@hemanth981 thx. But this doesn't seem to work.

system info

debian@debian:~$ glxinfo -Bname of display: localhost:10.0display: localhost:10  screen: 0direct rendering: YesExtended renderer info (GLX_MESA_query_renderer):    Vendor: Microsoft Corporation (0xffffffff)    Device: D3D12 (NVIDIA GeForce RTX 3060) (0xffffffff)    Version: 22.3.6    Accelerated: yes    Video memory: 44776MB    Unified memory: no    Preferred profile: core (0x1)    Max core profile version: 4.2    Max compat profile version: 4.2    Max GLES1 profile version: 1.1    Max GLES[23] profile version: 3.1OpenGL vendor string: Microsoft CorporationOpenGL renderer string: D3D12 (NVIDIA GeForce RTX 3060)OpenGL core profile version string: 4.2 (Core Profile) Mesa 22.3.6OpenGL core profile shading language version string: 4.20OpenGL core profile context flags: (none)OpenGL core profile profile mask: core profileOpenGL version string: 4.2 (Compatibility Profile) Mesa 22.3.6OpenGL shading language version string: 4.20OpenGL context flags: (none)OpenGL profile mask: compatibility profileOpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.3.6OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10debian@debian:~$ uname -aLinux debian 6.1.0-37-amd64#1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64 GNU/Linux

Launch ms-edge

debian@debian:~$export MESA_D3D12_DEFAULT_ADAPTER_NAME="NVIDIA"debian@debian:~$debian@debian:~$ microsoft-edge-beta[18256:18350:0807/150727.343341:ERROR:dbus/object_proxy.cc:590] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files[18256:18350:0807/150727.343545:ERROR:dbus/object_proxy.cc:590] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files[18256:18350:0807/150727.343749:ERROR:dbus/object_proxy.cc:590] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files[18302:18302:0807/150727.430230:ERROR:ui/gl/angle_platform_impl.cc:47] Display.cpp:1089 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.ERR: Display.cpp:1089 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.[18302:18302:0807/150727.430368:ERROR:ui/gl/egl_util.cc:92] EGL Driver message (Critical) eglInitialize: Invalid visual ID requested.[18302:18302:0807/150727.430455:ERROR:ui/gl/gl_display.cc:640] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next displaytype[18302:18302:0807/150727.440944:ERROR:ui/gl/angle_platform_impl.cc:47] Display.cpp:1089 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.ERR: Display.cpp:1089 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.[18302:18302:0807/150727.441021:ERROR:ui/gl/egl_util.cc:92] EGL Driver message (Critical) eglInitialize: Invalid visual ID requested.[18302:18302:0807/150727.441067:ERROR:ui/gl/gl_display.cc:640] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED[18302:18302:0807/150727.441120:ERROR:ui/gl/gl_display.cc:675] Initialization of all EGL display types failed.[18302:18302:0807/150727.441166:ERROR:ui/ozone/common/gl_ozone_egl.cc:27] GLDisplayEGL::Initialize failed.[18302:18302:0807/150727.452942:ERROR:ui/gl/angle_platform_impl.cc:47] Display.cpp:1089 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.ERR: Display.cpp:1089 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.[18302:18302:0807/150727.453019:ERROR:ui/gl/egl_util.cc:92] EGL Driver message (Critical) eglInitialize: Invalid visual ID requested.[18302:18302:0807/150727.453059:ERROR:ui/gl/gl_display.cc:640] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next displaytype[18302:18302:0807/150727.453774:ERROR:ui/gl/angle_platform_impl.cc:47] Display.cpp:1089 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.ERR: Display.cpp:1089 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.[18302:18302:0807/150727.453828:ERROR:ui/gl/egl_util.cc:92] EGL Driver message (Critical) eglInitialize: Invalid visual ID requested.[18302:18302:0807/150727.453868:ERROR:ui/gl/gl_display.cc:640] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED[18302:18302:0807/150727.453927:ERROR:ui/gl/gl_display.cc:675] Initialization of all EGL display types failed.[18302:18302:0807/150727.453958:ERROR:ui/ozone/common/gl_ozone_egl.cc:27] GLDisplayEGL::Initialize failed.[18302:18302:0807/150727.454873:ERROR:components/viz/service/main/viz_main_impl.cc:189] Exiting GPU process due to errors during initializationWarning: Vulkan shaderUniform*ArrayDynamicIndexing required. - While initializing adapter (backend=BackendType::Vulkan)    at InitializeImpl (../../third_party/dawn/src/dawn/native/vulkan/PhysicalDeviceVk.cpp:211)[18361:18361:0807/150734.971624:ERROR:ui/gl/egl_util.cc:92] EGL Driver message (Error) eglCreateContext: Requested version is not supportedWarning: eglCreateContext failed with EGL_BAD_ATTRIBUTE - While trying to discover a BackendType::OpenGL adapter.    at CheckEGL (../../third_party/dawn/src/dawn/native/opengl/UtilsEGL.cpp:98)debian@debian:~$
image

P.S. PyTorch can run normally on Tensor Core.

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
3 participants
@McBride-SallyJoeBob@eric-gitta-moore@hemanth981

[8]ページ先頭

©2009-2025 Movatter.jp