guitarix can't connect to qjackctl on ubuntu 21.10

yesterday I upgraded my ubuntu to 21.10 and it seems first bug found - guitarix can't connect to qjack

this is error in terminal when starting guitarix (qjack running):

Cannot mmap shm segment /jack-1000-0 (*temporary unavailable)
Map shared memory segments exception
JackShmReadWritePtr1::~JackShmReadWritePtr1 - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 0, skipping unlock

*translated from my language as good as I can

there is also message box with text: [time] Jack Init *** unknown jack server communication error

So I press Start jack in guitarix - qjack window apears in front and than a while nothing, later there is error message box from guitarix saying the same sentence as before + main *** I really tried to get jack up and running, sorry ...

in terminal same error but few more times

edit:

I noticed that in qjack log there apears these messages:

9:09:16.697 *layout connection JACK changed.
19:09:16.751 *layout connection JACK changed.
Thu Oct 21 19:09:16 2021: New client 'gx_head_amp' with PID 15173
Thu Oct 21 19:09:16 2021: Client 'gx_head_amp' with PID 15173 is out

*translated

edit 2:

so it seems no answers yet... I was reading trough some articles about qjack and it appeared that there could be some problem with privileges, so I tried to run:

first qjackctl as sudo and guitarix as normal user -> except all my config in jack was away, nothing different

second qjackctl as sudo and guitarix as sudo -> worked, but as I said, all config away, also quite weird running such apps as root

third time I tried to run qjack as user and guitarix as root, but also didn't work

so from this I assume, that with update there had to be some change in probably group audio


So to fix this problem I just edited (created) file /etc/security/limits.d/audio.conf, I wrote there:

@audio   -  rtprio     95
@audio   -  memlock    unlimited

if I get it right, it makes audio group users have unlimited memory + high priority for processes

To apply changes, user has to log out