wslg icon indicating copy to clipboard operation
wslg copied to clipboard

GUI apps not starting

Open timurkh-devstark opened this issue 4 years ago • 19 comments

Windows build number:

10.0.22000.0

Your Distribution version:

20.04

Your WSL versions:

version WSL: 0.68.4.0 kernel: 5.15.68.1 version WSLg: 1.0.44 version MSRDC: 1.2.3401 version Direct3D: 1.606.4 version DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22000.978

Steps to reproduce:

  1. Enable systemd
  2. Try to snap run gedit

WSL logs:

cat /mnt/wslg/pulseaudio.log

W: [pulseaudio] authkey.c: Failed to open cookie file '/home/wslg/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authentication key '/home/wslg/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to open cookie file '/home/wslg/.pulse-cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authentication key '/home/wslg/.pulse-cookie': No such file or directory
E: [pulseaudio] module-console-kit.c: GetSessionsForUnixUser() call failed: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ConsoleKit was not provided by any .service files
E: [pulseaudio] module.c: Failed to load module "module-console-kit" (argument: ""): initialization failed.
E: [rdp-sink] module-rdp-sink.c: RDP Sink - Trying to connect to /mnt/wslg/PulseAudioRDPSink
E: [rdp-sink] module-rdp-sink.c: Connected failed
E: [rdp-sink] module-rdp-sink.c: RDP Sink - Trying to connect to /mnt/wslg/PulseAudioRDPSink
E: [rdp-sink] module-rdp-sink.c: Connected failed

weston

[17:04:49.490] CreateWndow(): rdp_peer is not initalized
[17:04:49.490] CreateWndow(): rdp_peer is not initalized
[17:04:49.490] CreateWndow(): rdp_peer is not initalized
[17:04:49.490] CreateWndow(): rdp_peer is not initalized
[17:04:49.490] CreateWndow(): rdp_peer is not initalized
[17:04:49.490] CreateWndow(): rdp_peer is not initalized
[17:04:49.490] CreateWndow(): rdp_peer is not initalized
[17:04:49.490] CreateWndow(): rdp_peer is not initalized
[17:04:49.490] CreateWndow(): rdp_peer is not initalized
[17:04:49.490] CreateWndow(): rdp_peer is not initalized
[17:04:49.490] CreateWndow(): rdp_peer is not initalized
[17:04:49.534] app_list_monitor_thread: loadIconEvent is signalled. gedit
[17:04:49.534] app_list_monitor_thread: entry (nil), image (nil)
[17:04:49.534] set_window_icon(): rdp_peer is not initalized

stderr

<4>WSLGd: FontMonitor: monitoring thread started.
<4>WSLGd: FontMonitor: monitoring /mnt/wslg/distro/usr/share/fonts, and it is *not* added to X11 font path
<4>WSLGd: FontMonitor: monitoring /mnt/wslg/distro/usr/share/fonts/X11, and it is *not* added to X11 font path
<4>WSLGd: FontMonitor: monitoring /mnt/wslg/distro/usr/share/fonts/X11/Type1, and it is added to X11 font path
<4>WSLGd: FontMonitor: monitoring /mnt/wslg/distro/usr/share/fonts/X11/cyrillic, and it is added to X11 font path
<4>WSLGd: FontMonitor: monitoring /mnt/wslg/distro/usr/share/fonts/X11/encodings, and it is *not* added to X11 font path
<4>WSLGd: FontMonitor: monitoring /mnt/wslg/distro/usr/share/fonts/X11/encodings/large, and it is *not* added to X11 font path
<4>WSLGd: FontMonitor: monitoring /mnt/wslg/distro/usr/share/fonts/X11/misc, and it is added to X11 font path
<4>WSLGd: FontMonitor: monitoring /mnt/wslg/distro/usr/share/fonts/X11/util, and it is *not* added to X11 font path
<3>WSLGd: Exception: No such file or directory @../ProcessMonitor.cpp:72 (LaunchProcess)
<4>WSLGd: /mnt/c/Users/redde/AppData/Local/Microsoft/WindowsApps/MicrosoftCorporationII.WindowsSubsystemForLinux_8wekyb3d8bbwe/msrdc.exe exited with status 1.
<3>WSLGd: Exception: No such file or directory @../ProcessMonitor.cpp:72 (LaunchProcess)
<4>WSLGd: /mnt/c/Users/redde/AppData/Local/Microsoft/WindowsApps/MicrosoftCorporationII.WindowsSubsystemForLinux_8wekyb3d8bbwe/msrdc.exe exited with status 1.
<3>WSLGd: Exception: No such file or directory @../ProcessMonitor.cpp:72 (LaunchProcess)
<4>WSLGd: /mnt/c/Users/redde/AppData/Local/Microsoft/WindowsApps/MicrosoftCorporationII.WindowsSubsystemForLinux_8wekyb3d8bbwe/msrdc.exe exited with status 1.
dbus[1380]: Unknown username "systemd-oom" in message bus configuration file
<3>WSLGd: Exception: No such file or directory @../ProcessMonitor.cpp:72 (LaunchProcess)
dbus[1380]: Unknown username "pulse" in message bus configuration file

