Custom kernel that enabled CAN in WSL causes Docker to get stuck on startup

Configured .config file to enable socketCAN in WSL. However it causes the dcoker engine to never finish start up. I’ve made sure

  • Use the same kernel version as the one distributed by the latest WSL2 release. You can find the version by running wsl.exe --system uname -r in a terminal.
  • Make sure that your kernel build environment includes pahole and its version is properly reflected in the corresponding kernel config (CONFIG_PAHOLE_VERSION).

Any insight will be appreciated.

How did you create the custom Kernel? I assume you followed this guide, because you quoted the two suggestions from it

Those are the minimum requirements, but Docker Desktop could depend on other things as well.
Can you confirm that you also used the WSL2 kernel GitHub repo linked in the documentation?

You could also check the output of

docker desktop logs

Yes that is the repo that I used, I am using the latest release.
I provided an image of what docker looks like.

That just shows the engine could not start, but without logs, there is no universal way to solve it. You could try installing Docker CE in a WSL distro directly if that helps you with debugging. If the daemon of Docker CEgives you an error complaiing about missing kernel modules or any parameter, you are one step closer to solve it if it is possible.

this is what I got from the error logs. Seems like it is waiting for some init API.
GET /ping (1.0000587s): Get “http://ipc/ping”: context deadline exceeded
[2026-05-06T19:47:42.488844800Z][com.docker.backend.exe.enginedependencies] still waiting for init control API to respond after 6h17m57.7063236s
[2026-05-06T19:47:42.589201300Z][com.docker.backend.exe.ipc] (5e484a24-20612) e8e4728c-engines C->S init GET /ping
[2026-05-06T19:47:42.888942600Z][com.docker.backend.exe.socketforward] [2026-05-06T19:47:43.419421990Z][vpnkit-bridge] /run/guest-services/socketforwarder-receive-fds.sock: does not exist yet, waiting for it to be created
[2026-05-06T19:47:43.589761800Z][com.docker.backend.exe.ipc][W] (5e484a24-20612) e8e4728c-engines C<-S ConnectionClosed

So it is likely not just Docker that could not start in the VM. Maybe you can try checking system logs in the docker-desktop distro using commands like “dmesg”, “journalctl -e” (likely doesn’t exist), or just checking /var/logs. Last time I checked, the Docker daemon started in a container, so getting the right logs could be tricky. I don’t have my Windows machine to check, but I suspect that something is still missing from the kernel. If you can restore the original and save all the original kernel parameters, list of modules and compare those with the new kernel, maybe you notic something in it.

This is what I get when doing “dmesg”, when I do docker info, I get a ERROR: request returned 500 Internal Server Error for API route and version http://%2F%2F.%2Fpipe%2FdockerDesktopLinuxEngine/v1.54/info, check if the server supports the requested API version
errors pretty printing info.

