I am using aur/visual-studio-code-bin 1.81.1-1 (+1352 21.79), and also created code-flags.conf under ~/.config with the following content to make it native Wayland.
--ozone-platform-hint=auto
With the recent update, VS Code often does not start. The window just disappears right from the start, and a new icon appears on the panel, other than the one that I have pined. (Normally, it should just add a dot to the already pinned VS icon.)
If I delete code-flags.conf, then VS Code starts fine, but then it becomes XWayland, so I want it to be native Wayland.
Are other users also experiencing the same problem?
I encountered the same issue. It worked fine some time but an update broke VS Code & Wayland (presumably an update in the underlying electron version).
I’ve just given up on VS Code on Wayland, it has been nothing but trouble.
In case you’re really dependent on VS Code to run natively under Wayland, I guess your best bet is to open an issue on their GitHub.
Well, I can use it as Xwayland, but since I am using fractional scaling, the text becomes blurry.
I still don’t understand how a famous and OS-independent-GUI-framework app like VS Code, can still have problems in supporting Wayland out-of-the-box, in this day and age where many Linux desktops even choose/will choose Wayland by default.
It seems that on my PC, the same thing happens with the following as the config file, but randomly. I mean, if I keep trying to start VS Code, sometimes it starts and sometimes it fails, and even if when it starts, a new icon than the pinned icon is created on the bottom panel.
Also, I’m not sure if it is running native Wayland. If I kill the XWayland process, VS Code disappears. Is there a better way to detect whether VS Code is running Wayland or XWayland?
Another option is to run xwininfo (from xorg-xwininfo) in a terminal window: when hovering over an Xwayland window the mouse pointer will turn into a + sign. If you click the window it will display some information and end, but it will not do anything with native Wayland windows.You can use Ctrl+C to end it.
Well, xwininfo seems to be working. And VS Code is Wayland (not detected by xwininfo) if it could start with the other commands above in the conf file. But the Arch Wiki mentioned adding --ozone-platform-hint=auto in the conf file, so I wonder what is the difference.
Anyway, it seems with the other commands, VS can sometimes start (sometimes disappears from the start), so I guess I will be using the other commands, until this problem gets fixed by the developers.