microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.4k stars 819 forks source link

uname -r doesn't match ls /lib/modules #7019

Open glibg10b opened 3 years ago

glibg10b commented 3 years ago

Windows Build Number

10.0.19043.1023

WSL Version

Kernel Version

5.10.16.3-microsoft-standard-WSL2

Distro Version

Ubuntu-20.04 LTS

Other Software

apt modprobe ddcci-dkms

Repro Steps

  1. Update kernel with sudo apt update; sudo apt upgrade or an update package
  2. Try:
    • ls /lib/modules
    • sudo apt install ddcci-dkms
    • modprobe <any module>

Expected Behavior

Actual Behavior

5.4.0-73-generic  5.4.0-74-generic
Setting up ddcci-dkms (0.3.3-1) ...
Loading new ddcci-0.3.3 DKMS files...
BACKLIGHT_CLASS_DEVICE disabled in this kernel, not building module.
It is likely that 5.10.16.3-microsoft-standard-WSL2 belongs to a chroot's host
Building for 5.4.0-73-generic and 5.4.0-74-generic
Module build for kernel 5.4.0-73-generic was skipped since the
kernel headers for this kernel does not seem to be installed.
Building initial module for 5.4.0-74-generic
Done.

ddcci.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.4.0-74-generic/updates/dkms/

ddcci-backlight.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.4.0-74-generic/updates/dkms/

depmod...

DKMS: install completed.
modprobe: FATAL: Module ddcci-backlight not found in directory /lib/modules/5.10.16.3-microsoft-standard-WSL2

Diagnostic Logs

No response

0xbadfca11 commented 3 years ago

The kernel is managed outside the distribution and is not linked to the distribution's package system. When you need the kernel source, you can get it here. https://github.com/microsoft/WSL2-Linux-Kernel/tree/linux-msft-wsl-5.10.y

glibg10b commented 3 years ago

Thanks! I followed these instructions and ran make modules_install

therealkenc commented 3 years ago

All kernel modules are compiled into the kernel statically by-design. WSL does not have a DDC I²C bus besides.

GitMensch commented 2 years ago

@therealkenc is this accepted feature issue for "allow kernel modules to be run dynamically"?