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

ubuntu22.04 gpu err #12699

Closed
1 of 2 tasks
Amamiya23 opened this issue Mar 15, 2025 · 3 comments
Closed
1 of 2 tasks

ubuntu22.04 gpu err #12699

Amamiya23 opened this issue Mar 15, 2025 · 3 comments

Comments

@Amamiya23
Copy link

Amamiya23 commented Mar 15, 2025

Windows Version

Microsoft Windows [版本 10.0.26100.3037]

WSL Version

2.4.12.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.167.4-1

Distro Version

ubuntu 22.04

Other Software

No response

Repro Steps

After installing the specified version of Ubuntu using wsl --install -d Ubuntu-22.04, configuring GPU hardware acceleration fails,I can only use the CPU for simulation.:

➜  ~ glxinfo -B | egrep 'Device|Mesa'
    Vendor: Mesa (0xffffffff)
    Device: llvmpipe (LLVM 15.0.7, 256 bits) (0xffffffff)
OpenGL vendor string: Mesa
OpenGL core profile version string: 4.5 (Core Profile) Mesa 25.0.1 - kisak-mesa PPA
OpenGL version string: 4.5 (Compatibility Profile) Mesa 25.0.1 - kisak-mesa PPA
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 25.0.1 - kisak-mesa PPA

Image
It is worth noting that my directory contains the dev\dxg file!

Expected Behavior

I installed the latest version of Ubuntu 24.04 using wsl --install. After entering sudo add-apt-repository ppa:kisak/turtle and sudo apt update && sudo apt upgrade I ran glxinfo -B | egrep 'Device|Mesa' to check, and the results are as follows:

➜  ~ glxinfo -B | egrep 'Device|Mesa'
    Device: D3D12 (NVIDIA GeForce RTX 4060 Laptop GPU) (0xffffffff)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.04.1
OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.2.8-1ubuntu1~24.04.1
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 24.2.8-1ubuntu1~24.04.1

Image

Due to special reasons, I must use the Ubuntu 22.04 version. Therefore, I hope that the Ubuntu 22.04 version can also properly use hardware GPU acceleration instead of CPU rendering.

Actual Behavior

I sincerely hope there is a way to help me complete the hardware GPU acceleration configuration for Ubuntu 22.04.

Diagnostic Logs

No response

Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

@Amamiya23
Copy link
Author

/question

@Amamiya23
Copy link
Author

Amamiya23 commented Mar 15, 2025

After reviewing the issue, I found the #solution
#12584 (comment):
The reason seems to be that mesa cannot automatically select d3d12 on older versions of Ubuntu, so you just need to import the environment variable
export GALLIUM_DRIVER=d3d12
If you are a laptop user with both integrated and discrete graphics, you can additionally set the following variable to specify the NVIDIA graphics card.
export MESA_D3D12_DEFAULT_ADAPTER_NAME=NVIDIA

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