USB Audio Interface not recognized

I have the following setup in my NixOs configuration

https://github.com/gabyx/dotfiles/blob/2fcd7da23ef1d5fc03407b03322eb5a83b463d58/nixos/modules/sound.nix


{ config, pkgs, ... }:

{
  ### Sound Settings ==========================================================
  sound.enable = false; # Only meant for ALSA-based configurations.

  security.rtkit.enable = true;

  # Disable Pulseaudio because Pipewire is used.
  hardware.pulseaudio.enable = false;

  environment.systemPackages = with pkgs; [
    pavucontrol
  ];

  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    pulse.enable = true;
  };

The pavucontrol works and shows some HDMI output and my sound card, but my Mtrack usb audio device as regognized in Ubuntu is now shown. I might also have a missunderstanding, I am using here the more modern pipewire instead of pulseaudio.

What can I do to investigate the issue.

  • check for the device with some CLI tool?
  • do I need some config files to make the USB device work?
  • how does ubuntu do the same?
1 Like

Why don’t you try sound.enable = true; for a change?

I am not sure that will resolve the issue, but it is the first thing I’d try.

I have these settings in my config:

{ config, lib, pkgs, ... }:

{
  hardware.pulseaudio.enable = false;

  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    jack.enable = true;
    pulse.enable = true;
    wireplumber = {
      enable = true;
      package = pkgs.wireplumber;
    };
  };

  sound.enable = true;
}

That being said you could check with lsusb in the terminal if your device it appearing somewhere.

I have a Focusrite Scarlett 2i2 3rd Gen and the output looks like this

Bus 003 Device 006: ID 1235:8210 Focusrite-Novation Scarlett 2i2 3rd Gen
1 Like

dmesg can also be useful for seeing if the device is recognised by the kernel’s usb bus.

you should be able to see the kernel report when you hot plug it.

if’s not seeing in on the bus you have other problems.

what is it the device, and what are you doing with it?

The issue was probably due to the audio interface not beeing recognized (was not plugged in on the switching port :-|)
Thanks anyway for the kind hiints!

The following is now the config and works:

sound.enable = false; # Only meant for ALSA-based configurations.

  security.rtkit.enable = true;

  # Disable Pulseaudio because Pipewire is used.
  hardware.pulseaudio.enable = lib.mkForce false;

  environment.systemPackages = with pkgs; [
    pavucontrol
  ];

  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    pulse.enable = true;
    jack.enable = true;

    wireplumber = {
      enable = true;
      package = pkgs.wireplumber;
    };
  };

The problem

1 Like