Sublime Forum

Sublime Text freezes on Linux (Fedora / GNOME)

#1

When I start Sublime Text on my Linux machine, it freezes very often.
A lot of times, when I save the file I’m currently editing, the whole UI seems to freeze.
It appears that this only happens when the window is maximized.

The UI unfreezes, as soons as I:

  • resize the window
  • save the file
  • click any Ribbon from the menu bar

I guess this is probably a problem with GNOME or something, because running Sublime in i3 never gives me these problems.

But I just installed Sublime on a fresh Fedora install. Problem persists.
I also observed this problem using GNOME on Arch Linux.

Can someone help here please?

Thanks a lot!

0 Likes

ST3 hangs for a while (Ubuntu 20.10)
Sublime Text UI not always refreshing
Sublime Text 3 constantly freezes on Ubuntu
#2

Are you using X or Wayland?

0 Likes

#3

Currently, I’m using Wayland.
But if I remember correctly, I’ve been using X when I was on Arch Linux.
I had the same problem there.

0 Likes

#4

I have same or very similar problem straight after upgrading Ubuntu 20.04 to 20.10 so it may be related to new version of Gnome as @Skev pointed.

Sublime randomly freezes for couple of seconds - when writing, switching opened files tabs or scrolling.

During the freeze if I move mouse outside Sublime window ie. move mouse to taskbar it unfreezees. Similar when I minimize/maximize Sublime window.

I reinstalled ST3 but the problem persist.

0 Likes

#5

I can confirm that after the upgrade from Ubuntu 20.04 to Ubuntu 20.10 these freezes happen constantly on Xorg. Uninstall didn’t help so I suspect it might be something to do with the new version of Gnome. It freezes when switching tabs, when closing files, when coding (or changing lines). Both mouse and keyboard input. Since I have multiple sublime text (licensed) installed this has been a big issue for me personally, because I use sublime for my every day work in my company.

0 Likes

#6

Same here on Debian bullseye / GNOME 3.38 on X11. This is driving me nuts as a super long time (reg’d) user, ST3 is more than an extension of my own brain. Reinstalled, monitored logs, removed plugins… Nothing does it :frowning:
I can spend how much time you need to help you identify the issue though, feel free to reach !

0 Likes

#7

Considering this is only an issue on newer gnome/gtk versions I can only assume it’s an upstream issue. If anyone having this issue could run a profiler to see where ST3 is spending all of its time during the freezes that would confirm where the issue lies. I’ll be looking into this next week if it hasn’t been identified by then.

0 Likes

#9

Maybe it’s an gtk issue? Gnome 3.38 brought in some changes in regards of that.

0 Likes

#10

@chybz Yeah it is annoying. I will try to figure out the issue. I appreciate your help. Will let you all know if I managed to narrow down the issue.
Thank you all.

0 Likes

#11

I have used strace and when it frozes I get this output:

