Internal microphone stops working after unplugging headsets

I’m using a Lenovo T14 Gen 4 (AMD), with the Fedora 40 KDE Spin.

The internal microphone works normally on boot, and after sleeping and waking up. However, sometimes (not always), after connecting a USB-A headset with microphone, upon disconnection, the internal microphone stops working. Its volume indicator remains “locked” either on minimal or maximal volume, and no one can hear me on any software I try; for instance, currently this is the case, and it says “Digital Microphone” and the blue bar is full.

This is really annoying, and after a few months, the only solution I found is to reboot. I tried restarting pipewire, reconnecting and disconnecting the headset, updating the kernel in the hopes that a new kernel will fix it, removing and re-adding devices in the System Settings - Sound panel, etc. Nothing can ever restart the internal microphone after it gets into this state.

Is this a Lenovo issue? KDE? pipewire? I don’t know how to debug it; I don’t see anything obvious on sudo dmesg; on the other hand, when I open the sound settings, there are lots of org.kde.pulseaudio messages, but too many to know what to look for.

On a previous Lenovo laptop (P1), I had never encountered this kind of issue with the internal microphone. Any help is appreciated…

Could you please provide the output of inxi -Fzxx please?

As a workaround, could you switch your microphone input (and sound output) to the internal device instead of disconnecting the USB mic? I’m not sure if KDE has a way of quickly switching sound inputs and outputs, but GNOME has plugins that add menu entries for that sort of thing to the top level menus for quick access.

Another workaround might be to reset the PCI device: Use sysfs to restart failed PCI devices (WiFi cards, sound cards, etc.) - Fedora Magazine

Here’s the output of inxi :

System:
  Kernel: 6.9.6-200.fc40.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.41-37.fc40
  Desktop: KDE Plasma v: 6.1.1 tk: Qt v: N/A wm: kwin_wayland dm: SDDM
    Distro: Fedora Linux 40 (KDE Plasma)
Machine:
  Type: Laptop System: LENOVO product: 21K3002EFR v: ThinkPad T14 Gen 4
    serial:  Chassis: type: 10 serial: 
  Mobo: LENOVO model: 21K3002EFR v: SDK0T76530 WIN
    serial:  part-nu: LENOVO_MT_21K3_BU_Think_FM_ThinkPad
    T14 Gen 4 UEFI: LENOVO v: R2FET55W (1.35 ) date: 02/20/2024
Battery:
  ID-1: BAT0 charge: 51.7 Wh (99.4%) condition: 52.0/52.5 Wh (99.0%)
    volts: 17.0 min: 15.5 model: SMP 5B11M90026 serial: 
    status: not charging
CPU:
  Info: 8-core model: AMD Ryzen 7 PRO 7840U w/ Radeon 780M Graphics bits: 64
    type: MT MCP arch: Zen 4 rev: 1 cache: L1: 512 KiB L2: 8 MiB L3: 16 MiB
  Speed (MHz): avg: 1022 high: 3243 min/max: 400/5132 cores: 1: 1370 2: 1384
    3: 3243 4: 400 5: 400 6: 1370 7: 1372 8: 400 9: 1373 10: 400 11: 400 12: 400
    13: 2651 14: 400 15: 400 16: 400 bogomips: 105395
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: AMD Phoenix1 vendor: Lenovo driver: amdgpu v: kernel arch: RDNA-3
    pcie: speed: 16 GT/s lanes: 16 ports: active: eDP-1 empty: DP-1, DP-2,
    DP-3, DP-4, DP-5, DP-6, HDMI-A-1, Writeback-1 bus-ID: 64:00.0
    chip-ID: 1002:15bf temp: 43.0 C
  Device-2: Chicony Integrated Camera driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 3-1:2 chip-ID: 04f2:b7c0
  Display: wayland server: X.org v: 1.20.14 with: Xwayland v: 24.1.0
    compositor: kwin_wayland driver: X: loaded: modesetting
    alternate: fbdev,vesa dri: radeonsi gpu: amdgpu display-ID: 0
  Monitor-1: eDP-1 res: 1536x960 size: N/A
  API: EGL v: 1.5 platforms: device: 0 drv: radeonsi device: 1 drv: swrast
    surfaceless: drv: radeonsi wayland: drv: radeonsi x11: drv: radeonsi
    inactive: gbm
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.1.2 glx-v: 1.4
    direct-render: yes renderer: AMD Radeon 780M (radeonsi gfx1103_r1 LLVM
    18.1.6 DRM 3.57 6.9.6-200.fc40.x86_64) device-ID: 1002:15bf
    display-ID: :0.0
  API: Vulkan v: 1.3.283 surfaces: xcb,xlib,wayland device: 0
    type: integrated-gpu driver: N/A device-ID: 1002:15bf device: 1 type: cpu
    driver: N/A device-ID: 10005:0000
