Sublime Forum

Apple Displays

#1

There is an Apple Displays preference “mirror” option that only defaults where less than 2560 resolution is available to macOS. Since low resolution displays are a thing of the past for Apple devices, that is only mentioned in passing. I think this has everything to do in the 2K+ world with two (2) things that are requirements for setting the “gpu_window_buffer”: true, namely:

  1. Apple device running Sublime Text;
  2. Apple display is Retina, or 2560 horizontal pixels of better.

I prefer using 2 displays, one being an older 1080p 1920 resolution. I have tried ST in Apple “1K” 1920x1200, 1080p display, and ST predictably crashes unless default “false”.
However, with 2560x1440 2K, the 1080p has two behavioral conditions

  1. Behavior when ST window is on 1080p display and displays have separate spaces
  2. Behavior when ST window is on 1080p display and display do not have separate spaces

Space separation must be managed. Separate display spaces is visualized by dragging any window across the surface border of any attached displays. If displays have separate spaces, then the dragged window is released when visible on both displays, so the window will disappear on one display, and on the other display the window portion dragged onto that display will be visible. If displays do not have separate spaces, then when the dragged window is released on the border of all attached displays, then spaces shared will leave all window portions visible on all displays containing their respective portions of that window.

Now, this seems counter-intuitive to what Will Bond is telling us. Likely due to an interesting behavior on the Apple side, where a 2560+ resolution is detected. Without a 2K+, say Apple 1K and 1080p is immediate crash if “Auto” or if “True” setting is used. Apple 2K without shared spaces crashes ST on 1080p, where the ST app simply stops responding to normal commands, and often (but not always) open pages are not remembered. Apple 2K+ and 1080p will also crash, but only intermittently, and also the crash is different than the no-shared-spaces, as the ST app is performing normally, but suddenly closes, and finally, the 2K+/1080p shared spaces crash happens whatever display the ST app is on.

  1. No shared space - 2k available but ST on 1K = CRASH
  2. No shared space - 1K available but ST on 2K = EASY
  3. Shared space - TRY !! to keep ST on 2K screen = BEST

I find that the best way to manage the Sublime Text 3 GPU Bug is to use separate spaces for all displays, but only use ST in the 2k+ displays. That way, crash is less often, and the ST app performs as expected. However, sometimes the 1920+2560=4480 real estate is irresistible, in which case we just have to put up with constant and annoying ST crashes. The EASY/BEST distinction arises because apple window minimizing is unstable: apps minimized in one display can open in another display.

Apple does this to “maintain app focus”. Lose the Sublime Text GPU Bug, Apple defaults are no problem. If you focus your edited page in a browser in a 2K, guaranteed if you wake ST from the dock and your other unfocused display is 1K, then ST will open in the 1K, regardless of the fact that it was minimized from the 2K! Yesterday, ST crashed immediately on wake into the unfocused and forgotten 1K, CRASH!

This gets even more complicated, if we compare the external boot to the internal Apple device boot described above. External boots show same symptoms, but with more rigorous failure. I mean, that 1K display is useless if you even want to type a letter in ST. At least the internals tease some letters before they crash. Worse, the external crash forgets any letters typed after ‘drag-to-2K-rescue’ when it crashes anyway, forgets what you typed and wipes any memory buffers clean.

How to solve Rubik’s Cube blindfolded with one hand using only 2 fingers. A day in the life of your typical application programmer.

0 Likes

Crash or Memory Leak on macOS Mojave 10.14.4?