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

GUI app exit with segmentfault in NVIDIA GPU driver #715

Open
1 of 2 tasks
huiminghao opened this issue Apr 18, 2022 · 82 comments
Open
1 of 2 tasks

GUI app exit with segmentfault in NVIDIA GPU driver #715

huiminghao opened this issue Apr 18, 2022 · 82 comments
Labels
bug Something isn't working GPU

Comments

@huiminghao
Copy link

Version

Microsoft Windows [版本 10.0.22598.1]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.10.102.1

Distro Version

Debian 11

Other Software

默认分发: Debian
默认版本: 2
WSL 版本: 0.58.1.0
内核版本: 5.10.102.1
WSLg 版本: 1.0.33
MSRDC 版本: 1.2.2924
Direct3D 版本: 1.601.0
Windows 版本: 10.0.22598.1

Repro Steps

run wsl from cmd.
run glxinfo -B from wsl.
run qtcreator from wsl.

Expected Behavior

glxinfo exits normally. And other GUI/qt app should work normally.

Actual Behavior

~$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce GTX 1650) (0xffffffff)
    Version: 22.0.1
    Accelerated: yes
    Video memory: 20024MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.3
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce GTX 1650)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 22.0.1 - kisak-mesa PPA
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.3 (Compatibility Profile) Mesa 22.0.1 - kisak-mesa PPA
OpenGL shading language version string: 3.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.0.1 - kisak-mesa PPA
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

Segmentation fault

run qtcreator, close app, and get

~$ qtcreator
Segmentation fault

Diagnostic Logs

everything goes well before doing wsl --update, and after windows update(Windows 11 Insider Preview 22598.1 (ni_release)).
dmeg:

qtcreator[341]: segfault at 7f9e2c5e4000 ip 00007f9e18405aca sp 00007f9e264e5db0 error 4 in libnvwgf2umx.so[7f9e17aba000+1415000]
[  235.082142] Code: 01 be 00 00 00 00 31 d2 45 31 f6 eb 1d 90 90 90 8b 45 10 48 8b 54 24 10 48 83 c2 01 89 c1 83 c6 01 48 39 ca 0f 83 56 01 00 00 <41> 8b 4c 95 00 0f b7 c9 3b 8c 95 44 04 00 00 74 dd 89 8c 95 44 04
[  235.083786] potentially unexpected fatal signal 11.
[  235.084190] CPU: 3 PID: 341 Comm: qtcreator Not tainted 5.10.102.1-microsoft-standard-WSL2 microsoft/WSL#1
[  235.084897] RIP: 0033:0x7f9e18405aca
[  235.085212] Code: 01 be 00 00 00 00 31 d2 45 31 f6 eb 1d 90 90 90 8b 45 10 48 8b 54 24 10 48 83 c2 01 89 c1 83 c6 01 48 39 ca 0f 83 56 01 00 00 <41> 8b 4c 95 00 0f b7 c9 3b 8c 95 44 04 00 00 74 dd 89 8c 95 44 04
[  235.086602] RSP: 002b:00007f9e264e5db0 EFLAGS: 00010246
[  235.087094] RAX: 000000000000000e RBX: 000000000135f000 RCX: 00000000013ca020
[  235.087889] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000135f000
[  235.088617] RBP: 00000000013c8be0 R08: 0000000000000000 R09: 00007ffe18a5c080
[  235.089205] R10: 000000000000aea4 R11: 0000000000000000 R12: 00007f9e264e5e28
[  235.089835] R13: 00007f9e2c5e4000 R14: 0000000000000000 R15: 00007f9e16ec2101
[  235.090474] FS:  00007f9e264e6700 GS:  0000000000000000
[  235.090978] dxgk:err: wait_for_complition failed: fffffe00
[  235.091020] dxgk:err: wait_for_complition failed: fffffe00
[  235.092278] dxgk:err: did not find packet to complete
@CarlosNihelton
Copy link

CarlosNihelton commented May 9, 2022

This issue caught my attention due Flutter apps crashing on exit, right after updating Windows to build 22598.200. I'm right now on 22610.1 and still any Flutter app, and the other apps mentioned above crash on exit with segmentation fault, so something related to OpenGL changed recently.

To add more context about my development machine, here it is:

wsl --version:

Versão do WSL: 0.58.3.0
Versão do kernel: 5.10.102.1
Versão do WSLg: 1.0.33
Versão do MSRDC: 1.2.2924
Versão do Direct3D: 1.601.0
Versão do Windows: 10.0.22610.1

Experimented with Ubuntu versions 20.04and 22.04.

@CarlosNihelton
Copy link

Also, this bare bones OpenGL sample crashes in the very same way (either compiled with gcc or clang):

cc tetrahedron.cpp -o tetrahedron -lglut -lGL

// This is a simple introductory program; its main window contains a static
// picture of a tetrahedron, whose top vertex is white and whose bottom
// vertices are red, green and blue.  The program illustrates viewing by
// defining an object at a convenient location, then transforming it so that
// it lies within the view volume.  This is a lousy way to do things (it's
// easier to use gluLookAt()), but it's nice to see how viewing is done at
// a very low level.

#ifdef __APPLE_CC__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif

// Clears the window and draws the tetrahedron.  The tetrahedron is  easily
// specified with a triangle strip, though the specification really isn't very
// easy to read.
void display() {
  glClear(GL_COLOR_BUFFER_BIT);

  // Draw a white grid "floor" for the tetrahedron to sit on.
  glColor3f(1.0, 1.0, 1.0);
  glBegin(GL_LINES);
  for (GLfloat i = -2.5; i <= 2.5; i += 0.25) {
    glVertex3f(i, 0, 2.5); glVertex3f(i, 0, -2.5);
    glVertex3f(2.5, 0, i); glVertex3f(-2.5, 0, i);
  }
  glEnd();

  // Draw the tetrahedron.  It is a four sided figure, so when defining it
  // with a triangle strip we have to repeat the last two vertices.
  glBegin(GL_TRIANGLE_STRIP);
    glColor3f(1, 1, 1); glVertex3f(0, 2, 0);
    glColor3f(1, 0, 0); glVertex3f(-1, 0, 1);
    glColor3f(0, 1, 0); glVertex3f(1, 0, 1);
    glColor3f(0, 0, 1); glVertex3f(0, 0, -1.4);
    glColor3f(1, 1, 1); glVertex3f(0, 2, 0);
    glColor3f(1, 0, 0); glVertex3f(-1, 0, 1);
  glEnd();

  glFlush();
}

