@Peter
I followed the instructions on this page.
https://github.com/MichMich/MagicMirror/wiki/Configuring-the-Raspberry-Pi#enable-the-open-gl-driver-to-decrease-electrons-cpu-usage
They’re a little outdated because they deal with older versions also but the basic information is there.
Essentially, it seems that the Open GL driver is enabled by default now, so I had to:
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
and added the following line.
@xrandr --output HDMI-1 --rotate right