Hello everyone, I have been using NixOS for a few weeks and for several days I have been struggling to find a working and persistent audio configuration. My PC is a Dell Pro Max 14 (MC14250). I haven’t found anything relevant in the nixos-hardware repository or on the web.
My goals are:
- to have all audio profiles working (“Pro Audio” and “Stereo Output”), i.e., the internal speakers and microphone.
- to have Bluetooth headphones (with microphone) working. I am using Sony LinkBuds S, which should support these codecs: SBC, AAC, LDAC, and LC3.
Currently, the “Pro Audio” profile is the only one that works; it is activated automatically at startup. No sound is reproduced when the “Stereo Output” profile is active. When the headphones are connected, I have the HSP/HFP profiles with CVSD and mSBC codecs available, but no sound is reproduced.
Unfortunately, I don’t know much about audio in Linux, and my configuration is the result of various trials and errors (I’m sorry if it is messy):
{ config, pkgs, inputs, ... }:
{
imports = [
./hardware-configuration.nix
];
networking.hostName = "pc";
#########################################
## Dell Pro Max 14 Audio Configuration ##
#########################################
hardware.enableAllFirmware = true;
hardware.enableRedistributableFirmware = true;
hardware.firmware = with pkgs; [
sof-firmware
linux-firmware
];
boot.kernelParams = [
"snd-intel-dspcfg.dsp_driver=3"
"intel_iommu=on"
"iommu=pt"
];
boot.extraModprobeConfig = ''
options snd-intel-dspcfg dsp_driver=3
'';
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.enable = true;
extraConfig.pipewire-pulse = {
"pulse.properties" = {
"flat-volumes" = false;
};
};
# WirePlumber config
wireplumber.extraConfig = {
"51-dell-routing" = {
"monitor.alsa.rules" = [
{
matches = [ { "node.name" = "alsa_output.pci-0000_00_1f.3-platform-sof_sdw.pro-output-2"; } ];
actions = { "update-props" = {
"priority.session" = 3000;
"node.autoconnect" = true;
"node.nick" = "Internal Speakers";
}; };
}
{
matches = [ { "node.name" = "alsa_input.pci-0000_00_1f.3-platform-sof_sdw.pro-input-4"; } ];
actions = { "update-props" = {
"priority.session" = 3000;
"node.autoconnect" = true;
"node.nick" = "Internal Mic";
}; };
}
# disable HDMI (5/6/7) and the ones you don’t use (0/31), so policy/UI can’t jump to them
{
matches = [
{ "node.name" = "alsa_output.pci-0000_00_1f.3-platform-sof_sdw.pro-output-5"; }
{ "node.name" = "alsa_output.pci-0000_00_1f.3-platform-sof_sdw.pro-output-6"; }
{ "node.name" = "alsa_output.pci-0000_00_1f.3-platform-sof_sdw.pro-output-7"; }
{ "node.name" = "alsa_output.pci-0000_00_1f.3-platform-sof_sdw.pro-output-0"; }
{ "node.name" = "alsa_output.pci-0000_00_1f.3-platform-sof_sdw.pro-output-31"; }
];
actions = { "update-props" = {
"node.disabled" = true;
"priority.session" = 1;
}; };
}
];
};
};
};
# Init service
systemd.services.dell-audio-init = {
description = "Initialize Dell audio";
after = [ "sound.target" ];
wantedBy = [ "sound.target" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStartPre = "${pkgs.coreutils}/bin/sleep 10";
};
script = ''
# Speaker path
${pkgs.alsa-utils}/bin/amixer -c 0 cset name='rt1320-1 OT23 L Switch' on || true
${pkgs.alsa-utils}/bin/amixer -c 0 cset name='rt1320-1 OT23 R Switch' on || true
${pkgs.alsa-utils}/bin/amixer -c 0 cset name='Speaker Switch' on || true
${pkgs.alsa-utils}/bin/amixer -c 0 cset name='Pre Mixer Speaker Playback Volume' 45,45 || true
${pkgs.alsa-utils}/bin/amixer -c 0 cset name='Post Mixer Speaker Playback Volume' 45,45 || true
# Mic path
# Route both ADCs to DMIC1 (works fine on your hardware)
${pkgs.alsa-utils}/bin/amixer -c 0 cset name='rt722 ADC 24 Mux' 0 || true
${pkgs.alsa-utils}/bin/amixer -c 0 cset name='rt722 ADC 25 Mux' 0 || true
# Set capture switches
${pkgs.alsa-utils}/bin/amixer -c 0 cset numid=2 on,on || true # FU0F Capture Switch
${pkgs.alsa-utils}/bin/amixer -c 0 cset numid=6 on,on,on,on || true # FU1E Capture Switch
${pkgs.alsa-utils}/bin/amixer -c 0 cset numid=11 on,on,on,on || true # rt1320 Capture Switch
# Set capture volumes
${pkgs.alsa-utils}/bin/amixer -c 0 cset numid=3 30,30 || true # FU0F Capture Volume
${pkgs.alsa-utils}/bin/amixer -c 0 cset numid=7 30,30,30,30 || true # FU1E Capture Volume
${pkgs.alsa-utils}/bin/amixer -c 0 cset name='rt722 FU15 Boost Volume' 3,3,3,3 || true
${pkgs.alsa-utils}/bin/amixer -c 0 cset name='rt722 FU33 Boost Volume' 2,2 || true
# Save ALSA state
${pkgs.alsa-utils}/bin/alsactl store 0 || true
'';
};
systemd.user.services."audio-defaults" = {
description = "Set default sink/source and volume";
after = [ "pipewire-pulse.service" "wireplumber.service" ];
wantedBy = [ "default.target" ];
serviceConfig.Type = "oneshot";
script = ''
${pkgs.pipewire}/bin/wpctl set-default alsa_output.pci-0000_00_1f.3-platform-sof_sdw.pro-output-2 || true
${pkgs.pipewire}/bin/wpctl set-default alsa_input.pci-0000_00_1f.3-platform-sof_sdw.pro-input-4 || true
${pkgs.pipewire}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 || true
${pkgs.pipewire}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 1.0 || true
'';
};
# Restore ALSA state on boot
hardware.alsa.enablePersistence = true;
####################
## Networking, BT ##
####################
networking.networkmanager.enable = true;
networking.networkmanager.wifi.backend = "iwd";
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
Experimental = true;
};
};
};
services.blueman.enable = true;
services.pipewire.wireplumber.extraConfig."60-bluetooth" = {
"monitor.bluez.properties" = {
"bluez5.enable-sbc-xq" = true;
"bluez5.enable-msbc" = true;
"bluez5.enable-hw-volume" = true;
"bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
};
};
system.stateVersion = "25.05";
}
Here are some debug commands that I think might be useful:
nixos-version --json
{"nixosVersion":"25.05.20250917.e9b7f2f","nixpkgsRevision":"e9b7f2ff62b35f711568b1f0866243c7c302028d"}
uname -r
6.16.7
nix --version
nix (Nix) 2.28.5
wpctl status when Pro-Audio is active:
wpctl status
PipeWire 'pipewire-0' [1.4.7, marco@pc, cookie:916607124]
└─ Clients:
34. WirePlumber [1.4.7, marco@pc, pid:1815]
35. pipewire [1.4.7, marco@pc, pid:1814]
48. WirePlumber [export] [1.4.7, marco@pc, pid:1815]
49. .xdg-desktop-portal-wrapped [1.4.7, marco@pc, pid:1768]
50. .xdg-desktop-portal-hyprland-wrapped [1.4.7, marco@pc, pid:1840]
51. waybar [1.4.7, marco@pc, pid:1725]
52. Blueman [1.4.7, marco@pc, pid:1731]
66. .pwvucontrol-wrapped [1.4.7, marco@pc, pid:11617]
76. Firefox [1.4.7, marco@pc, pid:1992]
77. .pwvucontrol-wrapped [1.4.7, marco@pc, pid:11617]
83. .pwvucontrol-wrapped [1.4.7, marco@pc, pid:11617]
93. wpctl [1.4.7, marco@pc, pid:34004]
94. Blueman [1.4.7, marco@pc, pid:16344]
Audio
├─ Devices:
│ 53. sof-soundwire [alsa]
│
├─ Sinks:
│ * 68. sof-soundwire Pro 2 [vol: 0.65]
│
├─ Sources:
│ 69. sof-soundwire Pro 1 [vol: 1.00]
│ * 70. sof-soundwire Pro 4 [vol: 1.00]
│
├─ Filters:
│
└─ Streams:
102. PulseAudio Volume Control
84. input_FL < Internal Mic:capture_AUX0 [active]
85. input_FR < Internal Mic:capture_AUX1 [active]
97. monitor_FL
110. monitor_FR
105. PulseAudio Volume Control
80. monitor_FL
98. input_FR < Pro 1:capture_AUX1 [active]
101. input_FL < Pro 1:capture_AUX0 [active]
109. monitor_FR
Video
├─ Devices:
│ 57. Integrated_Webcam_FHD [v4l2]
│ 58. Integrated_Webcam_FHD [v4l2]
│ 59. Integrated_Webcam_FHD [v4l2]
│ 60. Integrated_Webcam_FHD [v4l2]
│ 64. Integrated_Webcam_FHD: Integrat [libcamera]
│ 65. Integrated_Webcam_FHD: Integrat [libcamera]
│
├─ Sinks:
│
├─ Sources:
│ * 72. Integrated_Webcam_FHD (V4L2)
│ 74. Integrated_Webcam_FHD (V4L2)
│
├─ Filters:
│
└─ Streams:
Settings
└─ Default Configured Devices:
0. Audio/Sink alsa_output.pci-0000_00_1f.3-platform-sof_sdw.pro-output-2
1. Audio/Source alsa_input.pci-0000_00_1f.3-platform-sof_sdw.pro-input-4
wpctl status when Stereo Output is active:
wpctl status
PipeWire 'pipewire-0' [1.4.7, marco@pc, cookie:916607124]
└─ Clients:
34. WirePlumber [1.4.7, marco@pc, pid:1815]
35. pipewire [1.4.7, marco@pc, pid:1814]
46. .pwvucontrol-wrapped [1.4.7, marco@pc, pid:11617]
48. WirePlumber [export] [1.4.7, marco@pc, pid:1815]
49. .xdg-desktop-portal-wrapped [1.4.7, marco@pc, pid:1768]
50. .xdg-desktop-portal-hyprland-wrapped [1.4.7, marco@pc, pid:1840]
51. waybar [1.4.7, marco@pc, pid:1725]
52. Blueman [1.4.7, marco@pc, pid:1731]
76. Firefox [1.4.7, marco@pc, pid:1992]
77. .pwvucontrol-wrapped [1.4.7, marco@pc, pid:11617]
87. wpctl [1.4.7, marco@pc, pid:35435]
94. Blueman [1.4.7, marco@pc, pid:16344]
Audio
├─ Devices:
│ 53. sof-soundwire [alsa]
│
├─ Sinks:
│ * 70. sof-soundwire Stereo [vol: 1.20]
│
├─ Sources:
│
├─ Filters:
│
└─ Streams:
68. PulseAudio Volume Control
44. monitor_FL
67. monitor_FR
71. input_FR < Stereo:monitor_FR [active]
78. input_FL < Stereo:monitor_FL [active]
Video
├─ Devices:
│ 57. Integrated_Webcam_FHD [v4l2]
│ 58. Integrated_Webcam_FHD [v4l2]
│ 59. Integrated_Webcam_FHD [v4l2]
│ 60. Integrated_Webcam_FHD [v4l2]
│ 64. Integrated_Webcam_FHD: Integrat [libcamera]
│ 65. Integrated_Webcam_FHD: Integrat [libcamera]
│
├─ Sinks:
│
├─ Sources:
│ * 72. Integrated_Webcam_FHD (V4L2)
│ 74. Integrated_Webcam_FHD (V4L2)
│
├─ Filters:
│
└─ Streams:
Settings
└─ Default Configured Devices:
0. Audio/Sink alsa_output.pci-0000_00_1f.3-platform-sof_sdw.pro-output-2
1. Audio/Source alsa_input.pci-0000_00_1f.3-platform-sof_sdw.pro-input-4
wpctl status when headphones are connected and selected:
wpctl status
PipeWire 'pipewire-0' [1.4.7, marco@pc, cookie:916607124]
└─ Clients:
34. WirePlumber [1.4.7, marco@pc, pid:1815]
35. pipewire [1.4.7, marco@pc, pid:1814]
46. .pwvucontrol-wrapped [1.4.7, marco@pc, pid:37964]
48. WirePlumber [export] [1.4.7, marco@pc, pid:1815]
49. .xdg-desktop-portal-wrapped [1.4.7, marco@pc, pid:1768]
50. .xdg-desktop-portal-hyprland-wrapped [1.4.7, marco@pc, pid:1840]
51. waybar [1.4.7, marco@pc, pid:1725]
52. Blueman [1.4.7, marco@pc, pid:1731]
68. wpctl [1.4.7, marco@pc, pid:41853]
76. Firefox [1.4.7, marco@pc, pid:1992]
Audio
├─ Devices:
│ 53. sof-soundwire [alsa]
│ 67. LinkBuds S [bluez5]
│
├─ Sinks:
│ * 102. LinkBuds S [vol: 1.00]
│
├─ Sources:
│ * 71. LinkBuds S [vol: 1.00]
│
├─ Filters:
│
└─ Streams:
69. Firefox
44. output_MONO > LinkBuds S:playback_MONO [init]
Video
├─ Devices:
│ 57. Integrated_Webcam_FHD [v4l2]
│ 58. Integrated_Webcam_FHD [v4l2]
│ 59. Integrated_Webcam_FHD [v4l2]
│ 60. Integrated_Webcam_FHD [v4l2]
│ 64. Integrated_Webcam_FHD: Integrat [libcamera]
│ 65. Integrated_Webcam_FHD: Integrat [libcamera]
│
├─ Sinks:
│
├─ Sources:
│ * 72. Integrated_Webcam_FHD (V4L2)
│ 74. Integrated_Webcam_FHD (V4L2)
│
├─ Filters:
│
└─ Streams:
Settings
└─ Default Configured Devices:
0. Audio/Sink alsa_output.pci-0000_00_1f.3-platform-sof_sdw.pro-output-2
1. Audio/Source alsa_input.pci-0000_00_1f.3-platform-sof_sdw.pro-input-4
Thanks in advance for any help. (This is my first post, so I apologize if I’ve made any mistakes or left anything out).