Speakers and wired earphones play sound simultaneously

My speakers and earphones play audio simultaneously. I use pipewire and removed pulseaudio due to some audio issues.My inxi output is

System:
  Kernel: 5.19.1-3-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.1.1
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.19-x86_64
    root=UUID=1be28bff-14ac-4bd6-8c07-940e0b04a857 rw quiet
    udev.log_priority=3
  Desktop: KDE Plasma v: 5.24.6 tk: Qt v: 5.15.5 info: latte-dock
    wm: kwin_x11 vt: 1 dm: SDDM Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Portable System: Dell product: Vostro 2520 v: N/A
    serial: <superuser required> Chassis: type: 8 serial: <superuser required>
  Mobo: Dell model: 0V1NDP v: A11 serial: <superuser required> UEFI: Dell
    v: A11 date: 02/24/2014
Battery:
  ID-1: BAT0 charge: 41.6 Wh (99.0%) condition: 42.0/48.8 Wh (86.0%)
    volts: 12.6 min: 11.1 model: Samsung SDI DELL 7XFJJA2 type: Li-ion
    serial: <filter> status: charging
Memory:
  RAM: total: 5.66 GiB used: 2.44 GiB (43.2%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges
    required.
CPU:
  Info: model: Intel Pentium 2020M bits: 64 type: MCP arch: Ivy Bridge
    level: v2 built: 2012-15 process: Intel 22nm family: 6 model-id: 0x3A (58)
    stepping: 9 microcode: 0x21
  Topology: cpus: 1x cores: 2 smt: <unsupported> cache: L1: 128 KiB
    desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB L3: 2 MiB
    desc: 1x2 MiB
  Speed (MHz): avg: 1198 high: 1200 min/max: 1200/2400 scaling:
    driver: intel_cpufreq governor: schedutil cores: 1: 1200 2: 1197
    bogomips: 9581
  Flags: acpi aperfmperf apic arat arch_perfmon bts clflush cmov
    constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts epb
    ept erms est flexpriority flush_l1d fpu fsgsbase fxsr ht ibpb ibrs lahf_lm
    lm mca mce md_clear mmx monitor msr mtrr nonstop_tsc nopl nx pae pat pbe
    pcid pclmulqdq pdcm pebs pge pln pni popcnt pse pse36 pti pts rdtscp
    rep_good sep smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm
    tm2 tpr_shadow tsc tsc_deadline_timer vme vmx vnmi vpid x2apic xsave
    xsaveopt xtopology xtpr
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
    disabled
  Type: mds mitigation: Clear CPU buffers; SMT disabled
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: disabled, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics vendor: Dell driver: i915
    v: kernel arch: Gen-7 process: Intel 22nm built: 2012-13 ports:
    active: LVDS-1 empty: DP-1,HDMI-A-1,VGA-1 bus-ID: 00:02.0
    chip-ID: 8086:0156 class-ID: 0300
  Device-2: Microdia Laptop_Integrated_Webcam_HD type: USB driver: uvcvideo
    bus-ID: 1-1.5:4 chip-ID: 0c45:6473 class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.4 compositor: kwin_x11 driver: X:
    loaded: modesetting alternate: fbdev,vesa gpu: i915 display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.21x7.99")
    s-diag: 414mm (16.31")
  Monitor-1: LVDS-1 model: BOE Display 0x06d3 built: 2016 res: 1366x768
    hz: 60 dpi: 101 gamma: 1.2 size: 344x194mm (13.54x7.64") diag: 395mm (15.5")
    ratio: 16:9 modes: 1366x768
  OpenGL: renderer: Mesa Intel HD Graphics 2500 (IVB GT1) v: 4.2 Mesa 22.1.6
    direct render: Yes
Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Dell
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:1e20
    class-ID: 0403
  Sound Server-1: ALSA v: k5.19.1-3-MANJARO running: yes
  Sound Server-2: PulseAudio v: 16.1 running: no
  Sound Server-3: PipeWire v: 0.3.56 running: yes
Network:
  Device-1: Broadcom BCM43142 802.11b/g/n vendor: Dell Wireless 1704 802.11n +
    BT 4.0 driver: N/A modules: bcma pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    bus-ID: 07:00.0 chip-ID: 14e4:4365 class-ID: 0280
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Dell driver: r8168 v: 8.050.03-NAPI modules: r8169 pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: e000 bus-ID: 09:00.0 chip-ID: 10ec:8168
    class-ID: 0200
  IF: enp9s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Device-1: Broadcom BCM43142 Bluetooth 4.0 type: USB driver: btusb v: 0.8
    bus-ID: 1-1.4:3 chip-ID: 0a5c:21d7 class-ID: fe01 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 931.51 GiB used: 326.21 GiB (35.0%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital
    model: WD10SPZX-26Z10T0 size: 931.51 GiB block-size: physical: 4096 B
    logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter>
    rev: 1A04 scheme: GPT
  Optical-1: /dev/sr0 vendor: TSSTcorp model: DVD+-RW SN-208DN rev: D100
    dev-links: cdrom
  Features: speed: 24 multisession: yes audio: yes dvd: yes
    rw: cd-r,cd-rw,dvd-r,dvd-ram state: running
Partition:
  ID-1: / raw-size: 194.7 GiB size: 190.59 GiB (97.89%) used: 19.36 GiB
    (10.2%) fs: ext4 dev: /dev/sda3 maj-min: 8:3 label: N/A
    uuid: 1be28bff-14ac-4bd6-8c07-940e0b04a857
  ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%) used: 300 KiB
    (0.3%) fs: vfat dev: /dev/sda1 maj-min: 8:1 label: N/A uuid: 8A2C-2655
  ID-3: /run/media/sachin/New Volume raw-size: 736.2 GiB size: 736.2 GiB
    (100.00%) used: 306.85 GiB (41.7%) fs: ntfs dev: /dev/sda5 maj-min: 8:5
    label: New Volume uuid: 80D066A4D0669FE0
Swap:
  Alert: No swap data was found.
Unmounted:
  ID-1: /dev/sda4 maj-min: 8:4 size: 507 MiB fs: ntfs label: N/A
    uuid: 8672DFB872DFAB67
USB:
  Hub-1: 1-0:1 info: Full speed or root hub ports: 2 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002 class-ID: 0900
  Hub-2: 1-1:2 info: Intel Integrated Rate Matching Hub ports: 6 rev: 2.0
    speed: 480 Mb/s chip-ID: 8087:0024 class-ID: 0900
  Device-1: 1-1.2:5 info: Lenovo Wireless KB_Mouse KN100 WW
    type: Keyboard,Mouse driver: hid-generic,usbhid interfaces: 2 rev: 1.1
    speed: 12 Mb/s power: 98mA chip-ID: 17ef:609f class-ID: 0301
  Device-2: 1-1.4:3 info: Broadcom BCM43142 Bluetooth 4.0 type: Bluetooth
    driver: btusb interfaces: 4 rev: 2.0 speed: 12 Mb/s chip-ID: 0a5c:21d7
    class-ID: fe01 serial: <filter>
  Device-3: 1-1.5:4 info: Microdia Laptop_Integrated_Webcam_HD type: Video
    driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA
    chip-ID: 0c45:6473 class-ID: 0e02
  Hub-3: 2-0:1 info: Full speed or root hub ports: 2 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-4: 2-1:2 info: Intel Integrated Rate Matching Hub ports: 6 rev: 2.0
    speed: 480 Mb/s chip-ID: 8087:0024 class-ID: 0900
  Device-1: 2-1.6:3 info: Realtek RTS5138 Card Reader Controller
    type: Mass Storage driver: ums-realtek interfaces: 1 rev: 2.0
    speed: 480 Mb/s power: 500mA chip-ID: 0bda:0138 class-ID: 0806
    serial: <filter>
Sensors:
  System Temperatures: cpu: 50.0 C mobo: 43.0 C
  Fan Speeds (RPM): cpu: 3003
Info:
  Processes: 164 Uptime: 12m wakeups: 1 Init: systemd v: 251
  default: graphical tool: systemctl Compilers: gcc: 12.1.1 clang: 14.0.6
  Packages: pm: pacman pkgs: 1338 libs: 391 tools: pamac Shell: Zsh v: 5.9
  default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.21

How do I fix it

Mute one of the sources? :man_shrugging:

I suggest checking ALSA setting for Auto-Mute

amixer -c0 sget 'Auto-Mute Mode'

I would expect terminal response to show auto-mute is disabled if audio is playing to both outputs

Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'

Use this command to enable auto-mute

amixer -c0 sset 'Auto-Mute Mode' Disabled

OR

Use terminal mixer interface to change Auto-Mute Mode manually

alsamixer --card=0

and save changes to ALSA settings

sudo alsactl store

Well first of all the correct command is
amixer -c0 sset 'Auto-Mute Mode' Enabled
And this method does work, but it doesn’t save permanently. If I eject the earphones and put it back the Auto mute mode gets disabled again and I have to enable it by using the same command or by using
sudo alsactl restore
Is there any way turn on auto mute mode permanently

There is only source which is named headphones but the audio comes from both headphones and speakers

I guess not, but there is normally a service which does the restore on boot time for you.

systemctl status alsa-restore.service
1 Like

This is the output

â—Ź alsa-restore.service - Save/Restore Sound Card State
     Loaded: loaded (/usr/lib/systemd/system/alsa-restore.service; static)
     Active: active (exited) since Wed 2022-08-31 11:12:07 IST; 18min ago
    Process: 402 ExecStart=/usr/bin/alsactl restore (code=exited, status=0/SUCCESS)
   Main PID: 402 (code=exited, status=0/SUCCESS)
        CPU: 4ms

Aug 31 11:12:07 vostro2520 systemd[1]: Starting Save/Restore Sound Card State...
Aug 31 11:12:07 vostro2520 systemd[1]: Finished Save/Restore Sound Card State.
1 Like

Looks totally normal. So when you set it and store it. It does not survive a reboot?


Maybe, no idea if it is the case, you need to set a special model.

cat /proc/asound/card[0-9]/pcm*/info | grep "card:\|name:"

There you should see the codec… and look it up here: HD-Audio Codec-Specific Models — The Linux Kernel documentation

There are models for some laptops with weird pins and configs.

Then probe it like:

sudo modprobe -rv snd_hda_intel
sudo modprobe -v snd_hda_intel model=<name>

check this link:

and if you have the same chipset as :arrow_up: , this could help

The output of cat /proc/asound/card[0-9]/pcm*/info | grep "card:\|name:" is

card: 0
name: CS4213 Analog
subname: subdevice #0
card: 0
name: CS4213 Analog
subname: subdevice #0
card: 0
name: HDMI 0
subname: subdevice #0

There was no information on CS4213 in the given site

I don’t have the same same chip set. My audio specifications are

Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Dell
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:1e20

this doesnt show the chip, run alsamixer, press f6, select your audio device and check on the chip on the left side

The chip is HDA Intel PCH

Can I say the system to run the command sudo alsactl restore anytime it detects a change in the audio output devices, that could be a solution

@brahma This system has Cirrus Logic CS4213 codec not Realtek ALC887
HW probe of Dell Vostro 2520 #3865f7c366: amixer