AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题 / 1754504
Accepted
მამუკა ჯიბლაძე
მამუკა ჯიბლაძე
Asked: 2022-11-25 05:45:00 +0800 CST2022-11-25 05:45:00 +0800 CST 2022-11-25 05:45:00 +0800 CST

wsl中如何开启gpu加速?

  • 772

dxdiag告诉我我有 Intel HD Graphics 520 和 AMD Radeon R7 M340

wsl.exe --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.22000.1281

并wsl --status说

Default Distribution: Ubuntu-22.04
Default Version: 2

从 wsl 内部,uname -a给出

5.19.0-microsoft-standard #2 SMP PREEMPT_DYNAMIC Wed Aug 3 01:11:12 +04 2022 x86_64 x86_64 x86_64 GNU/Linux

并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.4, 256 bits) (0xffffffff)
    Version: 22.2.4
    Accelerated: no
    Video memory: 5936MB
    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.4, 256 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 22.2.4 - kisak-mesa PPA
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.4 - kisak-mesa PPA
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.4 - kisak-mesa PPA
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

我的系统上没有/drv/dxg。的内容/usr/lib/x86_64-linux-gnu/dri是

crocus_dri.so
iris_dri.so
nouveau_dri.so
r600_dri.so
swrast_dri.so
vmwgfx_dri.so
d3d12_dri.so
kms_swrast_dri.so
r300_dri.so
radeonsi_dri.so
virtio_gpu_dri.so
zink_dri.so

有没有办法让 gpu 加速工作?

drivers
  • 1 1 个回答
  • 65 Views

1 个回答

  • Voted
  1. Best Answer
    NotTheDr01ds
    2022-11-25T09:06:58+08:002022-11-25T09:06:58+08:00

    随着最近发布的 WSL 应用程序包(可从 Microsoft Store 获得或直接下载 AppX/MSIX 捆绑包),您显然正在运行,用于运行 Linux 应用程序的 WSLg GPU 加速应该可用于许多系统。我没有 AMD 系统,但我从这篇开发博客文章中了解到它应该可以在您的系统上运行。

    WSL 下的 GPU 加速渲染需要(至少)三样东西:

    • 最近发布的 WSL(您显然拥有):
    • dxgkrnl支持的 WSL2 内核
    • 适用于支持 WDDM v2.9 或更高版本的 GPU 的Windows驱动程序

    Windows/WSL 先决条件

    虽然您似乎已经准备就绪,但我会将其包括在内供其他读者使用。你需要:

    • Windows 11:所有 WSL 版本
    • Windows 10:内部版本号以 2311 或更高版本结尾。您可以(Get-ComputerInfo).WindowsUBR在 PowerShell 中检查此编号(UBR - update-build-number)。有关详细信息,请参阅此答案的“Windows 10 上的 WSLg:先决条件”部分。

    dxgkrnl支持的 WSL2 内核

    从上面的输出来看,我希望您的问题非常简单——我注意到报告的内核版本与报告的uname -a不同wsl --version。我假设您在您的%userprofile%\.wslconfig? 如果是这样,请尝试删除该行,重新启动 WSL ( wsl --shutdown) 并再次检查。

    适用于支持 WDDM v2.9 或更高版本的 GPU 的Windows驱动程序

    最后,确保您的 Radeon 的 Windows 驱动程序包括对 WDDM 2.9 或更高版本的支持。这可以通过dxdiagWindows 中“显示”选项卡下的命令来确认。

    如果您低于 2.9,请确保您运行的是最新的 Catalyst 驱动程序。我不能肯定地告诉你你的卡是否支持带有最新驱动程序的 2.9,但我相信它应该。


    额外的背景阅读: 来自 Microsoft DevBlog 的DirectX ❤ Linux

    • 1

相关问题

  • 测试 tensorflow-gpu 失败,状态为:CUDA 驱动程序版本对于 CUDA 运行时版本不足(这不是真的)

  • 如何查找导致“Windows 无法验证此驱动程序软件的发布者”的驱动程序?

  • unixODBC 驱动程序管理器 SQL Server 错误

  • 为什么我的笔记本电脑不使用 nvidia GPU?

  • 客户端未响应 TCP SYN-ACK 数据包以太网驱动程序

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    v15 为什么通过电缆(同轴电缆)的千兆位/秒 Internet 连接不能像光纤一样提供对称速度? 2020-01-25 08:53:31 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve