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

Terminal is unusably slow due to GPU blacklisting #56517

Closed
grigorig opened this issue Aug 16, 2018 · 15 comments
Closed

Terminal is unusably slow due to GPU blacklisting #56517

grigorig opened this issue Aug 16, 2018 · 15 comments
Assignees
Labels
electron Issues and items related to Electron perf terminal General terminal issues that don't fall under another label upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@grigorig
Copy link

  • VSCode Version: 1.26.0
  • OS Version: Fedora 28

Steps to Reproduce:

  1. Start VSCode
  2. Try to use the integrated terminal - it's very slow

My system uses an AMD RX 480 GPU with Mesa 18.0.5 as the OpenGL driver. For some reason, Electron puts me onto the GPU blacklist, which results in bad performance. It's especially noticeable with the integrated terminal, which is unusably slow.

Starting VSCode with the --ignore-gpu-blacklist flag fixes the performance problems, with no noticeable issues.

It is unclear if my system/GPU was on the blacklist on previous VSCode versions as well, but they did not have the severe performance issues with the terminal.

So this might be two issues, I'm not sure: First, VSCode's terminal is extremely slow without GPU acceleration in 1.26.0, and apparently this wasn't a problem before. Second, VSCode/Electron seems to blacklist various GPU/driver combinations for no specific reason. I'm using an up to date driver with a contemporary GPU and acceleration should work just fine.

@grigorig
Copy link
Author

grigorig commented Aug 16, 2018

The aggressive GPU blacklist might actually be a problem with Electron 2.x:

electron/electron#12042
electron/electron#11051

Note: to give you some idea, "very slow" means it might take close to a second for a redraw of the terminal! It should not be that slow even with software rendering.

@MastroLindus
Copy link

I have the same issue on Linux Mint 18.3. ignore-gpu-blacklist fixes the issue.
I also have a related issue in 1.26.0 that I never had in 1.25.0 or before: when editing a TSX file, sometimes changing a tag causes a big jsx block to be invalid and normally the lines would be highlighted in red.
Sometimes when this happens now the whole visual code rendering freaks out and becomes unusable, e.g. most of the screen becomes black, you get weird characters on screen, and trying to move the mouse and interact with code has weird outcomes (I think the functionality keeps working, like pressing a button, but because the rendering fails you don't get a proper UI feedback of it).
Since I use the --ignore-gpu-blacklist I didn't see the problem again.

@grigorig
Copy link
Author

Is it possible to permanently set --ignore-gpu-blacklist in the preferences? That might be an acceptable workaround, short-term.

@stgogm
Copy link

stgogm commented Aug 16, 2018

I've also tried setting "terminal.integrated.rendererType" to "dom" and in fact, it is more responsive but it has padding issues.

@marcelofrau
Copy link

On the 1.25.0 even using canvas mode the performance on terminal is absurdly faster. On the 1.26.0 even with --ignore-gpu-blacklist the terminal suffers from slowdowns here on my enviroment. I am rolling back to 1.25.0 temporarily. :(

Changing to dom the rendererType solves the problem but the terminal here is getting a lot of padding issues.

I am currently working inside a virtualbox machine with no 3d acceleration (due to linux incompatibilities) and the performance is heavily noticed here.

Please fix this issue, if you need some help or some tests on my enviroment please let me know and I will be glad to contribute.

Thanks.

@vscodebot vscodebot bot removed the new release label Aug 21, 2018
@Tyriar
Copy link
Member

Tyriar commented Aug 21, 2018

The GPU blacklisting problem does go away with Electron 3 (#52629, for the most part at least). The dom renderer was added such that we have a reasonable experience when Chromium wants to disable the GPU like this (as we don't know why it wants to disable).

Something to note though is that there was also a pretty bad terminal perf regression in 1.26 which is fixed, I expect the experience in Insiders (tomorrow's build) to be much better for both canvas and dom renderers. #56628

Let's track the slow GPU issue due to Electron in this issue.

@Tyriar Tyriar added upstream Issue identified as 'upstream' component related (exists outside of VS Code) electron-2.0.x-update terminal General terminal issues that don't fall under another label perf electron Issues and items related to Electron labels Aug 21, 2018
@fractos
Copy link

fractos commented Aug 29, 2018

Hitting this issue on a Lenovo T470s (high dpi main display - 2560x1440) since last update to 1.26.* and have been getting notification about terminal renderer being slow. Switching to dom renderer type didn't help. I generally run with --disable-gpu since I get scroll issues on touchpad and I've tried with and without that. However, starting Code with --ignore-gpu-blacklist has completely alleviated the terminal being slow.

@davidstl
Copy link

Hi guys, I am not on Insider, but 1.26.1. And even with --ignore-gpu-blacklist it is still slow and unsusable if I make the terminal fullscreen.

Specs: i7 PC with GForce 1050.

@Tyriar
Copy link
Member

Tyriar commented Aug 31, 2018

@davidstl could you check if it improved on Insiders to see if #56628 was your problem?

@marcelofrau
Copy link

@Tyriar I am still having slowdown issues with the latest insiders version.. :(

@Tyriar
Copy link
Member

Tyriar commented Aug 31, 2018

@marcelofrau you mentioned this:

Changing to dom the rendererType solves the problem but the terminal here is getting a lot of padding issues.

The padding issues should be fixed in 1.26, I think your unfortunately on an environment that Chromium treats a little funny, which was the reason for the dom renderType being introduced. I'd stick with DOM for now and try switch again when our Electron 3 build comes out #52629

@clor09
Copy link

clor09 commented Sep 16, 2018

got this problem too with ver 1.27.2 , and ignore gpu blacklist works~ and just for a note: this also fix the hyper termnial~ it should be tracked~~

@Tyriar Tyriar mentioned this issue Oct 1, 2018
@yoisel
Copy link

yoisel commented Nov 1, 2018

I use vscode on xubuntu 18.04 over remote desktop (xrdp). In my case it is also unusable.

@CkTD
Copy link

CkTD commented Dec 13, 2018

the flag works for me with version 1.29.1 on fedora 29

@Tyriar
Copy link
Member

Tyriar commented Dec 13, 2018

Since we just merged in Electron 3 to Insiders (v1.31) I'm going to call this closed. If you do still see slowness issues the first thing you should do is turn on the DOM renderer by adding this setting (you should be prompted automatically to switch if your terminal is slow):

"terminal.integrated.rendererType": "dom"

The DOM renderer's performance has also improved a lot in Insiders due to xtermjs/xterm.js#1792, it's not meant to be faster than canvas but it should be reasonable. If you see any bad performance issues with the DOM renderer please file an issue.

I'll lock this to prevent this information from being buried.

@Tyriar Tyriar closed this as completed Dec 13, 2018
@Tyriar Tyriar added this to the December 2018 milestone Dec 13, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
electron Issues and items related to Electron perf terminal General terminal issues that don't fall under another label upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

10 participants