Ale Araldi
Ale Araldi

Reputation: 91

Why are there grey blocks of color on the VS Code editor window?

In the VS Code editor window, there are squares of another color that bother me when coding.

Has anyone had or has the same problem?

screenshot of VS Code

Upvotes: 9

Views: 4253

Answers (3)

Mark
Mark

Reputation: 180649

If you are on a mac, see Different colored area on macOS - although there is a linux report there too. Same dark grey patches of color. There are a couple of suggested fixes mentioned.

The most reliable appears to be changing this setting:
"disable-hardware-acceleration": true

  1. Open command palette and search for "Configure Runtime Arguments"
  2. Set "disable-hardware-acceleration": true
  3. Restart

or starting vscode from a terminal with code --disable-gpu.

Also

What did work is removing "disable-color-correct-rendering": true from ~/.vscode/argv.json file and restarting vscode. Now the different coloured patch on the side and bottom is gone.

Or

This happens to me with an intel mac as well. It was fixed by setting "disable-hardware-acceleration": true in the .vscode/argv.json file.

More from the issue:

Had the same problem on my M1 macbook air, I had to open the argv.json file (you can use Shift + CMD + P and type Configure Runtime Arguments to open it) and set this line to false :

"disable-color-correct-rendering": false (it was on true, maybe by default).

After that, just close your VS Code instance with CMD + Q and restart it.

And here are download links (for macOS) for the previous vscode version v1.68 in case you want to rollback:

https://az764295.vo.msecnd.net/stable/4af164ea3a06f701fe3e89a2bcbb421d2026b68f//VSCode-darwin-universal.zip
https://az764295.vo.msecnd.net/stable/4af164ea3a06f701fe3e89a2bcbb421d2026b68f/VSCode-darwin.zip
https://az764295.vo.msecnd.net/stable/4af164ea3a06f701fe3e89a2bcbb421d2026b68f/VSCode-darwin-arm64.zip

Thanks for the information to those posting in the issue comments.

Upvotes: 7

shoaib sabir
shoaib sabir

Reputation: 745

if you are facing this on mac you have to follow following steps

  1. open terminal and type cd ~/.vscode
  2. then open 'argv.json' file using vim argv.json

just uncomment the line // "disable-hardware-acceleration": true to "disable-hardware-acceleration": true

quit vim Esc then shift+: then wq then press enter, restart vs code your vs code will work normal again.

Upvotes: 0

Oscar Soto
Oscar Soto

Reputation: 109

I started experiencing this issue in my MacBook Pro M1 after the June 2022 autoupdate.

Setting "disable-color-correct-rendering": false in ~/.vscode/argv.json worked for me.

I hope this is fixed in the next release. It seems to be an old issue based on what I found when searching for a solution.

Upvotes: 10

Related Questions