Skip to content

Instantly share code, notes, and snippets.

@andriyudatama
Last active November 3, 2024 01:50
Show Gist options
  • Save andriyudatama/fe5d00deb36feeea30ef35a5ea0f7eff to your computer and use it in GitHub Desktop.
Save andriyudatama/fe5d00deb36feeea30ef35a5ea0f7eff to your computer and use it in GitHub Desktop.
Disable Hardware Acceleration (GPU) on Visual Studio Code
Visual Studio Code frequently crashes linux. Using NVIDIA GPU
1. Open command pallete (Ctrl + Shift + P)
2. Enter "Preferences: Configure Runtime Arguments"
3. Add config: "disable-hardware-acceleration": true
4. Restart VS Code
@xandaaah
Copy link

xandaaah commented Aug 10, 2024

If I start VS Code with: /usr/bin/code --disable-accelerated-video-decode it boots up but gives the following warning: Warning: 'disable-accelerated-video-decode' is not in the list of known options, but still passed to Electron/Chromium.

But if I uncomment the "disable-hardware-acceleration": true line in the Configure Runtime Arguments" and restart it with normally it just opens up the VS Code window when I restart it and then crashes. Starting it with verbose I get the following as the last three lines: [797079:0204/114044.796412:ERROR:gpu_process_host.cc(995)] GPU process exited unexpectedly: exit_code=133 [797079:0204/114044.796454:WARNING:gpu_process_host.cc(1364)] The GPU process has crashed 9 time(s) [797079:0204/114044.796462:FATAL:gpu_data_manager_impl_private.cc(448)] GPU process isn't usable. Goodbye.

Any suggestions of what to try next?

Same problem!
Arch, VSCode from AUR (visual-studio-code-bin)
Nvidia RTX 3060, 48G of RAM, Intel i7-11700, Dell XPS 8940
INXI -SMCG:

System:
  Host: spacecore Kernel: 6.6.44-2-lts arch: x86_64 bits: 64
  Desktop: KDE Plasma v: 6.1.3 Distro: Arch Linux
Machine:
  Type: Desktop System: Dell product: XPS 8940 v: N/A
    serial: <superuser required>
  Mobo: Dell model: 0K3CM7 v: A00 serial: <superuser required> UEFI: Dell
    v: 2.10.0 date: 09/14/2022
CPU:
  Info: 8-core model: 11th Gen Intel Core i7-11700 bits: 64 type: MT MCP
    cache: L2: 4 MiB
  Speed (MHz): avg: 800 min/max: 800/4800:4900 cores: 1: 800 2: 800 3: 800
    4: 800 5: 800 6: 800 7: 800 8: 800 9: 800 10: 800 11: 800 12: 800 13: 800
    14: 800 15: 800 16: 800
Graphics:
  Device-1: Intel RocketLake-S GT1 [UHD Graphics 750] driver: i915 v: kernel
  Device-2: NVIDIA GA106 [GeForce RTX 3060 Lite Hash Rate] driver: nvidia
    v: 555.58.02
  Device-3: Logitech HD Webcam C615 driver: snd-usb-audio,uvcvideo type: USB
  Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.1
    compositor: kwin_wayland driver: X: loaded: modesetting,nvidia
    unloaded: fbdev,nouveau,vesa dri: iris gpu: i915,nvidia resolution:
    1: 2560x1440 2: 1920x1080
  API: EGL v: 1.5 drivers: iris,nvidia,swrast,zink
    platforms: gbm,wayland,x11,surfaceless,device
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 555.58.02
    renderer: NVIDIA GeForce RTX 3060/PCIe/SSE2
  API: Vulkan v: 1.3.279 drivers: nvidia,intel surfaces: xcb,xlib,wayland

@EmmaIsaac
Copy link

Muchas gracias. Lo probe en hackintosh, porque tardaba mucho en iniciar vscode y ahora inicia super rapido

@oblx
Copy link

oblx commented Oct 28, 2024

What is this sorcery, my vscode booted faster than ever !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment