Say our username is
mike
Run
sudo usermod -a -G audio mike
Edit
/etc/security/limits.d/audio.conf
and make sure it contains the following:
@audio - rtprio 95 @audio - memlock unlimited
Log out of your desktop and log back in.
In a terminal, run
ulimit -l
to confirm the output is:
unlimited