Skip to content

Instantly share code, notes, and snippets.

@andriyudatama
Last active July 25, 2024 12:30
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
@niranjan-magare1997
Copy link

Working for me as well. Thanks !!!!

@dbarjs
Copy link

dbarjs commented Oct 31, 2023

Thanks!

@AnisTigrini
Copy link

Solved it from me as well thank you :)

@RolandVels
Copy link

Awesome thank you!

@bathwaterpizza
Copy link

In my case there was a line already there for disabling, just had to uncomment it. Thanks.

@dbjerke
Copy link

dbjerke commented Feb 4, 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?

@hippie68
Copy link

hippie68 commented May 1, 2024

Doesn't work (anymore?) on latest VS Code. You could pass --disable-gpu in the sense that the application would not complain about an unknown option, however a GPU process is still spawned, which you can check with nvtop.

@gloger2003
Copy link

THANKS!!!!

@AntonClaesson
Copy link

AntonClaesson commented Jun 18, 2024

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.

I have the same issue :(
Version: 1.90.1
Ubuntu: 22.04
Installed via snap

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