Under X11, the solution given by cassidyjames from Elementary OS works surprisingly well. I haven’t encountered any screen tearing at all, which feels a little strange for X11, albeit not knowing if my screen refresh rate has been affected.
An issue with implementing this was that placing the script in /etc/profile.d/
wouldn’t work, as the script would be executed before loading the desktop, thus breaking. A workaround would be to create a .desktop
entry in /etc/xdg/autostart/
that executes the script as if it were an application.