Sluggish Slack on a Mac

The Slack app is made using Electron.

In my case, this means extreme sluggishness, pretty much identical to playing a game at 1 or 2 FPS.

I have this sluggishness on all of my macs: MacBookPro mid-2011, Mac Mini 2012 and a “Hackintosh” with a GTX 1070 (using Nvidia’s Web Driver).

The fix (at least in my case) is to disable the GPU “acceleration”, which can be done by launching Slack with the --disable-gpu argument.

I also happen to have the same problem with the other Electron app I use, Visual Code Studio and have already posted the technique I use to fix VSCode. However, because of differences in packaging, that method would be too complicated to implement for Slack.

Update: it seems to be caused by using a complex color profile, like those made using DisplayCAL. Falling back to a simple profile “fixes” the problem.

Simple fix

Simply launch Slack from a terminal instead of clicking the icon:

$ open -a '' --args --disable-gpu

Or you could find a guide on the internet on how to launch a shell script from Finder and to that instead.

Once the application is running, everything else works the way you are used to.

A more permanent fix

Important: this technique will break “Open With” and all other file/url coming from Finder (like dragging a file on the icon in the Dock).

If, like me, you prefer to launch apps like that using Alfred, this method is probably a bit better and less annoying.

The first step is to go in a shell and make a small bash script to launch it with the desired parameter inside Slack’s app:

$ cd /Applications/
$ cat > <<"EOF"
#!/usr/bin/env bash

PATH="$(cd "$(dirname "$0")"; pwd -P)"
exec $PATH/Slack "$@" --disable-gpu
$ chmod a+x

The next step involves modifying “Info.plist” so that Finder launches the shell script instead of the application:

$ cd /Applications/
$ open -e Info.plist

You can replace open -e with vim, code, subl or any other text editor (assuming you are modifying an XML plist and not a binary one).

You need to modify the CFBundleExecutable entry. For example, Slack contains this:

<plist version="1.0">

We change it so it becomes:

<plist version="1.0">

We then need to tell Launch Services to reload the application’s definition:

$ /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f /Applications/

From this point, launching “Slack” with Finder, the Dock, Alfred or anything else should actually launch it without GPU support.