==> Edit the /etc/security/limits.conf to allow you (user) to have rt priviledges
@audio soft cpu unlimited @audio - rtprio 100 @audio - memlock unlimited
And add yourself to the audio group.
Forgot to say: NEVER start anything (jack, pd etc...) as root, it's not safe. This configuration above is enough.
I did try something similar but with cpu at 95 I think and memlock at 30% of ram. still same glitching. once I get the glitching to stop when pd window is open I will mess around with that. again. I guess If I set cpu to unlimited I will have to catch the cpu overload in pd and stop dsp.