**1604213696.060429 openat(AT_FDCWD, "/opt/sublime_text/libappmenu.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)<0.000062>**
1604213696.060634 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 103 <0.000045>
1604213696.060763 fstat(103, {st_mode=S_IFREG|0644, st_size=106025, ...}) = 0 <0.000042>
1604213696.060884 mmap(NULL, 106025, PROT_READ, MAP_PRIVATE, 103, 0) = 0x7f1508b81000 <0.000039>
1604213696.060983 close(103)            = 0 <0.000023>
1604213696.061084 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libappmenu.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) <0.000029>
1604213696.061184 openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/libappmenu.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) <0.000026>
1604213696.061277 openat(AT_FDCWD, "/lib/libappmenu.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) <0.000026>
1604213696.061368 openat(AT_FDCWD, "/usr/lib/libappmenu.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) <0.000026>

Looking for libappmenu.so, but not finding it. Could this be the cause?

0 Likes

#12

I also tried running strace on sublime.
It was interesting…
while running strace, no freezes occured.
It was only when I stopped strace, that Sublime was freezing again…
Don’t know what to make of it.

0 Likes

#13

At least, that was when running strace attached on the process.
I tried running the command:
strace -e status=failed subl

That was the output:

arch_prctl(0x3001 /* ARCH_??? */, 0x7fff822b7d20) = -1 EINVAL (Invalid argument)
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
ioctl(-1, TIOCGPGRP, 0x7fff822b7b64)    = -1 EBADF (Bad file descriptor)
ioctl(3, TCGETS, 0x7fff822b7af0)        = -1 ENOTTY (Inappropriate ioctl for device)
fcntl(255, F_GETFD)                     = -1 EBADF (Bad file descriptor)
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffe220ac070) = -1 EINVAL (Invalid argument)
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/tls/haswell/x86_64/libgobject-2.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/opt/sublime_text/tls/haswell/x86_64", 0x7ffe220ab220) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/tls/haswell/libgobject-2.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/opt/sublime_text/tls/haswell", 0x7ffe220ab220) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/tls/x86_64/libgobject-2.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/opt/sublime_text/tls/x86_64", 0x7ffe220ab220) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/tls/libgobject-2.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/opt/sublime_text/tls", 0x7ffe220ab220) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/haswell/x86_64/libgobject-2.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/opt/sublime_text/haswell/x86_64", 0x7ffe220ab220) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/haswell/libgobject-2.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/opt/sublime_text/haswell", 0x7ffe220ab220) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/x86_64/libgobject-2.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/opt/sublime_text/x86_64", 0x7ffe220ab220) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/libgobject-2.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/libglib-2.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/libX11.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/libcairo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/haswell/x86_64/libcairo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls/haswell/x86_64", 0x7ffe220ab6e0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/haswell/libcairo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls/haswell", 0x7ffe220ab6e0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/x86_64/libcairo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls/x86_64", 0x7ffe220ab6e0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/tls/libcairo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls", 0x7ffe220ab6e0)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/haswell/x86_64/libcairo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/haswell/x86_64", 0x7ffe220ab6e0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/haswell/libcairo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/haswell", 0x7ffe220ab6e0)  = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/x86_64/libcairo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/x86_64", 0x7ffe220ab6e0)   = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/libcairo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/tls/haswell/x86_64/libcairo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls/haswell/x86_64", 0x7ffe220ab6e0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/tls/haswell/libcairo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls/haswell", 0x7ffe220ab6e0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/tls/x86_64/libcairo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls/x86_64", 0x7ffe220ab6e0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/tls/libcairo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls", 0x7ffe220ab6e0)  = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/haswell/x86_64/libcairo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/haswell/x86_64", 0x7ffe220ab6e0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/haswell/libcairo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/haswell", 0x7ffe220ab6e0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64/libcairo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/x86_64", 0x7ffe220ab6e0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/libcairo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/libcairo.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/libpango-1.0.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/libpango-1.0.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/libpango-1.0.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/libpango-1.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/libpangocairo-1.0.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/libpangocairo-1.0.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/libpangocairo-1.0.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/libpangocairo-1.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/libgdk-3.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/libgdk-3.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/libgdk-3.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/libgdk-3.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/libgtk-3.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/libgtk-3.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/libgtk-3.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/libgtk-3.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
access("/etc/system-fips", F_OK)        = -1 ENOENT (No such file or directory)
access("/etc/gcrypt/fips_enabled", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/opt/sublime_text/libgio-2.0.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib64/libgio-2.0.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/libgio-2.0.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
+++ exited with 0 +++
0 Likes

#14

Same in PopOS (Ubuntu), it started when I upgraded from 20.04 to 20.10

1 Like

#15

Same here. Happened when upgrading from 20.04 to 20.10 on Pop OS. Using dev channel build 4090. I also see stalling in Sublime Merge when opening the command pallette. Sublime Merge build is 2038. I noticed i can workaround it by typing alt+tab to a different window and then again to come back. It is super annoying :wink: Let me know if there is anything i can do to help debug.

0 Likes

#17

It does seem better after i did the following, but will continue to test: I uninstalled, backed up my settings, and deleted .config/sublime-text. Then i reinstalled and reapplied my settings. Same for Sublime Merge.

0 Likes

#18

I wasn’t able to reproduce any freezing on a fresh Ubuntu 20.10 virtual machine with neither Sublime Text nor Sublime Merge. Does this also happen for people when using Sublime Merge’s “Safe Mode” (launch with --safe-mode)?

0 Likes

#19

I tried launching Sublime in Safe Mode.
Unfortunately, the issue persists.

Could this possibly be a problem with graphics drivers?
Since you do not experience these freezes in a VM?

I’ve heard that GNOME can be a bit unstable when using the official proprietary Nvidia Drivers for the GPU.

I use a GTX 970 with the official driver.

Maybe it would be a good idea for all the others experiencing this issue, to let us all know their setup.
Maybe then we can narrow down the issue?

0 Likes

#20

I have intel graphics and the freeze is present. I think it’s the new version of Gnome (and libraries) that are affecting the Sublime Text/Merge. Changing tabs help unfreeze it. It seems like rendering the window/tab is the main issue here. I also suspect the new gtk libraries (and API) might be the cause of this.

This is really affecting my productivity, and I’m starting to consider other editors/IDE’s as I use Sublime for my business.

0 Likes

#21

Update: The freezing is not limited to Sublime Text only. I have noticed that the freezing also occurs in applications like Libre Office. This is most likely an issue with Gnome, kernel or video drivers. I will keep a lookout for reported bugs on launchpad (Ubuntu).

0 Likes

#22

Hey @skev ! I use a “NVIDIA Corporation GM107GL [Quadro K620]” with “nvidia-driver 455.23.04-1” (same issues with driver 450.80.02-1), with X11.
I can also confirm the problem is with newer Gnome or kernel. It was not the case when I switched to Debian bullseye at the beginning and kernel has ramped up from 5.3 to 5.9 now. Gnome has been upgraded from 3.36 to 3.38.

0 Likes