Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSLg RDP connection crashes with specific display setups #124

Closed
icedream opened this issue Apr 28, 2021 · 1 comment
Closed

WSLg RDP connection crashes with specific display setups #124

icedream opened this issue Apr 28, 2021 · 1 comment
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@icedream
Copy link

icedream commented Apr 28, 2021

Environment

Windows build number: 10.0.21364.1000
Your Distribution version: Arch Linux (rolling)
Your WSLg version: 1.0.17.1

Steps to reproduce

  1. Set up the display layout such that at least one screen is positioned above or below all other screens. (as seen in the first third of the video I added at the bottom of this issue description)
  2. Start WSL and observe the mstsc.exe process restarting in an endless loop.

WSL logs:

Relevant part from weston.log:

Date: 2021-04-28 CEST
[22:51:41.405] weston 9.0.0
               https://wayland.freedesktop.org
               Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
               Build: 9.0.0-256-gfd961f5c
[22:51:41.406] Command line: /usr/bin/weston --backend=rdp-backend.so --xwayland --shell=rdprail-shell.so --logger-scopes=log,rdp-backend,rdprail-shell --log=/mnt/wslg/weston.log
[22:51:41.406] OS: Linux, 5.10.16.3-microsoft-standard-WSL2, #1 SMP Fri Apr 2 22:23:49 UTC 2021, x86_64
[22:51:41.406] Using config file '/home/wslg/.config/weston.ini'
[22:51:41.406] Output repaint window is 7 ms maximum.
[22:51:41.406] Loading module '/usr/lib/libweston-9/rdp-backend.so'
[22:51:41.410] using FreeRDP version 2.2.0
[22:51:41.410] RDP backend: WESTON_RDP_DEBUG_LEVEL: 3.
[22:51:41.410] RDP backend: Environment dump - start
[22:51:41.410]   WSL_DISTRO_NAME=
[22:51:41.410]   WSL2_SHARED_MEMORY_OB_DIRECTORY=WSL\149BCA93-34DE-4C6E-912B-5D060164032C\wslg
[22:51:41.410]   PWD=/
[22:51:41.410]   NAME=Icedream-HomePC
[22:51:41.410]   WSL_FEATURE_FLAGS=7
[22:51:41.410]   SHLVL=1
[22:51:41.410]   WSL2_GUI_APPS_ENABLED=1
[22:51:41.410]   WSL2_DISTRO_NAME=Arch
[22:51:41.410]   WSL2_VM_ID=149BCA93-34DE-4C6E-912B-5D060164032C
[22:51:41.410]   _=/usr/bin/WSLGd
[22:51:41.410]   HOME=/home/wslg
[22:51:41.410]   USER=wslg
[22:51:41.410]   LOGNAME=wslg
[22:51:41.410]   SHELL=/bin/bash
[22:51:41.410]   PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
[22:51:41.410]   XDG_RUNTIME_DIR=/mnt/wslg/runtime-dir
[22:51:41.410]   WAYLAND_DISPLAY=wayland-0
[22:51:41.410]   DISPLAY=:0
[22:51:41.410]   XCURSOR_PATH=/usr/share/icons
[22:51:41.410]   XCURSOR_THEME=whiteglass
[22:51:41.410]   XCURSOR_SIZE=16
[22:51:41.411]   PULSE_AUDIO_RDP_SINK=/mnt/wslg/PulseAudioRDPSink
[22:51:41.411]   PULSE_AUDIO_RDP_SOURCE=/mnt/wslg/PulseAudioRDPSource
[22:51:41.411]   USE_VSOCK=3
[22:51:41.411]   WSL2_DEFAULT_APP_ICON=/usr/share/icons/wsl/linux.png
[22:51:41.411]   WSL2_DEFAULT_APP_OVERLAY_ICON=/usr/share/icons/wsl/linux.png
[22:51:41.411]   WESTON_DISABLE_ABSTRACT_FD=1
[22:51:41.411]   WSL2_SHARED_MEMORY_MOUNT_POINT=/mnt/shared_memory
[22:51:41.411]   WESTON_CONFIG_FILE=/home/wslg/.config/weston.ini
[22:51:41.411] RDP backend: Environment dump - end
[22:51:41.411] Using external fd for incoming connections: 3
[22:51:41.411] Default head is being added
[22:51:41.411] Registered plugin API 'weston_rdprail_api_v1' of size 48
[22:51:41.415] RDP backend: use_gfxredir = 1
[22:51:41.415] RDP backend: enable_hi_dpi_support = 1
[22:51:41.415] RDP backend: enable_fractional_hi_dpi_support = 0
[22:51:41.415] RDP backend: debug_desktop_scaling_factor = 0
[22:51:41.415] RDP backend: enable_distro_name_title = 1
[22:51:41.415] RDP backend: enable_copy_warning_title = 0
[22:51:41.415] Using VSOCK for incoming connections: 3
[22:51:41.415] Registered plugin API 'weston_rdp_output_api_v1' of size 16
[22:51:41.415] Head attaching: rdp-0, index:0, is_primary: 1
[22:51:41.415] get_config: attached head [0]: make:(null), mode:(null), name:rdp-0, (0x562afc74d250)
[22:51:41.415] get_config: attached head [0]: x:0, y:0, width:0, height:0
[22:51:41.416] set_size: attached head [0]: make:weston, mode:rdp, name:rdp-0, (0x562afc74d250)
[22:51:41.416] set_size: attached head [0]: x:0, y:0, width:0, height:0
[22:51:41.416] Output 'rdp-0' enabled with head(s) rdp-0
[22:51:41.416] Compositor capabilities:
               arbitrary surface rotation: yes
               screen capture uses y-flip: no
               presentation clock: CLOCK_MONOTONIC_RAW, id 4
               presentation clock resolution: 0.000000001 s
