Laptop Audio Input/Output Issues

I recently switched to Tumbleweed. Everything is going smoothly, except that I can’t get my external microphone work. Whenever I have the microphone plugged in, I can’t get my speakers to work. One workaround was to switch to duplex, choose the speakers option for output (which had the label “unavailable” right next to it) and switch to pro audio. However, as I understand that is not a good solution, and it started breaking not too long ago (audio gets glitchy and I can get maybe 1/8 of the sound my speakers can output.). I am on a laptop with a Ryzen 7 7840hs cpu and an rtx 4060 gpu. Here are some outputs that might be useful. Also, the microphone works, and the speakers work if the mic is unplugged.

keymach@localhost:~> aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [R27qe]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC257 Analog [ALC257 Analog]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
keymach@localhost:~> pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 190
Tile Size: 65472
User Name: keymach
Host Name: localhost.localdomain
Server Name: PulseAudio (on PipeWire 1.6.6)
Server Version: 15.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_06_00.6.analog-stereo
Default Source: alsa_input.pci-0000_06_00.6.analog-stereo
Cookie: 6342:573c
keymach@localhost:~> pactl list short sinks
127     alsa_output.pci-0000_06_00.6.analog-stereo      PipeWire        s32le 2ch 48000Hz       SUSPENDED
keymach@localhost:~> inxi -Aa
Audio:
 Device-1: NVIDIA AD107 High Definition Audio vendor: Lenovo
   driver: snd_hda_intel v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 8
   link-max: gen: 4 speed: 16 GT/s bus-ID: 01:00.1 chip-ID: 10de:22be
   class-ID: 0403
 Device-2: Advanced Micro Devices [AMD] Audio Coprocessor
   driver: snd_pci_ps v: kernel alternate: snd_pci_acp3x, snd_rn_pci_acp3x,
   snd_pci_acp5x, snd_pci_acp6x, snd_acp_pci, snd_rpl_pci_acp6x,
   snd_sof_amd_renoir, snd_sof_amd_rembrandt, snd_sof_amd_vangogh,
   snd_sof_amd_acp63, snd_sof_amd_acp70 pcie: gen: 4 speed: 16 GT/s lanes: 16
   bus-ID: 06:00.5 chip-ID: 1022:15e2 class-ID: 0480
 Device-3: Advanced Micro Devices [AMD] Ryzen HD Audio vendor: Lenovo
   driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
   bus-ID: 06:00.6 chip-ID: 1022:15e3 class-ID: 0403
 API: ALSA v: k7.0.12-1-default status: kernel-api with: aoss
   type: oss-emulator tools: alsactl,alsamixer,amixer
 Server-1: PipeWire v: 1.6.6 status: active with: 1: pipewire-pulse
   status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
   4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
keymach@localhost:~> journalctl --user -b | grep pipewire
Jun 19 00:40:06 localhost.localdomain systemd[2138]: pipewire-pulse.service: Consumed 5.912s CPU time over 2h 9min 26.137s wall clock time.
Jun 19 00:50:36 localhost.localdomain pipewire-pulse[35819]: mod.protocol-pulse: [PulseAudio Volume Control] timeout on stream 0x55bbe10bf960 channel:0
Jun 19 00:50:56 localhost.localdomain pipewire-pulse[35819]: mod.protocol-pulse: [PulseAudio Volume Control] timeout on stream 0x55bbe10bf590 channel:1
Jun 19 00:51:04 localhost.localdomain pipewire-pulse[35819]: mod.protocol-pulse: [PulseAudio Volume Control] timeout on stream 0x55bbe110aae0 channel:2
keymach@localhost:~> 


Here is the output of alsa-info https://alsa-project.org/db/?f=7312a45370de6148e862f1ebb17af641b1effcd2

Please show the output from wpctl status and pactl list cards to start with.

Also I noticed that the speaker output was turned off…

Simple mixer control 'Speaker',0
  Front Left: Playback 0 [0%] [-65.25dB] [off]
  Front Right: Playback 0 [0%] [-65.25dB] [off]

and the headphones enabled…

Simple mixer control 'Headphone',0
  Front Left: Playback 87 [100%]
  Front Right: Playback 87 [100%]

Please post what is reported via

amixer -c 1 sget Speaker
amixer -c 1 sget Headphone

when the microphone plugged in and also when unplugged.

