I'm on Windows 10 Pro 10.0.21337 (windows insider program) and installed WSL with Ubuntu 20.04. From within ubuntu I said
apt-get update apt-get upgrade apt-get install emacs dpkg -l emacs -> ||/ Name Version Architecture Description +++-==============-=================-============-================================= ii emacs 1:26.3+1-1ubuntu2 all GNU Emacs editor (metapackage)
after installing I could launch emacs from the ubuntu bash and from the windows start menu.
It worked fine for a while but suddenly it crashed (I was measuring the effective keyboard delay rate in emacs by keeping the space bar pressed for up to 5 s, when it crashed, so I'm sure I didn't invoke anything special)
Since then, when I start it via the start menu nothing happens. It doesn't appear in the windows task manager but
ps auxww lists a running process
/usr/bin/emacs with 0% CPU.
When I start it on cmd line and press Ctrl-C it prints an unreadable character and then
Display :0 unavailable, simulating -nw. (after the latest update it stopped printing that message).
I renamed my
.emacs.d, uninstalled and reinstalled it (including
apt autoremove), with no success.
Then I tried command line options:
emacs -Q makes no difference.
emacs --debug-init prints nothing.
emacs -nw works: it starts the text version, so only the gui version is broken.
I kept two emacs processes (one started from start menu, one from cmd line) running while putting the laptop through sleep + wakeup a couple of times. Once on waking up two emacs windows were visible! On the next wakeup they were invisible again.
ps still shows the two processes. This means that it's indeed a window manager problem like @jue assumed or, say, a process manager problem. I'll keep investigating.