You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Native wayland support with newest electron #109176
electronIssues and items related to Electroninsiders-releasedPatch has been released in VS Code InsiderslinuxIssues with VS Code on LinuxupstreamIssue identified as 'upstream' component related (exists outside of VS Code)upstream-issue-linkedThis is an upstream issue that has been reported upstream
Native wayland support would be great to run vs code without XWayland as described in #77752.
Recently electron merged the chrome version with the ozone backend needed: electron/electron#26022
This would allow for:
Kinetic scrolling (maybe this is more elegantly implemented on the elctron side)
Better touch support (touch scrolling)
better dpi scaling
Reacted by Leonardo Razovic, Nimar, Tadej Janež, Nils K, nxadm, Valentin Hăloiu, Niccolò Belli, Thammachart Chinvarapon, Jason Nader, Dabo and 223 more
Reacted by Kowalski Dragon, lantgabor, Mohammad Amin Chitgarha, Max Vincent Goldgamer, Felicitas Pojtinger, Clémence Lesné, AckAck, Lena Fuhrimann, Tukusej’s Sirs, Anatolie and 10 more
Reacted by Tomas Sandven, Ed M, Virgiel, Reinaldo Antonio Camargo Rauch, Syver S. S., parcelcat, Max Vincent Goldgamer, Timo, Kowalski Dragon, Andrii Oriekhov and 14 more
Reacted by parcelcat, Max Vincent Goldgamer, Kowalski Dragon, ALI AROUS YOUSSOUF, Felicitas Pojtinger, Clémence Lesné, AckAck, Nguyễn Trường Sơn, Tukusej’s Sirs, Anatolie and 5 more
Thanks for opening the issue, agree with the benefits. The electron PR only got the basic compilation bits, there will be follow-up PRs to make it feature complete. VSCode will consume those binaries once they are available.
Reacted by Otavio David, Lenny., Josh Lipps, Andrew Nicolalde, Tomas Sandven, Ismael Juma, Ed M, Tadej Janež, Andrii Oriekhov, pinkpawkitty and 4 more
Reacted by Tomas Sandven, Wojciech Bartnik, Ícar, Syver S. S., SpareLeg and Lê Nguyễn Hoàng Nhân
Reacted by Leonardo Razovic, nxadm, David Yamnitsky, Fran Diéguez, Karuboniru, Kostiantyn (Constantine) Ponomarenko, Carwyn Edwards, Andrew Nicolalde, Lucas Hadjilucas, Timo and 9 more
Ozone has now landed in stable chrome (87) and in electron 11.0.1! I tried to compile vscode in electron-11.x.x branch, targeting electron 11.0.1. It compiles fine, but if I launch code as follows: code-oss --verbose --log=TRACE --enable-features=UseOzonePlatform --ozone-platform=wayland it shows a window for half a second and then crashes without any log. If I leave out the ozone cli commands vscode starts ok, without crashing.
EDIT: if I run it through gdb it now segfaults. [Thread 1 "code-oss" received signal SIGSEGV, Segmentation fault.
0x00005555576c1630 in ?? ()]
As far as I'm aware the official builds for Electron 11 do not have Wayland support. The initial Wayland support (electron/electron#26022) will only land in Electron 12.
So unless you're using an unofficial Electron build which has backported the Wayland fixes (e.g.: electron-ozone from the AUR) I think it's expected for the build to crash.
Valentin Hăloiu (@vially) is correct, the initial experimental support landed only in electron 12, once I merge #110759 to master , the exploration builds of vscode will start using electron 12. Can check again on the crash after that change.
Reacted by Valentin Hăloiu, Andrew Nicolalde, Ismael Juma, Tadej Janež, Andrii Oriekhov and Antonín Dach
Reacted by Valentin Hăloiu, Andrew Nicolalde, Aaron Janse, Ismael Juma, Tadej Janež, Andrii Oriekhov and Ícar
Valentin Hăloiu (@vially) is correct, the initial experimental support landed only in electron 12, once I merge #110759 to master , the exploration builds of vscode will start using electron 12. Can check again on the crash after that change.
Good to know, thank you so much!
As far as I'm aware the official builds for Electron 11 do not have Wayland support. The initial Wayland support (electron/electron#26022) will only land in Electron 12.
So unless you're using an unofficial Electron build which has backported the Wayland fixes (e.g.: electron-ozone from the AUR) I think it's expected for the build to crash.
[pbryan@sesame ~]$ /opt/visual-studio-code/code --enable-features=UseOzonePlatform --ozone-platform=wayland
[304926:0404/102527.563331:ERROR:gpu_init.cc(454)] Passthrough is not supported, GL is egl, ANGLE is
[304926:0404/102527.567356:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
Warning: 'enable-features' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'ozone-platform' is not in the list of known options, but still passed to Electron/Chromium.
[304883:0404/102527.615072:ERROR:cursor_loader.cc(116)] Failed to load a platform cursor of type kNull
[0404/102527.620756:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0404/102527.640310:ERROR:directory_reader_posix.cc(42)] opendir /home/pbryan/.config/Code/Crashpad/attachments/0946e5db-6f17-4fa7-a220-d77c8b893670: No such file or directory (2)
Segmentation fault (core dumped)
FWIW the Insiders version runs, but starts as LoDPI on a display which has 200% scaling. Using Developer: Reload Window fixes that and it then runs as proper HiDPI window.
Same is with latest signal-desktop, but for Signal I know of no way to reload it the window...
Well i don't know what went wrong before, but now for me it also works... Sorry for the spam
BTW: You don't need UseOzonePlatform anymore. Ozone is the new default since a few Chromium releases.
None of those config files work for me on Ubuntu 22.04 with code 1.66.2. Launching code with --verbose spews so much output it doesn't help me see the problem.
Any pointers?
None of those config files work for me on Ubuntu 22.04 with code 1.66.2. Launching code with --verbose spews so much output it doesn't help me see the problem.
Any pointers?
If you mean the ~/.config/electron-flags.conf file, that's Arch Linux specific.
On Fedora 36 + Sway, code --ozone-platform=wayland successfully launches VS Code in Wayland (no need for the other flags), but it seems we are still waiting on #134612 and its PR #135191 for a global configuration.
One way to work around this is to copy the code.desktop file from /usr/share/applications to ~/.local/share/applications, and set the Exec line to Exec=/usr/share/code/code --ozone-platform=wayland --unity-launch %F. Then Code opens using Wayland when running it via the quick launcher. (Note that the file paths might be different depending on the OS; this is for Fedora.)
Once Code is already running from an app launcher, the code CLI command will work with Wayland. Even when code ./path/to/dir opens a directory in a new window, that new window runs Wayland as long as you've already opened code from a launcher.
I don't think this issue is really fixed until VS Code is natively using Wayland by default if it's available.
Reacted by S.Palmer, Alexej Kowalew, Markó Norbert and Alexander Hartmaier
The flag --ozone-platform-hint needs to be added to electron from chromium (electron/electron#33810) and then electron apps can automatically launch on X11/Wayland based on the current session.
electronIssues and items related to Electroninsiders-releasedPatch has been released in VS Code InsiderslinuxIssues with VS Code on LinuxupstreamIssue identified as 'upstream' component related (exists outside of VS Code)upstream-issue-linkedThis is an upstream issue that has been reported upstream
Activity
deepak1556 commentedon Oct 22, 2020
Thanks for opening the issue, agree with the benefits. The electron PR only got the basic compilation bits, there will be follow-up PRs to make it feature complete. VSCode will consume those binaries once they are available.
Upstream issue: electron/electron#10915
kriive commentedon Nov 18, 2020
Ozone has now landed in stable chrome (87) and in electron 11.0.1! I tried to compile vscode in electron-11.x.x branch, targeting electron 11.0.1. It compiles fine, but if I launch code as follows:
code-oss --verbose --log=TRACE --enable-features=UseOzonePlatform --ozone-platform=waylandit shows a window for half a second and then crashes without any log. If I leave out the ozone cli commands vscode starts ok, without crashing.EDIT: if I run it through gdb it now segfaults. [Thread 1 "code-oss" received signal SIGSEGV, Segmentation fault.
0x00005555576c1630 in ?? ()]
tyalie commentedon Nov 18, 2020
There's also a Wayland debug flag (
WAYLAND_DEBUG=1). Maybe you can find more there.kriive commentedon Nov 18, 2020
Thanks, this is the output given:
WAYLAND_DEBUG=1 gdb --args ./code-oss --enable-features=UseOzonePlatform --ozone-platform=waylandhttps://pastebin.com/raw/ALk3JGz6
This is what happens

vially commentedon Nov 21, 2020
As far as I'm aware the official builds for Electron 11 do not have Wayland support. The initial Wayland support (electron/electron#26022) will only land in Electron 12.
So unless you're using an unofficial Electron build which has backported the Wayland fixes (e.g.: electron-ozone from the AUR) I think it's expected for the build to crash.
deepak1556 commentedon Nov 21, 2020
Valentin Hăloiu (@vially) is correct, the initial experimental support landed only in electron 12, once I merge #110759 to master , the exploration builds of vscode will start using electron 12. Can check again on the crash after that change.
12101111 commentedon Nov 24, 2020
electron-11 compile from my Gentoo Linux overlay works without any issue ( And works with musl libc! )

kriive commentedon Nov 24, 2020
Uhm, 韩朴宇 (@12101111) are you launching vscode with
--enable-features=UseOzonePlatform --ozone-platform=wayland?kriive commentedon Nov 24, 2020
Good to know, thank you so much!
And thank you for the info!
12101111 commentedon Nov 24, 2020
Yes
135 remaining items
pbryan commentedon Apr 4, 2022
slagiewka commentedon Apr 21, 2022
FWIW the Insiders version runs, but starts as LoDPI on a display which has 200% scaling. Using
Developer: Reload Windowfixes that and it then runs as proper HiDPI window.Same is with latest signal-desktop, but for Signal I know of no way to reload it the window...
major-mayer commentedon Apr 21, 2022
bbx0 commentedon Apr 21, 2022
Actually on Arch
coderuns with native wayland using the respective settings. :)$ pacman -Q code code 1.66.0-2 $ cat ~/.config/electron17-flags.conf --enable-features=UseOzonePlatform,WaylandWindowDecorations,WebRTCPipeWireCapturer --ozone-platform=wayland --ozone-platform-hint=auto--ozone-platform-hint=autohas currently no effect. I just maintain it for future reference.major-mayer commentedon Apr 21, 2022
Well i don't know what went wrong before, but now for me it also works... Sorry for the spam
BTW: You don't need UseOzonePlatform anymore. Ozone is the new default since a few Chromium releases.
abraxxa commentedon Apr 26, 2022
None of those config files work for me on Ubuntu 22.04 with code 1.66.2. Launching code with --verbose spews so much output it doesn't help me see the problem.
Any pointers?
RicArch97 commentedon Apr 26, 2022
If you mean the
~/.config/electron-flags.conffile, that's Arch Linux specific.abraxxa commentedon Apr 26, 2022
Yes, this an the version specific electron17-flags.conf.
I've tried
~/.config/chrome-flags.confas well, was ignored as well.kevindumanoir commentedon May 8, 2022
I got the same issue as Szymon Łągiewka (@slagiewka) with a 150% scaling. The same issue happens when you relaunch Chrome while keeping active tabs.
noahtallen commentedon May 13, 2022
On Fedora 36 + Sway,
code --ozone-platform=waylandsuccessfully launches VS Code in Wayland (no need for the other flags), but it seems we are still waiting on #134612 and its PR #135191 for a global configuration.One way to work around this is to copy the
code.desktopfile from/usr/share/applicationsto~/.local/share/applications, and set the Exec line toExec=/usr/share/code/code --ozone-platform=wayland --unity-launch %F. Then Code opens using Wayland when running it via the quick launcher. (Note that the file paths might be different depending on the OS; this is for Fedora.)Once Code is already running from an app launcher, the
codeCLI command will work with Wayland. Even whencode ./path/to/diropens a directory in a new window, that new window runs Wayland as long as you've already opened code from a launcher.I don't think this issue is really fixed until VS Code is natively using Wayland by default if it's available.
bacteriostat commentedon May 14, 2022
The flag
--ozone-platform-hintneeds to be added to electron from chromium (electron/electron#33810) and then electron apps can automatically launch on X11/Wayland based on the current session.chore: bump [email protected]