vscode-remote-release
vscode-remote-release copied to clipboard
[Remote-Container Bug] Massive UI performance issues without x11 socket when using Containers in WSL2
We use Dev-Containers from inside WSL2 and need graphical applications like Cypress. When we just run our container without special mounts, Cypress gets extremely slow and uses a lot of CPU. When we also add a mount for /tmp/.X11-unix into the container, it gets massively faster.
This can also easily be verified by using glxgears from mesa-utils. Without the mount, I get 100 FPS, with the mount 1100 FPS, so more than a 10x increase.
- VSCode Version: 1.90.2
- Local OS Version: Windows 10
- Remote OS Version: WSL2 Debian
- Remote Extension/Connection Type: Container over WSL
Steps to Reproduce:
- Create a
devcontainer.jsonfile like:
{
"name": "x11-socket-perf-test",
"build": {
"dockerfile": "Dockerfile",
},
"runArgs": [
"-e", "DISPLAY=${localEnv:DISPLAY}",
"-v", "/tmp/.X11-unix:/tmp/.X11-unix:ro"
]
}
- Create a simple
Dockerfilethe following content:
FROM debian
RUN apt-get update && apt-get install -y mesa-utils
- Start the dev-container and run
glxgears. Every 5 seconds you see an FPS in the console. - Close the container and remove the
runArgsfromdevcontainer.jsonand rebuild the container. - Start
glxgearsagain and you will see that it is a lot slower.
Does this issue occur when you try this locally?: Yes Does this issue occur when you try this locally and all extensions are disabled?: Yes
Additional info:
When I inspect the container created without my manual mount of the x11-socket, I only see a mount from /run/user/1000/wayland-0 (beside vscode/_data and the workspace).