RME Babyface Pro (CC Mode) – Jack

Hello,

I’m now using NixOS all the time, thanks :smile:!

However, I can’t get sound out of my RME Babyface Pro sound card (booted in Class Compliant Mode) in Jack (via qjackctl): I can select the right interface but only get my laptop outputs:

However everything is fine on my Manjaro partition:

I should add that I only have alsa on my system (everything is fine without Pulseaudio so I don’t think I need it, apart from hdmi outputs that I can’t select with or without Pulseaudio).
I can’t pinpoint where I failed, so any help is welcome!

For more information here are some relevants part of my configuration:

  imports =
    [
      <musnix>
    ];

  sound.enable = true;

  # RT audio
  musnix = {
    enable = true;
    kernel.optimize = true;
    kernel.realtime = true;
    kernel.packages = pkgs.linuxPackages_latest_rt;
  };
  
  # see https://nixos.wiki/wiki/JACK
  services.jack = {
    jackd.enable = true;
    alsa.enable = false;
    loopback = {
      enable = true;
      dmixConfig = ''
        period_size 2048
      '';
    };
  };

 # user packages
  environment.systemPackages = with pkgs;
    [
      jack2
      libjack2
      qjackctl
    ];

 users.users.tcip = {
    extraGroups = [ "wheel" "audio" "networkmanager" "jackaudio" ];
  };

and my system configuration:

          ::::.    ':::::     ::::'           tcip@tlap
          ':::::    ':::::.  ::::'            OS: NixOS 19.09.2006.8b76b125205 (Loris)
            :::::     '::::.:::::             Kernel: x86_64 Linux 5.0.19-rt11
      .......:::::..... ::::::::              Uptime: 29m
     ::::::::::::::::::. ::::::    ::::.      Packages: 2303
    ::::::::::::::::::::: :::::.  .::::'      Shell: bash 4.4.23
           .....           ::::' :::::'       Resolution: 1920x1080
          :::::            '::' :::::'        DE: KDE 5.61.0 / Plasma 5.16.5
 ........:::::               ' :::::::::::.   WM: KWin
:::::::::::::                 :::::::::::::   GTK Theme: Breeze [GTK2],  [GTK3]
 ::::::::::: ..              :::::            Icon Theme: breeze
     .::::: .:::            :::::             Font: Sans Serif Regular
    .:::::  :::::          '''''    .....     Disk: 7,5T / 9,5T (79%)
    :::::   ':::::.  ......:::::::::::::'     CPU: Intel Core i7-7700 @ 8x 4.2GHz [62.0°C]
     :::     ::::::. ':::::::::::::::::'      GPU: Intel Corporation HD Graphics 630 (rev 04)
            .:::::::: '::::::::::             RAM: 2382MiB / 15965MiB
           .::::''::::.     '::::.           
          .::::'   ::::.     '::::.          
         .::::      ::::      '::::.    
1 Like

Hey everyone,

I finally found where I messed up… bottom line: “there’s ALWAYS a NixOS way :wink:”. I’ll give the answer below for those who might stumble on the same mistake.

The trouble is that whatever you change in the configuration of qjackctl, won’t change anything. I should have read (before posting here) the “Messages” section in qjackctl, and would have seen that the buffer/frames were not 128 but 1024 – a.k.a. default value.
Actually, everything is bypassed in qjackctl and comes directly from whatever you put (or let to default) in your configuration file regarding services.jack options. Basically, my previous configuration stated by services.jack.jackd.enable put all values to default, hardware, sampling rate, buffers, etc. – see jackd man page.

Now everything is fine, since I’ve changed my configuration file as follow:

 services.jack = {
    jackd.enable = true;
    jackd.extraOptions = [ "-dalsa" "--device" "hw:1" "--period" "128" "--nperiods" "2" "--rate" "48000" ];
    # […]
};

Btw, hw:1 comes from my USB sound card being the second card on my laptop:

[tcip@tlap:~]$ cat /proc/asound/cards
 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xdf520000 irq 146
 1 [Pro70785381    ]: USB-Audio - Babyface Pro (70785381)
                      RME Babyface Pro (70785381) at usb-0000:00:14.0-1, high speed
 2 [XL             ]: USB-Audio - ESI M8U XL
                      ESI ESI M8U XL at usb-0000:03:00.0-2.5, full speed
10 [Loopback       ]: Loopback - Loopback
                      Loopback 1

I must confess that I’m happy having managed this blunder alone – finally growing and getting used to NixOS configuration files :grin:!

Thanks to all for your previous support (that lead to my first own victory!), hope that might help someone, and all the best,

2 Likes