// Sets up global attributes like clear color and drawing color, enables and
// initializes any needed modes (in this case we want backfaces culled), and
// sets up the desired projection and modelview matrices. It is cleaner to
// define these operations in a function separate from main().
void init() {

  // Set the current clear color to sky blue and the current drawing color to
  // white.
  glClearColor(0.1, 0.39, 0.88, 1.0);
  glColor3f(1.0, 1.0, 1.0);

  // Tell the rendering engine not to draw backfaces.  Without this code,
  // all four faces of the tetrahedron would be drawn and it is possible
  // that faces farther away could be drawn after nearer to the viewer.
  // Since there is only one closed polyhedron in the whole scene,
  // eliminating the drawing of backfaces gives us the realism we need.
  // THIS DOES NOT WORK IN GENERAL.
  glEnable(GL_CULL_FACE);
  glCullFace(GL_BACK);

  // Set the camera lens so that we have a perspective viewing volume whose
  // horizontal bounds at the near clipping plane are -2..2 and vertical
  // bounds are -1.5..1.5.  The near clipping plane is 1 unit from the camera
  // and the far clipping plane is 40 units away.
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  glFrustum(-2, 2, -1.5, 1.5, 1, 40);

  // Set up transforms so that the tetrahedron which is defined right at
  // the origin will be rotated and moved into the view volume.  First we
  // rotate 70 degrees around y so we can see a lot of the left side.
  // Then we rotate 50 degrees around x to "drop" the top of the pyramid
  // down a bit.  Then we move the object back 3 units "into the screen".
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();
  glTranslatef(0, 0, -3);
  glRotatef(50, 1, 0, 0);
  glRotatef(70, 0, 1, 0);
}

// Initializes GLUT, the display mode, and main window; registers callbacks;
// does application initialization; enters the main event loop.
int main(int argc, char** argv) {
  glutInit(&argc, argv);
  glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
  glutInitWindowPosition(80, 80);
  glutInitWindowSize(800, 600);
  glutCreateWindow("A Simple Tetrahedron");
  glutDisplayFunc(display);
  init();
  glutMainLoop();
}

@hideyukn88 hideyukn88 added bug Something isn't working GPU labels May 13, 2022
@hideyukn88 hideyukn88 changed the title GUI app exit with segmentfault GUI app exit with segmentfault in NVIDIA GPU driver May 13, 2022
@antasp
Copy link

antasp commented Jun 28, 2022

I have the same issue.

WSL-version: 0.61.4.0
Kernelversion: 5.10.102.1
WSLg-version: 1.0.39
MSRDC-version: 1.2.3213
Direct3D-version: 1.601.0
DXCore-version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows: 10.0.22000.739
glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA RTX A3000 Laptop GPU) (0xffffffff)
    Version: 21.2.6
    Accelerated: yes
    Video memory: 38412MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA RTX A3000 Laptop GPU)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 21.2.6
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.1 Mesa 21.2.6
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 21.2.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

Segmentation fault

@facboy
Copy link

facboy commented Jul 8, 2022

i'm getting segfaults in libnvwgf2umx.so running Intellij IDEA.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f8d5a7c73a1, pid=1065, tid=1120
#
# JRE version: OpenJDK Runtime Environment JBR-11.0.15.10-2043.56-jcef (11.0.15+10) (build 11.0.15+10-b2043.56)
# Java VM: OpenJDK 64-Bit Server VM JBR-11.0.15.10-2043.56-jcef (11.0.15+10-b2043.56, mixed mode, tiered, compressed oop
s, parallel gc, linux-amd64)
# Problematic frame:
# C  [libnvwgf2umx.so+0x1a463a1]
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c
 -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/chrisng/core.1065)
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#

and THREAD details:

Host: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz, 12 cores, 15G, Ubuntu 22.04 LTS
Time: Fri Jul  8 10:23:08 2022 BST elapsed time: 711.917453 seconds (0d 0h 11m 51s)

---------------  T H R E A D  ---------------

Current thread is native thread

Stack: [0x00007f8d3685c000,0x00007f8d3705b000],  sp=0x00007f8d37059d90,  free space=8183k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libnvwgf2umx.so+0x1a463a1]

[error occurred during error reporting (printing native stack), id 0xb, SIGSEGV (0xb) at pc=0x00007f8e927ba292]


siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x00007f8d530b1000

@PhyX-Meow
Copy link

I have same issue, actually I got segfault when I exit any gui apps.

@CarlosNihelton
Copy link

I've made some upgrades recently:

  • Windows Insiders Build 25163
  • NVidia Graphics 516.59

Still crashing on exit in the very same way:

❯ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce MX130) (0xffffffff)
    Version: 22.0.1
    Accelerated: yes
    Video memory: 10126MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.3
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce MX130)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 22.0.1
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.3 (Compatibility Profile) Mesa 22.0.1
OpenGL shading language version string: 3.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.0.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

[1]    1519 segmentation fault  glxinfo -B

@sarim
Copy link

sarim commented Jul 27, 2022

  • Windows 11 22621.232
  • Nvidia driver version 516.59

WSL version: 0.64.0.0
Kernel version: 5.10.102.1
WSLg version: 1.0.40
MSRDC version: 1.2.3213
Direct3D version: 1.601.0
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.232

$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce RTX 2060 SUPER) (0xffffffff)
    Version: 22.0.1
    Accelerated: yes
    Video memory: 24371MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.3
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 2060 SUPER)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 22.0.1
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.3 (Compatibility Profile) Mesa 22.0.1
OpenGL shading language version string: 3.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.0.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

Segmentation fault

