Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a setting to disable gpu acceleration #15211

Closed
SpaceShot opened this issue Nov 8, 2016 · 87 comments
Closed

Add a setting to disable gpu acceleration #15211

SpaceShot opened this issue Nov 8, 2016 · 87 comments

Comments

@SpaceShot
Copy link

@SpaceShot SpaceShot commented Nov 8, 2016

  • VSCode Version: 1.7.1-1478180561
  • OS Version: ubuntu 16.04 LTS
    more info:
    Guest OS using VM on VirtualBox 5.0.26,
    Guest Additions installed,
    unity_support_test reports Unity 3D supported = yes (everything is lit up with green yes)

Steps to Reproduce:

  1. Start VSCode. This can be when docked in Launcher or launched via GUI or launched from command line
  2. Window appears, screen stays black. There might be grey rectangles or a blinking cursor, moving the window usually results in tearing.

Workaround
Launch from command line with code . --disable-gpu
If first window is launched this way, subsequent windows launched by any method follow option of currently open window(s)

Proposed Workaround
Once I identify that this machine can't run VSCode effectively without --disable-gpu, can we have a way to add to settings.json and be done with it?

Thank you for consideration

@SpaceShot
Copy link
Author

@SpaceShot SpaceShot commented Nov 8, 2016

Forgot VS Code version (sorry). -fixed-

@bpasero
Copy link
Member

@bpasero bpasero commented Nov 9, 2016

@SpaceShot are you saying that you see the first window with GPU disabled but subsequent windows are not?

@bpasero bpasero added this to the Backlog milestone Nov 9, 2016
@bpasero
Copy link
Member

@bpasero bpasero commented Nov 9, 2016

There is app.disableHardwareAcceleration, but it needs to be set very early.

@SpaceShot
Copy link
Author

@SpaceShot SpaceShot commented Nov 10, 2016

My proposal is that it would be nice to not have to set this every time from the command line because I know for this configuration (OS and guest VM) I have to run with --disable-gpu

As a minor complaint, this also means docking Code in the launcher is somewhat pointless because I need to go to terminal and use the --disable-gpu option.

I simply was adding more information that I tried a few things, such as opening with --disable-gpu and then seeing what happened if I opened more windows.

@bpasero bpasero changed the title Disable gpu setting in user settings Add a setting to disable gpu acceleration Nov 11, 2016
@bpasero bpasero removed this from the Backlog milestone Nov 11, 2016
@bpasero bpasero removed their assignment Nov 11, 2016
@billscheidel
Copy link

@billscheidel billscheidel commented Dec 10, 2016

I have the same configuration and disabled the gpu in a similar manner. But now I'm seeing really bad screen tearing on scroll. Basically every time I scroll, I need to stop scrolling then scroll a little bit up or down to refresh the ui and fix the issue. Is there any way to fix this?

@faustotnc
Copy link

@faustotnc faustotnc commented Sep 19, 2017

I'm having to do the same. Otherwise, VSCode won't respond until 0.6/2 seconds after performing any action like typing, scrolling or even opening small files (20 - 40 lines).

I know that opening the terminal, typing code --disable-gpu, and pressing enter seems like a really small set of steps, but when you have to do it every day, you realize that those steps are way more than just clicking on the app's icon to launch it.

Is there any chance that this option will be added to the settings?

@luncht1me
Copy link

@luncht1me luncht1me commented Sep 30, 2017

add --disable-gpu to your shortcut or alias code="code --disable-gpu"

@amitkvmz
Copy link

@amitkvmz amitkvmz commented Dec 12, 2017

go to properties / compatibility / run this program in compatibility mode for windows 7.

And everything will be working as you want.

@GazizovMarat
Copy link

@GazizovMarat GazizovMarat commented Jan 4, 2018

@amitkvmz Thanks a lot. Also it works fine with the Windows 8 compatibility mode.

@fleps
Copy link

@fleps fleps commented Mar 21, 2018

I hope this gets added as setting also, because every time VSCode updates, it rewrites the shortcut so I lose the --disable-gpu.
The workaround is to create a manual shortcut, which is kind of a lame workaround you know =)

