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
Reacted by Richard Ivánek, NoTuxNoBux, Tomáš Krupka, ShaddyDC, Pavel, Valentin Hăloiu, Vuk Mirovic, Noa Aarts, Pascal Vorwerk, Celeste Peláez and 72 more
I'm seeing the same behavior on my end as well with Wayland and was able to reproduce it with electron-fiddle with the same arguments as @tengyifei - In my case the window show up, but crashes when I maximize it. It works fine when not run under Wayland.
I tried electron-fiddle with the same arguments as @tengyifei .
cpu: intel core i5
kernel version is 6.1.0-3-generic
wayland version is 1.20.0
Yes , the crash on maximuming window can be reproduced. However, I tried with vscode ,electron-quick-start, and electron default app, and none of them crash on maximuming the Browserwindow. Really confused.
This crash is the upstream issue of microsoft/vscode#184124. If we look at the data there, >20 users have reported this electron crash. This implies possibly there are hundreds of unreported instances. Is there a chance this bug can be prioritized?
Reacted by Philipp Schaffrath, gracie, gyaru, ardashir77, Francisco Giordano, maglore9900, jchv, masroof-maindak, FirelightFlagboy, ShaddyDC and 58 more
OS: Arch Linux x86_64
Kernel: 6.5.3-arch1-1
Compositor: Sway
After updating to v1.82.0-1, my instance always crashes when trying to open VSC in Wayland mode:
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.
Before this update, VSC ran just fine in native Wayland with HiDPI screens and also without these warnings.
Removing this config allows the program to start up normally, but not in native Wayland mode. The font and all visuals are very blurry as I'm on 3200x1800 monitor. Is there any other workaround for this or do I just need to wait until this is resolved? I don't think that downgrading is good way to solve this either for me.
This crash is the upstream issue of microsoft/vscode#184124. If we look at the data there, >20 users have reported this electron crash. This implies possibly there are hundreds of unreported instances.
For visibility: On the downstream & other issues (microsoft/vscode#184124, #37531) you can find stacktraces with debug symbols. All signs seem to point towards a race condition type of issue during startup & menu build.
Some example stacktraces (thanks to coredumpctl + gdb):
# For fresh OS install, best to use local repo mirrors...
sudo pacman-mirrors -f && sudo pacman -Syyu
# Install VSCode (a.k.a. "Code - OSS")
sudo pacman -Syu code
# Try to start VSCode under Wayland# + `"window.titleBarStyle": "native"# = Frequent Crash due to race condition during startup window & menu build
/usr/bin/code --ozone-platform-hint=wayland --enable-features=WaylandWindowDecorations --enable-features=WebRTCPipeWireCapturer --force-dark-mode --verbose
# Crash + coredump visible via: coredumpctl list
Note:Manjaro does not yet ship debuginfod debug symbols for code, nor electron25, so these must be built manually. You may have better out-of-the-box support for debuginfod debug symbols on "vanilla" Arch Linux. Although, first-time installation of ArchLinux in general requires a bit of *nix knowledge & time. The crash should be easily reproducible on Wayland + Sway, and probably other similar desktop environments (e.g. Hyprland, River, Wayfire, etc...)
Is there a chance this bug can be prioritized?
+1 to this! Many appear to be affected. Please & Thank You 🙏
Reacted by Scott Mabin, Bart Janssens, Jonas Strassel and Danilo Bargen
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<!-- Generated by Font Manager. Do NOT edit this file. -->
<fontconfig>
<match target="font">
<edit name="rgba" mode="assign" binding="strong">
<int>2</int>
</edit>
<edit name="lcdfilter" mode="assign" binding="strong">
<int>1</int>
</edit>
<edit name="scale" mode="assign" binding="strong">
<double>1.0</double>
</edit>
<edit name="dpi" mode="assign" binding="strong">
<double>36.0</double>
</edit>
</match>
</fontconfig>
Then afterwards rebuild fontconfig cache fc-cache -frv. Probably you should also restart Sway (or simply reboot for good measure), then check Sway's "Scaling Factor" is set to 1.0, and that "Subpixel hinting" also matches your subpixel layout: swaymsg -t get_outputs
If it doesn't match, then set them for your monitor (a.k.a. "Output" in Sway-terminology). For example:
Expand for example Sway output config ~/.config/sway/config.d/01-output-hdmi-subpixel-layout-scale.conf:
If you're not starting code with these flags, then it will be using XWayland compatibility layer, and thus rendered through the Xorg display manager protocol -> Xwayland -> Wayland adapter code path. As such, some things may not work as well as a native Wayland application. You can verify which apps are running over XWayland by running: xlsclients (this program is available in xorg-xlsclients package on ArchLinux-based distros).
Is there any other workaround for this or do I just need to wait until this is resolved?
A workaround for the crash race condition issue that seems to work for many people is to change the following setting in VScode's settings.json:
Expand for VSCode crash bug settings.json workaround
Note: The VSCode settings.json file may be located in an alternate location depending on whether you're using the OSS version of VSCode (a.k.a. VSCodium), or the official VScode from Microsoft.
Usually located at:
VSCode Official or code-features version: ~/.config/Code/User/settings.json
VSCode OSS or code w/o code-features: ~/.config/Code\ -\ OSS/User/settings.json
This will usually result in less frequent crashes during startup. Due to the nature of race conditions, you may want to retry starting code many times in succession to get it to succeed. Another thing to try is opening a pre-existing VSCode workspace, as this can affect startup timing & thus impact which thread wins the "race": /usr/bin/code --ozone-platform-hint=wayland --enable-features=WaylandWindowDecorations --enable-features=WebRTCPipeWireCapturer --force-dark-mode --verbose ~/path/to/your/vscode/project.code-workspace
code on Arch Linux Note:: ArchLinux-based distros use the VSCode OSS version, and the code package is by default setup to remove any Microsoft-specific telemetry, VSCode Extensions Marketplace (replaced by OpenVSX), and profile/settings Synchronization to Microsoft-controlled servers. This is due to an apparent licensing restriction from the non-100% OSS-friendly license which Microsoft has placed on their official VSCode release. "I'm not a lawyer", so whether these licensing restrictions are real or just apparently assumed due to legalese interpretations is unknown to me. Some features may be re-enabled by installing the code-features package from the AUR. After installing this package, it patches the /usr/lib/code/product.json file included in the OSS-code package to be more in-parity with Microsoft's official version. However, this package still does not replace OpenVSX with Microsoft's VSCode Extensions Marketplace because the extensionsGallery URLs in product.json are not changed.
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<!-- Generated by Font Manager. Do NOT edit this file. -->
<fontconfig>
<match target="font">
<edit name="rgba" mode="assign" binding="strong">
<int>2</int>
</edit>
<edit name="lcdfilter" mode="assign" binding="strong">
<int>1</int>
</edit>
<edit name="scale" mode="assign" binding="strong">
<double>1.0</double>
</edit>
<edit name="dpi" mode="assign" binding="strong">
<double>36.0</double>
</edit>
</match>
</fontconfig>
Then afterwards rebuild fontconfig cache fc-cache -frv. Probably you should also restart Sway (or simply reboot for good measure), then check Sway's "Scaling Factor" is set to 1.0, and that "Subpixel hinting" also matches your subpixel layout: swaymsg -t get_outputs
If it doesn't match, then set them for your monitor (a.k.a. "Output" in Sway-terminology). For example:
Expand for example Sway output config ~/.config/sway/config.d/01-output-hdmi-subpixel-layout-scale.conf:
If you're not starting code with these flags, then it will be using XWayland compatibility layer, and thus rendered through the Xorg display manager protocol -> Xwayland -> Wayland adapter code path. As such, some things may not work as well as a native Wayland application. You can verify which apps are running over XWayland by running: xlsclients (this program is available in xorg-xlsclients package on ArchLinux-based distros).
Well, I honestly don't think this is separate issue. VSC worked just fine with those flags before the update, but now it crashes. Downgrading also fixes the blurriness, so it is indeed related to Electron.
Well, I honestly don't think this is separate issue. VSC worked just fine with those flags before the update, but now it crashes. Downgrading also fixes the blurriness, so it is indeed related to Electron.
Please check my above post again, as I've updated it with more information regarding those flags & XWayland. It's likely that the Xorg -> Xwayland compatibility layer is behaving differently than running VSCode + Electron under Wayland natively. Probably still best to double-check any related fontconfig + sway and even Xorg settings relating to Fonts, Displays, DPI, and scaling.
EDIT: Also added notes about OSS VSCode vs. standard "official" VSCode & settings.json workaround.
EDIT++: You might try checking whether other Xwayland applications are blurry also. There are some reports of other IDEs including JetBrains being blurry under XWayland
Unsure where the remaining issues lie, whether with Electron or VSC, but perhaps closing this issue and opening a new one for any remaining crashes to get rid of the clutter would be an idea.
Reacted by Nantris, Leander Kurscheidt and James Cuzella
I've noticed the same as well. Things have been progressively getting better for Electron-based apps on Wayland. The most obtrusive crashes affecting VSCode seem to have been fixed, which is a great improvement! 🎉
Electron doesn't even attempt to support global hotkeys... I am thoroughly disillusioned with Electron on Wayland and distraught that the maintainers don't have a word to say about yet another promised feature breaking on a major platform.
This crash is the upstream issue of microsoft/vscode#184124. If we look at the data there, >20 users have reported this electron crash. This implies possibly there are hundreds of unreported instances. Is there a chance this bug can be prioritized?
Hi guys, I installed hyprland on my manjaro linux recently, and I find that every electron related stuff apps, such as spotify, obsidian, vscode, chromium are not able to load, they crash with my system. any idea of how to deal with such situation?
@Nantris X11 is fine. I tried add --disable-accelerated-video-decode flags to load the software, and it works, however, when I check the crash log of my system, it still shows that those command crashed.
It would be valuable to share exactly what error you're getting.
I assume it's troublesome to test whether it works for you in more common desktop environments on Wayland, but if it does, you may want to create a separate issue regarding problems specific to Hyprland+Wayland.
This is what I got for chromium and obsidian and spotify without the flags:
❯ chromium
[7780:7780:0824/124747.585874:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=139
[7780:7780:0824/124748.501216:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=139
[7780:7780:0824/124749.408726:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_cod
e=139
[7780:7780:0824/124750.536714:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=139
[7780:7780:0824/124751.714873:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=139
[7780:7780:0824/124752.984201:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=139
[7780:7780:0824/124753.698897:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=139
[7780:7780:0824/124754.271566:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=139
[7780:7780:0824/124754.831860:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=139
[7780:7780:0824/124754.831899:FATAL:gpu_data_manager_impl_private.cc(436)] GPU process isn't usable. Goodbye.
[0824/124754.847135:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.848327:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.849344:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.849463:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.849574:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.849852:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.849910:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.850277:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.850395:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.850772:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.850832:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.851113:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.851441:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.851551:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.851607:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.851669:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.851726:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.851781:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.851840:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.851898:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.852166:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.852224:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.852282:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.852340:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.852393:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.852451:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.852504:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.852557:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.852612:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.852718:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.853737:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.853791:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.853842:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.853896:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.853973:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0824/124754.854177:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[1] 7780 trace trap (core dumped) chromium
❯ spotify
User flags: --ozone-platform-hint=wayland
[9111:9111:0824/124847.043225:ERROR:policy_logger.cc(157)] :components/enterprise/browser/controller/chrome_browser_cloud_management_controller.cc(161) Cloud management controller initialization aborted as CBCM is not enabled. Please use the `--enable-chrome-browser-cloud-management` command line flag to enable it if you are not using the official Google Chrome build.
[9154:9179:0824/124848.362881:ERROR:ssl_client_socket_impl.cc(970)] handshake failed; returned -1, SSL error code 1, net_error -100
[9154:9179:0824/124848.371291:ERROR:ssl_client_socket_impl.cc(970)] handshake failed; returned -1, SSL error code 1, net_error -100
[9111:9111:0824/124849.034072:ERROR:gpu_process_host.cc(989)] GPU process exited unexpectedly: exit_code=139
[9154:9179:0824/124849.308278:ERROR:ssl_client_socket_impl.cc(970)] handshake failed; returned -1, SSL error code 1, net_error -100
[9154:9179:0824/124849.452052:ERROR:ssl_client_socket_impl.cc(970)] handshake failed; returned -1, SSL error code 1, net_error -100
[9111:9111:0824/124850.197216:ERROR:gpu_process_host.cc(989)] GPU process exited unexpectedly: exit_code=139
[9111:9111:0824/124851.364073:ERROR:gpu_process_host.cc(989)] GPU process exited unexpectedly: exit_code=139
[9111:9111:0824/124852.431570:ERROR:gpu_process_host.cc(989)] GPU process exited unexpectedly: exit_code=139
[9111:9111:0824/124853.513085:ERROR:gpu_process_host.cc(989)] GPU process exited unexpectedly: exit_code=139
[9111:9111:0824/124854.609464:ERROR:gpu_process_host.cc(989)] GPU process exited unexpectedly: exit_code=139
[9111:9111:0824/124855.198807:ERROR:gpu_process_host.cc(989)] GPU process exited unexpectedly: exit_code=139
[9111:9111:0824/124855.777939:ERROR:gpu_process_host.cc(989)] GPU process exited unexpectedly: exit_code=139
[9154:9179:0824/124855.778184:ERROR:ssl_client_socket_impl.cc(970)] handshake failed; returned -1, SSL error code 1, net_error -100
[9111:9111:0824/124856.414401:ERROR:gpu_process_host.cc(989)] GPU process exited unexpectedly: exit_code=139
[9111:9111:0824/124856.414441:FATAL:gpu_data_manager_impl_private.cc(448)] GPU process isn't usable. Goodbye.
[9154:9179:0824/124856.802240:ERROR:ssl_client_socket_impl.cc(970)] handshake failed; returned -1, SSL error code 1, net_error -100
[9154:9179:0824/124857.006576:ERROR:ssl_client_socket_impl.cc(970)] handshake failed; returned -1, SSL error code 1, net_error -100
[1] 9111 trace trap (core dumped) spotify
❯ obsidian
2024-08-24 04:49:39 Loading main app package /usr/lib/obsidian/obsidian.asar
2024-08-24 04:49:39 Checking for update using Github
[10159:0824/124941.203714:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=139
2024-08-24 04:49:41 Success.
2024-08-24 04:49:41 Latest version is 1.6.7
2024-08-24 04:49:41 App is up to date.
[10159:0824/124942.258268:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=139
[10159:0824/124943.369139:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=139
[10159:0824/124944.360262:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=139
[10159:0824/124945.362968:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=139
[10159:0824/124946.339188:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=139
[10159:0824/124946.768625:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=139
[10159:0824/124947.210867:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=139
[10159:0824/124947.640333:ERROR:gpu_process_host.cc(997)] GPU process exited unexpectedly: exit_code=139
[10159:0824/124947.640398:FATAL:gpu_data_manager_impl_private.cc(448)] GPU process isn't usable. Goodbye.
[1] 10159 trace trap (core dumped) obsidian
mine nvidia situation:
❯ sudo pacman -Qs nvidia
local/egl-wayland 4:1.1.13.1-1
EGLStream-based Wayland external platform
local/ffnvcodec-headers 12.2.72.0-1
FFmpeg version of headers required to interface with Nvidias codec APIs
local/lib32-libvdpau 1.5-2
Nvidia VDPAU library
local/lib32-nvidia-utils 550.107.02-1
NVIDIA drivers utilities (32-bit)
local/lib32-vulkan-nouveau 1:24.1.6-1
Open-source Vulkan driver for Nvidia GPUs - 32-bit
local/libvdpau 1.5-3
Nvidia VDPAU library
local/libxnvctrl 550.107.02-1
NVIDIA NV-CONTROL X extension
local/mhwd-nvidia 550.107.02-1
MHWD module-ids for nvidia 550.107.02
local/mhwd-nvidia-390xx 390.157-14
MHWD module-ids for nvidia 390.157
local/mhwd-nvidia-470xx 470.256.02-4
MHWD module-ids for nvidia 470.256.02
local/nvidia-dkms 550.107.02-1
NVIDIA drivers - module sources
local/nvidia-prime 1.0-5
NVIDIA Prime Render Offload configuration and utilities
local/nvidia-settings 550.107.02-1
Tool for configuring the NVIDIA graphics driver
local/nvidia-utils 550.107.02-1
NVIDIA drivers utilities
local/vulkan-nouveau 1:24.1.6-1
Open-source Vulkan driver for Nvidia GPUs
local/xf86-video-nouveau 1.0.17-3 (xorg-drivers)
Open Source 3D acceleration driver for nVidia cards
It does seem that other people are also discussing other issues here. Please file separate tickets for the separate issues so that they can be triaged on a case-by-case basis. Thank you!
@HilariousJon
This is likely a hyprland issue. There's been a lot of re working the code there recently so make sure you're on the latest git commit. If the issue still persists then report a bug with hyprland
Activity
mdp commentedon Aug 18, 2023
I'm seeing the same behavior on my end as well with Wayland and was able to reproduce it with electron-fiddle with the same arguments as @tengyifei - In my case the window show up, but crashes when I maximize it. It works fine when not run under Wayland.
System details:
Looks like this is affecting other Electron users on Wayland not just VSCode:
Signal: signalapp/Signal-Desktop#6247
Element Matrix Client: element-hq/element-desktop#1026
This also seems to have some history with 22.x as well:
#37531
wanted002 commentedon Aug 29, 2023
I tried electron-fiddle with the same arguments as @tengyifei .
cpu: intel core i5
kernel version is 6.1.0-3-generic
wayland version is 1.20.0
Yes , the crash on maximuming window can be reproduced. However, I tried with vscode ,electron-quick-start, and electron default app, and none of them crash on maximuming the Browserwindow. Really confused.
tengyifei commentedon Sep 20, 2023
This crash is the upstream issue of microsoft/vscode#184124. If we look at the data there, >20 users have reported this electron crash. This implies possibly there are hundreds of unreported instances. Is there a chance this bug can be prioritized?
3liasP commentedon Sep 24, 2023
OS: Arch Linux x86_64
Kernel: 6.5.3-arch1-1
Compositor: Sway
After updating to v1.82.0-1, my instance always crashes when trying to open VSC in Wayland mode:
Before this update, VSC ran just fine in native Wayland with HiDPI screens and also without these warnings.
My config flags look like this (
code-flags.conf):Removing this config allows the program to start up normally, but not in native Wayland mode. The font and all visuals are very blurry as I'm on 3200x1800 monitor. Is there any other workaround for this or do I just need to wait until this is resolved? I don't think that downgrading is good way to solve this either for me.
trinitronx commentedon Sep 28, 2023
For visibility: On the downstream & other issues (microsoft/vscode#184124, #37531) you can find stacktraces with debug symbols. All signs seem to point towards a race condition type of issue during startup & menu build.
Some example stacktraces (thanks to
coredumpctl+gdb):ERROR:elf_dynamic_array_reader.h(64)] tag not found#0 0x0000562d9cd48f77 _ZN5views12_GLOBAL__N_120BuildViewsWithLayersEPNS_4ViewEPSt6vectorIS2_SaIS2_EE (electron + 0x8da0f77)views::(anonymous namespace)::BuildViewsWithLayers(views::View*, std::vector<views::View*, std::allocator<views::View*> >*) ()ERROR:elf_dynamic_array_reader.h(64)] tag not found#0 0x000055c8c9767d69 _ZN5views4View22UpdateChildLayerBoundsERKNS0_15LayerOffsetDataE (electron + 0x8d83d69)views::View::UpdateChildLayerBounds(views::View::LayerOffsetData const&) ()Reproduction case is pretty easy: Simply install & try to start VSCode on ArchLinux + Wayland desktop environment (e.g. Sway), Manjaro Sway edition, or other Arch-based distros with Wayland-based desktop environment (e.g. EndeavourOS, Garuda Linux, etc...).
I reproduced on Manjaro Sway Edition:
Note: Manjaro does not yet ship
debuginfoddebug symbols forcode, norelectron25, so these must be built manually. You may have better out-of-the-box support fordebuginfoddebug symbols on "vanilla" Arch Linux. Although, first-time installation of ArchLinux in general requires a bit of *nix knowledge & time. The crash should be easily reproducible on Wayland + Sway, and probably other similar desktop environments (e.g. Hyprland, River, Wayfire, etc...)+1 to this! Many appear to be affected. Please & Thank You 🙏
trinitronx commentedon Sep 28, 2023
Off-topic:
@3liasP: This is most probably a separate issue and is not related to VSCode nor Electron.
Expand for possible solution
Check your monitor's native physical DPI & subpixel layout, then configure this in
fontconfig. The values forrgbasetting can be found here under the "Configuration File Format -><const>section.For example my monitor had BGR (blue-green-red) subpixel layout, and 36 DPI:
Expand for example
fontconfigsettings (~/.config/fontconfig/conf.d/19-DisplayProperties.conf)~/.config/fontconfig/conf.d/19-DisplayProperties.conf:Then afterwards rebuild fontconfig cache
fc-cache -frv. Probably you should also restart Sway (or simply reboot for good measure), then check Sway's "Scaling Factor" is set to1.0, and that "Subpixel hinting" also matches your subpixel layout:swaymsg -t get_outputsIf it doesn't match, then set them for your monitor (a.k.a. "Output" in Sway-terminology). For example:
Expand for example Sway output config
~/.config/sway/config.d/01-output-hdmi-subpixel-layout-scale.conf:If you're not starting
codewith these flags, then it will be using XWayland compatibility layer, and thus rendered through the Xorg display manager protocol -> Xwayland -> Wayland adapter code path. As such, some things may not work as well as a native Wayland application. You can verify which apps are running over XWayland by running:xlsclients(this program is available inxorg-xlsclientspackage on ArchLinux-based distros).A workaround for the crash race condition issue that seems to work for many people is to change the following setting in VScode's
settings.json:Expand for VSCode crash bug
settings.jsonworkaroundNote: The VSCode
settings.jsonfile may be located in an alternate location depending on whether you're using the OSS version of VSCode (a.k.a. VSCodium), or the official VScode from Microsoft.Usually located at:
code-featuresversion:~/.config/Code/User/settings.jsoncodew/ocode-features:~/.config/Code\ -\ OSS/User/settings.jsonThis will usually result in less frequent crashes during startup. Due to the nature of race conditions, you may want to retry starting
codemany times in succession to get it to succeed. Another thing to try is opening a pre-existing VSCode workspace, as this can affect startup timing & thus impact which thread wins the "race":/usr/bin/code --ozone-platform-hint=wayland --enable-features=WaylandWindowDecorations --enable-features=WebRTCPipeWireCapturer --force-dark-mode --verbose ~/path/to/your/vscode/project.code-workspacecodeon Arch Linux Note:: ArchLinux-based distros use the VSCode OSS version, and thecodepackage is by default setup to remove any Microsoft-specific telemetry, VSCode Extensions Marketplace (replaced by OpenVSX), and profile/settings Synchronization to Microsoft-controlled servers. This is due to an apparent licensing restriction from the non-100% OSS-friendly license which Microsoft has placed on their official VSCode release. "I'm not a lawyer", so whether these licensing restrictions are real or just apparently assumed due to legalese interpretations is unknown to me. Some features may be re-enabled by installing thecode-featurespackage from the AUR. After installing this package, it patches the/usr/lib/code/product.jsonfile included in the OSS-codepackage to be more in-parity with Microsoft's official version. However, this package still does not replace OpenVSX with Microsoft's VSCode Extensions Marketplace because theextensionsGalleryURLs inproduct.jsonare not changed.3liasP commentedon Sep 28, 2023
Well, I honestly don't think this is separate issue. VSC worked just fine with those flags before the update, but now it crashes. Downgrading also fixes the blurriness, so it is indeed related to Electron.
trinitronx commentedon Sep 28, 2023
@3liasP: Edited above post + reply
Off-topic:
Please check my above post again, as I've updated it with more information regarding those flags & XWayland. It's likely that the Xorg -> Xwayland compatibility layer is behaving differently than running VSCode + Electron under Wayland natively. Probably still best to double-check any related
fontconfig+swayand even Xorg settings relating to Fonts, Displays, DPI, and scaling.EDIT: Also added notes about OSS VSCode vs. standard "official" VSCode &
settings.jsonworkaround.EDIT++: You might try checking whether other Xwayland applications are blurry also. There are some reports of other IDEs including JetBrains being blurry under XWayland
29 remaining items
Nantris commentedon Jul 11, 2024
Can this be closed now? Does the issue persist?
crabvk commentedon Jul 12, 2024
Fixed long time ago, Idk why no one's closing it.
C0rn3j commentedon Jul 12, 2024
@Nantris There's many different crashes in Electron and VSC that were being progressively fixed with each version.
For what it's worth, microsoft/vscode#184124 has greatly died down this year.
VSC still crashes on me, but it's very rare now:
Unsure where the remaining issues lie, whether with Electron or VSC, but perhaps closing this issue and opening a new one for any remaining crashes to get rid of the clutter would be an idea.
trinitronx commentedon Jul 14, 2024
I've noticed the same as well. Things have been progressively getting better for Electron-based apps on Wayland. The most obtrusive crashes affecting VSCode seem to have been fixed, which is a great improvement! 🎉
Nantris commentedon Jul 16, 2024
Electron doesn't even attempt to support global hotkeys... I am thoroughly disillusioned with Electron on Wayland and distraught that the maintainers don't have a word to say about yet another promised feature breaking on a major platform.
KweezyCode commentedon Jul 26, 2024
still unfixed :/
HilariousJon commentedon Aug 22, 2024
Hi guys, I installed hyprland on my manjaro linux recently, and I find that every electron related stuff apps, such as
spotify,obsidian,vscode,chromiumare not able to load, they crash with my system. any idea of how to deal with such situation?Nantris commentedon Aug 22, 2024
@HilariousJon is your issue only occurring on Wayland? Can you try X11? If it fails on X11 you'll probably be best off creating a new issue.
HilariousJon commentedon Aug 23, 2024
@Nantris X11 is fine. I tried add
--disable-accelerated-video-decodeflags to load the software, and it works, however, when I check the crash log of my system, it still shows that those command crashed.Nantris commentedon Aug 23, 2024
It would be valuable to share exactly what error you're getting.
I assume it's troublesome to test whether it works for you in more common desktop environments on Wayland, but if it does, you may want to create a separate issue regarding problems specific to Hyprland+Wayland.
HilariousJon commentedon Aug 24, 2024
@Nantris
This is what I got for
chromiumandobsidianandspotifywithout the flags:mine nvidia situation:
ckerr commentedon Aug 24, 2024
It's very difficult to triage & manage tickets that track multiple bugs like this one.
Since #39449 (comment), #39449 (comment), and #39449 (comment) all report this as fixed, I'm going to close this ticket.
It does seem that other people are also discussing other issues here. Please file separate tickets for the separate issues so that they can be triaged on a case-by-case basis. Thank you!
Ben9986 commentedon Aug 24, 2024
@HilariousJon
This is likely a hyprland issue. There's been a lot of re working the code there recently so make sure you're on the latest git commit. If the issue still persists then report a bug with hyprland
HilariousJon commentedon Aug 26, 2024
@BenCarmichael01 yes, already fixed that with the flags
--disable-accelerated-video-decodeand--disable-gpu