Unable to start jack (Cannot allocate memory)

Ok, got it: I had to add myself to the group audio:

usermod -a -G audio theusername

Group membership is only updated on login, so you need to log out and in again (or just reboot).


The quick version: This is what I added to /etc/security/limits.conf to fix the memory lock issue; the @ symbol indicates the settings are for a group instead of a user:

 user        soft      rtprio      90
 user        soft      memlock      unlimited

 @audio      hard      rtprio      90
 @audio      hard      memlock      unlimited

 @video      hard      rtprio      90
 @video      hard      memlock      unlimited

There's an easy way to fix the problem "Cannot lock down 82246176 byte memory area." The memory lock is apparently very small, typically. You can check for yourself with ulimit -l or for maximum fun ulimit -a. Or maximum info, if you hate fun.

You want to configure the system to allow your user and the relevant groups to use unlimited memory.

The settings are in /etc/security/limits.conf; the file as it is doesn't do anything, but explains your options. If ulimit -l doesn't return "unlimited" after you follow my example from above, something's not right with your settings in the document.

Re: peoples' questions about Docker (or snapd, or any kind of virtualization), you may not have enough memory available flat out, or the configuration file might not be editable. Or it might work.