Sublime Forum

CPU rather than GPU rendering

#1

Hello,

Sorry in advance if my english is poor, I am not a native English speaker.
My request may seem strange, I’d like to know if there is an option to use CPU instead of GPU to display the code zone in ST. I have found the “gpu_window_buffer” option, but apprently it only applies to Mac OS X (I use Xubuntu) and it is not really what I am asking for.
The reason is, I sometimes enable Folding @ Home on my GPU (which is much faster than a CPU for this task), and it makes ST really slow (for example when scolling). Since F@H should have by default the lowest priority, I wonder if this is not a F@H bug.
Anyway, when I am scrolling (for example) in ST, I don’t see the CPU usage increasing (but I see the GPU usage increasing which is weird because it should already be at 100% with F@H). Whereas when I try to scroll with (for example) gVim, there is no slow-down.
So I would like to know if there is a way in ST to fix this or if I have to temporarily pause F@H to use ST.

Thank you!

1 Like

UI lag under high GPU load
Sublime crawls when Folding@Home runs in the background
Slow scrolling when running CUDA programs
#2

I had a similar problem when I was running 3D stereoscopic support on my monitors. Sublime would just slow down to a crawl. I was never able to find anything to control GPU use. I don’t believe that it is an option currently. Sublime just never learned to share…

0 Likes

#3

ok, problem “solved”.
Thank you!

0 Likes

#4

Hi, I’m facing the same problem.
How did you solve the problem?

0 Likes

#5

Sorry, actually I meant there was no satisfying solution at that moment.
I haven’t dig deeper since then.

0 Likes

#6

Is there any update on this?
I’m usually training Deep Neural Networks (Deep learning related stuff) and they cap the GPU utilization to 100% .
When that happens its nearly impossible to properly use SublimeText, It takes ages for scroling several lines up and down! and this is while the CPU utilization is very low.
Is there anything that we can use in the newer version to get around this issue? I’m using 3143 build.

1 Like

#7

I’m using sublime text build 4121, and turning on hardware acceleration (“hardware_acceleration”: “opengl”) helps it. This may sound counterintuitive, because wouldn’t this use the gpu and slow things down? But for some reason it fixed it on my computer, even at 100% utilization. I think that by default, sublime uses Cairo library or sth like that, which uses gpu behind the scenes, but does not have a high priority. Turning on hardware acceleration uses opengl, which I suspect has a higher priority and thus runs smoothly.

0 Likes

#8

It would be counterintuitive if using the GPU slowed things down, as rendering is literally what GPUs were designed for. It has nothing to do with priority, GPUs are simply much faster at performing rendering tasks. ST uses skia for software rendering when hardware acceleration is not enabled.

0 Likes

#9

I mean, I was talking about the case where you uses 100% of the GPU for some purpose (mine is deep learning and ether mining), then it is intuitive that using the GPU to render would make the experience laggy, because it has to make space for sublime’s graphics computation. And sublime on my machine does run slow if it uses Cairo by default on 100% gpu utilization.

I am unsure if the problem is actually due to Cairo not having a higher priority or not, but oh well, I’ve run into this problem for a good part of a year already, and wanted to write something so other people know what to do.

0 Likes

#10

We don’t use cairo, we use Skia for software rendering. OpenGL is used for hardware accelerated rendering, which is enabled by default on macOS but the others default to software rendering.

0 Likes