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

Can't open display error when trying to launch apps #134

Closed
mickaelchanrion opened this issue Apr 30, 2021 · 8 comments
Closed

Can't open display error when trying to launch apps #134

mickaelchanrion opened this issue Apr 30, 2021 · 8 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@mickaelchanrion
Copy link

Environment

Windows build number: Microsoft Windows [Version 10.0.21370.1]
Your Distribution version: Ubuntu 20.04
Your WSLg version: 1.0.17.1

Steps to reproduce

  • wsl --update (on my existing ubuntu distro in wsl2)
  • install x11-apps and google-chrome
  • launch xcalc / xclock / xeyes : I get "Error: Can't open display: 127.0.0.1:0"
  • launch google-chrome: I get "[517:517:0430/101516.333068:ERROR:browser_main_loop.cc(1386)] Unable to open X display."

Thinking that there might be a misconfig in my distro, I tried to test wslg with a fresh ubuntu distro, but same result...

Please note: I followed this blog post 2 months ago to try to get google-chrome running
https://techcommunity.microsoft.com/t5/windows-dev-appconsult/running-wsl-gui-apps-on-windows-10/ba-p/1493242
I could launch basic apps like xcalc but couldn't launch google-chrome
Then I uninstalled VcXsrv.

WSL logs:

  • puseaudio.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.log
    File is quite big, please see the attached file.
    weston.log

  • 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

Launch the gui apps

Actual behavior

Gettings errors

@mickaelchanrion mickaelchanrion added the bug Something isn't working label Apr 30, 2021
@smallst
Copy link

smallst commented Apr 30, 2021

do you restart your wsl?

@mickaelchanrion
Copy link
Author

Yes, I even restarted the computer

@spronovo spronovo added the duplicate This issue or pull request already exists label Apr 30, 2021
@spronovo
Copy link
Collaborator

spronovo commented Apr 30, 2021

Thanks for your report. You are hitting a known issue in version 1.0.17 with monitor configuration (see #19)

weston: ../libweston/backend-rdp/rdpdisp.c:481: disp_monitor_validate_and_compute_layout: Assertion `isConnected_V == true' failed.

Good new is this is fixed in 1.0.19 that we just released moments ago. Open an elevated command prompt in Windows and type

wsl --shutdown
wsl --update

That should pick up 1.0.19 and your config should start working.

@mickaelchanrion
Copy link
Author

After the update, I still have the same issue :/

@lateau
Copy link

lateau commented May 3, 2021

@mickaelchanrion Which kernel version does it have now? I solved this issue by updating & force restarting WSL as he described.

Reproduce:

  1. Run Powershell as Administrator
  2. Execute wsl --shutdown and wsl --update
  3. Launch Ubuntu
C:\Users\***> wsl --status
Default Distribution: Ubuntu
Default Version: 2

Windows Subsystem for Linux was last updated on 5/4/2021
The Windows Subsystem for Linux kernel can be manually updated with 'wsl --update', but automatic updates cannot occur due to your system settings.
To receive automatic kernel updates, please enable the Windows Update setting: 'Receive updates for other Microsoft products when you update Windows'.
For more information please visit https://aka.ms/wsl2kernel.

Kernel version: 5.10.16

@mickaelchanrion
Copy link
Author

Yes I did that, and I have the same version as you. But still not working for me

@sukehiro-San
Copy link

Screenshot 2021-05-27 100451

windows build 21370
wsl 2

@spronovo
Copy link
Collaborator

@sukehiro-San could you take a peek at the following wiki to see where things are failing for you:

https://github.com/microsoft/wslg/wiki/Diagnosing-%22cannot-open-display%22-type-issues-with-WSLg

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

5 participants