microsoft / wslg

Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
MIT License
10.26k stars 310 forks source link

WSL xrdp issue (works in 2.0.4, doesn't work in 2.0.9) #1163

Open blakeduffey opened 11 months ago

blakeduffey commented 11 months ago

Windows Version

Microsoft Windows [Version 10.0.19045.3693]

WSL Version

2.0.9.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.133.1-1

Distro Version

Ubuntu 22.04

Other Software

xrdp

Repro Steps

I've developed steps for using a full desktop environment (via mstsc and xrdp). Over the past few months I've tested

Budgie Cinnamon Enlightenment GNOME KDE LXDE LXQT MATE Xfce

I periodically re-test (to make sure my steps work). I have confirmed that works in 2.0.4 does NOT work in 2.0.9+

EUD-WSLwithdesktop-081223-1524-4.pdf

I just installed a fresh 22.04 instance on wsl 2.0.4 with GNOME. I was immediately able to RDP to the desktop (via mstsc and xrdp). I can see the dock and use apps.

After I update wsl to 2.0.9 - I can connect to xrdp and login, but I don't get a desktop. If I install fresh under 2.0.9, I see the same behavior.

Expected Behavior

Consistent xrdp behavior between 2.0.4 and 2.0.9+

Actual Behavior

Inconsistent xrdp behavior between 2.0.4 and 2.0.9+

Diagnostic Logs

No response

github-actions[bot] commented 11 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Heng-Zhou commented 11 months ago

GNOME desktop works for me without problem in WSL 2.0.9 when I connect using Windows Remote Desktop, so I can confirm you that it is not the problem of WSL version. I'm on Windows 22H2 Education and installed Ubuntu 22.04.3 inside WSL2. I followed this discussion for the configuration, so the .xsessionrc file is different from your pdf.

blakeduffey commented 11 months ago

I appreciate your feedback @Heng-Zhou. However, I have a working desktop on 2.0.4. I upgrade to 2.0.9 (or 2.0.14) and it doesn't work. I will do some additional testing when time permits.

OneBlue commented 11 months ago

Thank you @blakeduffey. Can you share details about specifically is failing ? We don't support xrdp so to root cause this we'd need to know what exactly is causing gnome to fail in your configuration. I'd recommend looking at straces / logs to see if you can pin point what's going wrong.

blakeduffey commented 11 months ago

@OneBlue - thanks so much for following up. To test this fresh I've done the following:

Uninstall WSL Install WSL 2.0.4 (via the msi)

That gives me the following:

WSL version: 2.0.4.0
Kernel version: 5.15.123.1-1
WSLg version: 1.0.58
MSRDC version: 1.2.4485
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25880.1000-230602-1350.main
Windows version: 10.0.19045.3693

Install Ubuntu via wsl --install Ubuntu Configure wsl-vpnkit

Export the Ubuntu distro via wsl --export Ubuntu ubuntu.tar

I've then imported that image as UbuntuGNOME, UbuntuKDE, and UbuntuXfce (just for comparison purposes)

I follow my distro-specific steps to setup GNOME, KDE, and Xfce on the 3 separate instances (and bounce xrdp on each).

FWIW I feel confident I could do it with the other desktops I've tested including budgie, cinnamon, MATE, Enlightenment, LXDE and LXQT.

Then I shut everything down wsl --shutdown since xrdp will try to run on the same port on each as it stands.

I bring them up, one at a time, and connect via mstsc (localhost:3390) to verify I can get the desktop

wsl-Xfce wsl-kde wsl-gnome

I shut all the instances down via wsl --shutdown

I update to 2.0.14 (as of today) via wsl --update

So Xfce worked KDE crashes and GNOME gives a black screen after logon wsl-gnome-black-screen wsl-kde-crashes

I'm actually typing this as I do it - the only thing that has changed is I updated WSL from 2.0.4 to 2.0.14.

OneBlue commented 11 months ago

Thank you @blakeduffey. Unfortunately we don't have internal knowledge of KDE or gnome so if nothing jumps out in their straces / logs, you might need to contact their respective maintainers to help figure out what the issue is.

I can also see that msrdc has been updated in 2.0.10 so transferring to wslg so they can help us figure out if this is related.

blakeduffey commented 11 months ago

@OneBlue - I appreciate the info. I haven't been upgrading as regularly as normal due to the recent issues with wsl-vpnkit. Whatever this change is, it seems to impact multiple desktop environments (budgie, GNOME, KDE). Xfce seems to still work on 2.0.14. Appreciate your hard work.

blakeduffey commented 11 months ago

Thanks much for the redirect. I'm happy to provide any details as would be useful.

blakeduffey commented 10 months ago

I would love to get someone to chime in on this? I can provide logs, etc.

I feel like this some kind of rendering/redraw problem - I can connect to the GNOME instance (for example) and I get a partial desktop (I see the Home folder on a black screen).

blakeduffey commented 10 months ago

So I decided to try to reset everything and try again. I've uninstalled all the WSL bits and installed wsl 2.0.4.

WSL version: 2.0.4.0 Kernel version: 5.15.123.1-1 WSLg version: 1.0.58 MSRDC version: 1.2.4485 Direct3D version: 1.608.2-61064218 DXCore version: 10.0.25880.1000-230602-1350.main Windows version: 10.0.19045.3803

I've installed Ubuntu 22.04 and the GNOME desktop. I can connect to xrdp via remote desktop, no problem.

image

I shutdown the instances and update wsl to 2.0.14.

wsl --shutdown wsl --update wsl --version

WSL version: 2.0.14.0 Kernel version: 5.15.133.1-1 WSLg version: 1.0.59 MSRDC version: 1.2.4677 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.19045.3803

I restart the Ubuntu instance and connect again:

image

Literally nothing has changed in the 5 minutes except upgrading wsl from 2.0.4 to 2.0.14.

I see this using other desktops (KDE, budgie, etc).

Segment0895 commented 10 months ago

@blakeduffey you don't happen to have somewhere on the logs something about dxgkrnl and/or ioctl failed, do you?

EDIT: Debian ~machine~ WSL2 distro logs (may or may not be a different issue):

Jan 29 15:26:59 MYMACHINENAME gnome-initial-s[1620]: Starting gnome-initial-setup
Jan 29 15:26:59 MYMACHINENAME gnome-initial-s[1620]: Production mode: changes will be saved to disk
Jan 29 15:26:59 MYMACHINENAME gnome-initial-setup[1620]: libEGL warning: DRI2: failed to authenticate
Jan 29 15:26:59 MYMACHINENAME kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
Jan 29 15:26:59 MYMACHINENAME kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
Jan 29 15:26:59 MYMACHINENAME kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
Jan 29 15:26:59 MYMACHINENAME kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Jan 29 15:26:59 MYMACHINENAME dbus-daemon[429]: [session uid=1000 pid=429] Successfully activated service 'org.freedesktop>
Jan 29 15:26:59 MYMACHINENAME systemd[408]: Started xdg-desktop-portal.service - Portal service.
Jan 29 15:26:59 MYMACHINENAME dbus-daemon[142]: [system] Activating via systemd: service name='org.freedesktop.fwupd' unit>
Jan 29 15:26:59 MYMACHINENAME systemd[1]: fwupd.service - Firmware update daemon was skipped because of an unmet condition>
Jan 29 15:27:03 MYMACHINENAME gnome-initial-setup[1620]: libEGL warning: DRI2: failed to authenticate
Jan 29 15:27:03 MYMACHINENAME gnome-initial-setup[1620]: libEGL warning: failed to open /dev/dri/renderD128: Permission de>
Jan 29 15:27:03 MYMACHINENAME gnome-initial-setup[1620]: libEGL warning: failed to open /dev/dri/card0: Permission denied
Jan 29 15:27:03 MYMACHINENAME gnome-initial-setup[1620]: free(): invalid pointer
Jan 29 15:27:03 MYMACHINENAME kernel: potentially unexpected fatal signal 6.
Jan 29 15:27:03 MYMACHINENAME kernel: CPU: 9 PID: 1825 Comm: gnome-initial-s Not tainted 5.15.133.1-microsoft-standard-WSL>
Jan 29 15:27:03 MYMACHINENAME kernel: RIP: 0033:0x7f9cea54fccc
Jan 29 15:27:03 MYMACHINENAME kernel: Code: ff ff 0f 46 ea eb 89 0f 1f 80 00 00 00 00 b8 ba 00 00 00 0f 05 89 c3 e8 22 a6 >
Jan 29 15:27:03 MYMACHINENAME kernel: RSP: 002b:00007ffdd433c9e0 EFLAGS: 00000246 ORIG_RAX: 00000000000000ea
Jan 29 15:27:03 MYMACHINENAME kernel: RAX: 0000000000000000 RBX: 0000000000000654 RCX: 00007f9cea54fccc
Jan 29 15:27:03 MYMACHINENAME kernel: RDX: 0000000000000006 RSI: 0000000000000654 RDI: 0000000000000654
Jan 29 15:27:03 MYMACHINENAME kernel: RBP: 00007f9ce1af9380 R08: 00000000ffffffff R09: 0000000000000000
Jan 29 15:27:03 MYMACHINENAME kernel: R10: 0000000000000008 R11: 0000000000000246 R12: 0000000000000006
Jan 29 15:27:03 MYMACHINENAME kernel: R13: 00007f9c88b39000 R14: 0000000000000001 R15: 0000000000000001
Jan 29 15:27:03 MYMACHINENAME kernel: FS:  00007f9ce1af9380 GS:  0000000000000000
Jan 29 15:27:03 MYMACHINENAME systemd[408]: gnome-initial-setup-first-login.service: Main process exited, code=killed, sta>
Jan 29 15:27:03 MYMACHINENAME systemd[408]: gnome-initial-setup-first-login.service: Failed with result 'signal'.
blakeduffey commented 10 months ago

@Segment0895

I ran: sudo grep dxgk /var/log/*

I get this kind of results:

/var/log/dmesg:[ 1.379728] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg:[ 1.380414] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg:[ 1.381021] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg:[ 1.381633] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 /var/log/dmesg:[ 2.550324] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg:[ 2.555921] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg:[ 2.558532] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg:[ 2.561861] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 /var/log/dmesg:[ 5.944779] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg:[ 5.945326] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg:[ 5.946258] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg:[ 5.946837] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 /var/log/dmesg:[ 7.754035] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg:[ 7.755308] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg:[ 7.756819] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg:[ 7.757523] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 /var/log/dmesg:[ 123.362595] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg:[ 123.363616] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg:[ 123.364196] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg:[ 123.365089] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 /var/log/dmesg:[ 132.528848] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg:[ 132.529332] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg:[ 132.529721] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22

/var/log/kern.log:Jan 29 17:14:10 MACHINENAME kernel: [500584.569045] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/kern.log:Jan 29 17:14:10 MACHINENAME kernel: [500584.570518] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/kern.log:Jan 29 17:14:10 MACHINENAME kernel: [500584.571229] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/kern.log:Jan 29 17:14:10 MACHINENAME kernel: [500584.572001] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 /var/log/kern.log:Jan 29 17:14:10 MACHINENAME kernel: [500594.619799] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/kern.log:Jan 29 17:14:10 MACHINENAME kernel: [500594.620603] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/kern.log:Jan 29 17:14:10 MACHINENAME kernel: [500594.621279] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/kern.log:Jan 29 17:14:10 MACHINENAME kernel: [500594.621998] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 /var/log/kern.log:Jan 29 17:14:20 MACHINENAME kernel: [500605.336656] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/kern.log:Jan 29 17:14:20 MACHINENAME kernel: [500605.338243] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/kern.log:Jan 29 17:14:20 MACHINENAME kernel: [500605.338889] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/kern.log:Jan 29 17:14:20 MACHINENAME kernel: [500605.339711] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2

/var/log/syslog:Jan 29 17:14:10 MACHINENAME kernel: [500584.569045] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:14:10 MACHINENAME kernel: [500584.570518] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:14:10 MACHINENAME kernel: [500584.571229] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:14:10 MACHINENAME kernel: [500584.572001] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 /var/log/syslog:Jan 29 17:14:10 MACHINENAME kernel: [500594.619799] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:14:10 MACHINENAME kernel: [500594.620603] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:14:10 MACHINENAME kernel: [500594.621279] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:14:10 MACHINENAME kernel: [500594.621998] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 /var/log/syslog:Jan 29 17:14:20 MACHINENAME kernel: [500605.336656] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:14:20 MACHINENAME kernel: [500605.338243] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:14:20 MACHINENAME kernel: [500605.338889] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:14:20 MACHINENAME kernel: [500605.339711] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 /var/log/syslog:Jan 29 17:19:49 MACHINENAME kernel: [500935.062571] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:19:49 MACHINENAME kernel: [500935.063168] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:19:49 MACHINENAME kernel: [500935.063602] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22

so yes

Segment0895 commented 10 months ago

@blakeduffey when possible, can you recheck if those errors appear on WSL 2.0.4?

blakeduffey commented 10 months ago

@Segment0895 - I will try that today and report back.

blakeduffey commented 10 months ago

So I uninstalled WSL 2.1.1, installed WSL 2.04

The Ubuntu instance is unchanged, I just left if.

When I try to connect to the instance now via RDP:

image

When I run sudo grep dxgk /var/log/*

I am continuing to see:

/var/log/dmesg.0:[ 1.379728] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg.0:[ 1.380414] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg.0:[ 1.381021] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg.0:[ 1.381633] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 /var/log/dmesg.0:[ 2.550324] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg.0:[ 2.555921] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg.0:[ 2.558532] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg.0:[ 2.561861] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 /var/log/dmesg.0:[ 5.944779] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg.0:[ 5.945326] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/dmesg.0:[ 5.946258] kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22

/var/log/kern.log:Jan 29 17:14:10 MACHINENAME kernel: [500584.569045] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/kern.log:Jan 29 17:14:10 MACHINENAME kernel: [500584.570518] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/kern.log:Jan 29 17:14:10 MACHINENAME kernel: [500584.571229] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/kern.log:Jan 29 17:14:10 MACHINENAME kernel: [500584.572001] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 /var/log/kern.log:Jan 29 17:14:10 MACHINENAME kernel: [500594.619799] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/kern.log:Jan 29 17:14:10 MACHINENAME kernel: [500594.620603] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/kern.log:Jan 29 17:14:10 MACHINENAME kernel: [500594.621279] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/kern.log:Jan 29 17:14:10 MACHINENAME kernel: [500594.621998] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 /var/log/kern.log:Jan 29 17:14:20 MACHINENAME kernel: [500605.336656] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/kern.log:Jan 29 17:14:20 MACHINENAME kernel: [500605.338243] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/kern.log:Jan 29 17:14:20 MACHINENAME kernel: [500605.338889] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/kern.log:Jan 29 17:14:20 MACHINENAME kernel: [500605.339711] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 /var/log/kern.log:Jan 29 17:19:49 MACHINENAME kernel: [500935.062571] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/kern.log:Jan 29 17:19:49 MACHINENAME kernel: [500935.063168] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22

/var/log/syslog:Jan 29 17:14:10 MACHINENAME kernel: [500584.569045] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:14:10 MACHINENAME kernel: [500584.570518] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:14:10 MACHINENAME kernel: [500584.571229] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:14:10 MACHINENAME kernel: [500584.572001] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 /var/log/syslog:Jan 29 17:14:10 MACHINENAME kernel: [500594.619799] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:14:10 MACHINENAME kernel: [500594.620603] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:14:10 MACHINENAME kernel: [500594.621279] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:14:10 MACHINENAME kernel: [500594.621998] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 /var/log/syslog:Jan 29 17:14:20 MACHINENAME kernel: [500605.336656] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:14:20 MACHINENAME kernel: [500605.338243] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:14:20 MACHINENAME kernel: [500605.338889] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:14:20 MACHINENAME kernel: [500605.339711] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2 /var/log/syslog:Jan 29 17:19:49 MACHINENAME kernel: [500935.062571] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:19:49 MACHINENAME kernel: [500935.063168] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:19:49 MACHINENAME kernel: [500935.063602] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22 /var/log/syslog:Jan 29 17:19:49 MACHINENAME kernel: [500935.064152] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2

(the above are just snippets)

Segment0895 commented 10 months ago

Recheck your screenshot, was the one posted the one you wanted to post?

Thanks

blakeduffey commented 10 months ago

@Segment0895 - it was not :)

I thought I fixed it before anyone saw it. I've replaced.

Segment0895 commented 10 months ago

Ok, one theory down.

I'm out of ideas for now.

Thanks for your feedback! Maybe someone else can pick it up from here.

blakeduffey commented 10 months ago

Ok, one theory down. I'm out of ideas for now. Thanks for your feedback! Maybe someone else can pick it up from here.

@Segment0895 - I neglected to look at the dates. Those log entries look to be from a couple days ago (and may not be relevant to the testing re: 2.0.4) - let me verify. Please come back ! :)

blakeduffey commented 10 months ago

@Segment0895 -

So I tested again (wsl --shutdown and restart)

Connecting to RDP I do see:

/var/log/kern.log:Jan 31 14:58:37 MACHINENAME kernel: [ 0.325213] hv_vmbus: registering driver dxgkrnl /var/log/kern.log:Jan 31 14:58:37 MACHINENAME kernel: [ 1.644580] misc dxg: dxgk: dxgkio_query_statistics: Ioctl failed: -22 /var/log/kern.log:Jan 31 14:58:37 MACHINENAME kernel: [ 3.254461] misc dxg: dxgk: dxgkio_query_statistics: Ioctl failed: -22 /var/log/kern.log:Jan 31 14:59:00 MACHINENAME kernel: [ 37.413300] misc dxg: dxgk: dxgkio_query_statistics: Ioctl failed: -22 /var/log/kern.log:Jan 31 14:59:00 MACHINENAME kernel: [ 37.858868] misc dxg: dxgk: dxgkio_query_statistics: Ioctl failed: -22 /var/log/kern.log:Jan 31 14:59:00 MACHINENAME kernel: [ 37.955305] misc dxg: dxgk: dxgkio_query_statistics: Ioctl failed: -22 /var/log/kern.log:Jan 31 14:59:00 MACHINENAME kernel: [ 38.066750] misc dxg: dxgk: dxgkio_query_statistics: Ioctl failed: -22 /var/log/kern.log:Jan 31 14:59:01 MACHINENAME kernel: [ 38.303145] misc dxg: dxgk: dxgkio_query_statistics: Ioctl failed: -22 /var/log/kern.log:Jan 31 14:59:02 MACHINENAME kernel: [ 39.926727] misc dxg: dxgk: dxgkio_query_statistics: Ioctl failed: -22 /var/log/kern.log:Jan 31 14:59:03 MACHINENAME kernel: [ 40.751973] misc dxg: dxgk: dxgkio_query_statistics: Ioctl failed: -22

/var/log/syslog:Jan 31 14:58:37 MACHINENAME kernel: [ 0.325213] hv_vmbus: registering driver dxgkrnl /var/log/syslog:Jan 31 14:58:37 MACHINENAME kernel: [ 1.644580] misc dxg: dxgk: dxgkio_query_statistics: Ioctl failed: -22 /var/log/syslog:Jan 31 14:58:37 MACHINENAME kernel: [ 3.254461] misc dxg: dxgk: dxgkio_query_statistics: Ioctl failed: -22 /var/log/syslog:Jan 31 14:59:00 MACHINENAME kernel: [ 37.413300] misc dxg: dxgk: dxgkio_query_statistics: Ioctl failed: -22 /var/log/syslog:Jan 31 14:59:00 MACHINENAME kernel: [ 37.858868] misc dxg: dxgk: dxgkio_query_statistics: Ioctl failed: -22 /var/log/syslog:Jan 31 14:59:00 MACHINENAME kernel: [ 37.955305] misc dxg: dxgk: dxgkio_query_statistics: Ioctl failed: -22 /var/log/syslog:Jan 31 14:59:00 MACHINENAME kernel: [ 38.066750] misc dxg: dxgk: dxgkio_query_statistics: Ioctl failed: -22 /var/log/syslog:Jan 31 14:59:01 MACHINENAME kernel: [ 38.303145] misc dxg: dxgk: dxgkio_query_statistics: Ioctl failed: -22 /var/log/syslog:Jan 31 14:59:02 MACHINENAME kernel: [ 39.926727] misc dxg: dxgk: dxgkio_query_statistics: Ioctl failed: -22 /var/log/syslog:Jan 31 14:59:03 MACHINENAME kernel: [ 40.751973] misc dxg: dxgk: dxgkio_query_statistics: Ioctl failed: -22

So I think these logs appear whether the problem exists or not

Segment0895 commented 8 months ago

Confirm it also happens with XFCE. On XFCE it just happens when opening an app such as the terminal.

Apr 03 10:23:36 MYMACHINENAME kernel: potentially unexpected fatal signal 6.
Apr 03 10:23:36 MYMACHINENAME kernel: CPU: 9 PID: 6881 Comm: x-terminal-emul Not tainted 5.15.146.1-microsoft-standard-WSL>
Apr 03 10:23:36 MYMACHINENAME kernel: RIP: 0033:0x7f3891a6ae2c
Apr 03 10:23:36 MYMACHINENAME kernel: Code: ff ff 0f 46 ea eb 89 0f 1f 80 00 00 00 00 b8 ba 00 00 00 0f 05 89 c3 e8 02 a6 >
Apr 03 10:23:36 MYMACHINENAME kernel: x-terminal-emul[6875]: segfault at 10 ip 00005561bcc4d87c sp 00007ffdfee57ac0 error 4
Apr 03 10:23:36 MYMACHINENAME kernel: RSP: 002b:00007f387a3ecf20 EFLAGS: 00000246 ORIG_RAX: 00000000000000ea
Apr 03 10:23:36 MYMACHINENAME kernel: RAX: 0000000000000000 RBX: 00000000000019e7 RCX: 00007f3891a6ae2c
Apr 03 10:23:36 MYMACHINENAME kernel: RDX: 0000000000000006 RSI: 00000000000019e7 RDI: 00000000000019e1
Apr 03 10:23:36 MYMACHINENAME kernel: RBP: 00007f387a3ee6c0 R08: 0000000000000000 R09: 00007f387a3eca30
Apr 03 10:23:36 MYMACHINENAME kernel: R10: 0000000000000008 R11: 0000000000000246 R12: 0000000000000006
Apr 03 10:23:36 MYMACHINENAME kernel: R13: 0000000000000004 R14: 0000000000000004 R15: 00007f3891be0200
Apr 03 10:23:36 MYMACHINENAME kernel:  in zutty[5561bcc33000+33000]
Apr 03 10:23:36 MYMACHINENAME kernel: FS:  00007f387a3ee6c0 GS:  0000000000000000

ADDED: I downgraded to 2.0.4.0 and still can't run KDE.

Versão do WSL: 2.0.4.0
Versão do kernel: 5.15.123.1-1
Versão do WSLg: 1.0.58
Versão do MSRDC: 1.2.4485
Versão do Direct3D: 1.608.2-61064218
Versão do DXCore: 10.0.25880.1000-230602-1350.main
Versão do Windows: 10.0.22621.3296
Apr 03 11:11:38 MYMACHINENAME kernel: potentially unexpected fatal signal 11.
Apr 03 11:11:38 MYMACHINENAME kernel: CPU: 4 PID: 6056 Comm: plasmashell Not tainted 5.15.123.1-microsoft-standard-WSL2 #1
Apr 03 11:11:38 MYMACHINENAME kernel: RIP: 0033:0x7f0daf155e2c
Apr 03 11:11:38 MYMACHINENAME kernel: Code: ff ff 0f 46 ea eb 89 0f 1f 80 00 00 00 00 b8 ba 00 00 00 0f 05 89 c3 e8 02 a6 04 00 44 89 e2 89 de 89 c7 b8 ea 00 00 00 0f 05 <89> c5 f7 dd 3d 00 f0 ff ff b8 00 00 00 00 0f 47 c5 e9 7a ff ff ff
Apr 03 11:11:38 MYMACHINENAME kernel: RSP: 002b:00007ffc73e474b0 EFLAGS: 00000246 ORIG_RAX: 00000000000000ea
Apr 03 11:11:38 MYMACHINENAME kernel: RAX: 0000000000000000 RBX: 00000000000016d7 RCX: 00007f0daf155e2c
Apr 03 11:11:38 MYMACHINENAME kernel: RDX: 000000000000000b RSI: 00000000000016d7 RDI: 00000000000016d7
Apr 03 11:11:38 MYMACHINENAME kernel: RBP: 00007f0db172e120 R08: 00007ffc73e473a0 R09: 0000000000000073
Apr 03 11:11:38 MYMACHINENAME kernel: R10: 0000000000000008 R11: 0000000000000246 R12: 000000000000000b
Apr 03 11:11:38 MYMACHINENAME kernel: R13: 00007ffc73e47520 R14: 0000000000000001 R15: 00007f0daf29e840
Apr 03 11:11:38 MYMACHINENAME kernel: FS:  00007f0daa8af540 GS:  0000000000000000
blakeduffey commented 7 months ago

Just so this thread doesn't completely fade into oblivion

This issue persists on wsl version 2.2.2.0

Versions of WSL up to 2.0.4 - I was able to install a desktop environment and connect via xrdp (I have documentation for Budgie, Cinnamon, MATE, Xfce, Enlightenment, GNOME, KDE, LXDE and LXQT). After 2.0.4 (and up to 2.2.2.0) - this no longer works.

Dnzldotexe commented 2 months ago

Encountered the same issue on xrdp with Ubuntu 22.04. I haven't tried myself, but, maybe updating the Ubuntu version to 24.04 could solve this? Saw someone from YouTube doing the exact steps as I am, and his xrdp worked.

wsl --version

WSL version: 2.2.4.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.61
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26091.1-240325-1447.ge-release
Windows version: 10.0.22631.4169