WSL dumps:

No response

Expected behavior:

No response

Actual behavior:

After enabling systemd I faced with the problem that I cant launch GUI apps. When I just enabled systemd, downloaded sublime-text, and its worked good, /snap/bin/subl lanunched sublime-text. But on next day I can't launch it, and as other apps like gedit, xcalc, xeyes, and other GUI apps.

gedit:

sudo snap run gedit
(gedit:8274): Gdk-WARNING **: 17:08:34.310: Settings portal not found: Failed to execute child process “dbus-launch” (No such file or directory)

(gedit:8274): Gdk-CRITICAL **: 17:08:34.335: gdk_seat_get_keyboard: assertion 'GDK_IS_SEAT (seat)' failed

sublime text: for command /snap/bin/subl no reaction but in syslog I see Oct 7 17:09:10 DESKTOP-ER4032A systemd[1]: Started snap.sublime-text.subl.41000325-78b8-4053-9611-ee587a681ff3.scope.

And as I understand there are always some problems with dbus.

timurkh-devstark avatar Oct 07 '22 14:10 timurkh-devstark

@timurkhakhalev, this issue should be fixed in WSL 0.68.2 or newer version, thanks for reporting the issue!

hideyukn88 avatar Oct 07 '22 17:10 hideyukn88

@timurkhakhalev, this issue should be fixed in WSL 0.68.2 or newer version, thanks for reporting the issue!

But im on 0.68.4

timurkh-devstark avatar Oct 07 '22 17:10 timurkh-devstark

@timurkhakhalev, sorry, I missed that, it looks like in your case msrdc.exe is failing to establish connection with WSL. Would you please share output from reg QUERY "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /S on Windows's command prompt? thanks!

<4>WSLGd: /mnt/c/Users/redde/AppData/Local/Microsoft/WindowsApps/MicrosoftCorporationII.WindowsSubsystemForLinux_8wekyb3d8bbwe/msrdc.exe exited with status 1.

hideyukn88 avatar Oct 07 '22 17:10 hideyukn88

@timurkhakhalev, sorry, I missed that, it looks like in your case msrdc.exe is failing to establish connection with WSL. Would you please share output from reg QUERY "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /S on Windows's command prompt? thanks!

<4>WSLGd: /mnt/c/Users/redde/AppData/Local/Microsoft/WindowsApps/MicrosoftCorporationII.WindowsSubsystemForLinux_8wekyb3d8bbwe/msrdc.exe exited with status 1.

PS C:\Users\redde> reg QUERY "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /S

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\Client
    fEnableUsbBlockDeviceBySetupClass    REG_DWORD    0x1
    fEnableUsbNoAckIsochWriteToDevice    REG_DWORD    0x50
    fEnableUsbSelectDeviceByInterface    REG_DWORD    0x1

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\Client\UsbBlockDeviceBySetupClasses
    1000    REG_SZ    {3376f4ce-ff8d-40a2-a80f-bb4359d1415c}

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\Client\UsbSelectDeviceByInterfaces
    1000    REG_SZ    {6bdd1fc6-810f-11d0-bec7-08002be2092f}

timurkh-devstark avatar Oct 07 '22 20:10 timurkh-devstark

@timurkhakhalev, thanks, there is known issue with group policy which refuse connection with WSLg, but your case is something different, and I will need more information to determine the cause, would you please report the issue using Feedback Hub app? please select category as below, and put the link to this GitHub page at "Explain in more detail (optional)" section, thanks!

image

hideyukn88 avatar Oct 07 '22 20:10 hideyukn88

@hideyukn88 hi! any updates?

timurkh-devstark avatar Oct 12 '22 08:10 timurkh-devstark

