Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code is visibly not running over 60fps on 144hz monitor?

I just tried the Visual Studio Community Edition and there's a huge visible difference between the two.

VS code is clearly not running over 60fps and it just makes everything look laggy and annoying on a 144hz monitor. If you get used to 144hz and that responsiveness it's quite an annoying thing.

I've googled it and tried finding people that had the same problem but not much success.

like image 427
SebastianG Avatar asked Sep 07 '18 22:09

SebastianG


3 Answers

VS Code locks framerate to the lowest refresh rate of all monitors, so you'd have to unplug or disable your other low refresh rate monitors, which is very unconvinient. A different work around I found, is disabling hardware acceleration, tho be aware that your cpu and gpu usage will increase, because VS Code will be using software rendering and will have to render higher framerate. On i7-8700 and GTX 1080 ti while not doing anything usage is 0%, but while scrolling, it goes up to CPU 9% and GPU 10% but if smooth scrolling is enabled then CPU 16% and GPU 22%

To disable hardware acceleration:

  1. Open VS Code
  2. Open the Command Palette (Ctrl+Shift+P)
  3. Run the Preferences: Configure Runtime Arguments command
  4. This command will open an argv.json file
  5. Add or uncomment "disable-hardware-acceleration": true
  6. Save the file (Ctrl+S)
  7. Restart VS Code

And if you also want smooth scrolling animation, enable it in settings. Open settings, search for smooth scrolling and enable both options.

like image 54
Skillter Avatar answered Sep 27 '22 16:09

Skillter


I did tried the solution given here: https://github.com/microsoft/vscode/issues/65142#issuecomment-751434030
Aka code --disable-gpu-vsync --disable-frame-rate-limit but this does not work so far on Ubuntu 20.04.

Meanwhile, I know that some software are locked to the lowest refresh rate of all the monitors. Since I do also have an UHD@60Hz, I just unplugged this one for testing purposes.

And realized that VScode (and Chrome btw) are both perfectly running 144Hz.
My main monitor is 240Hz, but 144 is still good enough.

TLDR: as of today, it looks like VScode configures itself to support 144Hz out of the box (or at least, the lowest refresh rate of all monitors).

like image 1
kissu Avatar answered Oct 17 '22 07:10

kissu


  1. Add these to your settings.json:

     { 
       "editor.smoothScrolling": true, 
       "editor.cursorSmoothCaretAnimation": true 
     }
    
  2. Open Settings (UI) and search for smooth. Enable those 2 and it will be improved a bit, just a little bit, it doesn't mean it's running natively 144hz

like image 1
Jasper Lee Avatar answered Oct 17 '22 09:10

Jasper Lee