[22:51:41.416] Loading module '/usr/lib/weston/rdprail-shell.so'
[22:51:41.416] RDPRAIL-shell: WESTON_RDPRAIL_SHELL_DEBUG_LEVEL: 3.
[22:51:41.417] wet_shell_init: distro name Arch (4)
[22:51:41.418] rdp_rail_shell_initialize_notify: shell: distro name: Arch
[22:51:41.419] Loading module '/usr/lib/libweston-9/xwayland.so'
[22:51:41.419] app_list_monitor_thread: running in system-distro with user-distro: Arch
[22:51:41.419] app_list_monitor_thread: open(/proc/self/ns/mnt)
[22:51:41.419] app_list_monitor_thread: open(/proc/2/ns/mnt)
[20:51:41.419] app_list_monitor_thread: inotify_add_watch(/usr/share/applications)
[20:51:41.420] app_list_monitor_thread: /usr/local/share/applications doesn't exist, skipping.
[20:51:41.420] app list folder[0]: /usr/share/applications
[22:51:41.420] desktop file: /usr/share/applications/bvnc.desktop
[... available GUI applications getting listed here ...]
[20:51:41.426] app list folder[1]: /usr/local/share/applications
[22:51:42.120] xf_peer_adjust_monitor_layout:
[22:51:42.120]   DesktopWidth:1920, DesktopHeight:1080
[22:51:42.120]   UseMultimon:0
[22:51:42.120]   ForceMultimon:0
[22:51:42.120]   MonitorCount:3
[22:51:42.120]   HasMonitorAttributes:1
[22:51:42.120]   HiDefRemoteApp:1
[22:51:42.120] disp_monitor_validate_and_compute_layout:---INPUT---
[22:51:42.120]  rdpMonitor[0]: x:0, y:0, width:1920, height:1080, is_primary:1
[22:51:42.120]  rdpMonitor[0]: physicalWidth:531, physicalHeight:299, orientation:0
[22:51:42.120]  rdpMonitor[0]: desktopScaleFactor:100, deviceScaleFactor:100
[22:51:42.120]  rdpMonitor[0]: scale:1, client scale :1.00
[22:51:42.120]  rdpMonitor[1]: x:1277, y:-1440, width:2560, height:1440, is_primary:0
[22:51:42.120]  rdpMonitor[1]: physicalWidth:708, physicalHeight:399, orientation:0
[22:51:42.120]  rdpMonitor[1]: desktopScaleFactor:100, deviceScaleFactor:100
[22:51:42.120]  rdpMonitor[1]: scale:1, client scale :1.00
[22:51:42.120]  rdpMonitor[2]: x:1920, y:0, width:1920, height:1080, is_primary:0
[22:51:42.120]  rdpMonitor[2]: physicalWidth:531, physicalHeight:299, orientation:0
[22:51:42.120]  rdpMonitor[2]: desktopScaleFactor:100, deviceScaleFactor:100
[22:51:42.120]  rdpMonitor[2]: scale:1, client scale :1.00
[22:51:42.120] Client desktop upper left coordinate (0,-1440)
[22:51:42.120]  RDP client reported monitors not horizontally connected each other at 1 (x check)
[22:51:42.120]  RDP client reported monitors not vertically connected each other at 2 (y check)
weston: ../libweston/backend-rdp/rdpdisp.c:481: disp_monitor_validate_and_compute_layout: Assertion `isConnected_V == true' failed.

This log is repeated similarly many, many times.

Contents of versions.txt:

WSLg ( x86_64 ): 1.0.17+3.Branch.master.Sha.a526dfd5ad03d126bb2d8c528f6c3563e86a40da
Mariner: VERSION="1.0.20210224"
FreeRDP: e4a2fc2053bd8c5f99455fcd08ffee7e5591567a
weston: fd961f5cd116c9358d82ce94d139c1578e21bd00
pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
mesa:

Expected behavior

mstsc.exe should not crash, GUI applications would then work.

Actual behavior

mstsc.exe restarts as long as the display layout has at least one screen positioned above or below all other displays, the process will restart endlessly (see first third of the video) until the display layout is changed so all screens are aligned by Y offset (second third of the video). Unaligning the screens will cause the previously healthy mstsc.exe to die again (last third of the video).

Video:

yfRyiuBAUN.mp4
@icedream icedream added the bug Something isn't working label Apr 28, 2021
@spronovo spronovo added the duplicate This issue or pull request already exists label Apr 28, 2021
@spronovo
Copy link
Collaborator

Thanks for your report. This is a known issue (see #19) and a fix is on the way and will be included in the next update for WSLg. For the time being to work around this you need to connect all of your monitor either vertically or horizontally, but not mix both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants