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

As we know in issue #308 that mesa uses llvmpipe instead of D3D12, if my laptop has a nvidia gpu as well, how to make Arch use Nvidia GPU like the Ubuntu WSL do? #367

Open
RayneScofield opened this issue May 20, 2024 · 15 comments

Comments

@RayneScofield
Copy link

For my Ubuntu WSL that GPU indicates NVIDIA GeForce GTX1060

❯ 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 1060) (0xffffffff)
Version: 23.2.1
Accelerated: yes
Video memory: 14164MB
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 GTX 1060)
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

Is it possible to config Archlinux to perform this way?

@dmitry3l
Copy link

does your arch have /usr/lib/dri/d3d12_dri.so?

@RayneScofield
Copy link
Author

does your arch have /usr/lib/dri/d3d12_dri.so?

no, there is no /usr/lib/dri direcoty.

@dmitry3l
Copy link

dmitry3l commented May 24, 2024

does your arch have /usr/lib/dri/d3d12_dri.so?

no, there is no /usr/lib/dri direcoty.

/usr/lib/dri/d3d12_dri.so is owned by mesa 1:24.0.7-3
reinstall mesa
maybe your installation is corrupted

@reflyable
Copy link

reflyable commented Jun 4, 2024

does your arch have /usr/lib/dri/d3d12_dri.so?你的 Arch 有 /usr/lib/dri/d3d12_dri.so 吗?

I have the file, but it still uses LLVM as renderer.
图片

@dmitry3l
Copy link

dmitry3l commented Jun 7, 2024

does your arch have /usr/lib/dri/d3d12_dri.so?你的 Arch 有 /usr/lib/dri/d3d12_dri.so 吗?

I have the file, but it still uses LLVM as renderer. 图片

try MESA_LOADER_DRIVER_OVERRIDE=d3d12 glxinfo -B | grep render
what do you see?

@reflyable
Copy link

does your arch have /usr/lib/dri/d3d12_dri.so?你的 Arch 有 /usr/lib/dri/d3d12_dri.so 吗?

I have the file, but it still uses LLVM as renderer. 图片

try MESA_LOADER_DRIVER_OVERRIDE=d3d12 glxinfo -B | grep render what do you see?

The same as before.

图片

@dmitry3l
Copy link

dmitry3l commented Jun 7, 2024

does your arch have /usr/lib/dri/d3d12_dri.so?你的 Arch 有 /usr/lib/dri/d3d12_dri.so 吗?

I have the file, but it still uses LLVM as renderer. 图片

try MESA_LOADER_DRIVER_OVERRIDE=d3d12 glxinfo -B | grep render what do you see?

The same as before.

图片

Is your gpu included in this (including same driver version or more recent)?
image

@reflyable
Copy link

reflyable commented Jun 7, 2024

does your arch have /usr/lib/dri/d3d12_dri.so?你的 Arch 有 /usr/lib/dri/d3d12_dri.so 吗?

I have the file, but it still uses LLVM as renderer. 图片

try MESA_LOADER_DRIVER_OVERRIDE=d3d12 glxinfo -B | grep render what do you see?

The same as before.
图片

Is your gpu included in this (including same driver version or more recent)? image

yes, I use a laptop with two gpu. A GeForce RTX 4060 laptop with driver 551.86 and a Intel Iris Xe with driver 31.0.101.4502.

@dmitry3l
Copy link

dmitry3l commented Jun 7, 2024

does your arch have /usr/lib/dri/d3d12_dri.so?你的 Arch 有 /usr/lib/dri/d3d12_dri.so 吗?

I have the file, but it still uses LLVM as renderer. 图片

try MESA_LOADER_DRIVER_OVERRIDE=d3d12 glxinfo -B | grep render what do you see?

The same as before.
图片

Is your gpu included in this (including same driver version or more recent)? image

yes, I use a laptop with two gpu. A GeForce RTX 4060 laptop with driver 551.86 and a Intel Iris Xe with driver 31.0.101.4502.

AFAIK it should work out of box if you have guiApplications=true in ur .wslconfig
maybe someone will find out what i missed here

@AreamanM
Copy link

AreamanM commented Jun 7, 2024

Hi I had the same problem this thread is about and I think I've figure out a fix for this from microsoft/wslg#1254 (comment) and microsoft/wslg#1254 (comment)

@xuangeyouneihan
Copy link

Hello, I have the same issue here. When I rebuild Mesa according to @AreamanM's method, it tells me that fakeinstall/usr/lib/libspirv_to_dxil.a is not a directory. What should I do now?

@dmitry3l
Copy link

Hello, I have the same issue here. When I rebuild Mesa according to @AreamanM's method, it tells me that fakeinstall/usr/lib/libspirv_to_dxil.a is not a directory. What should I do now?

thats because libspirv_to_dxil.a is a static library
anyways i use this script

  _install fakeinstall/usr/share/vulkan/icd.d/dzn_icd*.json
  _install fakeinstall/$_libdir/libvulkan_dzn.so
  _install fakeinstall/$_libdir/libspirv_to_dxil.so
  _install fakeinstall/$_libdir/libspirv_to_dxil.a
  _install fakeinstall/$_libdir/clon12compiler.so
  _install fakeinstall/usr/bin/spirv2dxil

@xuangeyouneihan
Copy link

In package_microsoft-dozen-driver()?

@dmitry3l
Copy link

In package_microsoft-dozen-driver()?

obv yes

@jaxvanyang
Copy link

mesa package maintainer has updated the PKGBUILD, the _install function is replaced by the new _pick function. So the workaround script need update too. And I created a fork here: https://gitlab.archlinux.org/jaxvanyang/mesa/-/blob/dozen/PKGBUILD. It should be enough to use.

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

6 participants