Apparently the external mic is mistakenly detected like a “headphone”, so speaker output is switched to the “phones”.
Maybe the laptop has something to detect what is actually being connected but that works only on Windows?
On Tumbleweed Gnome asks when you connect “something” to a combined input/output jack so that the system can wire everything as needed, but KDE-Plasma looks more quirky to me (but I’m no regular KDE user…)

I’m not convinced this is a KDE vs GNOME issue. Jack detection is handled by ALSA/Kernel and device routing by PipeWire/WirePlumber, so the desktop environment won’t determine how a microphone is identified.

The ALSA output didn’t show any mis-detection. What we did see is that the speaker was muted (off), headphone playback was active, and auto-mute disabled.

I am wondering if there might be a UCM profile issue causing the audio routing to react incorrectly when the microphone is plugged in though.

Speakers were muted, but the sound is very low regardless. They just happened to be turned off at that moment.
Headphones are enabled, because the system thinks my dedicated mic is a headphone. There were no headphones plugged in at the time of running the commands above.

wpctl status
PipeWire 'pipewire-0' [1.6.6, keymach@localhost.localdomain, cookie:1958266688]
 └─ Clients:
        32. pipewire                            [1.6.6, keymach@localhost.localdomain, pid:2339]
        34. WirePlumber                         [1.6.6, keymach@localhost.localdomain, pid:2338]
        46. WirePlumber [export]                [1.6.6, keymach@localhost.localdomain, pid:2338]
        61. kwin_wayland                        [1.6.6, keymach@localhost.localdomain, pid:2470]
        64. libcanberra                         [1.6.6, keymach@localhost.localdomain, pid:2591]
        65.                                     [1.6.6, keymach@localhost.localdomain, pid:2591]
        66. libcanberra                         [1.6.6, keymach@localhost.localdomain, pid:2717]
        67. plasmashell                         [1.6.6, keymach@localhost.localdomain, pid:2717]
        68.                                     [1.6.6, keymach@localhost.localdomain, pid:2717]
        69. xdg-desktop-portal                  [1.6.6, keymach@localhost.localdomain, pid:2996]
        70. Chromium input                      [1.6.6, keymach@localhost.localdomain, pid:4259]
        73. wpctl                               [1.6.6, keymach@localhost.localdomain, pid:8048]

Audio
 ├─ Devices:
 │      50. AD107 High Definition Audio Controller [alsa]
 │      51. Ryzen HD Audio Controller           [alsa]
 │  
 ├─ Sinks:
 │  *   58. Ryzen HD Audio Controller Analog Stereo [vol: 0.88]
 │  
 ├─ Sources:
 │  *   59. Ryzen HD Audio Controller Analog Stereo [vol: 1.00]
 │  
 ├─ Filters:
 │  
 └─ Streams:

Video
 ├─ Devices:
 │      52. Integrated Camera                   [v4l2]
 │      53. Integrated Camera                   [v4l2]
 │      57. Integrated Camera: Integrated C     [libcamera]
 │  
 ├─ Sinks:
 │  
 ├─ Sources:
 │  *   62. Integrated Camera (V4L2)           
 │  
 ├─ Filters:
 │  
 └─ Streams:

Settings
 └─ Default Configured Devices:
         0. Audio/Sink    alsa_output.pci-0000_06_00.6.analog-stereo
         1. Audio/Source  alsa_input.pci-0000_06_00.6.pro-input-0
