WSL 中的 /lib/modules 中没有显示内核模块

Dab*_*bbo 3 video display kernel drivers windows-subsystem-for-linux

我正在使用 WSL2 在 Windows 11 下运行 Ubuntu 20.04.5,并尝试解决(并自我教育)与显示内核模块(我理解为 Linux 中的设备驱动程序等效)有关的问题。

\n

我正在尝试从 Linux 终端在 Mplayer 和 VLC 上运行本地视频(一个.avi和一个)。.mp4两者都可以工作,但效果很差,有很多砍伐和口吃。

\n

如果我从 Windows 运行相同的视频,它们会完美运行。

\n

我的显示驱动程序(从 Windows 11 中看到)是Intel Iris Xe 版本 31.0.101.4091,这是最新版本。

\n

对类似的askUbuntu问题的答复说内核模块存储在/lib/modules中,但是当我查看该目录时它是空的。

\n
edablin@EdsSamsungLaptop:/lib/modules$ ls -alF  \ntotal 16  \ndrwxr-xr-x   2 root root  4096 Apr 23  2020 ./  \ndrwxr-xr-x 146 root root 12288 Feb 19 08:45 ../  \nedablin@EdsSamsungLaptop:/lib/modules$  \nedablin@EdsSamsungLaptop:/lib/modules$ ls -R /lib/modules/$(uname -r)/kernel/  \nls: cannot access '/lib/modules/5.15.79.1-microsoft-standard-WSL2/kernel/': No such file or directory   \n
Run Code Online (Sandbox Code Playgroud)\n

这是我的机器:

\n
    \n
  • 处理器 第 11 代 Intel(R) Core(TM) i7-1165G7 @ 2.80GHz 2.80 GHz

    \n
  • \n
  • 已安装 RAM 16.0 GB(15.7 GB 可用)

    \n
  • \n
  • 系统类型 64位操作系统,基于x64的处理器

    \n
  • \n
  • Windows 11 家庭版

    \n
  • \n
  • 22H2版本

    \n
  • \n
  • 安装在 \xe2\x80\x8e14/\xe2\x80\x8e02/\xe2\x80\x8e2023

    \n
  • \n
  • 操作系统版本 22621.1265

    \n
  • \n
\n

以下是我试图理解的一些回复:

\n
[VO_XV] It seems there is no Xvideo support for your video card available.  \n[VO_XV] Run 'xvinfo' to verify its Xv support and read  \n[VO_XV] DOCS/HTML/en/video.html#xv!  \n[VO_XV] See 'mplayer -vo help' for other (non-xv) video out drivers.  \n[VO_XV] Try -vo x11.  \n
Run Code Online (Sandbox Code Playgroud)\n

\n
       ************************************************  \n       **** Your system is too SLOW to play this!  ****  \n       ************************************************   \n
Run Code Online (Sandbox Code Playgroud)\n

那么我认为显示内核模块不存在是正确的,因为 Windows 负责显示的设备驱动程序吗?\n有人可以为我指出关于您的显卡消息不支持 Xvideo 的正确方向吗?如果没有解决方案,请告诉我需要去哪里查找。谢谢

\n

Not*_*1ds 6

那么我认为显示内核模块不存在是正确的,因为 Windows 负责显示的设备驱动程序吗?

有点,是的。WSLg 中的“显示器”实际上是 Wayland/XWayland/Weston 实现,它输出到 RDP(远程桌面协议)而不是物理显示器。是的,因为 RDP客户端在Windows下运行,所以 Windows 驱动程序处理实际输出。

还有一些 WSL 在启动时安装到 Ubuntu 中的库,提供与 GPU 的一些交互。您会在 中找到这些/usr/lib/wsl/lib。这些库与 Windows 端的等效 DLL 和驱动程序进行通信,以使 Windows GPU 功能可用于 Ubuntu。

虽然这些通常用于 GPU 计算任务,但我也确实遇到过这个花絮,其中提到(非常)最近添加了 GPU 加速视频解码(以及更多)。我还没有机会尝试这个或深入研究细节。

/lib/modules 中没有显示内核模块

另请注意,默认的 WSL2 内核所有驱动程序都是静态编译的,没有可加载模块。您可以通过以下命令查看当前使用的内核配置:

zless /proc/config.gz
Run Code Online (Sandbox Code Playgroud)

no Xvideo support for your video card有人可以为我指明该消息的正确方向吗

据我所知,这仅仅意味着 XVideo X 扩展在用于 WSLg 的 RDP 后端中不可用。

但是,RDP 后端确实支持 OpenGL 加速,因此您可能会发现更好的结果:

mplayer -vo gl <filename>
Run Code Online (Sandbox Code Playgroud)

后端-vo sdl也可能是一种可能性,但请注意,Mplayer 联机帮助页显示 SDL 后端“有缺陷/过时”。

它也可能值得尝试mpv,它是支持 Mesa 图形的 Mplayer 的一个分支。

Your system is too SLOW to play this!

不幸的是,我无法在我的 2070 Super 系统上重现这一点,但这(从我在基准评级上看到的)比 Iris Xe 快大约 5 倍。

但是,希望使用不同的输出后端和/或硬件加速视频解码(使用最新的 1.1.0 或更高版本的 WSL 和适当的播放器),您将能够克服这个问题。