Re: Problems connecting Sound Devices usbpre2 to JACK

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
https://lists.linuxaudio.org/listinfo/linux-audio-user




[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux