Score:3

No kernel modules showing in /lib/modules in WSL

mz flag

I'm running Ubuntu 20.04.5 under Windows 11 using WSL2 and trying to resolve (and educate myself) about a problem to do with the display kernel modules (which I understand to be the Linux equivalent of device drivers).

I am trying to run local videos (one .avi and one .mp4) on Mplayer and VLC from the Linux terminal. Both work, but poorly with a lot of chopping and stuttering.

If I run the same videos from Windows they work perfectly.

My display driver (as seen from Windows 11) is Intel Iris Xe version 31.0.101.4091 which is the latest version.

A reply to a similar askUbuntu question says that the kernel modules are stored in /lib/modules, but when I look in that directory it is empty.

edablin@EdsSamsungLaptop:/lib/modules$ ls -alF  
total 16  
drwxr-xr-x   2 root root  4096 Apr 23  2020 ./  
drwxr-xr-x 146 root root 12288 Feb 19 08:45 ../  
edablin@EdsSamsungLaptop:/lib/modules$  
edablin@EdsSamsungLaptop:/lib/modules$ ls -R /lib/modules/$(uname -r)/kernel/  
ls: cannot access '/lib/modules/5.15.79.1-microsoft-standard-WSL2/kernel/': No such file or directory   

Here's my machine:

  • Processor 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz 2.80 GHz

  • Installed RAM 16.0 GB (15.7 GB usable)

  • System type 64-bit operating system, x64-based processor

  • Edition Windows 11 Home

  • Version 22H2

  • Installed on ‎14/‎02/‎2023

  • OS build 22621.1265

Here's some of the responses I'm trying to make sense of:

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

and

       ************************************************  
       **** Your system is too SLOW to play this!  ****  
       ************************************************   

So would I be right in thinking the display kernel module is not there because Windows takes care of the device drivers for the display? Can someone point me in the right direction about the no Xvideo support for your video card message. If not a solution then tell me where I need to go look. Thanks

Score:6
vn flag

So would I be right in thinking the display kernel module is not there because Windows takes care of the device drivers for the display?

Sort of, yes. The "display" in WSLg is actually a Wayland/XWayland/Weston implementation that outputs to RDP (the Remote Desktop Protocol) rather than a physical display. And yes, because the RDP client is running under Windows, it's the Windows drivers that handle the actual output.

There are also some libraries that WSL mounts into Ubuntu at startup that provide some interaction with the GPU. You'll find these in /usr/lib/wsl/lib. These libraries communicate with equivalent DLLs and drivers on the Windows side to make Windows GPU features available to Ubuntu.

While these have typically been for GPU-compute tasks, I also did come across this tidbit which mentions the (very) recent addition of GPU-accelerated video decode (and more). I haven't had a chance to try this or dig into the details too much yet.

No kernel modules showing in /lib/modules

And also note that the default WSL2 kernel has all drivers statically compiled, with no loadable modules. You can see the current kernel config in use with:

zless /proc/config.gz

Can someone point me in the right direction about the no Xvideo support for your video card message

As far as I can tell, this simply means that the XVideo X extension isn't available in the RDP backend being used for WSLg.

However, the RDP backend does support OpenGL-acceleration, so you may find better results with:

mplayer -vo gl <filename>

The -vo sdl backend might also be a possibility, but note that the Mplayer manpage says that the SDL backend is "buggy/outdated."

It might also be worth trying mpv, a fork of Mplayer that supports Mesa graphics.

Your system is too SLOW to play this!

Unfortunately, I'm not able to reproduce this on my system with a 2070 Super, but that's (from what I see on benchmark ratings) about 5 times faster than an Iris Xe.

However, hopefully with a different output backend and/or hardware-accelerated video decode (with the latest 1.1.0 or later WSL and an appropriate player), you'll be able to overcome this.

Dabbo avatar
mz flag
Were it not for the fact that saying thanks under StackExchange rules is deprecated, I would show my appreciation for such a thoughtful answer!
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.