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

GUI not working with WSL2 + Ubuntu 24.10 #1303

Open
1 of 2 tasks
Grufoony opened this issue Jan 21, 2025 · 6 comments
Open
1 of 2 tasks

GUI not working with WSL2 + Ubuntu 24.10 #1303

Grufoony opened this issue Jan 21, 2025 · 6 comments

Comments

@Grufoony
Copy link

Grufoony commented Jan 21, 2025

Windows Version

Version 10.0.26100.2894

WSL Version

2.3.26.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

No response

Distro Version

Ubuntu 24.10

Other Software

No response

Repro Steps

After upgrading from Ubuntu 24.04 to Ubuntu 24.10, GUI stopped working.
In python as example I get:

Traceback (most recent call last):
  File "/home/grufoony/DynamicalSystemFramework/utils/get_osm_data.py", line 118, in <module>
    ox.plot_graph(GRAPH, show=False, close=True, save=True, filepath="./original.png")
  File "/home/grufoony/.local/lib/python3.12/site-packages/osmnx/plot.py", line 251, in plot_graph
    fig, ax = _get_fig_ax(ax=ax, figsize=figsize, bgcolor=bgcolor, polar=False)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/grufoony/.local/lib/python3.12/site-packages/osmnx/plot.py", line 1045, in _get_fig_ax
    fig, ax = plt.subplots(figsize=figsize, facecolor=bgcolor, frameon=False)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/grufoony/.local/lib/python3.12/site-packages/matplotlib/pyplot.py", line 1775, in subplots
    fig = figure(**fig_kw)
          ^^^^^^^^^^^^^^^^
  File "/home/grufoony/.local/lib/python3.12/site-packages/matplotlib/pyplot.py", line 1042, in figure
    manager = new_figure_manager(
              ^^^^^^^^^^^^^^^^^^^
  File "/home/grufoony/.local/lib/python3.12/site-packages/matplotlib/pyplot.py", line 552, in new_figure_manager
    return _get_backend_mod().new_figure_manager(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/grufoony/.local/lib/python3.12/site-packages/matplotlib/backend_bases.py", line 3501, in new_figure_manager
    return cls.new_figure_manager_given_figure(num, fig)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/grufoony/.local/lib/python3.12/site-packages/matplotlib/backend_bases.py", line 3506, in new_figure_manager_given_figure
    return cls.FigureCanvas.new_manager(figure, num)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/grufoony/.local/lib/python3.12/site-packages/matplotlib/backend_bases.py", line 1783, in new_manager
    return cls.manager_class.create_with_canvas(cls, figure, num)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/grufoony/.local/lib/python3.12/site-packages/matplotlib/backends/_backend_tk.py", line 507, in create_with_canvas
    window = tk.Tk(className="matplotlib")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/tkinter/__init__.py", line 2349, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: couldn't connect to display ":0"

Expected Behavior

Correctly opening the figure

Actual Behavior

Error

Diagnostic Logs

WslLogs-2025-01-21_12-45-09.zip

Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

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!

Closed similar issues:

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

@Grufoony
Copy link
Author

Grufoony commented Jan 21, 2025

EDIT: restarting the machine (not the WSL but the entire machine) I get the command xeyes working one time only. From the second exectution the error appears again

grufoony@Grufoony:~$ xeyes
grufoony@Grufoony:~$ xeyes
Error: Can't open display: :0
grufoony@Grufoony:~$

EDIT2: it seems to work more than one time (also restarting wsl) but for a limited amount time... it seems pretty random at the moment

Copy link

Diagnostic information
Issue was edited and new log file was found: https://github.com/user-attachments/files/18489928/WslLogs-2025-01-21_12-45-09.zip
Detected appx version: 2.3.26.0

@OneBlue
Copy link
Collaborator

OneBlue commented Jan 21, 2025

Thank you for reporting this @Grufoony. I wonder if there's an issue with X. Could you share the output of echo $DISPLAY when you see that error ?

@Grufoony
Copy link
Author

Here it is:

grufoony@Grufoony:~$ echo $DISPLAY
:0

@OneBlue
Copy link
Collaborator

OneBlue commented Jan 21, 2025

Ok thank you, this looks correct. Transferring to wslg to investigate further

@OneBlue OneBlue transferred this issue from microsoft/WSL Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants