Skip to content

Glitches in GUI applications #1148

@azegas

Description

@azegas

Windows build number:

10.0.22631.0

Your Distribution version:

22.04

Your WSL versions:

WSL version: 2.0.9.0
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22631.2715

Steps to reproduce:

  1. activate wsl on windows
  2. install ubuntu distro either from MS store or from terminal by wsl --install or wsl --install ubuntu
  3. update ubuntu distro sudo apt update && upgrade
  4. install emacs, vlc or nautilus
  5. launch one of those, I get this behavior as described in the screenshots

WSL logs:

stderr.log
weston.log
pulseaudio.log

WSL dumps:

No response

Expected behavior:

WSL should run gui applications without the glitches.

Actual behavior:

I had wsl working just fine until yesterday! Everything I am about to eplain about was working fine yesterday.

Yesterday I have installed another ubuntu version on my wsl, alongside fully working wsl version(was testing out different emacs versions). So I had 2x ubuntu versions + the default docker wsl's.

This strange gui glitch started to happen when I launch emacs gui application. If I launch it in the terminal - all is good.
emacs gui with glitches:
emacs

emacs over terminal:
emacs_terminal

When I move the emacs gui screen - the glitch dissapears. When I stop moving it - it reappears.

I thought okay I can not work like this, I need to start fresh. I then unregistered both ubuntu distros and went to "add remove programs" to uninstall those ubuntu versions.

I installed ubuntu from terminal by wls --install ubuntu or wsl --install or from ms store, restarts...- same problem.

I then disabled WSL feature. Restarts... installed wsl again, did wsl --set-default-version 2 - same problem.

I then tried to install another GUI application - nautilus and VLC - same probelm with those:
nautilus
vlc

I then thought thanks god its not related with emacs, its a gui bug in general with all linux applications over wsl. Nothing similar happens on my windows apps.

That helped me to narrow the problem down. Insead of googling "emacs gui glitches in wsl", I started to google for "wsl gui glitches".

I then found out about wslg and that it is responsible for launching gui applications over wsl.

I then installed mobaxterm since I guess it does not use wslg, but uses xserver. I then tried to launch emacs with it:

x server off - emacs launched in terminal mode:

xserver_off

x server on - emacs launched in gui mode:

xserver_on

Finally emacs has no glitches!!!

I dont really want to reset my windows to make wsl not glitch anymore, can you help me find a way what to update/remove/reinstall to make these glitches go away?

Thank you!

p.s. this is everything I have installed right now that I know regarding wsl, hope that helps:

versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions