Skip to content

Instantly share code, notes, and snippets.

@andriyudatama
Last active February 4, 2024 17:43
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • 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
@NoobCoderAk
Copy link

thanks, solve problem !

@digishoes
Copy link

Thanks, straight forward enough. Solved my issue.

@kendy-karakawa
Copy link

thanks, you saved me!

@justinehell
Copy link

Thanks, you saved me too !!

Copy link

ghost commented Sep 13, 2023

Thanks for the guidance! It was not possible to configure this from the Preferences/Settings menu.

@brianondemand
Copy link

Works like a charm . Thank You!

@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?

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