Sublime Forum

Failed to initialize OpenGL rendering

#1

Hey!

Having problems enabling hardware rendering in Linux, Wayland, Fedora 42. It is a fully updated system with a freshly-installed latest Sublime Text 4.

GPU / OpenGL info:

gaha@fedora-trx 10:32:48
~$ glxinfo | grep "OpenGL"
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce RTX 4090/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 575.64.03
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 575.64.03
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 575.64.03
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
gaha@fedora-trx 10:33:04
~$ lspci | grep -i 'vga\|3d\|display'
81:00.0 VGA compatible controller: NVIDIA Corporation AD102 [GeForce RTX 4090] (rev a1)

Specific problem I am having:

gaha@fedora-trx 10:40:02
~$ subl --multiinstance --debug
:0                                                                startup, version: 4200 linux x64 channel: stable
:0                                                                executable: /opt/sublime_text/sublime_text
:0                                                                application: /opt/sublime_text
:0                                                                working dir: /home/gaha
:0                                                                packages path: /home/gaha/.config/sublime-text/Packages
:0                                                                state path: /home/gaha/.config/sublime-text/Local
:0                                                                zip path: /opt/sublime_text/Packages
:0                                                                zip path: /home/gaha/.config/sublime-text/Installed Packages
:0                                                                ignored_packages: ["Vintage"]
:0                                                                pre session restore time: 0.107651
:0                                                                OpenGL Context Information:
:0                                                                  GL API Version: OpenGL ES 3.2 NVIDIA 575.64.03
:0                                                                  GLSL Version: OpenGL ES GLSL ES 3.20
:0                                                                  Vendor: NVIDIA Corporation
:0                                                                  Renderer: NVIDIA GeForce RTX 4090/PCIe/SSE2
:0                                                                GL Shader 'rect.vert' compilation failed: 0(2) : error C0201: unsupported version 410
0(4) : error C7532: global type vec2 requires "#version 100" or later
0(9) : error C0000: syntax error, unexpected '(', expecting "::" at token "("
0(34) : error C1503: undefined variable "a_position"
0(36) : error C7011: implicit cast from "int" to "float"
0(36) : error C7011: implicit cast from "int" to "float"
0(37) : error C7532: global variable gl_Position requires "#version 100" or later
0(37) : error C7532: global type vec4 requires "#version 100" or later
:0                                                                OpenGL: Error on data initialization: 0(2) : error C0201: unsupported version 410
0(4) : error C7532: global type vec2 requires "#version 100" or later
0(9) : error C0000: syntax error, unexpected '(', expecting "::" at token "("
0(34) : error C1503: undefined variable "a_position"
0(36) : error C7011: implicit cast from "int" to "float"
0(36) : error C7011: implicit cast from "int" to "float"
0(37) : error C7532: global variable gl_Position requires "#version 100" or later
0(37) : error C7532: global type vec4 requires "#version 100" or later
:0                                                                startup time: 3.01954
:0                                                                first paint time: 3.04446
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.html_print
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.keymap
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
:0                                                                plugins loaded
:0                                                                shutdown

After displaying the error popup

Sublime launches in software rendering mode, which is too laggy for me to use. When hovering the cursor above the Sublime Text window, it looks like it is moving in 10-20 FPS.

0 Likes

#2

NVIDIA has known issues with Wayland, especially on older drivers. Does this also happen in X11?

When hovering the cursor above the Sublime Text window, it looks like it is moving in 10-20 FPS.

This indicates an issue with your system. Sublime Text doesn’t draw the cursor, neither does it do much rendering when moving the cursor. Regardless of how slow ST is rendering, the cursor shouldn’t be affected.

Additionally while software rendering is slow compared to hardware, it’s plenty fast for the small bits of rendering that are done when just moving the cursor. We’ve tested with a slow-ish CPU and an 8k display and it’s only large redraws like scrolling that are an issue performance wise. But again regardless this shouldn’t affect the cursor in any way.

0 Likes

#3

I see. On the other hand, I didn’t observe this with any other software. Any other steps to troubleshoot this issue? I am using a 64 core threadripper CPU if that matters.

0 Likes

#4

Regarding X11, it is unfortunately not included in Fedora 42 and I don’t have an easy way to test that. I could test running X11 from Live Boot USB stick, but would that information help in troubleshooting the issue on Wayland?

0 Likes

#5

You can try using xwayland by launching ST using GDK_BACKEND=x11 subl. You can also try installing more recent nvidia drivers. It could help with diagnosis to check CPU utilization when the cursor is lagging, is the ST process using a lot?

0 Likes

#6

@bschaaf Sublime Text 4 started working perfectly well when run with GDK_BACKEND=x11 subl. I think it actually solves the problem for me.

Regarding the CPU utilization, it didn’t seem to spike in a meaningful way. Even when lagging, the subl CPU utilization stays at low single digit percentages.

0 Likes

#7

How should it spike, except ST would occupy all 64 cores / 128 threads just for cursor rendering.

Actually if a threadripper is not capable to do drive software rendering of a text editor, system must really be borked.

0 Likes

#8

The only way ST could possibly cause a laggy cursor is by over-utilizing system resources, since that isn’t happening this must be a problem with your desktop environment and/or gpu drivers.

0 Likes