[arch-general] ThinkPad X1 Carbon Gen 11 mic not working
Hello everyone, I installed arch 5.18.9-arch1-1 on a ThinkPad X1 Carbon Gen 11. Initially my speakers weren't working. Following the arch wiki, I installed sof-firmware and added the following to /etc/modprobe.d/audiofix.conf: options snd-hda-intel dmic_detect=0 options snd-hda-intel model=laptop-amic enable=yes After that speakers started to work. However, my mic is still not working. I'm using plain alsa, and amixer command to control audio. I have already increased the volume of the mic using `amixer set Capture '100%'` for which I see the following output. Simple mixer control 'Capture',0 Capabilities: cvolume cswitch Capture channels: Front Left - Front Right Limits: Capture 0 - 63 Front Left: Capture 63 [100%] [30.00dB] [on] Front Right: Capture 63 [100%] [30.00dB] [on] Result of `arecord -l` is: **** List of CAPTURE Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC287 Analog [ALC287 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 Following the Arch wiki, I tried adding the following to /etc/modprobe.d/snd-hda-intel.conf: options snd-hda-intel enable_msi=1 When I tried to run the following command, I got the "Not permitted error": # rmmod snd-hda-intel && modprobe snd-hda-intel Help please. -- Executive ability is prominent in your make-up.
Hi, On Monday, 4 July 2022 15:36:20 CEST Sadeep Madurange via arch-general wrote:
Hello everyone,
I installed arch 5.18.9-arch1-1 on a ThinkPad X1 Carbon Gen 11. Initially my speakers weren't working. Following the arch wiki, I installed sof-firmware and added the following to /etc/modprobe.d/audiofix.conf:
options snd-hda-intel dmic_detect=0 options snd-hda-intel model=laptop-amic enable=yes
After that speakers started to work. However, my mic is still not working. I'm using plain alsa, and amixer command to control audio. I have already increased the volume of the mic using `amixer set Capture '100%'` for which I see the following output.
Simple mixer control 'Capture',0 Capabilities: cvolume cswitch Capture channels: Front Left - Front Right Limits: Capture 0 - 63 Front Left: Capture 63 [100%] [30.00dB] [on] Front Right: Capture 63 [100%] [30.00dB] [on]
Result of `arecord -l` is:
**** List of CAPTURE Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC287 Analog [ALC287 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0
Following the Arch wiki, I tried adding the following to /etc/modprobe.d/snd-hda-intel.conf:
options snd-hda-intel enable_msi=1
When I tried to run the following command, I got the "Not permitted error":
# rmmod snd-hda-intel && modprobe snd-hda-intel
By Gen 11 you mean the Intel CPU? There is no X1 Carbon Gen 11. The latest is Gen 10. In any case, I have a X1 Yoga Gen 6, which is (apart from the screen and chasis) equivalent to the X1 Carbon Gen 9 (with an Intel Gen 11), and I have no issues with the mic or the speakers. Everything works out of the box, but I'm using pipewire. Would you consider trying pipewire or is it a no go for you? -- Iyán Méndez Veiga GPG: 0x422E3694311E5AC1
On Mon, Jul 04, 2022 at 04:29:13PM +0200, Iyán Méndez Veiga via arch-general wrote:
In any case, I have a X1 Yoga Gen 6, which is (apart from the screen and chasis) equivalent to the X1 Carbon Gen 9 (with an Intel Gen 11), and I have no issues with the mic or the speakers. Everything works out of the box, but I'm using pipewire.
Would you consider trying pipewire or is it a no go for you?
As far as I'm aware, Pipewire sits on top of ALSA. So in your case I'd expect just ALSA to work as well. Maybe you could test... -- FA
On Monday, 4 July 2022 16:47:46 CEST Fons Adriaensen via arch-general wrote:
On Mon, Jul 04, 2022 at 04:29:13PM +0200, Iyán Méndez Veiga via arch-general wrote:
In any case, I have a X1 Yoga Gen 6, which is (apart from the screen and chasis) equivalent to the X1 Carbon Gen 9 (with an Intel Gen 11), and I have no issues with the mic or the speakers. Everything works out of the box, but I'm using pipewire.
Would you consider trying pipewire or is it a no go for you?
As far as I'm aware, Pipewire sits on top of ALSA. So in your case I'd expect just ALSA to work as well. Maybe you could test...
What do you want me to try? I'm not an expert and I never looked into too much detail about this. Pipewire simply works for me. For example, running `arecord --duration=5 --format=dat test-mic.wav` doesn't work but selecting pipewire with flag -D does the trick `arecord -D pipewire -- duration=5 --format=dat test-mic.wav` Also, double check that the microphone is not disabled by the laptop (Fn + F4), although the led makes it easy to spot. And in alsamixer the word "Capture" dissapears if the mic is disabled. Btw, I don't have any custom files in /etc/modprobe.d/ regarding audio. -- Iyán Méndez Veiga GPG: 0x422E3694311E5AC1
I tried installing pipewire but capture is still not working. So, I uninstalled pipewire again. Also, I removed the audiofix.conf from /etc/modprobe.d/. After deleting the file my LED lights for speaker and mic mute/unmute are working now. However, capture is still not working. After deleting the audiofix file, the output of arecord -l has changed to the following. **** List of CAPTURE Hardware Devices **** card 0: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: sofhdadsp [sof-hda-dsp], device 6: DMIC (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: sofhdadsp [sof-hda-dsp], device 7: DMIC16kHz (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 I need to install sof-firmare though. Without that, even the speakers don't work and no device get listed in the above output. On 2022-07-04 20:56:56, Iyán Méndez Veiga via arch-general wrote:
On Monday, 4 July 2022 16:47:46 CEST Fons Adriaensen via arch-general wrote:
On Mon, Jul 04, 2022 at 04:29:13PM +0200, Iyán Méndez Veiga via arch-general wrote:
In any case, I have a X1 Yoga Gen 6, which is (apart from the screen and chasis) equivalent to the X1 Carbon Gen 9 (with an Intel Gen 11), and I have no issues with the mic or the speakers. Everything works out of the box, but I'm using pipewire.
Would you consider trying pipewire or is it a no go for you?
As far as I'm aware, Pipewire sits on top of ALSA. So in your case I'd expect just ALSA to work as well. Maybe you could test...
What do you want me to try?
I'm not an expert and I never looked into too much detail about this. Pipewire simply works for me.
For example, running `arecord --duration=5 --format=dat test-mic.wav` doesn't work but selecting pipewire with flag -D does the trick `arecord -D pipewire -- duration=5 --format=dat test-mic.wav`
Also, double check that the microphone is not disabled by the laptop (Fn + F4), although the led makes it easy to spot. And in alsamixer the word "Capture" dissapears if the mic is disabled.
Btw, I don't have any custom files in /etc/modprobe.d/ regarding audio.
-- Iyán Méndez Veiga GPG: 0x422E3694311E5AC1
On Tue, Jul 05, 2022 at 10:25:14AM +0800, Sadeep Madurange via arch-general wrote:
**** List of CAPTURE Hardware Devices **** card 0: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: sofhdadsp [sof-hda-dsp], device 6: DMIC (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: sofhdadsp [sof-hda-dsp], device 7: DMIC16kHz (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0
This means that to record from the built-in mic you need arecord -D hw:0,6 <other args> ^^^^^^^^^ The default (probably -D hw:0,0) would record from the HDA device, which may be wired to an extern mic input or not at all. -- FA
On 2022-07-05 10:08:28, Fons Adriaensen via arch-general wrote:
On Tue, Jul 05, 2022 at 10:25:14AM +0800, Sadeep Madurange via arch-general wrote:
**** List of CAPTURE Hardware Devices **** card 0: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: sofhdadsp [sof-hda-dsp], device 6: DMIC (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: sofhdadsp [sof-hda-dsp], device 7: DMIC16kHz (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0
This means that to record from the built-in mic you need
arecord -D hw:0,6 <other args> ^^^^^^^^^
The default (probably -D hw:0,0) would record from the HDA device, which may be wired to an extern mic input or not at all.
-- FA
Hi FA and everyone else that was helping, I just got the mic to work by installing pipewire. FA, I think you are right because when I installed pipewire and checked pavucontrol, I can see that the mic selected now is dmic. When I try arecord with `-D hw:0,6`, though, I get an error "arecord set_params:1396: Channels count non available". To summarise, what I did was to install sof-firmware and then install pipewire and reboot the machine. Thanks to everyone here and irc!
On Monday, 4 July 2022 16:47:46 CEST Fons Adriaensen wrote:
On Mon, Jul 04, 2022 at 04:29:13PM +0200, Iyán Méndez Veiga wrote: As far as I'm aware, Pipewire sits on top of ALSA. So in your case I'd expect just ALSA to work as well. Maybe you could test...
What do you want me to try?
I'm not an expert and I never looked into too much detail about this. Pipewire simply works for me.
For example, running `arecord [...] doesn't work but selecting pipewire [...] does the trick [...]
Hi, only one client can grab an ALSA input or output device. Take, for example, the case of a browser playing a video or as in your case a sound server does already access the device, then neither a music player or by command line something else can use the same ALSA device, too. Before arecord can access the ALSA device, pipewire must be disconnected from it. As soon as pipewire released the audio device, test with arecord again. In a nutshell, only a single client can access an ALSA device, such as a sound card's input or output channel directly. Several clients can access a sound server. The sound server shares the hardware inputs and outputs with the inputs and outputs of clients. When using plain ALSA, without a sound server or without https://alsa.opensrc.org/Dmix only one client at a time can use an audio hardware input or output channel. I'm using either plain ALSA (without dmix) or the jack sound server, but not a ThinkPad's audio device, hence I can't help with this. However, since pipewire seemingly doesn't replace the ALSA drivers, usage of the ThinkPad's audio input and output channels should work with plain ALSA, too. IOW if ALSA already fails, then pipewire unlikely does fix this issue, unless pipewire does fix bad ALSA configurations automagically. Maybe pipewire does (re)configure ALSA, but way more likely is, the more layers, the more issues. Regards, Ralf
My apologies, I made a mistake when trimming the text. This is misleading:
On Monday, 4 July 2022 16:47:46 CEST Fons Adriaensen wrote:
On Mon, Jul 04, 2022 at 04:29:13PM +0200, Iyán Méndez Veiga wrote:
This way it's correct: On Mon, 04 Jul 2022 20:56:56 +0200, Iyán Méndez Veiga wrote:
On Monday, 4 July 2022 16:47:46 CEST Fons Adriaensen wrote:
Hi, Thanks for the advice. I tried installing pipewire as well as pulseaudio but none of them worked with default settings. I think the issue with ALSA. At this point I have reverted all the changes I made back to just plain alsa with sof-firmware. Looking at alsamixer, I have multiple mics under the Capture tab. My alsa card is sof-hda-dsp. The chip is Realtek ALC287. I have following items in capture tab: 1. Mic Boost (I have set it to max) 2. Capture (maxed and toggled to on) 3. Dmic0 Front (muted and toggled off) 4. Dmic0 Rear (muted and toggled off) 5. Dmic1 2nd Front (muted and can't toggle) 6. Dmic1 2nd Rear (muted and can't toggle) 7. PGA2.0 2 Master (muted and can't toggle) I tried increasing the volume of all of them to max as well as toggling them to ON but none of them worked. If I increase the volume of PGA2.0 2 Master I can here a constant cracking sound but nothing is recorded with `arecord --duration=5 --format=dat test-mic.wav`. Any help is much appreciated! On 2022-07-05 05:49:34, Ralf Mardorf via arch-general wrote:
Hi,
only one client can grab an ALSA input or output device. Take, for example, the case of a browser playing a video or as in your case a sound server does already access the device, then neither a music player or by command line something else can use the same ALSA device, too. Before arecord can access the ALSA device, pipewire must be disconnected from it. As soon as pipewire released the audio device, test with arecord again.
In a nutshell, only a single client can access an ALSA device, such as a sound card's input or output channel directly. Several clients can access a sound server. The sound server shares the hardware inputs and outputs with the inputs and outputs of clients. When using plain ALSA, without a sound server or without https://alsa.opensrc.org/Dmix only one client at a time can use an audio hardware input or output channel.
I'm using either plain ALSA (without dmix) or the jack sound server, but not a ThinkPad's audio device, hence I can't help with this. However, since pipewire seemingly doesn't replace the ALSA drivers, usage of the ThinkPad's audio input and output channels should work with plain ALSA, too. IOW if ALSA already fails, then pipewire unlikely does fix this issue, unless pipewire does fix bad ALSA configurations automagically. Maybe pipewire does (re)configure ALSA, but way more likely is, the more layers, the more issues.
Regards, Ralf
On Tuesday 5 July 2022 07:19:36 CEST Sadeep Madurange via arch-general wrote:
Hi,
Thanks for the advice. I tried installing pipewire as well as pulseaudio but none of them worked with default settings. I think the issue with ALSA. At this point I have reverted all the changes I made back to just plain alsa with sof-firmware. Looking at alsamixer, I have multiple mics under the Capture tab. My alsa card is sof-hda-dsp. The chip is Realtek ALC287. I have following items in capture tab:
1. Mic Boost (I have set it to max) 2. Capture (maxed and toggled to on) 3. Dmic0 Front (muted and toggled off) 4. Dmic0 Rear (muted and toggled off) 5. Dmic1 2nd Front (muted and can't toggle) 6. Dmic1 2nd Rear (muted and can't toggle) 7. PGA2.0 2 Master (muted and can't toggle)
In my case I have the boost at 0, but Dmic0 Front and Roar have a "CAPTURE" below and those are the important ones. I have them at 70%. When using Plasma KDE, from the audio volume settings, moving the mic % changes these two values. Hope that helps. -- Iyán Méndez Veiga GPG 0x422E3694311E5AC1
Hi Ivan, Thanks a lot for sharing. I updated my alsamixer settings to match yours. Still no luck. How about your main "Capture"? Set to on with some volume? I also have following information that may be useful. Output of lspci: 00:00.0 Host bridge: Intel Corporation 11th Gen Core Processor Host Bridge/DRAM Registers (rev 01) 00:02.0 VGA compatible controller: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] (rev 01) 00:04.0 Signal processing controller: Intel Corporation TigerLake-LP Dynamic Tuning Processor Participant (rev 01) 00:06.0 PCI bridge: Intel Corporation 11th Gen Core Processor PCIe Controller (rev 01) 00:07.0 PCI bridge: Intel Corporation Tiger Lake-LP Thunderbolt 4 PCI Express Root Port #1 (rev 01) 00:07.2 PCI bridge: Intel Corporation Tiger Lake-LP Thunderbolt 4 PCI Express Root Port #2 (rev 01) 00:08.0 System peripheral: Intel Corporation GNA Scoring Accelerator module (rev 01) 00:0a.0 Signal processing controller: Intel Corporation Tigerlake Telemetry Aggregator Driver (rev 01) 00:0d.0 USB controller: Intel Corporation Tiger Lake-LP Thunderbolt 4 USB Controller (rev 01) 00:0d.2 USB controller: Intel Corporation Tiger Lake-LP Thunderbolt 4 NHI #0 (rev 01) 00:0d.3 USB controller: Intel Corporation Tiger Lake-LP Thunderbolt 4 NHI #1 (rev 01) 00:14.0 USB controller: Intel Corporation Tiger Lake-LP USB 3.2 Gen 2x1 xHCI Host Controller (rev 20) 00:14.2 RAM memory: Intel Corporation Tiger Lake-LP Shared SRAM (rev 20) 00:14.3 Network controller: Intel Corporation Wi-Fi 6 AX201 (rev 20) 00:15.0 Serial bus controller: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #0 (rev 20) 00:16.0 Communication controller: Intel Corporation Tiger Lake-LP Management Engine Interface (rev 20) 00:1f.0 ISA bridge: Intel Corporation Tiger Lake-LP LPC Controller (rev 20) 00:1f.3 Audio device: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20) 00:1f.4 SMBus: Intel Corporation Tiger Lake-LP SMBus Controller (rev 20) 00:1f.5 Serial bus controller: Intel Corporation Tiger Lake-LP SPI Controller (rev 20) 04:00.0 Non-Volatile memory controller: KIOXIA Corporation Device 000c Output of dmesg | grep -E 'snd|sof': [ 0.615853] PCI-DMA: Using software bounce buffering for IO (SWIOTLB) [ 0.615854] software IO TLB: mapped [mem 0x00000000858dc000-0x00000000898dc000] (64MB) [ 0.871403] integrity: Loaded X.509 cert 'Microsoft Corporation UEFI CA 2011: 13adbf4309bd82709c8cd54f316ed522988a1bd4' [ 0.871411] integrity: Loaded X.509 cert 'Microsoft Windows Production PCA 2011: a92902398e16c49778cd90f99e4f9ae17c55af53' [ 7.283107] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380 [ 7.283412] snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver [ 7.695674] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380 [ 7.696277] sof-audio-pci-intel-tgl 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver [ 7.696983] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380 [ 7.697050] sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915]) [ 7.703739] sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode [ 7.751725] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 5 [ 7.751728] sof-audio-pci-intel-tgl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now [ 7.751731] sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 4 [ 7.753631] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864 [ 7.753633] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:19:1 [ 7.753634] sof-audio-pci-intel-tgl 0000:00:1f.3: warn: FW ABI is more recent than kernel [ 7.753636] sof-audio-pci-intel-tgl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30 [ 7.849473] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864 [ 7.849475] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:19:1 [ 7.849477] sof-audio-pci-intel-tgl 0000:00:1f.3: warn: FW ABI is more recent than kernel [ 7.895630] sof-audio-pci-intel-tgl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:19:1 [ 7.895633] sof-audio-pci-intel-tgl 0000:00:1f.3: warn: topology ABI is more recent than kernel [ 7.922067] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC287: line_outs=2 (0x14/0x17/0x0/0x0/0x0) type:speaker [ 7.922070] snd_hda_codec_realtek ehdaudio0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0) [ 7.922072] snd_hda_codec_realtek ehdaudio0D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0) [ 7.922072] snd_hda_codec_realtek ehdaudio0D0: mono: mono_out=0x0 [ 7.922073] snd_hda_codec_realtek ehdaudio0D0: inputs: [ 7.922073] snd_hda_codec_realtek ehdaudio0D0: Mic=0x19 [ 8.014439] snd_hda_codec_realtek ehdaudio0D0: ASoC: sink widget AIF1TX overwritten [ 8.014445] snd_hda_codec_realtek ehdaudio0D0: ASoC: source widget AIF1RX overwritten [ 8.035352] input: sof-hda-dsp Mic as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input28 [ 8.035401] input: sof-hda-dsp Headphone as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input29 [ 8.035658] input: sof-hda-dsp HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input30 [ 8.035683] input: sof-hda-dsp HDMI/DP,pcm=4 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input31 [ 8.035715] input: sof-hda-dsp HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input32 On 2022-07-05 07:33:57, Iyán Méndez Veiga via arch-general wrote:
On Tuesday 5 July 2022 07:19:36 CEST Sadeep Madurange via arch-general wrote:
Hi,
Thanks for the advice. I tried installing pipewire as well as pulseaudio but none of them worked with default settings. I think the issue with ALSA. At this point I have reverted all the changes I made back to just plain alsa with sof-firmware. Looking at alsamixer, I have multiple mics under the Capture tab. My alsa card is sof-hda-dsp. The chip is Realtek ALC287. I have following items in capture tab:
1. Mic Boost (I have set it to max) 2. Capture (maxed and toggled to on) 3. Dmic0 Front (muted and toggled off) 4. Dmic0 Rear (muted and toggled off) 5. Dmic1 2nd Front (muted and can't toggle) 6. Dmic1 2nd Rear (muted and can't toggle) 7. PGA2.0 2 Master (muted and can't toggle)
In my case I have the boost at 0, but Dmic0 Front and Roar have a "CAPTURE" below and those are the important ones. I have them at 70%. When using Plasma KDE, from the audio volume settings, moving the mic % changes these two values. Hope that helps.
-- Iyán Méndez Veiga GPG 0x422E3694311E5AC1
Hi Ralf, On Tuesday 5 July 2022 05:49:34 CEST Ralf Mardorf via arch-general wrote:
only one client can grab an ALSA input or output device. Take, for example, the case of a browser playing a video or as in your case a sound server does already access the device, then neither a music player or by command line something else can use the same ALSA device, too. Before arecord can access the ALSA device, pipewire must be disconnected from it. As soon as pipewire released the audio device, test with arecord again.
I will try this evening to stop pipewire and try running arecord again. -- Iyán Méndez Veiga GPG 0x422E3694311E5AC1
participants (4)
-
Fons Adriaensen
-
Iyán Méndez Veiga
-
Ralf Mardorf
-
Sadeep Madurange