linux-guide-split-audio-ports icon indicating copy to clipboard operation
linux-guide-split-audio-ports copied to clipboard

Port muted on boot/resume from suspend

Open luisbocanegra opened this issue 10 months ago • 3 comments

Currently, it is necessary to unmute the internal speakers or jack output every reboot or after suspending. For me this happened only sometimes but now it happens every time.

Tasks

  • [x] Investigate the problem
  • [ ] Find a solution/workaround

luisbocanegra avatar Apr 10 '24 20:04 luisbocanegra

Looks like disabling Speaker detection for Headphones fixes this (same process as 2 Disable Headphone jack detection for speakers but for wired output)

To quickly test this edit /usr/share/alsa-card-profile/mixer/paths/analog-output-headphones.conf

Below

[General]
priority = 99
description-key = analog-output-headphones

[Properties]
device.icon_name = audio-headphones

Add this

[Jack Speaker]
state.plugged = unknown
state.unplugged = unknown

And comment this

;[Element Speaker]
;switch = off
;volume = off

Restart pipewire systemctl restart --user pipewire pipewire-pulse pipewire.socket wireplumber

After doing that the availability of both ports should be unknown e.g:

$ pactl list sinks | grep -E 'Name|Desc|State|Port|device.profile-set|availability'
        State: RUNNING
        Name: alsa_output.pci-0000_00_1f.3.analog-stereo-headphones.3
        Description: Built-in Audio Headphones
                device.profile-set = "/etc/alsa-card-profile/mixer/profile-sets/split-ports-profile.conf"
        Ports:
                analog-output-headphones: Headphones (type: Headphones, priority: 9900, availability group: Legacy 3, availability unknown)
        Active Port: analog-output-headphones
        State: SUSPENDED
        Name: alsa_output.pci-0000_00_1f.3.analog-stereo-speaker
        Description: Built-in Audio Speakers
                device.profile-set = "/etc/alsa-card-profile/mixer/profile-sets/split-ports-profile.conf"
        Ports:
                analog-output-speaker-split: Speakers (type: Speaker, priority: 10000, availability group: Legacy 3, availability unknown)
        Active Port: analog-output-speaker-split

luisbocanegra avatar Apr 13 '24 17:04 luisbocanegra

I had the same issue with an Ubuntu 23.10 installation, in my case upgrading to 24.04 LTS fixed the muting issue.

My package versions after upgrading which might be relevant:

ii  alsa-base                     1.0.25+dfsg-0ubuntu7
ii  alsa-tools                    1.2.11-1build2
ii  alsa-tools-gui                1.2.5-3
ii  alsa-topology-conf            1.2.5.1-2
ii  alsa-ucm-conf                 1.2.10-1ubuntu5
ii  alsa-utils                    1.2.9-1ubuntu5
ii  gstreamer1.0-alsa:amd64       1.24.2-1
ii  libpipewire-0.3-0t64:amd64    1.0.5-1
ii  libpipewire-0.3-common        1.0.5-1
ii  libpipewire-0.3-modules:amd64 1.0.5-1
ii  libsox-fmt-alsa:amd64         14.4.2+git20190427-4build4
ii  libwireplumber-0.4-0:amd64    0.4.17-1ubuntu4
ii  pipewire-alsa:amd64           1.0.5-1
ii  pipewire-audio                1.0.5-1
ii  pipewire-bin                  1.0.5-1
ii  pipewire-pulse                1.0.5-1
ii  pipewire:amd64                1.0.5-1
ii  wireplumber                   0.4.17-1ubuntu4

mh0rst avatar Apr 26 '24 20:04 mh0rst

That's interesting, for me this workaround has been working great. Just tried restoring the original analog-output-headphones.conf and it it still mutes here, these are my versions:

paru -Q $(paru -Qsq "alsa-*|pipewire|wireplumber")
alsa-card-profiles 1:1.0.5-1
alsa-lib 1.2.11-1
alsa-plugins 1:1.2.7.1-2
alsa-topology-conf 1.2.5.1-3
alsa-ucm-conf 1.2.11-1
alsa-utils 1.2.11-1
easyeffects 7.1.6-1
kpipewire 6.0.4-1
lib32-alsa-lib 1.2.11-1
lib32-alsa-plugins 1.2.7.1-2
libpipewire 1:1.0.5-1
libwireplumber 0.5.2-1
pipewire 1:1.0.5-1
pipewire-alsa 1:1.0.5-1
pipewire-audio 1:1.0.5-1
pipewire-jack 1:1.0.5-1
pipewire-pulse 1:1.0.5-1
qemu-audio-alsa 8.2.2-2
qemu-audio-pipewire 8.2.2-2
wireplumber 0.5.2-1

luisbocanegra avatar Apr 26 '24 20:04 luisbocanegra