Anyone got any workarounds? I had to resort back to VcXsrv and disablw wslg :(

@Venorcis
Copy link

Venorcis commented Aug 1, 2022

Same issue with IntelliJ crashes on my NVIDIA laptop. On my AMD desktop I don't experience this.

@sarim
Copy link

sarim commented Aug 1, 2022

Another observation: if we use systemd bottle, genie / distrod, the segfault occurs for more apps / occasions. For example android emulator always segfaults for me when inside systemd. But outside systemd It open once or twice over ~20 tries. As the crush is happening from libnv... .so, I wonder if its even fixable from wslg? Who maintains those nvidia linux wsl drivers?

@catkira
Copy link

catkira commented Aug 25, 2022

any progress here? I have the same problem.

@4x7y
Copy link

4x7y commented Aug 28, 2022

Same issue for my NVIDIA GeForce GTX 1650 card with driver version 516.94.

@lucmann
Copy link

lucmann commented Sep 18, 2022

same issue when I ran glmark2 or glmark2-es2

some backtraces, HTH

Reading symbols from glmark2...
(gdb) r -b build:nframes=1
Starting program: /usr/bin/glmark2 -b build:nframes=1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Detaching after vfork from child process 6542]
[New Thread 0x7fffec81e700 (LWP 6544)]
[New Thread 0x7fffe7a9e700 (LWP 6545)]
[New Thread 0x7fffe729d700 (LWP 6546)]
[New Thread 0x7fffe6a9c700 (LWP 6547)]
[New Thread 0x7fffe629b700 (LWP 6548)]
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
=======================================================
    glmark2 2021.12
=======================================================
    OpenGL Information
    GL_VENDOR:      Microsoft Corporation
    GL_RENDERER:    D3D12 (NVIDIA GeForce MX250)
    GL_VERSION:     3.1 Mesa 21.2.6
    Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0
    Surface Size:   800x600 windowed
=======================================================
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[build] nframes=1: FPS: 31 FrameTime: 32.258 ms
=======================================================
                                  glmark2 Score: 31
=======================================================
Thread 2 "glmark2" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffec81e700 (LWP 6544)]
0x00007fffee5113aa in ?? () from /usr/lib/wsl/drivers/nvdm.inf_amd64_201e30fdba70f061/libnvwgf2umx.so
(gdb) bt
#0  0x00007fffee5113aa in ?? () from /usr/lib/wsl/drivers/nvdm.inf_amd64_201e30fdba70f061/libnvwgf2umx.so
#1  0x00007fffee50f94c in ?? () from /usr/lib/wsl/drivers/nvdm.inf_amd64_201e30fdba70f061/libnvwgf2umx.so
#2  0x00007fffee50f8d6 in ?? () from /usr/lib/wsl/drivers/nvdm.inf_amd64_201e30fdba70f061/libnvwgf2umx.so
#3  0x00007ffff7309609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#4  0x00007ffff7996133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) info shared
From                To                  Syms Read   Shared Object Library
0x00007ffff7fd0100  0x00007ffff7ff2684  Yes         /lib64/ld-linux-x86-64.so.2
0x00007ffff7fb2220  0x00007ffff7fb3179  Yes         /lib/x86_64-linux-gnu/libdl.so.2
0x00007ffff7f30540  0x00007ffff7f73469  Yes (*)     /lib/x86_64-linux-gnu/libjpeg.so.8
0x00007ffff7ef9510  0x00007ffff7f1d29d  Yes (*)     /lib/x86_64-linux-gnu/libpng16.so.16
0x00007ffff7dd00c0  0x00007ffff7e59766  Yes (*)     /lib/x86_64-linux-gnu/libX11.so.6
0x00007ffff7c73160  0x00007ffff7d5b452  Yes (*)     /lib/x86_64-linux-gnu/libstdc++.so.6
0x00007ffff7a933c0  0x00007ffff7b39fa8  Yes         /lib/x86_64-linux-gnu/libm.so.6
0x00007ffff7a6c5e0  0x00007ffff7a7d045  Yes (*)     /lib/x86_64-linux-gnu/libgcc_s.so.1
0x00007ffff7899630  0x00007ffff7a0e27d  Yes         /lib/x86_64-linux-gnu/libc.so.6
0x00007ffff785d280  0x00007ffff786df3b  Yes (*)     /lib/x86_64-linux-gnu/libz.so.1
0x00007ffff783c620  0x00007ffff784f699  Yes (*)     /lib/x86_64-linux-gnu/libxcb.so.1
0x00007ffff782c360  0x00007ffff782d052  Yes (*)     /lib/x86_64-linux-gnu/libXau.so.6
0x00007ffff78231a0  0x00007ffff7824a03  Yes (*)     /lib/x86_64-linux-gnu/libXdmcp.so.6
0x00007ffff780be40  0x00007ffff7819e69  Yes (*)     /lib/x86_64-linux-gnu/libbsd.so.0
0x00007ffff77be1c0  0x00007ffff77c101d  Yes (*)     /lib/x86_64-linux-gnu/libGL.so
0x00007ffff7703240  0x00007ffff77054eb  Yes (*)     /lib/x86_64-linux-gnu/libGLdispatch.so.0
0x00007ffff7692700  0x00007ffff76ac48c  Yes (*)     /lib/x86_64-linux-gnu/libGLX.so.0
0x00007ffff7630d80  0x00007ffff7672382  Yes (*)     /lib/x86_64-linux-gnu/libGLX_mesa.so.0
0x00007ffff75e81a0  0x00007ffff75f5a60  Yes (*)     /lib/x86_64-linux-gnu/libglapi.so.0
0x00007ffff75cac40  0x00007ffff75d4e19  Yes         /lib/x86_64-linux-gnu/libdrm.so.2
0x00007ffff75b30a0  0x00007ffff75bbb29  Yes (*)     /lib/x86_64-linux-gnu/libxcb-glx.so.0
0x00007ffff75a4040  0x00007ffff75a411f  Yes (*)     /lib/x86_64-linux-gnu/libX11-xcb.so.1
0x00007ffff759e0a0  0x00007ffff759f309  Yes (*)     /lib/x86_64-linux-gnu/libxcb-dri2.so.0
0x00007ffff758b5e0  0x00007ffff759584e  Yes (*)     /lib/x86_64-linux-gnu/libXext.so.6
0x00007ffff7581300  0x00007ffff75836ea  Yes (*)     /lib/x86_64-linux-gnu/libXfixes.so.3
0x00007ffff7579240  0x00007ffff757b9f9  Yes (*)     /lib/x86_64-linux-gnu/libXxf86vm.so.1
0x00007ffff75740e0  0x00007ffff7574c37  Yes (*)     /lib/x86_64-linux-gnu/libxcb-shm.so.0
0x00007ffff7549230  0x00007ffff7564b07  Yes (*)     /lib/x86_64-linux-gnu/libexpat.so.1
0x00007ffff75410e0  0x00007ffff7541fd7  Yes (*)     /lib/x86_64-linux-gnu/libxcb-dri3.so.0
0x00007ffff753b0a0  0x00007ffff753b97a  Yes (*)     /lib/x86_64-linux-gnu/libxcb-present.so.0
0x00007ffff7533100  0x00007ffff7535416  Yes (*)     /lib/x86_64-linux-gnu/libxcb-sync.so.1
0x00007ffff732e960  0x00007ffff732ec2c  Yes (*)     /lib/x86_64-linux-gnu/libxshmfence.so.1
0x00007ffff73270a0  0x00007ffff73298de  Yes (*)     /lib/x86_64-linux-gnu/libxcb-xfixes.so.0
0x00007ffff7307ae0  0x00007ffff7317535  Yes         /lib/x86_64-linux-gnu/libpthread.so.0
0x00007ffff09b6e30  0x00007ffff330f633  Yes (*)     /lib/x86_64-linux-gnu/libLLVM-12.so.1
0x00007fffefe64230  0x00007fffefe69a46  Yes (*)     /lib/x86_64-linux-gnu/libffi.so.7
0x00007fffefe32fb0  0x00007fffefe4cf24  Yes (*)     /lib/x86_64-linux-gnu/libedit.so.2
0x00007fffefe22720  0x00007fffefe25d70  Yes         /lib/x86_64-linux-gnu/librt.so.1
0x00007fffefdfe6a0  0x00007fffefe0c17c  Yes (*)     /lib/x86_64-linux-gnu/libtinfo.so.6
0x00007fffefd62720  0x00007fffefde23af  Yes (*)     /usr/lib/wsl/lib/libdxcore.so
0x00007fffefc99df0  0x00007fffefd114d3  Yes (*)     /usr/lib/wsl/lib/libd3d12.so
0x00007fffed73f010  0x00007fffeea0a8f1  Yes (*)     /usr/lib/wsl/drivers/nvdm.inf_amd64_201e30fdba70f061/libnvwgf2umx.so
(*): Shared library is missing debugging information.
(gdb) info thread
  Id   Target Id                                  Frame
  1    Thread 0x7ffff7805dc0 (LWP 6538) "glmark2" 0x00007ffff798583b in __GI___close (fd=4) at ../sysdeps/unix/sysv/linux/close.c:27