I have the same problem as you. this one help me a lot. https://stackoverflow.com/questions/43397162/show-matplotlib-plots-and-other-gui-in-ubuntu-wsl1-wsl2

Koonarm avatar Oct 12 '22 15:10 Koonarm

@timurkhakhalev, somehow the necessary data is not attached to the Feedback report at https://aka.ms/AAic05b, do you reproduce the issue when Feedback Hub asked? if not, please do below at repro.

  1. When Feedback Hub asked to reproduce the issue.
  2. shutdown WSL by wsl --shutdown (just in case it's already started).
  3. start wsl as you do normally.
  4. Complete the repro at Feedback Hub.

Thanks!

hideyukn88 avatar Oct 12 '22 15:10 hideyukn88

@hideyukn88 Okay I didn't know that I need to reboot wsl. Sent feedback again.

timurkh-devstark avatar Oct 12 '22 16:10 timurkh-devstark

@timurkhakhalev, thanks we got the new one, https://aka.ms/AAict0w, it often takes a few hours to attached data to show up in our side, once it's ready, I will take a look, thanks!

hideyukn88 avatar Oct 12 '22 17:10 hideyukn88

@timurkhakhalev, just update. Somehow, we didn't get the data again. Yesterday, I asked another user for different issue to file issue via Feedback Hub, and I am able to receive the data, so Feedback Hub should work, but I will ask internally what went wrong first, thanks!

hideyukn88 avatar Oct 14 '22 16:10 hideyukn88

@timurkhakhalev, just update. Somehow, we didn't get the data again. Yesterday, I asked another user for different issue to file issue via Feedback Hub, and I am able to receive the data, so Feedback Hub should work, but I will ask internally what went wrong first, thanks!

Sorry seems like I didn’t understood what does mean “reproduce issue when Feedback hub asked”. Its never asked. How to trigger it?

timurkh-devstark avatar Oct 14 '22 16:10 timurkh-devstark

@timurkhakhalev, at step 4 "Add more details", select "Recreate my problem" -> "Start recording", then you perform the step at https://github.com/microsoft/wslg/issues/851#issuecomment-1276387048, in this case, you don't need to enable "screenshots" option, thanks!

image

hideyukn88 avatar Oct 14 '22 17:10 hideyukn88

@timurkhakhalev, at step 4 "Add more details", select "Recreate my problem" -> "Start recording", then you perform the step at #851 (comment), in this case, you don't need to enable "screenshots" option, thanks!

image

I faced with a new issue. First of all it was turned off telemetry and sending any diagnostic data. So I turned it on, but unable to start a record. It says "Something went wrong. We couldn't start the recording. Please select Start recording to try again". I tried to reinstall Feedback Hub and reboot PC also but it not helped. And also there are no information about this in Google.

Should I turn on some params in regedit to start a record? image

timurkh-devstark avatar Oct 14 '22 20:10 timurkh-devstark

@timurkhakhalev, while we didn't get your data, but we were able to reproduce the issue similar as yours, and the fix will be available in WSLg 1.0.47, thanks!

hideyukn88 avatar Oct 26 '22 22:10 hideyukn88

@timurkhakhalev, while we didn't get your data, but we were able to reproduce the issue similar as yours, and the fix will be available in WSLg 1.0.47, thanks!

Should I install this https://github.com/microsoft/wslg/releases/tag/v1.0.47 ? And how to install from source?

timurkhakhalev avatar Oct 27 '22 09:10 timurkhakhalev

@timurkhakhalev, while we didn't get your data, but we were able to reproduce the issue similar as yours, and the fix will be available in WSLg 1.0.47, thanks!

Same question, how can I get it?

hushanjushi avatar Nov 06 '22 14:11 hushanjushi

@hideyukn88 Hi! Today got official update now I am at:

WSL version: 1.0.0.0
Kernel version: 5.15.74.2
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22000.1219

After update I tried to run xeyes - all good. Then I tried to run sublime-text installed by snapd. It said Interacting with snapd is not yet supported on Windows Subsystem for Linux. I updated sudo apt update && sudo apt -y upgrade and after this no xeyes no sublime-text not runned

timurkhakhalev avatar Nov 17 '22 21:11 timurkhakhalev

@timur-khakhalev, regarding to Interacting with snapd is not yet supported on Windows Subsystem for Linux, Canonical made update to Ubuntu, and now snap should work, please update your Ubuntu, and try again, thanks!

hideyukn88 avatar Dec 08 '22 01:12 hideyukn88