You've got a DisplayLink dock, a mac, a vertical monitor and constantly deal with monitors freezing out? I've gotchu fam!
A lazy, but somewhat-useful workaround to speed up your ~daily DisplaylinkManager restart
Note: The DisplayLink Driver has been updated on MacOS since I wrote this post and no longer presents the issues resolved by this post, treat the contents of this post as an archive.
First of all, if you haven't bought a dock yet and are thinking of getting a DisplayLink dock for your laptop, please DON'T. The only time where DisplayLink would make sense is if you got the brand new M1 macs and want more than just display mirroring.
Now if you made the same mistake as me and fancy vertical monitors for slack/discord duty. You may have noticed that your vertical monitor freezes up at least once a day (the image rendered on it will stay static). This is unacceptable and until DisplayLink patches it up, I will forever advocate against their products.
Step 0: Manual workaround
The only workaround I have found to resolve the issue is to force quit the DisplayLinkUserAgent
process from the activity monitor. This quickly got very very time-consuming and I just won't accept this much manual work for a problem that really shouldn't be a problem.
Step 1: AUTOMATE!!!
Currently on my mac, I use skhd alongside yabai as a tiling window manager (blog post on that coming in the future ๐). But there's nothing preventing you from adding your own shortcuts and scripts to your skhdrc
file and this is exactly how my workaround works, a simple shell script.
But how?
Save this script in your preferred directory (something like ~/.local/bin/restartDisplayLink.sh
) and make sure it has execution rights (chmod +x ~/.local/bin/restartDisplayLink.sh
) ```bash #!/bin/bash
killall DisplayLinkUserAgent
sleep 15 open -a "DisplayLink Manager" ``` Easy right? Might be ugly, may not work on the first execution but that doesn't really matter for my use case, I can simply just press the same keyboard shortcut again.
Making your own keyboard shortcut to execute your new script
This is the home stretch, all you need to do is edit (or create) ~/.config/skhd/skhdrc
and add the following line:
fn + lalt - 1 : "${HOME}"/.local/bin/killDisplaylink.sh