pactl list cards
Card #50
        Name: alsa_card.pci-0000_01_00.1
        Driver: alsa
        Owner Module: n/a
        Properties:
                device.enum.api = "udev"
                device.api = "alsa"
                media.class = "Audio/Device"
                api.alsa.path = "hw:0"
                api.alsa.card = "0"
                api.alsa.card.name = "HDA NVidia"
                api.alsa.card.longname = "HDA NVidia at 0x61080000 irq 95"
                device.plugged.usec = "7779510"
                device.bus_path = "pci-0000:01:00.1"
                sysfs.path = "/devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card0"
                device.bus = "pci"
                device.subsystem = "sound"
                device.vendor.id = "0x10de"
                device.vendor.name = "NVIDIA Corporation"
                device.product.id = "0x22be"
                device.product.name = "AD107 High Definition Audio Controller"
                device.name = "alsa_card.pci-0000_01_00.1"
                device.description = "AD107 High Definition Audio Controller"
                device.nick = "HDA NVidia"
                device.icon_name = "audio-card-analog-pci"
                api.alsa.use-acp = "true"
                api.acp.auto-profile = "false"
                api.acp.auto-port = "false"
                api.dbus.ReserveDevice1.Priority = "-20"
                api.alsa.split-enable = "true"
                api.dbus.ReserveDevice1 = "Audio0"
                spa.object.id = "2"
                factory.id = "15"
                client.id = "46"
                object.id = "50"
                object.serial = "50"
                object.path = "alsa:acp:NVidia"
                alsa.card = "0"
                alsa.card_name = "HDA NVidia"
                alsa.long_card_name = "HDA NVidia at 0x61080000 irq 95"
                alsa.driver_name = "snd_hda_intel"
                alsa.mixer_name = "Nvidia GPU a7 HDMI/DP"
                alsa.components = "HDA:10de00a7,17aa3c93,00100100"
                alsa.id = "NVidia"
                device.string = "0"
        Profiles:
                off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
                output:hdmi-stereo: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority: 5900, available: yes)
                output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (sinks: 1, sources: 0, priority: 5700, available: no)
                output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (sinks: 1, sources: 0, priority: 5700, available: no)
                output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (sinks: 1, sources: 0, priority: 5700, available: no)
                output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (sinks: 1, sources: 0, priority: 600, available: no)
                output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (sinks: 1, sources: 0, priority: 600, available: no)
                output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (sinks: 1, sources: 0, priority: 600, available: no)
                output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (sinks: 1, sources: 0, priority: 600, available: no)
                output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output (sinks: 1, sources: 0, priority: 600, available: no)
                output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) Output (sinks: 1, sources: 0, priority: 600, available: no)
                pro-audio: Pro Audio (sinks: 4, sources: 0, priority: 1, available: yes)
        Active Profile: off
        Ports:
                hdmi-output-0: HDMI / DisplayPort (type: HDMI, priority: 5900, latency offset: 0 usec, availability group: Legacy 1, available)
                        Properties:
                                port.type = "hdmi"
                                port.availability-group = "Legacy 1"
                                device.icon_name = "video-display"
                                card.profile.port = "0"
                                device.product.name = "R27qe"
                                iec958.codecs.detected = "[\"PCM\"]"
                                audio.channels.detected = "2"
                                audio.position.detected = "[FL,FR]"
                        Part of profile(s): output:hdmi-stereo
                hdmi-output-1: HDMI / DisplayPort 2 (type: HDMI, priority: 5800, latency offset: 0 usec, availability group: Legacy 2, not available)
                        Properties:
                                port.type = "hdmi"
                                port.availability-group = "Legacy 2"
                                device.icon_name = "video-display"
                                card.profile.port = "1"
                        Part of profile(s): output:hdmi-stereo-extra1, output:hdmi-surround-extra1, output:hdmi-surround71-extra1
                hdmi-output-2: HDMI / DisplayPort 3 (type: HDMI, priority: 5700, latency offset: 0 usec, availability group: Legacy 3, not available)
                        Properties:
                                port.type = "hdmi"
                                port.availability-group = "Legacy 3"
                                device.icon_name = "video-display"
                                card.profile.port = "2"
                        Part of profile(s): output:hdmi-stereo-extra2, output:hdmi-surround-extra2, output:hdmi-surround71-extra2
                hdmi-output-3: HDMI / DisplayPort 4 (type: HDMI, priority: 5600, latency offset: 0 usec, availability group: Legacy 4, not available)
                        Properties:
                                port.type = "hdmi"
                                port.availability-group = "Legacy 4"
                                device.icon_name = "video-display"
                                card.profile.port = "3"
                        Part of profile(s): output:hdmi-stereo-extra3, output:hdmi-surround-extra3, output:hdmi-surround71-extra3