Audio:
  Device-1: AMD Rembrandt Radeon High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16
    bus-ID: 64:00.1 chip-ID: 1002:1640
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo
    driver: snd_pci_ps v: kernel pcie: speed: 16 GT/s lanes: 16 bus-ID: 64:00.5
    chip-ID: 1022:15e2
  Device-3: AMD Family 17h/19h HD Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel pcie: speed: 16 GT/s lanes: 16 bus-ID: 64:00.6 chip-ID: 1022:15e3
  API: ALSA v: k6.9.6-200.fc40.x86_64 status: kernel-api
  Server-1: PipeWire v: 1.0.7 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1
    port: 6000 bus-ID: 01:00.0 chip-ID: 10ec:8168
  IF: enp1s0f0 state: down mac: 
  Device-2: Qualcomm QCNFA765 Wireless Network Adapter vendor: Lenovo
    driver: ath11k_pci v: kernel pcie: speed: 8 GT/s lanes: 1 bus-ID: 02:00.0
    chip-ID: 17cb:1103
  IF: wlp2s0 state: up mac: 
  IF-ID-1: vpn0 state: up speed: 10000 Mbps duplex: full mac: N/A
Drives:
  Local Storage: total: ...
  ID-1: /dev/nvme0n1 vendor: SK Hynix model: HFS001TEJ9X162N
    size: 953.87 GiB speed: 63.2 Gb/s lanes: 4 serial:  temp: 39.9 C
Partition:
  ID-1: ...
  ID-2: ...
  ID-3: ...
Swap:
  ID-1: ...
Sensors:
  System Temperatures: cpu: 47.0 C mobo: N/A gpu: amdgpu temp: 44.0 C
  Fan Speeds (rpm): fan-1: 1968 fan-2: 1968
Info:
  Memory: total: 32 GiB note: est. available: 30.05 GiB
    used: 13.83 GiB (46.0%)
  Processes: 489 Power: uptime: 10d 11h 22m wakeups: 47 Init: systemd v: 255
    target: graphical (5) default: graphical
  Packages: pm: rpm pkgs: N/A note: see --rpm Compilers: clang: 18.1.6
    gcc: 14.1.1 Shell: Zsh v: 5.9 running-in: konsole inxi: 3.3.34

@glb: I tried the workaround in the linked website, but the “echo 1 >…” command to the PCI device (as root) does not terminate, and even Ctrl+C does nothing. I had to manually close the terminal. I retried it, and also with /rescan instead of /remove at the end, and, again, nothing happened, and the command does not terminate.

As for the other workaround, I’m not sure I understood it. You mean, before physically disconnecting the USB headset (which I need to do periodically), switching the currently active microphone to be the internal one, and then disconnecting the USB? I can try it next time. By the way, if I reconnect an external microphone (via a USB-A or USB-C headset w/ mic), this new microphone does work; it’s really only the internal one that stops working (I can still mute it and the keyboard light does respond to it, and everything seems fine except that no one can hear me, and the current volume indicator in the audio widget in the taskbar confirms that there is no sound variation at all; unlike when everything works, and I can tap the laptop or talk and see the widget sound indicator change as expected).

It sounds vaguely similar to this bug report: No sound devices after disconnecting HDMI However, that sound issue occurs when disconnecting HDMI.

Sometimes older client programs like alsamixer (cli) or pavucontrol (gui) can reset/unmute audio channels when the default graphical control panel of the DE cannot. Other than that, I pretty much out of random ideas to try. :slightly_smiling_face: You’d have to find some low-level debug messages to dig into the problem further.

Thanks, it also might be related to this one: No microphone signal/input - Thinkpad T14 gen1 (AMD).

I haven’t been able to reach the “no more microphone” state so far, but when it happens, I’ll try restarting wireplumber just in case. I did try alsamixer/pavucontrol once but they didn’t help.