[ 1.834976] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 1.835706] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 1.837905] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 1.840468] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 1.841112] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 1.842883] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 1.897628] systemd-journald[42]: Collecting audit messages is disabled.
[ 1.947524] systemd-journald[42]: Received client request to flush runtime journal.
[ 1.953543] systemd-journald[42]: File /var/log/journal/96f981d3259048cf8c3cde1fb145052a/system.journal corrupted or uncleanly shut down, renaming and replacing.
[ 2.083635] ACPI: AC: AC Adapter [AC1] (on-line)
[ 2.085494] ACPI: battery: Slot [BAT1] (battery present)
[ 2.461454] kvm_intel: Using Hyper-V Enlightened VMCS
[ 2.463489] vmentry_ctrl unsupported with eVMCS: 0x100000
[ 2.463494] vmexit_ctrl unsupported with eVMCS: 0x10000000
[ 2.616937] intel_rapl_msr: PL4 support detected.
[ 3.905613] systemd-journald[42]: File /var/log/journal/96f981d3259048cf8c3cde1fb145052a/user-1000.journal corrupted or uncleanly shut down, renaming and replacing.
[ 6.283437] WSL (163) ERROR: CheckConnection: getaddrinfo() failed: -5
[ 22.651157] ACPI: bus type USB registered
[ 22.651997] usbcore: registered new interface driver usbfs
[ 22.652005] usbcore: registered new interface driver hub
[ 22.652025] usbcore: registered new device driver usb
[ 22.661821] vhci_hcd vhci_hcd.0: USB/IP Virtual Host Controller
[ 22.661827] vhci_hcd vhci_hcd.0: new USB bus registered, assigned bus number 1
[ 22.661832] vhci_hcd: created sysfs vhci_hcd.0
[ 22.662538] hub 1-0:1.0: USB hub found
[ 22.662576] hub 1-0:1.0: 8 ports detected
[ 22.663302] vhci_hcd vhci_hcd.0: USB/IP Virtual Host Controller
[ 22.663306] vhci_hcd vhci_hcd.0: new USB bus registered, assigned bus number 2
[ 22.663418] usb usb2: We don’t know the algorithms for LPM for this host, disabling LPM.
[ 22.663709] hub 2-0:1.0: USB hub found
[ 22.663748] hub 2-0:1.0: 8 ports detected
[ 24.506999] vhci_hcd vhci_hcd.0: pdev(0) rhport(0) sockfd(3)
[ 24.507006] vhci_hcd vhci_hcd.0: devid(262150) speed(3) speed_str(high-speed)
[ 24.507052] vhci_hcd vhci_hcd.0: Device attached
[ 24.730533] usb 1-1: new high-speed USB device number 2 using vhci_hcd
[ 24.850436] usb 1-1: SetAddress Request (2) to port 0
[ 38.739090] vhci_hcd vhci_hcd.0: pdev(0) rhport(1) sockfd(3)
[ 38.739099] vhci_hcd vhci_hcd.0: devid(262151) speed(2) speed_str(full-speed)
[ 38.739129] vhci_hcd vhci_hcd.0: Device attached
[ 38.930614] vhci_hcd: vhci_device speed not set
[ 38.986494] usb 1-2: new full-speed USB device number 3 using vhci_hcd
[ 39.050487] vhci_hcd: vhci_device speed not set
[ 39.106590] usb 1-2: SetAddress Request (3) to port 1
[ 39.140248] CAN device driver interface
[ 39.147282] peak_usb 1-2:1.0: PEAK-System PCAN-USB adapter hwrev 86 serial FFFFFFFF (1 channel)
[ 39.150452] peak_usb 1-2:1.0 can0: attached to PCAN-USB channel 0 (device 0x000000FF)
[ 39.150510] usbcore: registered new interface driver peak_usb
[ 40.286452] systemd-journald[42]: Time jumped backwards, rotating.
[ 48.302697] hv_balloon: Max. dynamic memory size: 7914 MB
[ 628.571742] mini_init (156): drop_caches:

You can check if your custom kernel has all required kernel modules:

curl -L https://github.com/moby/moby/raw/master/contrib/check-config.sh | sh

These are the packaeges missing, even if I enable them and rebuild the kernel they don’t seem to stick and become missing

  • CONFIG_IP_NF_FILTER: missing
  • CONFIG_IP_NF_MANGLE: missing
  • CONFIG_IP_NF_TARGET_MASQUERADE: missing
  • CONFIG_IP6_NF_FILTER: missing
  • CONFIG_IP6_NF_MANGLE: missing
  • CONFIG_IP6_NF_TARGET_MASQUERADE: missing
  • CONFIG_IP_NF_RAW: missing
  • CONFIG_IP_NF_NAT: missing
  • CONFIG_IP6_NF_RAW: missing
  • CONFIG_IP6_NF_NAT: missing
  • CONFIG_IP_NF_TARGET_REDIRECT: missing
  • CONFIG_EXT3_FS: missing
  • CONFIG_EXT3_FS_XATTR: missing
  • CONFIG_EXT3_FS_POSIX_ACL: missing
  • CONFIG_EXT3_FS_SECURITY: missing
    • /dev/zfs: missing
    • zfs command: missing
    • zpool command: missing

If I am not mistaken, you are the first (at least in the last 7 years) that uses a custom WSL kernel which causes Docker Desktop to fail, and post about it.

Looks like your problem is to create a custom kernel that includes all default kernel moduls + the one you enabled.

Changes are high that your topic remains unsolved here, as it’s rather a WSL/Kernel related issue than a Docker Desktop issue. You might have better chances in a WSL support channel. The WSL Github repository is probably not the right place, but I don’t know any other support channel for WSL that I could recomend instead.

Maybe the Microsoft Tech community? https://techcommunity.microsoft.com/
Or possibly any Linux forum if it is really a kernel build issue. I only made a custom WSL2 kernel once years ago and I don’t remember if I needed it to be compatible with Docker Desktop. Probably not, but I think I also broke something.