1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

JACK Audio Server

Discussion in 'General Linux Discussion' started by allenskd, Jul 1, 2014.

  1. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    7,709
    Likes Received:
    550
    Trophy Points:
    113
    Location:
    Linux, Arizona
    Home page:
    Here are some tips for Fedora on how to make JACK and Pulseaudio work together:
    JACK & Pulseaudio

  2. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    51
    Trophy Points:
    28
    Thanks for the info, although I just got everything working like I wanted. However, I had such a nasty crash right now thanks to video cards drivers that it killed my X and audio thrown into chaos. The crash corrupted KDE configuration files, blah.
  3. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    7,709
    Likes Received:
    550
    Trophy Points:
    113
    Location:
    Linux, Arizona
    Home page:
    UGH, that really sucks!
    That is my worst-fear because I don't know how to fix corrupted anything... I only know how to re-install Linux to fix something like that.
  4. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    51
    Trophy Points:
    28
    @ThunderRd

    This is weird... I'm actually not getting realtime scheduling: MPC complains that it can't lower volume because jack_output can't acquire realtime sched.

    I checked my configs:
    limits.conf

    #@faculty hard nproc 50
    #ftp hard nproc 0
    #ftp - chroot /ftp
    #@student - maxlogins 4
    david - rtprio 99
    david - memlock unlimited
    david - nice -10
    # End of file

    $ cat /etc/security/limits.d/audio.conf
    # Provided by the jackd package.
    #
    # Changes to this file will be preserved.
    #
    # If you want to enable/disable realtime permissions, run
    #
    # dpkg-reconfigure -p high jackd

    @audio - rtprio 95
    @audio - memlock unlimited
    @audio - nice -19

    It's a no-go. Gonna do something pretty overkill... (such as using a realtime kernel for the hell of it). I have another neutral solution...
  5. ThunderRd

    ThunderRd Irreverent Query Chairman Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    1,919
    Likes Received:
    68
    Trophy Points:
    48
    Location:
    Northern Thailand, the Land of Smiles
    Home page:
    You don't need a realtime kernel to achieve what you want. This is made crystal clear in the JACK FAQ.

    I also don't think that MPC is 'JACK-aware' the same way that vlc is, for example. It's not listed as such: http://jackaudio.org/applications/ You might want to consider vlc, it is a fine player.

    For apps that aren't jack-aware you can set up a generic connection in the patchbay. I have a poker app that wouldn't play the sound, so I set up a connection and defined it to connect to the system input socket. Now, it can access the sound card at the same time as the media player. You can see this in my screenshot earlier in this thread as 'other: non-jack-compat'.

    I question the @audio, and think it should be @realtime. You could try changing that. Is your user in the realtime group? Do you actually have a realtime group? If you don't, create it and add your user to it (you need to be in realtime as well as the audio group.)

    I don't have that file in /etc/security/limits.d/audio.conf. Instead, I have 40-realtime-base.conf, most likely generated by the settings in limits.conf:

    Code:
    # Start of 40-realtime-base.conf from realtime-base-0.1
    
    @realtime    -    rtprio    99
    @realtime    -    memlock    unlimited
    
    # End of 40-realtime-base.conf from realtime-base-0.1
    If you are still using pulseaudio, you *must* have rtkit installed. rtkit is a dbus service that allows the per-application privilege escalation that you need with pulse. I don't know what the precise package name is in your distro, but in Gentoo it's sys-auth/rtkit. Since my system is finally purged of all things pulseaudio, it uses only sys-auth/realtime-base (a package in the JACK family that is compiled as a dependency of the media-sound/jack-audio-connection-kit package). Again, IDK what the exact package names are in your distro, but you probably should make sure they are there before doing anything else.

    If none of this stuff solves your issue, I'll try to find some time to reproduce your problem on my 'siduction' box (Debian Sid), but I don't know when that will be.
    Last edited: Jul 11, 2014
  6. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    51
    Trophy Points:
    28
    @ThunderRd

    Thanks for the reply. I'm aware that I don't need the rt kernel, I just did it for the hell of it :p. I think I've come to the conclusion that maybe MPD's JACK driver isn't that solid, it works, but it outputs realtime issues in the logs which baffled me. I sat on the issue for a while and things just doesn't make sense.

    Most of the things you mentioned are already done. audio, realtime group has been added. I've added them in my user. JACK verbose mode doesn't output anything related to realtime thus I think I'm gonna call it an isolated issue with MPD. mplayer, vlc, flash videos in browsers all works fine on both jack and alsa plugin (by routing ALSA to JACK).

    I'm using Debian sid. Actually @audio is the default that gets added by doing dpkg-reconfigured -p high jackd, at least to me.

    So yea, unless there's a noticeable issue with the audio I think I'm done with JACK's configuration. Realtime works, that's my verdict on it.

    Now I'm just fixing some issues with ALSA routing non-aware apps (hello, linux Steam games!). I'm gonna have to report it soon. Super Hexagon works completely fine under my native environment (downloaded from GOG). But for some reason, under the Steam environment it just fails to use ALSA default (which is routing to JACK). I think it's time for a break haha, I'll report it to Valve and see what they say, I'm pretty sure they are doing breaking something.

Share This Page