* 2    Thread 0x7fffec81e700 (LWP 6544) "glmark2" 0x00007fffee5113aa in ?? () from /usr/lib/wsl/drivers/nvdm.inf_amd64_201e30fdba70f061/libnvwgf2umx.so
  3    Thread 0x7fffe7a9e700 (LWP 6545) "glmark2" futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fffe0000b88) at ../sysdeps/nptl/futex-internal.h:183
  4    Thread 0x7fffe729d700 (LWP 6546) "glmark2" futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fffe0000b88) at ../sysdeps/nptl/futex-internal.h:183
  5    Thread 0x7fffe6a9c700 (LWP 6547) "glmark2" futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fffe0000b88) at ../sysdeps/nptl/futex-internal.h:183
  6    Thread 0x7fffe629b700 (LWP 6548) "glmark2" futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fffe0000b88) at ../sysdeps/nptl/futex-internal.h:183

/mnt/wslg/versions.txt

WSLg ( x86_64 ): 1.0.42+Branch.main.Sha.78fa15d6ffd8fad62343b194d39c142e57cc1869
Mariner: VERSION="2.0.20220426"
DirectX-Headers:
mesa:
pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
FreeRDP: c574044a10003e50453acb4cf42801c5833fb572
weston: d57e0de202fd049f6cc0ce8c25b7120feea3468f

@fc4525
Copy link

fc4525 commented Oct 14, 2022

Hello,

I am also running into segmentation fault when trying any of the graphics CUDA Sample files (e.g. fluidGL). The GUI window
opens briefly before exiting with segmentation fault. The installation is below.

I also tried the same samples from Windows 11 using VS and they work. The graphics segmentation fault happens
only in WSL2 in my case.

- CUDA 11.6 (also tried 11.7)
- Ubuntu 22.04 on WSL2
- Windows 11  22H2
- Thinkpad P1 gen2 with nVidia Quadro T2000
- nVidia drivers tried (516.94 and 517.40)


  /mnt/wslg/versions.txt: 
  WSLg ( x86_64 ): 1.0.45+Branch.main.Sha.254cbbc0eb26fe4bf82e9656470ebb5546a84a23
  Mariner: VERSION="2.0.20220426"
  DirectX-Headers:
  mesa:
  pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
  FreeRDP: c574044a10003e50453acb4cf42801c5833fb572
  weston: 2270ceb3cf75a03e8b3f073eca2c5dc04b12e504


   glxinfo -B:
   name of display: :0
   display: :0  screen: 0
   direct rendering: Yes
   Extended renderer info (GLX_MESA_query_renderer):
        Vendor: Microsoft Corporation (0xffffffff)
        Device: D3D12 (NVIDIA Quadro T2000) (0xffffffff)
        Version: 22.0.5
        Accelerated: yes
        Video memory: 36583MB
        Unified memory: no
        Preferred profile: core (0x1)
        Max core profile version: 3.3
        Max compat profile version: 3.3
        Max GLES1 profile version: 1.1
        Max GLES[23] profile version: 3.1
   OpenGL vendor string: Microsoft Corporation
   OpenGL renderer string: D3D12 (NVIDIA Quadro T2000)
   OpenGL core profile version string: 3.3 (Core Profile) Mesa 22.0.5
   OpenGL core profile shading language version string: 3.30
   OpenGL core profile context flags: (none)
   OpenGL core profile profile mask: core profile
    
   OpenGL version string: 3.3 (Compatibility Profile) Mesa 22.0.5
   OpenGL shading language version string: 3.30
   OpenGL context flags: (none)
   OpenGL profile mask: compatibility profile
    
   OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.0.5
   OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
    
   Segmentation fault

Felix

@junaire
Copy link

junaire commented Oct 23, 2022

Having similar issues:

wsl --version
WSL version: 0.70.0.0
kernel version: 5.15.68.1
WSLg version: 1.0.45
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.675

Running hotspot build from the recent source, when doing nothing but exit:

* thread #25, name = 'hotspot', stop reason = signal SIGSEGV: invalid address (fault address: 0x7fffc80b4000)
    frame #0: 0x00007fff7f4ce4ba libnvwgf2umx.so`___lldb_unnamed_symbol185521 + 106
