microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.43k stars 822 forks source link

Cannot lauch any gui app after update #12047

Open PietroValerio opened 1 month ago

PietroValerio commented 1 month ago

Windows Version

Microsoft Windows [Version 10.0.22631.4169]

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.153.1-2

Distro Version

Ubuntu 24.04

Other Software

xcb version 2.4-8build2 ros2 version jazzy xeyes version 1.3.0 xcalc version 1.1.2

Repro Steps

For xcb: -sudo apt install xcb

For ros2: For installation follow this:

locale  # check for UTF-8

sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8

locale  # verify settings
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null

sudo apt update && sudo apt upgrade sudo apt install ros-jazzy-desktop

For xcalc: -sudo apt install x11-apps

For xeyes: -sudo apt install x11-apps

Expected Behavior

The window should open and the program should be displayed as a linux window on windows

Actual Behavior

for xcb, xcalc, xeyes the output is: Error: Can't open display: :0

for ros2 the output is:

qt.qpa.xcb: could not connect to display :0
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

[ros2run]: Aborted

current workaround found(that doesn't survive reboot): sudo rm -rf /tmp/.X11-unix && ln -s /mnt/wslg/.X11-unix /tmp/

Diagnostic Logs

No response

github-actions[bot] commented 1 month ago

View similar issues

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!

Open similar issues:

Closed similar issues:

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

Diagnostic information
Multiple log files found, using: https://github.com/user-attachments/files/17041292/ros2log.zip
Detected appx version: 2.2.4.0

OneBlue commented 1 month ago

/logs

PietroValerio commented 1 month ago

the logs are already provided

OneBlue commented 1 month ago

We need logs provided by the collect-wsl-logs script.

/logs

OneBlue commented 1 month ago

Ok I see that those are already included, the zip files are just changed.

Is systemd enabled in your distribution ? Does disabling it solve the issue ?

PietroValerio commented 1 month ago

Ok I see that those are already included, the zip files are just changed.

Is systemd enabled in your distribution ? Does disabling it solve the issue ?

systemd is enabled, can you explain better on how i disable it?

OneBlue commented 1 month ago

You can disable systemd via /etc/wsl.conf

[boot]
systemd=false
PietroValerio commented 1 month ago

Disabling systemd solves the issue apparently