please fix this so i can never use another text editor again. on a 144hz monitor specifically, since the refresh rate is not a multiple of 60, the framerate actually looks very inconsistent like it’s stuttering and lagging.
How to increase Sublime Text frame rate from 60 Hz to 144 Hz
As far as I know, we don’t have any frame rate limits built in. Which OS are you using and which version of ST? I’ve had no issues with 144hz on Linux.
windows 10 (1909) and sublime 3.2.2 (3211). actually it’s the same on linux for me, and i’ve tried a few different window managers/compositors. same problem described in the original post, smooth scrolling is locked to 60fps but if i manually drag the scrollbar it’ll update at 144.
I’ve confirmed with opengl hardware acceleration using ST4, that we’re rendering at the refresh rate of the monitor. You can use the environment variable LIBGL_SHOW_FPS=1
to confirm. You can enable hardware acceleration on the latest Sublime Merge or Sublime Text 4 using "hardware_acceleration": "opengl"
. I’m also not able to observe a difference with hardware acceleration turned off. Do you perhaps have a mixed-refresh rate setup? As far as I know the compositor runs at the lowest refresh rate.
Environment:
- Windows 10 version 1809.
- Single monitor.
startup, version: 4074 windows x64 channel: dev
OpenGL Context Information:
GL API Version: 4.6.0 NVIDIA 445.87
GLSL Version: 4.60 NVIDIA
Vendor: NVIDIA Corporation
Renderer: GeForce GTX 1070/PCIe/SSE2
I am still able to reproduce the issue on this build. Specifically, scrolling a document with the mouse wheel goes at 60 Hz, while clicking and dragging the minimap or scrollbar scrolls at 144 Hz.
Where does the FPS info from LIBGL_SHOW_FPS=1 appear?
LIBGL_SHOW_FPS=1
is for linux. You’d need to run using --multiinstance
to run ST in the foreground. Do you see the same behaviour in other applications on windows? It could be that scroll events are being limited to 60hz.
chromium and basically everything else runs at a smooth 144fps for me on windows. sublime is the only thing locked to 60. i noticed the caret animation is locked to 60 as well, but when using the scrollbar and “forcing” the screen to update, it looks a lot smoother. i have a single monitor as well and a GTX 970 if it matters. i can’t test the new build as i don’t have a license.
I’ve done some further investigation into this issue on linux. It seems that this is an open issue for GTK and depends on the event frequency from the scrolling device: https://gitlab.gnome.org/GNOME/gtk/-/issues/2025
The same seems to be true of Windows. I’m able to get 70fps when scrolling with my touchpad, which is likely the polling rate.
Nice find. I think that might be a similar but different issue, though.
My mouse’s polling rate is 1000 Hz, and using it to scroll via click-and-drag on the scroll bar does scroll at 144 Hz.
On the other hand, when rolling the scroll wheel one notch, Sublime Text scrolls 3 lines of text in a 60 Hz animation.
Using the page-up and page-down keys on the keyboard also does a scroll animation at 60 Hz.
Indeed, there seems to be two issues here: No scroll event interpolation and a fixed animation frame-rate.
Another large contributing factor may be that Sublime Text simply can’t render at the required speed. From testing I can only get it to render quickly enough using CPU rendering with a really small window. This is on linux though.
I have a 144Hz screen now. SublimeText looks quite out of place with respect to all the other applications.
I just updated to build 4121 and this is a great one, I displayed the FPS and I get consistent 144 fps now where I had more around 80 - 100 FPS before
(You can use sublime.log_fps(True) to show fps)
I’m on 4126 and scrolling is still on 60 fps while on a 144hz display. In contrast, VSC looks abundantly smoother scrolling and caret moving…
I just tried ST4 again after initially avoiding it due to performance problems, but they seem to still be around so adding my issues to the mix in the hope they get fixed.
In my case, I have a single 100hz display and a single discrete GPU. Internal FPS of ST4 seems to be locked at 60, making it feel extremely stuttery and laggy compared to every other application which updates at 100hz.
Using build 4143.
OpenGL Context Information:
GL API Version: 4.6 (Core Profile) Mesa 22.0.5
GLSL Version: 4.60
Vendor: AMD
Renderer: AMD Radeon RX 6900 XT (sienna_cichlid, LLVM 13.0.1, DRM 3.42, 5.15.0-57-generic)
$ inxi -S
System:
Host: desktop Kernel: 5.15.0-57-generic x86_64 bits: 64
Desktop: MATE 1.26.0 Distro: Ubuntu 22.04.1 LTS (Jammy Jellyfish)
You can see here, glxgears has no trouble detecting and hitting 100hz, but for some reason ST4 is seemingly locked at 60hz.