Card #51
        Name: alsa_card.pci-0000_06_00.6
        Driver: alsa
        Owner Module: n/a
        Properties:
                device.enum.api = "udev"
                device.api = "alsa"
                media.class = "Audio/Device"
                api.alsa.path = "hw:1"
                api.alsa.card = "1"
                api.alsa.card.name = "HD-Audio Generic"
                api.alsa.card.longname = "HD-Audio Generic at 0x617c0000 irq 96"
                device.plugged.usec = "7995551"
                device.bus_path = "pci-0000:06:00.6"
                sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:06:00.6/sound/card1"
                device.bus = "pci"
                device.subsystem = "sound"
                device.vendor.id = "0x1022"
                device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
                device.product.id = "0x15e3"
                device.product.name = "Ryzen HD Audio Controller"
                device.name = "alsa_card.pci-0000_06_00.6"
                device.description = "Ryzen HD Audio Controller"
                device.nick = "HD-Audio Generic"
                device.icon_name = "audio-card-analog-pci"
                api.alsa.use-acp = "true"
                api.acp.auto-profile = "false"
                api.acp.auto-port = "false"
                api.dbus.ReserveDevice1.Priority = "-20"
                api.alsa.split-enable = "true"
                api.dbus.ReserveDevice1 = "Audio1"
                spa.object.id = "4"
                factory.id = "15"
                client.id = "46"
                object.id = "51"
                object.serial = "51"
                object.path = "alsa:acp:Generic"
                alsa.card = "1"
                alsa.card_name = "HD-Audio Generic"
                alsa.long_card_name = "HD-Audio Generic at 0x617c0000 irq 96"
                alsa.driver_name = "snd_hda_intel"
                alsa.mixer_name = "Realtek ALC257"
                alsa.components = "HDA:10ec0257,17aa3bfa,00100001"
                alsa.id = "Generic"
                device.string = "1"
        Profiles:
                off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
                output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (sinks: 1, sources: 1, priority: 6565, available: yes)
                output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority: 6500, available: yes)
                input:analog-stereo: Analog Stereo Input (sinks: 0, sources: 1, priority: 65, available: yes)
                pro-audio: Pro Audio (sinks: 1, sources: 1, priority: 1, available: yes)
        Active Profile: output:analog-stereo+input:analog-stereo
        Ports:
                analog-input-internal-mic: Internal Microphone (type: Mic, priority: 8900, latency offset: 0 usec, availability group: Legacy 1, not available)
                        Properties:
                                port.type = "mic"
                                port.availability-group = "Legacy 1"
                                device.icon_name = "audio-input-microphone"
                                card.profile.port = "0"
                        Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo
                analog-input-mic: Microphone (type: Mic, priority: 8700, latency offset: 0 usec, availability group: Legacy 2, available)
                        Properties:
                                port.type = "mic"
                                port.availability-group = "Legacy 2"
                                device.icon_name = "audio-input-microphone"
                                card.profile.port = "1"
                        Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo
                analog-output-speaker: Speakers (type: Speaker, priority: 10000, latency offset: 0 usec, availability group: Legacy 3, not available)
                        Properties:
                                port.type = "speaker"
                                port.availability-group = "Legacy 3"
                                device.icon_name = "audio-speakers"
                                card.profile.port = "2"
                        Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
                analog-output-headphones: Headphones (type: Headphones, priority: 9900, latency offset: 0 usec, availability group: Legacy 4, available)
                        Properties:
                                port.type = "headphones"
                                port.availability-group = "Legacy 4"
                                device.icon_name = "audio-headphones"
                                card.profile.port = "3"
                        Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
amixer -c 1 sget Speaker (Mic plugged in)
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 0 [0%] [-65.25dB] [off]
  Front Right: Playback 0 [0%] [-65.25dB] [off]
amixer -c 1 sget Headphone (Mic plugged in)
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
amixer -c 1 sget Speaker (Mic not plugged in)
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]

amixer -c 1 sget Headphone (Mic not plugged in)
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 0 [0%] [-65.25dB] [off]
  Front Right: Playback 0 [0%] [-65.25dB] [off]

I am on KDE Plasma 6 by the way, forgot to mention that. The speaker issue seems to have been resolved, meaning I don’t get glitchy, distorted audio anymore and the maximum volume issue seems to have been solved. Still, I can’t get the speakers to work with the microphone plugged in. I hope my text formatting is not too awful. :sweat_smile:

Given that behaviour, I’d still be inclined to look at the lower audio stack (codec jack sensing, ALSA, ACP/UCM, or WirePlumber policy perhaps) rather than KDE Plasma itself. Plasma is ust presenting the state it’s being given.

One thing that would help narrow this down is knowing the physical audio jack layout on the laptop. Does it have a single combined headset (TRRS) jack, or separate mic and headphone jacks? Also, what type of microphone are you connecting (TRS mic-only plug or TRRS headset-style plug)?