m-labs / artiq

A leading-edge control system for quantum information experiments
https://m-labs.hk/artiq
GNU Lesser General Public License v3.0
426 stars 196 forks source link

Cannot move Applets GUI Window in WSL2 #2144

Closed andrewvh4 closed 7 months ago

andrewvh4 commented 1 year ago

Bug Report

One-Line Summary

Cannot move Applets GUI Window in WSL2

Issue Details

WSL2 now natively supports GUI Apps: https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps However, applets cannot be moved or re-sized. They remain in the top-left corner.

image

Steps to Reproduce

  1. Create an Ubuntu distribution in WSL2: https://learn.microsoft.com/en-us/windows/wsl/install
  2. Install Artiq using Nix with the same procedure as an Ubuntu machine
  3. Launch the artiq_session and run an experiment that generates an applet.

Expected Behavior

We should be able to move and re-size the applet as is possible in native Linux systems.

Actual (undesired) Behavior

The applet is stuck in the top left corner of the screen and cannot be moved or re-sized: The following message appears when launching an applet: print:qt.qpa.xcb: internal error: void QXcbWindow::setNetWmStateOnUnmappedWindow() called on mapped window

image

Your System (omit irrelevant parts)

charlesbaynham commented 1 year ago

+1 - this also happens on Windows 11 which introduced extra support for WSL GUIs.

charlesbaynham commented 1 year ago

FWIW I think the setNetWmStateOnUnmappedWindow error is a red herring. We also get that from our Ubuntu systems which don't have this problem.

thomasfire commented 1 year ago

Does this persist on ARTIQ-7 and ARTIQ-8 (beta)? The ARTIQ-6 is unlikely to be fixed anyway

andrewvh4 commented 1 year ago

@thomasfire I just tested this with Artiq-7 and saw the same behavior. I don't have a system set up with Artiq-8

ARTIQ dashboard 7.8179.928ca50

sbourdeauducq commented 1 year ago

@thomasfire Please study the situation before making random guesses. It's the same code on all versions so:

  1. of course the bug is still present, and
  2. if there is a fix there is no reason not to apply it to the 6 branch.
andrewvh4 commented 1 year ago

Are there any updates on this issue? Figuring this out would be very helpful for allowing remote operation across different platforms.

sbourdeauducq commented 1 year ago

Can you use one of the supported installation methods? They already give us more than enough work to be honest.

andrewvh4 commented 10 months ago

At the time of writing, I was having issues with conda-forge failing due to an invalid OpenSSL certificate. I re-tested this week, and that seems to have resolved and I am able to use the Conda installation method.

In the future, I do think WSL support would be valuable. But I know that takes more resources to achieve.

sbourdeauducq commented 7 months ago

It seems nobody is working on WSL support nor has plans for it. Closing.

charlesbaynham commented 7 months ago

I'd be happy to work on this at some point in the future, though I can't guarantee when I'll find time.

If WSL can be fully supported then I think your support workload might reduce since Nix could then be the only installation method required. This issue is the only blocker for that AFAIK. I don't know how well WSL interfaces with USB devices however, we only use WSL for artiq_client connections.

andrewvh4 commented 7 months ago

You are correct that WSL has issues with USB devices. However, that's not a huge issue since it's pretty straightforward to set up a Raspberry Pi for remote flashing/logging.

sbourdeauducq commented 7 months ago

It's also pretty straightforward to install Linux or BSD on your PC.

charlesbaynham commented 7 months ago

It's also pretty straightforward to install Linux or BSD on your PC.

It's not quite so easy to convince all your collaborators and their diverse IT departments to do so!

evilmav commented 3 months ago

Possibly related: https://github.com/microsoft/wslg/issues/1153