Sublime Forum

Plugin freezes the entire Xorg

#1

I’m trying to setup Sublime Text to work as a development environment for Rust. I spent last two days trying to figure out what actually happens. Still no idea, I’d appreciate any help.

My setup:

  • Dell XPS 13 9380
  • Arch Linux (5.14.5 kernel)
  • XFCE 4.16
  • Rust 1.55.0
  • Sublime Text 4113

I do the following steps:

  1. Remove old ST and the whole ~/.config/sublime-text folder
  2. Install a fresh copy of ST
  3. Install Package Control
  4. Install Rust Enhanced via Package Control
  5. Open a helloworld file in Rust.
  6. Press Ctrl+S

Result: My entire desktop freezes. When I move the mouse I can see the pointer moving, but everything else I see on any of my screens becomes completely unresponsive and still. Alt+Tab does nothing. The only way I found out of that situation is to switch to another console (Ctrl+Alt+F2) and kill the whole X server (killall Xorg)

Plot twist: When I repeat all the above in the safe mode (subl --safe-mode) everything works as expected.

Any ideas what is happening or how to fix it?

1 Like

#2

When things work in Safe mode but not normally, the reason is generally because of a package or plugin, since Safe Mode starts Sublime in it’s default state with no third party things active.

I would suggest disabling the Rust Enhanced package and try the same thing to see if it still happens. If it does, the issue is that the Rust Enhanced package is doing something unfortunate for you, in which case the best chances of fixing it are with raising an issue with the package maintainer.

0 Likes

#3

Thanks for your reply. But one thing still confuses me. Am I right to assume that Safe Mode should work exactly the same as a “freshly” installed Sublime Text? In other words: if the contents of ~/.config/sublime-text and ~/.config/sublime-text-safe-mode are exactly the same (packages installed, config files etc.) both modes should behave in the same way, right? Because in my case they don’t, safe mode works and normal mode freezes.

0 Likes

#4

Any chance to get some explanation how running in the Safe Mode is different from the normal mode when config files and plugins for both modes are exactly the same?

0 Likes

#5

Safe Mode replaces the configuration directory with an empty one so that everything runs at pure default; no packages are installed except for the ones that ship with Sublime, all user configuration files and key bindings are removed so that only the defaults apply, etc.

As such, a configuration directory that has nothing in it should indeed behave exactly the same as Safe Mode in that instance.

0 Likes

#6

I found a workaround of the problem. For the record, if someone runs into similar issue:

The problem seems to be with XFCE desktop environment. When I start Sublime Text by typing subl in my terminal, everything works fine. However, if I start it via XFCE desktop launcher or panel launcher, it freezes the whole X server (in a way I described above, with mouse strangely working) every time I attempt to call any Rust Enhanced commands.

@OdatNurd Thanks for your help!

1 Like

#7

Glad you got stuff mostly sorted out.

For what it’s worth, I also use XFCE and I have no issues. I can’t imagine what about the environment would make it work when launched from a terminal and not a launcher though.

1 Like

#8

Funny, the exact same thing happens to me (first time that I try to use Sublime Text).

Linux with kernel 5.16.4
Distribution: Gentoo
Desktop Environment: xfce-base/xfce4-4.18
Rust 1.74.1
sublime-text-4_p4169 with “Package Control” and “Rust Enhanced”

If I start Sublime Text with the command “subl” from a terminal and then I try to build a Rust project then everything works fine, but if I dare to start it from the XFCE-launcher and then I try to run a build then the whole desktop freezes (mouse pointer still working).

Workaround to still be able to use a launcher:
1]
Created an executable script containing the following:

#!/bin/bash
xterm -e "subl --detached"

2]
Created a launcher that executes the above script.

This is not perfect as it first creates a small xterm-window, but it does vanish on its own when I close Sublime Text, so not too bad.

(I don’t know what “–detached” does but this way at least the calling terminal does not exit immediately shutting down as well ST; I just tried out a few ones that I saw when using “strings” against ST’s executable and I saw as well with “ps” that “subl” uses “–detached” in the background for something so I blindly tried that one out as well)

0 Likes