GPU resource cannot be used in wsl2: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22/-2
Windows Version
10.0.22631.3155
WSL Version
2.1.4.0
Are you using WSL 1 or WSL 2?
- [X] WSL 2
- [ ] WSL 1
Kernel Version
5.15.146.1-2
Distro Version
Ubuntu20.04
Other Software
NVIDIA-SMI 550.60.01 Driver Version: 551.76 CUDA Version: 12.4
Repro Steps
I have a RTX3070Ti type GPU in my laptop, and I am using wsl2 with nvidia driver and cuda installed.
Initially, after I run my wsl -d Ubuntu-20.04, I saw "libcuda.so.1 is not a symbolic link" in my dmesg log, after I deleted the orignal libcuda.so.1 and libcuda.so files by running the following code in my powershell:
cd C:\Windows\System32\lxss\lib
rm libcuda.so
rm libcuda.so.1
wsl -e /bin/bash
ln -s libcuda.so.1.1 libcuda.so.1
ln -s libcuda.so.1.1 libcuda.so
I still get this error message in my dmesg log: [ 0.593906] EXT4-fs (sdc): mounted filesystem with ordered data mode. Opts: discard,errors=remount-ro,data=ordered. Quota mode: none. [ 0.868684] FS-Cache: Duplicate cookie detected [ 0.868920] FS-Cache: O-cookie c=00000008 [p=00000002 fl=222 nc=0 na=1] [ 0.869171] FS-Cache: O-cookie d=00000000f48f82d2{9P.session} n=0000000041b2bec2 [ 0.869359] FS-Cache: O-key=[10] '34323934393337333737' [ 0.869533] FS-Cache: N-cookie c=00000009 [p=00000002 fl=2 nc=0 na=1] [ 0.869739] FS-Cache: N-cookie d=00000000f48f82d2{9P.session} n=00000000254caff7 [ 0.869983] FS-Cache: N-key=[10] '34323934393337333737' [ 1.019739] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 [ 1.020297] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 [ 1.020621] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 [ 1.021025] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 [ 1.021994] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 [ 1.022328] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 [ 1.022633] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 [ 1.023063] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 [ 1.121705] FS-Cache: Duplicate cookie detected [ 1.122075] FS-Cache: O-cookie c=0000000f [p=00000002 fl=222 nc=0 na=1] [ 1.122362] FS-Cache: O-cookie d=00000000f48f82d2{9P.session} n=00000000afce7235 [ 1.122634] FS-Cache: O-key=[10] '34323934393337343032' [ 1.122871] FS-Cache: N-cookie c=00000010 [p=00000002 fl=2 nc=0 na=1] [ 1.123121] FS-Cache: N-cookie d=00000000f48f82d2{9P.session} n=00000000f2f4c832 [ 1.123445] FS-Cache: N-key=[10] '34323934393337343032'
Expected Behavior
My was trying to use gpu acceleration for my xgboost model in a wsl2 environment, and here is what I posted in their forum: https://discuss.xgboost.ai/t/xgboost-using-gpu-in-wsl-environment-doesnt-work/3539
Actual Behavior
In side my dmesg log:
For my xgboost model running: https://discuss.xgboost.ai/t/xgboost-using-gpu-in-wsl-environment-doesnt-work/3539
Diagnostic Logs
No response
Occurring the same here when I start the android emulator from avd cli on WSL2. After some seconds the emulator closes and this error happens.
If I start the emulator with -gpu off flag everything works fine - but veeeeeeeery slowly
hitting this on a clean install of windows 11 and WSL, the errors occur as soon as the wsl distro is started:
[ 0.245739] hv_vmbus: registering driver dxgkrnl
[ 0.955213] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 0.955615] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 0.955991] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 0.956428] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
GPU acceleration is working properly on windows sandbox info:
WSL: 2.2.2.0
kernel: 5.15.150.1-2
WSLg: 1.0.61
MSRDC: 1.2.5105
Direct3D: 1.611.1-81528511
DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows: 10.0.22631.3374
distro: Ubuntu 22.04.3 LTS
gpu: 7800x3d igpu
amd driver version: 23.40.27.01-240313a-401413C-AMD-Software-Adrenalin-Edition
I have the same issue. does anyone have a solution for this?
Same here
Same here
Same issue here. Would be nice to get this fixed since this and FS-Cache: Duplicate cookie detected cause the startup of WSL to be slow.
- WSL version
2.2.4.0 - Occurs on both my Debian and Alpine distros
dmesg logs from Alpine:
[ 0.704654] sd 0:0:0:2: [sdc] 4096-byte physical blocks
[ 0.704975] sd 0:0:0:2: [sdc] Write Protect is off
[ 0.705230] sd 0:0:0:2: [sdc] Mode Sense: 0f 00 00 00
[ 0.705610] sd 0:0:0:2: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 0.707656] sd 0:0:0:2: [sdc] Attached SCSI disk
[ 0.731817] EXT4-fs (sdc): mounted filesystem with ordered data mode. Opts: discard,errors=remount-ro,data=ordered. Quota mode: none.
[ 1.089170] FS-Cache: Duplicate cookie detected
[ 1.089510] FS-Cache: O-cookie c=0000000b [p=00000002 fl=222 nc=0 na=1]
[ 1.089826] FS-Cache: O-cookie d=00000000c32a5c61{9P.session} n=000000002adfe9ce
[ 1.090199] FS-Cache: O-key=[10] '34323934393337333938'
[ 1.090511] FS-Cache: N-cookie c=0000000c [p=00000002 fl=2 nc=0 na=1]
[ 1.090838] FS-Cache: N-cookie d=00000000c32a5c61{9P.session} n=000000001e8a64ee
[ 1.091212] FS-Cache: N-key=[10] '34323934393337333938'
[ 1.101315] WSL (1) ERROR: ConfigApplyWindowsLibPath:2537: open /etc/ld.so.conf.d/ld.wsl.conf
[ 1.101319] failed 2
[ 1.105784] FS-Cache: Duplicate cookie detected
[ 1.106185] FS-Cache: O-cookie c=0000000d [p=00000002 fl=222 nc=0 na=1]
[ 1.106590] FS-Cache: O-cookie d=00000000c32a5c61{9P.session} n=00000000791852b8
[ 1.107089] FS-Cache: O-key=[10] '34323934393337343030'
[ 1.107462] FS-Cache: N-cookie c=0000000e [p=00000002 fl=2 nc=0 na=1]
[ 1.107844] FS-Cache: N-cookie d=00000000c32a5c61{9P.session} n=00000000f798b43a
[ 1.108352] FS-Cache: N-key=[10] '34323934393337343030'
[ 1.258635] misc dxg: dxgk: dxgkio_is_feature_enabled: Ioctl failed: -22
[ 1.269130] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 1.269611] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 1.270267] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x33e466b4ab4, max_idle_ns: 440795242338 ns
[ 1.270275] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 1.272423] clocksource: Switched to clocksource tsc
[ 1.272613] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 2.023448] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 2.145317] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 2.145822] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 2.146236] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 2.146635] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 2.147025] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 2.147419] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 2.147809] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 2.148199] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 2.148595] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 2.148986] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 2.149386] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 2.149776] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 2.150165] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 2.150610] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 2.420417] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
In my case, if I call gnome-logs from wsl2 and run the GUI, I get that error.
# start gnome-logs
Jul 07 16:27:56 * systemd-resolved[166]: Clock change detected. Flushing caches.
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_is_feature_enabled: Ioctl failed: -22
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgvmb_send_create_sync_object: failed -75
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_create_sync_object: Ioctl failed: -75
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgvmb_send_create_sync_object: failed -75
Jul 07 16:28:05 * kernel: misc dxg: dxgk: dxgkio_create_sync_object: Ioctl failed: -75
Jul 07 16:28:31 * systemd-resolved[166]: Clock change detected. Flushing caches.
The gnome-logs window works, but there is a margin area different from the actual window size.
I wonder why is this still not fixed. All those issues are directly related: #9083 #9523 #9662 #10085 #11086 #11095 #11208 #11838 #11939. Intel iGPU doesn't exist to Microsoft?
Still an issue with 6.6.36.6-microsoft-standard-WSL2+.
same on 6.6.36.6-microsoft-standard-WSL2
Windows 11 with GeForce RTX 3060 here. GameReady driver 566.03.
WSL version: 2.3.24.0 Kernel version: 5.15.153.1-2 WSLg version: 1.0.65 MSRDC version: 1.2.5620 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26100.1-240331-1435.ge-release Windows version: 10.0.22631.4317
I get this when trying to use OpenGL. The app is super slow:
[Tue Nov 5 22:56:15 2024] misc dxg: dxgk: dxgkio_is_feature_enabled: Ioctl failed: -22 [Tue Nov 5 22:56:15 2024] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 [Tue Nov 5 22:56:15 2024] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 [Tue Nov 5 22:56:15 2024] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 [Tue Nov 5 22:56:15 2024] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 [Tue Nov 5 22:56:15 2024] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
hitting this on a clean install of windows 11 and WSL, the errors occur as soon as the wsl distro is started:
[ 0.245739] hv_vmbus: registering driver dxgkrnl [ 0.955213] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 [ 0.955615] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 [ 0.955991] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 [ 0.956428] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2GPU acceleration is working properly on windows sandbox info:
WSL: 2.2.2.0 kernel: 5.15.150.1-2 WSLg: 1.0.61 MSRDC: 1.2.5105 Direct3D: 1.611.1-81528511 DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows: 10.0.22631.3374 distro: Ubuntu 22.04.3 LTS gpu: 7800x3d igpu amd driver version: 23.40.27.01-240313a-401413C-AMD-Software-Adrenalin-Edition
Same issue here
I think the current implementation on Kernel 5.15 and up is broken. I've tested on 6.6.36 and even on 6.6.63 by pulling latest updates from upstream stable branch and doesn't seem to be working at all.
[ 1.687032] misc dxg: dxgk: dxgkio_is_feature_enabled: Ioctl failed: -22
[ 1.687032] misc dxg: dxgk: dxgkio_is_feature_enabled: Ioctl failed: -22
[ 1.692342] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 1.693191] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 1.694044] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 1.695030] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 1.697464] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 1.698302] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 1.699089] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 1.700093] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Linux fedoraremix 6.6.63-microsoft-standard-WSL2+ #3 SMP PREEMPT_DYNAMIC Sun Dec 1 15:29:41 -03 2024 x86_64 GNU/Linux
Or, if there's something missing on the host side it could be stated somewhere but none that I could find.
It would be very good if someone working directly on this driver could follow up on this.
The only workaround I was able to find thus far was to disable systemd by commenting out the following line at /etc/wsl.conf:
[boot]
# systemd=true
Then in PowerShell, shutting down the distro then launching it back again without systemd this time.
More info on my wsl --version after wsl --update and wsl --update --pre-release:
WSL version: 2.4.5.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.22624.1391
Obs.: I am using Debian distro. Previously I was using systemd with https://github.com/DamionGans/ubuntu-wsl2-systemd-script.
I have tested with another Distro within WSL2 - OpenSuse Leap and I found out this problem does not occur with Leap.
More info on my wsl --version:
WSL version: 2.4.5.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.22624.1391
Coincidently or not, this problem with direnv does not happen with OpenSuse Leap.
same here.
WSL 版本: 2.3.26.0 内核版本: 5.15.167.4-1 WSLg 版本: 1.0.65 MSRDC 版本: 1.2.5620 Direct3D 版本: 1.611.1-81528511 DXCore 版本: 10.0.26100.1-240331-1435.ge-release Windows 版本: 10.0.26100.2605
Still no reply from team?
br
/question
The only workaround I was able to find thus far was to disable systemd by commenting out the following line at /etc/wsl.conf:
[boot]
# systemd=trueThen in PowerShell, shutting down the distro then launching it back again without systemd this time.
I had recently upgraded from 22.04 to 24.04 and ran into hanging problems. During diagnosis, I ran into the reported errors. Your comment reminded me I had enabled it. This eliminates the logs.
I also had autoMemoryReclaim=gradual set, which is experimental. I've disabled that hoping it eliminates the hanging.
After disabling systemd it's definitely faster to wake up 😆
There is a coping strategy to the slow loading problem, although it is not a fundamental solution. You can set a timeout.
[boot]
initTimeout=1000
I have the same issue as well. :(
I have the same issue too
C:\Users\Local_Admin>wsl --version WSL version: 2.4.10.0 Kernel version: 5.15.167.4-1 WSLg version: 1.0.65 MSRDC version: 1.2.5716 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26100.1-240331-1435.ge-release Windows version: 10.0.26100.2894
same
wsl --version WSL version: 2.4.11.0 Kernel version: 5.15.167.4-1 WSLg version: 1.0.65 MSRDC version: 1.2.5716 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26100.1-240331-1435.ge-release Windows version: 10.0.26100.3194
I'm also having this issue to this date. Wsl started having problems 2 months ago and now is completely unusable (with xrdp and remote desktop)
I am also experiencing this issue: wsl --version WSL version: 2.5.4.0 Kernel version: 6.6.75.1-1 WSLg version: 1.0.66 MSRDC version: 1.2.6074 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26100.1-240331-1435.ge-release Windows version: 10.0.26100.3476
Same issue here, exactly the same behavior
wsl -v -l WSL version: 2.5.4.0 Kernel version: 6.6.75.1-1 WSLg version: 1.0.66 MSRDC version: 1.2.6074 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26100.1-240331-1435.ge-release Windows version: 10.0.22631.5189
Not sure how the WSL team hasn't at least commented saying they're looking into this
With so many people experiencing this issue it's pretty disappointing that none of the devs have even given an explanation, let alone are working on a fix.
I use WSL often and the slow startup times are one of the reasons that I'm considering just ditching Windows altogether.
same for me
same for me