trouble running JACK in realtime?

Tonight I noticed something peculiar that may explain why some users still have trouble starting JACK or running it in real time without xruns even after following all the basic configuration steps. I’m not sure if this is specific to Ubuntu but it has to do with the users-admin tool in Gnome. The graphical tool is misleading because if one were to try to add a user to the audio group by clicking the “Manage Groups” button, one might notice the audio group does not appear in this list and one might feel compelled to create it (as I did). What is not immediately evident is that the audio group already exists, and adding it a second time will change its group number to something like 1001, thereby preventing applications from directly accessing the audio hardware. If you’ve tried to add the audio group using System > Administration > Users and Groups, take a look in your /etc/group file. The group number for audio should normally be 29. If you don’t see your username listed as a member of audio, add yourself using this command:

useradd -G audio yourusername

I had always just assumed my laptop’s cheap integrated sound card wasn’t up for the task, but after making this correction I can run Ardour and JACK in realtime with 256 Frames/Period. Lesson learned: It’s a good idea to use the terminal for administrative tasks.

duffrecords,

great post…very important.

I would just add for most Debian and Older Ubuntu (6.06-7.10) users the terminal command would be:

sudo adduser USERNAME audio

I am mainly a SuSE and KDE user, but I seem to recall that there is some issue in ubuntu, or maybe in GNOME generally, about groups with low gid numbers…

Wow, some caveat.

I added a check for this situation to my configuration ‘quickscan’ script: http://wiki.linuxmusicians.com/doku.php?id=system_configuration#quickscan

ahoy all,

thanks for the info. this may be a stupid follow-up question, but i cannot seem to find an answer:

  • does the “audio” group HAVE to use ID # 29? or do programs just look for an “audio” group name?

recently i have noticed rosegarden (while running with ardour) “running out of processing power”. while investigating, it seems that neither rosegarden, ardour, jackd, etc are running with real time priorities, though i have created the audio group, added myself, edited /etc/security/limits.conf, etc. hoping it is something this simple.

thanks.

the closer to the root GID or UID (=0), the more privileges, that’s a unix thing. Your own user GID must something like 1000. If the audio group is 1001 after you added it, then it could well be an issue. A guy on the ubuntu forums said it was not but I doubt it. Make it to 29 and see what you get.