libnvwgf2umx.so`___lldb_unnamed_symbol185521:
->  0x7fff7f4ce4ba <+106>: movl   (%r13,%rdx,4), %ecx
    0x7fff7f4ce4bf <+111>: movzwl %cx, %ecx
    0x7fff7f4ce4c2 <+114>: cmpl   0x444(%rsi,%rdx,4), %ecx
    0x7fff7f4ce4c9 <+121>: je     0x7fff7f4ce4a8            ; <+88>
(lldb) bt
* thread #25, name = 'hotspot', stop reason = signal SIGSEGV: invalid address (fault address: 0x7fffc80b4000)
  * frame #0: 0x00007fff7f4ce4ba libnvwgf2umx.so`___lldb_unnamed_symbol185521 + 106
    frame #1: 0x00007fff7f4cc8ee libnvwgf2umx.so`___lldb_unnamed_symbol185494 + 126
    frame #2: 0x00007fff7f4cc866 libnvwgf2umx.so`___lldb_unnamed_symbol185493 + 6
    frame #3: 0x00007ffff54b7b43 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:442:8
    frame #4: 0x00007ffff5549a00 libc.so.6`__clone3 at clone3.S:81
(lldb)

Got a segment fault...

@alonbl
Copy link

alonbl commented Oct 24, 2022

Hello Microsoft,

How come no response from anyone at Microsoft, this is not an open source project in which contributors can fix issues. This issue is easy to reproduce and confirm that exists and a bug.

Also reproduced using:

WSL version: 0.70.4.0
Kernel version: 5.15.68.1
WSLg version: 1.0.45
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.674

glxgears and glxinfo may be used to reproduce, nothing special is required, below is an example of glxinfo of mesa-utils-8.4.0-1ubuntu1.

Recent windows, ubuntu-22.04.

$ gdb --args glxinfo -B
<snip>
Thread 2 "glxinfo" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffea468640 (LWP 507)]
0x00007fffec15a0ca in ?? () from /usr/lib/wsl/drivers/nvlt.inf_amd64_922792e2d39c47ae/libnvwgf2umx.so
(gdb) bt
#0  0x00007fffec15a0ca in ?? () from /usr/lib/wsl/drivers/nvlt.inf_amd64_922792e2d39c47ae/libnvwgf2umx.so
#1  0x00007fffec15866c in ?? () from /usr/lib/wsl/drivers/nvlt.inf_amd64_922792e2d39c47ae/libnvwgf2umx.so
#2  0x00007fffec1585f6 in ?? () from /usr/lib/wsl/drivers/nvlt.inf_amd64_922792e2d39c47ae/libnvwgf2umx.so
#3  0x00007ffff7c49b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#4  0x00007ffff7cdba00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Regards,

@PhyX-Meow
Copy link

PhyX-Meow commented Nov 7, 2022

Hey, the issue seems disappear on my machine today, suddenly.
My environment:

WSL version: 0.70.5.0
Kernel version: 5.15.68.1
WSLg version: 1.0.45
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.25236.1010

GPU: NVIDIA RTX 2060 Super
GPU driver version: game ready driver 526.47

Distro: Archlinux
mesa version: 22.2.2-1 (Updated today)

glxinfo -B output:

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce RTX 2060 SUPER) (0xffffffff)
    Version: 22.2.2
    Accelerated: yes
    Video memory: 24365MB
    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.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 2060 SUPER)
OpenGL core profile version string: 4.2 (Core Profile) Mesa 22.2.2
OpenGL core profile shading language version string: 4.20
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.2 (Compatibility Profile) Mesa 22.2.2
OpenGL shading language version string: 4.20
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.2.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

@huiminghao
Copy link
Author

not fixed yet, verions:

WSL 版本: 0.70.8.0
内核版本: 5.15.74.2
WSLg 版本: 1.0.47
MSRDC 版本: 1.2.3575
Direct3D 版本: 1.606.4
DXCore 版本: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows版本: 10.0.22622.586

just use following to avoid.

cat /etc/profile.d/wslg.sh 
#export MESA_D3D12_DEFAULT_ADAPTER_NAME="AMD"
export MESA_D3D12_DEFAULT_ADAPTER_NAME="llvm"
export LIBGL_ALWAYS_SOFTWARE=true

@NinovanderMark
Copy link

NinovanderMark commented Dec 8, 2022

I have this same issue on my new Thinkpad P16S laptop running Ubuntu 22.04 in WSL on Windows 10.

PS C:\Users\NinovanderMark> wsl --version
WSL version: 1.0.0.0
Kernel version: 5.15.74.2
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.2311
ninovdmark@LAPTOP-M3OIV1UR:~$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA T550 Laptop GPU) (0xffffffff)
    Version: 22.0.5
    Accelerated: yes
    Video memory: 20201MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.3
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA T550 Laptop GPU)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 22.0.5
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.3 (Compatibility Profile) Mesa 22.0.5
OpenGL shading language version string: 3.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

Segmentation fault

Running from gdb indicates that the issue is coming from the NVIDIA driver.

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

[Thread 0x7fffe26ad640 (LWP 2906) exited]

Thread 2 "glxinfo" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffea480640 (LWP 2899)]
0x00007fffec0f7391 in ?? () from /usr/lib/wsl/drivers/nvlt.inf_amd64_0e3c491f201d0b53/libnvwgf2umx.so

@mflagg2814
Copy link

mflagg2814 commented Dec 13, 2022

I’m also seeing this issue. I’ve been forced to completely disable my Dell Precision 5550’s Quadro T1000 dGPU so I can do my job. My issue matches the reproduction steps and backtraces already posted.

@IkonOne
Copy link

IkonOne commented Dec 27, 2022

Still present for me as well.

PS C:\Users\ikono> wsl --version
WSL version: 1.0.3.0
Kernel version: 5.15.79.1
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.963
ikonone@devbot:~$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce RTX 3060 Laptop GPU) (0xffffffff)
    Version: 22.0.5
    Accelerated: yes
    Video memory: 26335MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.3
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 3060 Laptop GPU)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 22.0.5
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.3 (Compatibility Profile) Mesa 22.0.5
OpenGL shading language version string: 3.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