@mindplay-dk
Copy link

@mindplay-dk mindplay-dk commented Mar 22, 2018

Had to disable this to make a (window) screen recording with OBS.

I didn't find the disableHardwareAcceleration setting in User Settings?

I had to disable it by creating a custom shortcut with the --disable-gpu flag added.

@hallsbyra
Copy link

@hallsbyra hallsbyra commented Apr 17, 2018

I'd also like a machine wide config of this. Running VSCode in Win10 VMWare Guest and can't get decent peformance without --disable-gpu. But the command line option is not an alternative when opening code from explorer (context menu, double clicking, etc.).

@scarolan
Copy link

@scarolan scarolan commented Apr 19, 2018

I'm running VSC on a Surface Book 2, Windows 10 with WSL. The integrated terminal was super laggy and would even cause the entire program to lock up. After stumbling around and searching I discovered --disable-gpu which seems to have fixed the problem.

+1 for a way to permanently set this.

@fleps
Copy link

@fleps fleps commented May 9, 2018

Guys, now that VS Code is getting new versions / updates consistently we REALLY need this option to be part of the settings.

Every time I update VS Code it overwrites my shortcut removing --disable-gpu from it, and it's getting annoying having to remember to add it each time.

We need a better solution that is permanent, even if this is a separate shortcut that you guys create each update, whatever you think is best.

Please.

@chwzr
Copy link

@chwzr chwzr commented May 9, 2018

how to make a custom shortcut? or how to add the commandline flag in the dock in osx?
please add a user setting to disable the gpu soon!!!
its so annoying to always open the terminal before opening a document from finder...

@maccurt
Copy link

@maccurt maccurt commented Jun 9, 2018

Come on there has to be a fix for this!!

@bpasero
Copy link
Member

@bpasero bpasero commented Oct 9, 2019

Current idea (and pushed): have a new %user.home%/.vscode/argv.json file that allows to configure static arguments.

Contents:
image

Getting There:
image

We will probably add more values as default there. Possibly also the language configuration which currently resides in a locale.json file.

Feedback welcome.

@miketemby
Copy link

@miketemby miketemby commented Oct 10, 2019

@bpasero Excellent that this is getting addressed!!!

feedback:
Is there potential to just add this as an option within Preferences > Settings so users can just switch on or off GPU acceleration without needing to modify a JSON file?
Might be easier for users that are not so technically skilled.

@bpasero
Copy link
Member

@bpasero bpasero commented Oct 10, 2019

@miketemby since extensions can change settings programmatically and this can have quite an impact, it feels wrong to have it in a place that is not 100% under the control of the user.

@miketemby
Copy link

@miketemby miketemby commented Oct 10, 2019

@miketemby since extensions can change settings programmatically and this can have quite an impact, it feels wrong to have it in a place that is not 100% under the control of the user.

Fair enough. I'm happy either way. cheers.

@usernamehw
Copy link
Contributor

@usernamehw usernamehw commented Oct 12, 2019

@bpasero Why is it so limiting? I thought it would be possible to add any arguments like --enable-proposed-api or --disable-smooth-scrolling but they do not work.

@bpasero
Copy link
Member

@bpasero bpasero commented Oct 14, 2019

@usernamehw first of all, not all Chrome command line switches can be set that late. Many of the GPU related switches will only work if you configure them on the command line so that Chrome gets them very early. Setting them within our code is often too late.

I also think we should be careful with what we want to support from this file. I am open to adding more things to the file on a case by case basis if it makes sense and a lot of people would benefit from it.

@mlindner
Copy link

@mlindner mlindner commented Oct 17, 2019

Is there a similar issue created for Microsoft Teams? Teams has the same issue. This seems like a base Microsoft library issue rather than an issue specific to VSCode.

@aaomidi
Copy link

@aaomidi aaomidi commented Oct 29, 2019

What if I want to disable it with a command line switch? Is that possible? For example if I'm doing some testing in CI.

@bpasero
Copy link
Member

@bpasero bpasero commented Oct 30, 2019

@aaomidi what exactly do you want to disable?

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet