microsoft / wslg

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

X applications interact poorly with returning from locked screen #1158

Open dmankins opened 10 months ago

dmankins commented 10 months ago

Windows Version

Microsoft Windows [Version 10.0.22621.2715]

WSL Version

2.0.9.0

Are you using WSL 1 or WSL 2?

Kernel Version

Linux version 5.15.133.1-microsoft-standard-WSL2 (root@1c602f52c2e4) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) microsoft/WSL#1 SMP Thu Oct 5 21:02:42 UTC 2023

Distro Version

Ubuntu 22.04

Other Software

xclock installed by whatever the shell suggests when you type 'xclock' at it ("sudo apt-get install x-"something, I think) Also, emacs, also installed with apt-get.

Repro Steps

I am using the (mostly wonderful) built-in X server in Windows+WSL. After 15 minutes or so my computer locks automatically, and often I use Windows-L to lock the computer.

To a command prompt, Linux shell, type "xclock &", "emacs &".

Lock the screen.

Unlock the screen.

I've seen three behaviors:

Screenshot 2023-11-30 115007

Expected Behavior

I'd like my X programs to survive a locked screen.

When they survive the locked screen, I'd like them to refresh and reappear automatically, just as though they'd gotten an expose-event or something similar.

Actual Behavior

See above. Locking the screen appears to shut down the X server, and sometimes leaves its internal window-manager confused.

Diagnostic Logs

No response

bmeier-pros commented 9 months ago

I've seen this repetitively with my intellij environments, but it doesn't always require a lock screen, I've seen it happen when the Windows desktop background changes as well.