Segmentation fault
ikonone@devbot:~$
(gdb) run -B
Starting program: /usr/bin/glxinfo -B
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
name of display: :0
[Detaching after vfork from child process 161]
[New Thread 0x7fffe9699640 (LWP 163)]
[New Thread 0x7fffe3fff640 (LWP 164)]
[New Thread 0x7fffe37fe640 (LWP 165)]
[New Thread 0x7fffe2ffd640 (LWP 166)]
[New Thread 0x7fffe27fc640 (LWP 167)]
[New Thread 0x7fffe16fb640 (LWP 168)]
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce RTX 3060 Laptop GPU) (0xffffffff)
    Version: 22.0.5
    Accelerated: yes
    Video memory: 26335MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.3
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 3060 Laptop GPU)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 22.0.5
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
[New Thread 0x7fffe0efa640 (LWP 169)]
[Thread 0x7fffe16fb640 (LWP 168) exited]

OpenGL version string: 3.3 (Compatibility Profile) Mesa 22.0.5
OpenGL shading language version string: 3.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
[New Thread 0x7fffe16fb640 (LWP 170)]
[Thread 0x7fffe0efa640 (LWP 169) exited]

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

[Thread 0x7fffe16fb640 (LWP 170) exited]

Thread 2 "glxinfo" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe9699640 (LWP 163)]
0x00007fffec15bf0a in ?? () from /usr/lib/wsl/drivers/nvamig.inf_amd64_e3bf6f587f5b65de/libnvwgf2umx.so
(gdb)

@timweckx
Copy link

Same issue

glxinfo and glxgears both run, but always end with segmentation fault.
other graphics applications that require openGL fail to run altogether

WSL version: 1.0.3.0
Kernel version: 5.15.79.1
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.2486
> LIBGL_DEBUG=VERBOSE glxinfo -B
name of display: :0
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/tweckx/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/tweckx/.drirc: No such file or directory.
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce RTX 2070 Super) (0xffffffff)
    Version: 22.0.5
    Accelerated: yes
    Video memory: 24258MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.3
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 2070 Super)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 22.0.5
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.3 (Compatibility Profile) Mesa 22.0.5
OpenGL shading language version string: 3.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

Segmentation fault

@afilp
Copy link

afilp commented Jan 21, 2023

Could the investigation of this issue be related? It seems that Microsoft is looking at it right now. I hope they can look into our "Segmentation fault" issues too, as we cannot work with some GUI apps.

microsoft/WSL#8696

@sarim
Copy link

sarim commented Jan 23, 2023

Could the investigation of this issue be related? It seems that Microsoft is looking at it right now. I hope they can look into our "Segmentation fault" issues too, as we cannot work with some GUI apps.

microsoft/WSL#8696

It not related to hibernate in any way.

@dshadowwolf
Copy link

Same issue, no OpenGL required -- just a simple display of an image using SDL2. On application exit there is the crash in the NVidia driver, at exactly the place shown in the lldb provided by @junaire.

wsl --version results:

WSL version: 1.1.0.0
Kernel version: 5.15.83.1
WSLg version: 1.0.48
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.25284.1000

And error is literally:

* thread #2, name = 'game-thing', stop reason = signal SIGSEGV: invalid address (fault address: 0x7fffea7bc000)
    frame #0: 0x00007fffed23ef0a libnvwgf2umx.so`___lldb_unnamed_symbol196498$$libnvwgf2umx.so + 106
