[LAU] Problems connecting Sound Devices usbpre2 to JACK

robertlazarski robertlazarski at gmail.com
Sat Apr 24 17:03:20 CEST 2021

On Fri, Apr 23, 2021 at 5:41 PM Chris Caudle <6807.chris at pop.powweb.com>

> On 2021-04-23 16:57, robertlazarski wrote:
> > I am stuck on this part. jltcdump won't connect after starting jackd
> > from qjackctl.
> >
> > [linux-fesf(robert)]
> > /home/robert> sudo /usr/local/bin/jltcdump
> Seeing "sudo" is a big red flag.  Why are you using sudo to start
> jltcdump?  Do you start all of your audio applications using sudo?  By
> using sudo to start jltcdump you are running it as root, but if you did
> not start qjackctl using sudo then jackd and jltcdump will be running
> under different user accounts and cannot access each other.
> More to the point, it is recommended to never run jackd or jack
> applications as root.  Usually when someone is using sudo to start audio
> applications it indicates that the security configuration of their
> machine is incorrect and not allowing users to run applications with
> realtime permissions.
> You should have a directory /etc/security/limits.d/ with files for
> various settings.  Depending on your distribution the settings may be in
> /etc/security/limits.conf or in separate files in /etc/security/limits.d
> or a mix of some settings in limits.conf and some settings in the
> individual files in limits.d/.
> For example this is what I have in my
> /etc/security/limits.d/95-jack.conf file:
> # Modified limits for users of jack-audio-connection-kit
> ## Automatically appended by jack-audio-connection-kit
> ## Other documents recommend rtprio of 60 or 70 -- Chris
> @jackuser - rtprio 95
> @jackuser - memlock 16777216
> ## Automatically appended by jack-audio-connection-kit
> # This seemed to override the value of 90 I set above, so commenting out
> # @pulse-rt - rtprio 80
> @pulse-rt - nice -20
> I am running Fedora linux on my machine, which creates the group
> jackuser for user accounts which will be using jackd.  I think the
> current default Fedora file sets the rtprio limit to 70, but I had used
> 95 as a limit going way back based on recommendations I saw in some
> jackd FAQ.  As a practical matter it won't really matter as long as you
> also make sure anything else which tries to set priorities, like the
> rtirq script, is coordinated to use the same maximum value.
> The last section that I commented out was part of the file from Fedora,
> but I think since my user account is a member of both jackuser and
> pulse-rt groups, the later rtprio limit of 80 for the pulse-rt group was
> overriding the limit of 95 set earlier for the jackuser group.
> After correcting any problems in your conf files you will have to log
> out and log back in for the changes to take effect.   You can verify the
> limit in use with the ulimit program:
> ~]$ ulimit -r
> 95
> After verifying your user account can set realtime permissions, start
> your applications again but do not use sudo.  I suspect that is the
> cause of your problems.
> --
> Chris Caudle

Thanks for the reply. I was getting this error without sudo.

 /home/robert> /usr/local/bin/jltcdump
Cannot read socket fd = 5 err = Success
Cannot open jltcdump client
JackShmReadWritePtr1::~JackShmReadWritePtr1 - Init not done for -1,
skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping
jack_client_open() failed, status = 0x21

I am on OpenSuse leap 15 and I had no idea about jackuser. I needed to
create the jackuser group and assign it to my user via the commands:
groupadd jackuser && usermod -a -G jackuser robert .

Once I had my user account with the jackuser group then I proceeded as you
suggested: 1) Run qjackctl as my user account, start jack after choosing my
interface. 2) Start jltcdump with my user account. 3) Use qjackctl to
connect the interface to jltcdump.

Then everything just worked. Much appreciated!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.linuxaudio.org/archives/linux-audio-user/attachments/20210424/48acfa60/attachment.html>

More information about the Linux-audio-user mailing list