• Blog
  • Tutorials
  • Downloads
  • Ben?
RATTICON
  • Blog
  • Tutorials
  • Downloads
  • Ben?
No Result
View All Result
  • Blog
  • Tutorials
  • Downloads
  • Ben?
No Result
View All Result
RATTICON
No Result
View All Result

How to fix slow Visual Studio Code on Raspberry Pi 4

Ben by Ben
2023-05-30
in Coding, Raspberry Pi, Raspberry Pi Projects, Tech, Tutorials
10
How to fix slow Visual Studio Code on Raspberry Pi 4

Are you struggling with slow Visual Studio Code on Raspberry Pi 4?

When I upgraded from a Raspberry Pi 3B to a Raspberry Pi 4B for a project I was working on, I was hoping to see Visual Studio Code benefit from the bump from 1GB to 4GB RAM. Instead I was treated to a slugfest, where I could barely type, do lookups, git sync, etc.

After a long evening of digging around, I finally figured out the root cause:

  • Visual Studio Code is built on top of Chromium, the codebase that Google’s Chrome browser is based upon.
  • Chromium has hardware acceleration enabled by default.
  • The implementation of hardware acceleration sucks on Raspberry Pi 4B, as of 2021-11.

You can work around this by disabling hardware acceleration in both Chromium and VS Code:

How to Disable Hardware Acceleration in Chromium

The Chromium web browser is installed by default in the latest Raspbian Desktop release. It suffers the same issues as VS Code: horribly slow user interface, delayed clicking and scrolling etc.
To fix this:

  • Open Chromium / “Web Browser”
  • Click on the three vertical dots (aka hamburger) menu button, then Settings
  • Scroll all the way down to the bottom and click Advanced to open the System section.
  • Uncheck the “Use hardware acceleration when available” option (pictured below)
  • Close and re-open Chromium for the change to take effect.

How to Disable Hardware Acceleration in Visual Studio Code

Changing the setting in Chromium doesn’t disable hardware acceleration in Visual Studio Code.
Here’s how to do it:

  • Open Visual Studio Code
  • Open the Command Palette by hitting your F1 key or the key combo Ctrl+Shift+P
  • Begin typing runtime and you should see “Preferences: Configure Runtime Arguments” appear (Pictured below). Click it or hit Enter to open a configuration file called argv.json which allows us to set runtime arguments.
  • There should be the line "disable-hardware-acceleration": true, commented out. (Pictured below)
  • Uncomment the line by deleting the preceding // or add the line if it is missing entirely.
    Tip: Be careful not forget the comma if the line is not the last uncommented one inside the curly braces.
  • Save the file and restart Visual Studio Code for the change to take effect.

Get on with your life!

I hope this has saved you some trouble. Perhaps one day Chromium will be able to detect degraded performance and suggest disabling hardware acceleration to us. Until then, this is our “fix”!

As always, thanks for reading, and do drop a comment in the box below to let me know if this helped you out!

Cheers!
Ben

Share this:

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to share on Pinterest (Opens in new window) Pinterest
Tags: Performance IssuePipi 4.pi 4bRaspberry Piraspberry pi 4bSluggishTutorialVisual Studio CodeVS Codevscode
Previous Post

Fix Neural DSP ASIO and No Windows Sounds

Comments 10

  1. Colin Ng says:
    3 years ago

    Thanks Ben! This made it from “completely unusable, how on earth did this even ship?!?” to “usable”!

    Reply
    • Ben says:
      3 years ago

      You and me both, buddy!

      Reply
  2. Guibert says:
    3 years ago

    You, Sir, gave me my pi4 back !
    Thank you.

    Reply
    • Ben says:
      3 years ago

      Glad to hear it Guibert!

      Reply
  3. Bob Denny says:
    3 years ago

    This reared its ugly head when logging in via VNC.

    Reply
  4. DoubleU says:
    3 years ago

    When I search for runtime or any other term from the setting it doesn’t show up in the command bar. Is there any other way to acces this file?

    Reply
    • Ben says:
      2 years ago

      Sorry for the late reply. The default Visual Studio Code config filepath is C:\Users\{username}\.vscode\argv.json on Windows, ~/.vscode/argv.json on Linux. Have you tried opening the file and adding the “disable-hardware-acceleration”: true line manually?

      Reply
  5. jack says:
    2 years ago

    very good thany you very much

    Reply
  6. Mark says:
    2 years ago

    Thanks, this just helped me. I was not expecting blazing performance on the PI, but it was WAY to slow.

    Reply
  7. BogdanV says:
    1 year ago

    Fantastic! Thanks a lot.

    Reply

Leave a ReplyCancel reply

Search

No Result
View All Result

Recent Posts

  • How to fix slow Visual Studio Code on Raspberry Pi 4
  • Fix Neural DSP ASIO and No Windows Sounds
  • Real vs Fake EZ-RJPRO HD Crimp Tools
  • Arduino UNO Clone – CH34X Chip Serial Driver
  • Thank You SoftLayer / IBM Cloud
  • Folding@Home Team Statistics Checker
  • Tutorial: Train Departure Board with Pi, Python and an LCD

Tags

apache Arduino ASIO bass coronavirus covid-19 Crimping Crimp Tool Departure Board DIY Driver EZ-RJPRO HD fah-teamstats fah-teamstats.py freenas GitHub guitar Hardware I2C Display lamp LCD music Neuraldsp nginx ODPT Performance Issue Pi Pi Zero Python Raspberry Pi server SLO-100 Sluggish Soldano soundcloud SSL terminal Trains Tutorial Uno vscode VS Code Webserver Windows Audio x0ptis
  • Downloads
  • Hi! I’m Ben, a Brit living in Tokyo.

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Blog
  • Tutorials
  • Downloads
  • Ben?

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.