libnvwgf2umx.so`___lldb_unnamed_symbol196498$$libnvwgf2umx.so:
->  0x7fffed23ef0a <+106>: movl   (%r13,%rdx,4), %ecx
    0x7fffed23ef0f <+111>: movzwl %cx, %ecx
    0x7fffed23ef12 <+114>: cmpl   0x44c(%rsi,%rdx,4), %ecx
    0x7fffed23ef19 <+121>: je     0x7fffed23eef8            ; <+88>

I added some extra debugging to the program I was testing (just a quick&dirty bit to re-familiarize myself with SDL and get comfortable with SDL2 after a long period of doing a lot of systems work) and it reaches the final return 0 of main() (or thereabouts) and then crashes. This occurs after releasing everything that was allocated and making output about such.

Note: I did add a breakpoint in lldb and single-step and it did not crash on that run, so this might be a timing issue where one of the threads tries a use-after-free, but... I have no clue, as I didn't write any code for extra threads in the quick test program.

@nedsociety
Copy link

nedsociety commented Jun 17, 2023

For me, updating to 1.3.11 the GUI are not crashing anymore, but because the d3d12 MESA driver is not used anymore, and llvmpipe (i.e. software rendering) is always used. For the people that have everything working with 1.3.11, can you post the output of your glxinfo -B? Thanks!

Pretty much the same to what sarim posted. But I did find some differences on webgl caps when running chrome from host and from within wsl though:

image

(host)

image

(wsl)

And the aquarium shows a major perf drop after the update -- with 30000 fishes it used to keep 60 fps just like running from host, now it dropped to 19 fps.

@dshadowwolf
Copy link

Waiting on wsl --update --pre-release to finish right now (14:11 EST) after the last run saw no change and WSL still reporting itself as 1.2.5...

...
...

No crash on any test programs exit! Looks like this bug is truly fixed. Hurrah!

Here's glxinfo -B:

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce RTX 3070) (0xffffffff)
    Version: 21.2.6
    Accelerated: yes
    Video memory: 40748MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 3070)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 21.2.6
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.1 Mesa 21.2.6
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 21.2.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

And wsl --version:

WSL version: 1.3.11.0
Kernel version: 5.15.90.2-3
WSLg version: 1.0.54
MSRDC version: 1.2.4240
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25880.1000-230602-1350.main
Windows version: 10.0.25393.1

@sarim
Copy link

sarim commented Jun 17, 2023

@nedsociety interesting. I get similar bad result on the tests you linked too. But I'm not a graphics / game engine guy so don't have much insight/tools in hand to investigate further. You should open a new bug for this performance discrepancy.

@Ratstail91
Copy link

You can update it with wsl --update --pre-release

$ wsl --update --pre-release
Checking for updates.
Updating Windows Subsystem for Linux to version: 1.3.11.

I can confirm that the crash appears to be gone for me, too, once WSL was updated to 1.3.11.

This worked for me, thank you!

@andreear-23
Copy link

Waiting on wsl --update --pre-release to finish right now (14:11 EST) after the last run saw no change and WSL still reporting itself as 1.2.5...

... ...

No crash on any test programs exit! Looks like this bug is truly fixed. Hurrah!

Here's glxinfo -B:

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce RTX 3070) (0xffffffff)
    Version: 21.2.6
    Accelerated: yes
    Video memory: 40748MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 3070)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 21.2.6
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.1 Mesa 21.2.6
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 21.2.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

And wsl --version:

WSL version: 1.3.11.0
Kernel version: 5.15.90.2-3
WSLg version: 1.0.54
MSRDC version: 1.2.4240
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25880.1000-230602-1350.main
Windows version: 10.0.25393.1

@dshadowwolf @sarim what nvidia driver do you have? If you do nvidia-smi what version does it say there? Also what version/distro are you using? If ubuntu, which version?
I've been trying for weeks to get opengl to work directly with the GPU inside WSL2 (in a docker container) but it always uses the llvmpipe device.
One thing I've noticed in the snippets from the people who have it working is that the OpenGL core profile version is always lower than 4.5. You have OpenGL 3.3 and sarim has OpenGL 4.2.
For me glxinfo always says OpenGL 4.5 but I don't know how to downgrade it and if it comes packaged with the nvidia driver.

@dshadowwolf
Copy link

@andreear-23 I've been using the latest driver release using Geforce Experience -- thats it, entirely. Though I'm also, IIRC, using an older Ubuntu install as I've had it going since WSL2 first became available, so that might be it.

@nedsociety
Copy link

@andreear-23

$ nvidia-smi
Tue Jul 11 22:26:22 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 527.92.01    Driver Version: 528.02       CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| 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  On |                  N/A |
|  0%   34C    P8    14W / 285W |   1178MiB / 12282MiB |      1%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A        23      G   /Xwayland                       N/A      |
|    0   N/A  N/A        23      G   /Xwayland                       N/A      |
|    0   N/A  N/A        26      G   /Xwayland                       N/A      |
+-----------------------------------------------------------------------------+

$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce RTX 4070 Ti) (0xffffffff)
    Version: 22.2.5
    Accelerated: yes
    Video memory: 44341MB
    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.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 4070 Ti)
OpenGL core profile version string: 4.2 (Core Profile) Mesa 22.2.5-0ubuntu0.1~22.04.3
OpenGL core profile shading language version string: 4.20
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.2 (Compatibility Profile) Mesa 22.2.5-0ubuntu0.1~22.04.3
OpenGL shading language version string: 4.20
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.2.5-0ubuntu0.1~22.04.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

@andreear-23
Copy link

Thanks a lot, I have the same mesa driver and almost the same Nvidia driver but somehow still different OpenGL core version

$ nvidia-smi
Tue Jul 11 16:27:33 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.104      Driver Version: 528.79       CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| 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   50C    P0    14W /  50W |      0MiB /  4096MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Mesa/X.org (0xffffffff)
    Device: llvmpipe (LLVM 15.0.7, 256 bits) (0xffffffff)
    Version: 22.2.5
    Accelerated: no
    Video memory: 31975MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.5
    Max compat profile version: 4.5
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Mesa/X.org
OpenGL renderer string: llvmpipe (LLVM 15.0.7, 256 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 22.2.5-0ubuntu0.1~22.04.3
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.5 (Compatibility Profile) Mesa 22.2.5-0ubuntu0.1~22.04.3
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 22.2.5-0ubuntu0.1~22.04.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

What is stranger is that the only way I could get the Nvidia GPU for rendering on an Ubuntu machine was by using these settings:
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo -B
Otherwise I still got the llvmpipe device.

@sarim
Copy link

sarim commented Jul 11, 2023

~ ➤ nvidia-smi
Tue Jul 11 21:07:53 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.54.06              Driver Version: 536.40       CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| 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 RTX 2060 ...    On  | 00000000:08:00.0  On |                  N/A |
| 37%   41C    P8              17W / 175W |   1250MiB /  8192MiB |      4%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A        48      G   /Xwayland                                 N/A      |
+---------------------------------------------------------------------------------------+
↪ ~ ➤ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce RTX 2060 SUPER) (0xffffffff)
    Version: 22.2.5
    Accelerated: yes
    Video memory: 24359MB
    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.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 2060 SUPER)
OpenGL core profile version string: 4.2 (Core Profile) Mesa 22.2.5-0ubuntu0.1~22.04.3
OpenGL core profile shading language version string: 4.20
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.2 (Compatibility Profile) Mesa 22.2.5-0ubuntu0.1~22.04.3
OpenGL shading language version string: 4.20
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.2.5-0ubuntu0.1~22.04.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

↪ ~

@andreear-23
Copy link

@sarim I have exactly the same GPU. Could you tell me what is the Build version of your Windows OS? Also are you using Windows 11 or Windows 10?

@sarim
Copy link

sarim commented Jul 11, 2023

Windows 11. Build 10.0.22621.1928

@andreear-23
Copy link

This could be the reason, I have Windows 10, build 19044
And according to this article: https://devblogs.microsoft.com/directx/directx-heart-linux/ and another post I found, native GPU support on WSL2 was introduced only from a higher build of Windows 10 (some insider preview version) or Windows 11.
I'll try on another machine, thanks a lot for all your help!

@sarim
Copy link

sarim commented Jan 30, 2024

Seems like segfault is back with latest wsl/wslg.

➤ wsl --version
WSL version: 2.1.1.0
Kernel version: 5.15.146.1-2
WSLg version: 1.0.60
MSRDC version: 1.2.5105
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.3078
➤ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce RTX 2060 SUPER) (0xffffffff)
    Version: 23.0.4
    Accelerated: yes
    Video memory: 24344MB
    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.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 2060 SUPER)
OpenGL core profile version string: 4.2 (Core Profile) Mesa 23.0.4-0ubuntu1~22.04.1
OpenGL core profile shading language version string: 4.20
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.2 (Compatibility Profile) Mesa 23.0.4-0ubuntu1~22.04.1
OpenGL shading language version string: 4.20
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 23.0.4-0ubuntu1~22.04.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

Segmentation fault

@ivanocj
Copy link

ivanocj commented Feb 10, 2024

Seems like segfault is back with latest wsl/wslg.

➤ wsl --version
WSL version: 2.1.1.0
Kernel version: 5.15.146.1-2
WSLg version: 1.0.60
MSRDC version: 1.2.5105
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.3078
➤ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce RTX 2060 SUPER) (0xffffffff)
    Version: 23.0.4
    Accelerated: yes
    Video memory: 24344MB
    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.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 2060 SUPER)
OpenGL core profile version string: 4.2 (Core Profile) Mesa 23.0.4-0ubuntu1~22.04.1
OpenGL core profile shading language version string: 4.20
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.2 (Compatibility Profile) Mesa 23.0.4-0ubuntu1~22.04.1
OpenGL shading language version string: 4.20
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 23.0.4-0ubuntu1~22.04.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

Segmentation fault

Two weeks. and no one is looking to this?

@alonbl
Copy link

alonbl commented Feb 10, 2024

Same versions as you.

Crashes with nvidia works with intel.

$ MESA_D3D12_DEFAULT_ADAPTER_NAME="INTEL" glxinfo -B
<snip>
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (Intel(R) Iris(R) Xe Graphics)
OpenGL core profile version string: 4.1 (Core Profile) Mesa 23.0.4-0ubuntu1~22.04.1
OpenGL core profile shading language version string: 4.10
<snip>

$ MESA_D3D12_DEFAULT_ADAPTER_NAME="NVIDIA" glxinfo -B
<snip>
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA T500)
OpenGL core profile version string: 4.2 (Core Profile) Mesa 23.0.4-0ubuntu1~22.04.1
OpenGL core profile shading language version string: 4.20
<snip>
Segmentation fault

@hhoppe
Copy link

hhoppe commented Mar 6, 2024

I just applied the latest apt upgrade and the problem appears to be fixed now. Can anyone else confirm?

Setting up libglapi-mesa:amd64 (23.2.1-1ubuntu3.1~22.04.2) ...
Setting up mesa-va-drivers:amd64 (23.2.1-1ubuntu3.1~22.04.2) ...
Setting up libgl1-mesa-dri:amd64 (23.2.1-1ubuntu3.1~22.04.2) ...
Setting up libegl-mesa0:amd64 (23.2.1-1ubuntu3.1~22.04.2) ...
Setting up ubuntu-release-upgrader-core (1:22.04.19) ...
Setting up libglx-mesa0:amd64 (23.2.1-1ubuntu3.1~22.04.2) ...

@ivanocj
Copy link

ivanocj commented Mar 6, 2024

@hhoppe, I can confirm it looks good now. Thanks for the info.

❯ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce RTX 3060) (0xffffffff)
    Version: 23.2.1
    Accelerated: yes
    Video memory: 77599MB
    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.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 3060)
OpenGL core profile version string: 4.2 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
OpenGL core profile shading language version string: 4.20
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.2 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
OpenGL shading language version string: 4.20
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 23.2.1-1ubuntu3.1~22.04.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

@alonbl
Copy link

alonbl commented Mar 6, 2024

yes, I can also confirm that both intel and nvidia working as expected, unlike previously tested[1]

[1] #715 (comment)

@pbk20191
Copy link

pbk20191 commented Apr 15, 2024

my wsl focal container fails with same segmentfault

  • wsl2 with Docker desktop
  • All good for AMD
  • fail with Nvidia
  • nvidia container tool kit is valid
  • wsl2 opengl is valid for both AMD and Nvidia

Nvidia

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce RTX 4060 Laptop GPU) (0xffffffff)
    Version: 21.2.6
    Accelerated: yes
    Video memory: 23939MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 4060 Laptop GPU)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 21.2.6
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.1 Mesa 21.2.6
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 21.2.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

Segmentation fault

AMD

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (AMD Radeon(TM) 610M) (0xffffffff)
    Version: 21.2.6
    Accelerated: yes
    Video memory: 16468MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (AMD Radeon(TM) 610M)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 21.2.6
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.1 Mesa 21.2.6
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 21.2.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

stacktrace of failed command
trace.txt

It looks like close(4) on line 2252 is causing crash which is open on line 790 openat(AT_FDCWD, "/dev/dxg", O_RDONLY|O_CLOEXEC) = 4

@TZECHIN6
Copy link

I am still facing the issue... not sure is it really fixed. Seeking help from others.

glxinfo -B

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce RTX 3070) (0xffffffff)
    Version: 23.2.1
    Accelerated: yes
    Video memory: 16153MB
    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.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 3070)
OpenGL core profile version string: 4.2 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
OpenGL core profile shading language version string: 4.20
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.2 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
OpenGL shading language version string: 4.20
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 23.2.1-1ubuntu3.1~22.04.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

nvidia-smi

Thu Jun 13 21:08:52 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 555.52.01              Driver Version: 555.99         CUDA Version: 12.5     |
|-----------------------------------------+------------------------+----------------------+
| 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 RTX 3070        On  |   00000000:07:00.0  On |                  N/A |
| 53%   44C    P0             48W /  240W |    1157MiB /   8192MiB |      2%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A     15994      G   /Xwayland                                   N/A      |
+-----------------------------------------------------------------------------------------+

wsl --version

WSL 版本: 2.1.5.0
核心版本: 5.15.146.1-2
WSLg 版本: 1.0.60
MSRDC 版本: 1.2.5105
Direct3D 版本: 1.611.1-81528511
DXCore 版本: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows 版本: 10.0.22631.3672

@lwintermelon
Copy link

I upgrade the latest GPU driver from AMD site and it appears to fix my problem. Previous GPU driver is provided by OEM, and it's WDDM 3.0, the latest AMD driver comes with WDDM 3.1. Can anyone else with AMD GPU confirm?

@PhyX-Meow
Copy link

I think this is really a mesa issue. After I update mesa to 24, everything works well.

@TZECHIN6
Copy link

@PhyX-Meow @lwintermelon Would you mind sharing the tips on how to upgrade those drivers in WSL, especially for the mesa driver. I have run apt update for mesa, it said its already the latest.

@sarim
Copy link

sarim commented Jun 15, 2024

@lwintermelon
Copy link

@PhyX-Meow @lwintermelon Would you mind sharing the tips on how to upgrade those drivers in WSL, especially for the mesa driver. I have run apt update for mesa, it said its already the latest.

Basicly, there are 2 drivers involved if you want to use 3d acceleration in WSLg, one is Windows WDDM display driver runs on host windows,the other is Mesa driver runs on host WSL implemented OpenGL or Vulkan.
For my situation, old Windows display driver will cause the problem whether I use old or new Mesa driver, but newer Windows display driver plays well whether I use old or new Mesa driver, so the problem is fixed when I upgrade to latest AMD GPU driver.

As for driver update, for Mesa, try PPA mentioned above if you are using Ubuntu; for Windows display driver, follow WSL docs.

@TZECHIN6
Copy link

@PhyX-Meow @lwintermelon Thanks both. As I have no admin right to install drivers, I only tried the PPA method to upgrade MESA. The result is positive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GPU
Projects
None yet
Development

No branches or pull requests