Linux audio

Linux audio

Linux headphone autodetection not working

Disable jack detection

Disable jack detection in alsamixer by Auto-Mute: disabled

In case auto mute does not remain disabled after a reboot:

To retask a jack, for example front jacks for extra surround channels:

Create overrides Jack detection –> not present, possibly for both front and rear panels.

Retask rear mic jack as headphones

Pink mic, rear side, pin id 0x18 - retask to headphone, front channel group, advanced override checked on the right side of the screen.

If it works, "Install boot override".

Linux audio wireplumber and pipewire debugging

Pipewire configuration is in /usr/share/pipewire/pipewire.conf.d/. Configuration snippets available: /usr/share/pipewire/pipewire.conf.avail/.

Packages needed for alsa and pulseaudio outputs are wireplumber, pipewire-alsa, pipewire-pulse.

1
LANG=C pactl info | grep '^Server Name'
1
Server Name: PulseAudio (on PipeWire 1.4.2)
1
LANG=C aplay -L | grep -A 1 default
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
sysdefault
    Default Audio Device
lavrate
--
default
    Default ALSA Output (currently PipeWire Media Server)
hw:CARD=USB,DEV=0
--
sysdefault:CARD=USB
    Scarlett 2i4 USB, USB Audio
    Default Audio Device
front:CARD=USB,DEV=0
--
sysdefault:CARD=Generic
    HD-Audio Generic, ALC1220 Analog
    Default Audio Device
front:CARD=Generic,DEV=0

Pipewire audio crackling, fine tuning

The most important step to solve crackling seems to be disabling audio device suspend.

1
2
3
4
5
#~/.config/wireplumber/wireplumber.conf.d/10-alsa-vm.conf
actions = {
  update-props = {
    # disable audio device suspend, should fix crackling 20260911
    session.suspend-timeout-seconds = 0

Restart wireplumber and pipewire wholly to apply.

1
systemctl --user restart wireplumber pipewire pipewire-pulse

Add audio rates in pipewire

Some applications via wine need 44100 Hz to work properly.

1
2
3
4
5
6
7
# ~/.config/pipewire/pipewire.conf.d/10-rates.conf
# Adds more common rates
#Note that this is not enabled by default for now because of kernel driver bugs that need to be fixed/worked around first. There are also potentially some bugs with bluetooth devices and synchronization.
#Note that when switching rates, the quantum sizes are scaled relative to the default clock rate.
context.properties = {
    default.clock.allowed-rates = [ 44100 48000 88200 96000 ]
}

Further steps

Thanks to Rabcor for their guide.