Sublime Forum

Broken window in KDE Plasma 5


After some update in Plasma 5, sublime started breaking. When I run sublime, it all works fine in the beginning, but then at some point it breaks and every sublime window starts looking like the screenshot below. Looks like it’s likely a problem with sublime as this doesn’t happen with any other application.

Is there a way I can debug this, like look at some sublime logs?

I am on Linux, installed sublime from source using the tarball. KDE Plasma version 5.27.10



Are you using hardware acceleration? Does it happen in safe mode?



Thanks for suggestion. Safe mode works fine. I wiped the cache in my installation of sublime (~/.cache/sublime-text and ~/.config/sublime-text), but the problem still happens. Any tips what might be the reason and what are other differences with safe mode?



Do you have hardware acceleration enabled in your settings?



No, hardware_acceleration is set to none in settings



Does it also happen in other GTK-based applications?



I haven’t seen this happen in any other application. I also tried GIMP as it seems to be GTK-based, but it behaves properly.

Additional info: It looks like the problem happens after wake up from suspend. There seems to be some ‘resizing’ happening on wake up - I have seen other applications automatically ‘resizing’ from the crop size on the picture to full screen, but it takes them a second at most, rather than getting stuck and unresponsive like sublime. It might also be related to having an external monitor connected.

I also tried using hardware_accelaration: opengl and then sublime crashes and closes after wake up from suspend.

Since safe mode seemed to work correctly, what would be the differences between a fresh install of sublime with no local cache and safe mode?



GIMP uses older versions of GTK, I’d try gedit, gnome-calculator or gnome-terminal.

what would be the differences between a fresh install of sublime with no local cache and safe mode?

There is no difference between fully reverting to a freshly installed state and safe mode.



Tried gnome-calculator, it works alright too. sublime is the only application where I have observed this

It’s very strange that it doesn’t happen in safe mode, but happens with a freshly installed state. Are there any logs I could check that would give us further information what causes the problem?



There are no logs for rendering, the only extra thing you could enable is G_MESSAGES_DEBUG=all for getting logs from GTK.



This is very strange. I did some extensive testing and whatever I do, it eventually happens in normal mode, but never happens in safe mode.

Could it be something related to handling the cached data by normal mode, which effectively doesn’t happen in safe mode since the state is not preserved between different launches of the program.



It looks like the above is the exact reason. I continued with my testing, here are the results:

  1. Safe mode - problem never happens
  2. Normal mode, clean install, ~/.cache/sublime-text and ~/.config/sublime-text cleaned up, just open up several windows, no settings changed - problem doesn’t happen
  3. Same as 2, but I close sublime and reopen it (so now ~/.config/sublime-text is populated only with data about the windows I opened in 2 and nothing else) - problem happens