Hi, I’m using ST3 build 3200 on linux Mint 19 with both a GTX 970 and a GTX 1080 Ti, but this problem has been around for the last few years that I’ve used it with Mint 17.2, 17.3 and 18.X.
Under high GPU load (tensorflow with CUDA) the sublime text UI lags - to the point where it’s unusable.
Reading other posts on this forum, I’m not the only one with this problem:
I love ST, I want to keep using it but it’s becoming a problem as more of my work switches to using GPUs. I know it might be possible to work around by using a second GPU but I feel like you guys might lose linux users if there isn’t a more robust solution to this problem.
I’m really hoping that this can be scheduled for a fix in future, and you can devote some resources to this. If there is anything I can provide to help you guys figure this out, I’m willing.
We don’t currently explicitly use the GPU at all. We recently did update from GTK2 to GTK3. This seemed to help some people with scrolling performance on some Nvidia cards. Since you see UI lag when you have heavy GPU load, it makes me think that perhaps GTK/cairo are using your GPU for drawing the interface, or your CPU is backlogged feeding info to your GPU, or something along those lines? Do you see similar lags from recent builds of Firefox? I believe it uses GTK also, and renders interfaces that aren’t basic GTK widgets.
From reports I’ve seen, unfortunately Nvidia seems to have various issues with things like the 1080 cards on Linux where users can’t get smooth scrolling at 4k. I have a 1030 that pushes updates to a 4k screen no issue on Arch Linux, and a 1050 on a laptop with a 4k screen that does fine too. It doesn’t really make sense to me why some low powered cards can do it no problem, but high end ones can’t.
So at this point, it isn’t really clear to me that there is a fix that Sublime Text can make to solve this. That said, we do have an OpenGL rendering backend in the pipeline to be tested during this next dev cycle. Perhaps your GPU will better be able to handle OpenGL than pushing pixel buffers from main memory to the screen? Maybe there is a way to configure GTK/Gnome/Cairo to not use your GPU? Unfortunately I’m not familiar with the techniques or configuration on how to set priorities on the GPU in Linux or how they affect rendering. Perhaps being a heavy GPU user on Linux you have some insight on this?
Cairo is designed to produce consistent output on all output media while taking advantage of display hardware acceleration when available (eg. through the X Render Extension).
Your suspicion about Firefox was correct - I never noticed, because I don’t use that browser. I’m kind of at a loss as to what can be done however, it seems like something inefficient is going on with the process of drawing to the screen.