microsoft / wslg

Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
MIT License
10.06k stars 302 forks source link

gPlanarity in wslg doesn't react to input anymore #801

Closed AdmiralSnyder closed 1 year ago

AdmiralSnyder commented 2 years ago

Environment

Windows build number: 10.0.25174.1010
Your Distribution version: Ubuntu v. 
Your WSLg version: 1.0.27

Steps to reproduce

After i installed x11-apps and gPlanarity, i was able to play gPlanarity for a while. a couple days later, the gplanarity window started to repeatedly get stuck (as in don't react to mouse inputs anymore) sometimes when i started the game or the VM - usually killing the process or closing the window form the task bar icon and restarting the process afterwards was sufficient to get it back to a reacting state. THEN i made the mistake of maximizing the window - 2000x3000 on a surface book. since then, nothing i can do gets the window back into a reacting state.

other x11 apps like xclock and xcalc work fine, even when the gPlanarity window is open and hanging. using xwininfo on the hanging gPlanarity window works too, and yields

xwininfo: Window id: 0x390 (the root window) (has no name)

  Absolute upper-left X:  0
  Absolute upper-left Y:  0
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 3000
  Height: 2000
  Depth: 24
  Visual: 0x23
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x22 (installed)
  Bit Gravity State: ForgetGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +0+0  -0+0  -0-0  +0-0
  -geometry 3000x2000+0+0

which doesn't appear do be weird. i would like to try to resize the window using the console, but wmctrl -l yields

Cannot get client list properties.
(_NET_CLIENT_LIST or _WIN_CLIENT_LIST)

so i'm afraid i might be quite out of luck getting that game back to working and not losing my progress :-P

any help is appreciated, thanks.

WSL logs:

You can access the wslg logs using explorer at: \\wsl$\<Distro-Name>\mnt\wslg (e.g.: \\wsl$\Ubuntu-20.04\mnt\wslg)

Expected behavior

mouse input should work i.e. i should be able to move the nodes.

Actual behavior

nothing i do changes anything.

hideyukn88 commented 2 years ago

@AdmiralSnyder, thanks for reporting the issue, I have tried it on below version of WSLg and it's working fine. I am able to interact with application and going maximize then restore original window size by double clicking title bar. If you are on WSLg 1.0.27, it's very old version, please update from aka.ms/wslstorepage, and try again, thanks!

>> Your WSLg version: 1.0.27

My WSLg versions:

C:\>wsl --version
WSL version: 0.65.3.0
Kernel version: 5.15.57.1
WSLg version: 1.0.41
MSRDC version: 1.2.3213
Direct3D version: 1.601.0
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22622.575
AdmiralSnyder commented 2 years ago

hi @hideyukn88 that link gets me to the store page for wsl preview where it only says "open" - it appears to be recent - i was confused about the version number, too... is the forwarding broken, maybe? or is it a problem with the new store in the windows 11 insider builds?

thanks

hideyukn88 commented 2 years ago

Hi @AdmiralSnyder, I should have noticed the version.txt you provided, and that shows you are on the latest version of WSL. I have played around with this app with 4K monitor, but max/restore isn't the problem and I haven't encountered any app hang. How about disabling GPU acceleration? Please try LIBGL_ALWAYS_SOFTWARE=1, thanks!

AdmiralSnyder commented 2 years ago

Hi, setting LIBGL_ALWAYS_SOFTWARE to 1 doesn't change the behaviour. I'm on level 103 in gplanarity, and i think the odd behaviour didn't start until i was in the 60+ range of levels... sadly, i don't know where the level state is persisted (gonna have a look at the source code later) nor where linux saves the last known window size (or if that's saved in the app config somewhere...) this all is very strange indeed. the fact that xwininfo does work to me sounds like it's a software problem in gplanarity rather than a wsl issue... i'm thinking whether installing an entire gui desktop environment like gnome and instead of having the rdp work on the apps window, have it work on the entire desktop... would that make a difference? thanks so far :-)

hideyukn88 commented 2 years ago

@AdmiralSnyder, it looks level state is saved at ~/.gPlanarity/levelstate. And I am able to reproduce the issue you are seeing by simply maximizing the window, then close application by upper right "x", then launch again, then application is frozen. I will take a look, thanks!

AdmiralSnyder commented 2 years ago

Yeah, when i delete the last line in levelstate, after it having broken, at least the game is back in a playable state… next time i start it.

Gesendet von meinem Windows 10-Gerät.

Von: Hideyuki Nagase Gesendet: Mittwoch, 10. August 2022 04:54 An: microsoft/wslg Cc: Alexander Gayko; Mention Betreff: Re: [microsoft/wslg] gPlanarity in wslg doesn't react to inputanymore (Issue #801)

@AdmiralSnyder, it looks level state is saved at ~/.gPlanarity/levelstate. And I am able to reproduce the issue you are seeing by simply maximizing the window, then close application by upper right "x", then launch again, then application is frozen. I will take a look, thanks! — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

hideyukn88 commented 1 year ago

Hi all, WSL 0.70.0 is just released, and this should address the issue, please update it by wsl --update, and if the problem still persists, please let us know by reopening this issue, thanks!