Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Sound] ThinkPad x1 carbon 5th gen internal microphone recognized but not working

New to Debian (Or Linux in general)? Ask your questions here!
Message
Author
janba
Posts: 28
Joined: 2023-04-19 18:42
Has thanked: 3 times

Re: [Sound] ThinkPad x1 carbon 5th gen internal microphone recognized but not working

#21 Post by janba »

@FreewheelinFrank

Code: Select all

~$ ls -l /etc/modprobe.d
total 8
-rw-r--r-- 1 root root 154 Dec 20  2019 amd64-microcode-blacklist.conf
-rw-r--r-- 1 root root 154 Jul  4  2022 intel-microcode-blacklist.conf
Perhaps there is something in there to disable the digital microphone?
What does that mean ? Like how can I know that ?
Is there a DSP setting in the BIOS? Is it enabled?
I checked my BIOS but didn't found anything like that..
If you add
CODE: SELECT ALL

modprobe.blacklist=snd_hda_intel
to the boot command in Grub, what is subsequent output of
CODE: SELECT ALL

# dmesg | grep 'snd\|skl\|sof\|audio\|firmware'
?

Code: Select all

[    0.044663] software IO TLB: area num 4.
[    0.476864] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    0.476867] software IO TLB: mapped [mem 0x000000003c000000-0x0000000040000000] (64MB)
[    1.709360] integrity: Loaded X.509 cert 'Microsoft Corporation UEFI CA 2011: 13adbf4309bd82709c8cd54f316ed522988a1bd4'
[    1.709379] integrity: Loaded X.509 cert 'Microsoft Windows Production PCA 2011: a92902398e16c49778cd90f99e4f9ae17c55af53'
[    2.709220] i915 0000:00:02.0: firmware: direct-loading firmware i915/kbl_dmc_ver1_04.bin
[    2.709705] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)
[    5.342531] platform regulatory.0: firmware: direct-loading firmware regulatory.db
[    5.343071] platform regulatory.0: firmware: direct-loading firmware regulatory.db.p7s
[    5.468494] iwlwifi 0000:04:00.0: firmware: direct-loading firmware iwlwifi-8265-36.ucode
[    5.469007] iwlwifi 0000:04:00.0: loaded firmware version 36.ca7b901d.0 8265-36.ucode op_mode iwlmvm
[    5.597610] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    5.699896] snd_hda_codec_conexant hdaudioC0D0: CX8200: BIOS auto-probing.
[    5.702488] snd_hda_codec_conexant hdaudioC0D0: vmaster hook already present before cdev!
[    5.702658] snd_hda_codec_conexant hdaudioC0D0: autoconfig for CX8200: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[    5.702663] snd_hda_codec_conexant hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    5.702666] snd_hda_codec_conexant hdaudioC0D0:    hp_outs=1 (0x16/0x0/0x0/0x0/0x0)
[    5.702669] snd_hda_codec_conexant hdaudioC0D0:    mono: mono_out=0x0
[    5.702670] snd_hda_codec_conexant hdaudioC0D0:    inputs:
[    5.702672] snd_hda_codec_conexant hdaudioC0D0:      Internal Mic=0x1a
[    5.702674] snd_hda_codec_conexant hdaudioC0D0:      Mic=0x19
[    5.757612] psmouse serio2: trackpoint: Elan TrackPoint firmware: 0x04, buttons: 3/3
[    7.185518] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[    7.186839] bluetooth hci0: firmware: direct-loading firmware intel/ibt-12-16.sfi
[    7.186846] Bluetooth: hci0: Found device firmware: intel/ibt-12-16.sfi
[    8.617295] Bluetooth: hci0: Waiting for firmware download to complete
[    8.631188] bluetooth hci0: firmware: direct-loading firmware intel/ibt-12-16.ddc
Specifying the microphone in /etc/pulse/default.pa as
CODE: SELECT ALL

load-module module-alsa-source device=hw:0,7
Seems to work for later X1 gens seems to work. Worth a try?
Tried that.. By default it was hw:1,0,where do you have the 0,7 from ?.. (I've tried both)

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2062
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 221 times

Re: [Sound] ThinkPad x1 carbon 5th gen internal microphone recognized but not working

#22 Post by FreewheelinFrank »

janba wrote: 2023-05-17 20:34
Perhaps there is something in there to disable the digital microphone?
What does that mean ? Like how can I know that ?
Sometimes if a digital microphone is present (and not working), sound will not work at all. The microphone can be disabled with an additional .conf file in that location containing the option "DMIC=0". There is no additional file in your case, so we can rule that out.
janba wrote: 2023-05-17 20:34
Tried that.. By default it was hw:1,0,where do you have the 0,7 from ?.. (I've tried both)
That option is said to work for later models.

https://wiki.archlinux.org/title/Lenovo ... n_7)#Audio

Actually it should be

Code: Select all

load-module module-alsa-source device=hw:0,7 channels=4
I think the idea is to tell Alsa that the computer has a microphone array (which yours does) rather than a simple stereo mic.

Interesting that the default is hw:1,0 - arecord says the mic is hw:0,0.

It might be worth trying

Code: Select all

load-module module-alsa-source device=hw:0,0 channels=4
But that might be grasping at straws.

To summarise where we are, you laptop seems to have a digital microphone array that will only work with the SOF driver but is using snd_hda_intel. We have tried forcing the SOF driver and disabling snd_hda_intel, but there is no sign that the microphone is recognised as digital or that SOF is loading.

This seems to be a similar issue to here (the X1 Carbon Gen 5 also seems to use Intel Kaby Lake, according to a review I found.

https://bbs.archlinux.org/viewtopic.php?id=273789

https://hexus.net/tech/reviews/laptop/1 ... 7-5th-gen/

There seem to be issues with Intel not releasing the necessary code for this microphone. See the bug reports and documentation linked to at the Arch Wiki.

On the other hand, I've seen a report of the microphone working on this laptop with SOF in Arch Linux (see post #9).

https://bbs.archlinux.org/viewtopic.php?id=253793

But in this case a digital input is recognised and I can't see any in your outputs. That user doesn't have Pulseaudio, so it could be that there is an issue in Pulseaudio (or now Pipewire) that prevents recognition of the microphone.

I will try to find a way to test that hypothesis. Maybe if you have a USB live image you could try removing Pulseaudio/Pipewire and see if the microphone is recognised?

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2062
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 221 times

Re: [Sound] ThinkPad x1 carbon 5th gen internal microphone recognized but not working

#23 Post by FreewheelinFrank »

Can the microphone be turned off in the BIOS? If it is on, try turning it off and on again.

https://forums.lenovo.com/t5/ThinkPad-X ... -p/4634093

janba
Posts: 28
Joined: 2023-04-19 18:42
Has thanked: 3 times

Re: [Sound] ThinkPad x1 carbon 5th gen internal microphone recognized but not working

#24 Post by janba »

@FreewheelinFrank
Can the microphone be turned off in the BIOS?
No, there are no audio or microphone settings..
I was wondering, why I don't have these settings, while other versions of the x1 seem to have them. This might be a dump question, but is there something like BIOS-update's I should do ? I haven't found anything on the internet (which at least doesn't sound very extraordinary nerdy..)

Something related to your preview post:
I was trying to set the

Code: Select all

load-module module-alsa-source device=hw:0,7 channels=4
line again (with all those other 0,0; 0,4; 0,7...)
And I don't know what I've done, but since the second try my internal speakers aren't recognized at all :D Even when I comment the mentioned line out again, output devices are still not detected :D Bluetooth-headphones and usb-c headphones still work fine (speakers+mic)
I'm actually pretty sure that I haven't changed anything else, except that mentioned line. Is there any way to check, what changes were made to this file in the past ? (propably not.. ? :D)

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2062
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 221 times

Re: [Sound] ThinkPad x1 carbon 5th gen internal microphone recognized but not working

#25 Post by FreewheelinFrank »

What is the BIOS version?
DETERMINING WHICH VERSION IS INSTALLED


[Checking on ThinkPad Setup]

1. Turn on the computer.
2. While the "To interrupt normal startup, press Enter" message is displayed
at the lower-left area or lower-center of the screen, press the F1 key.
The ThinkPad Setup menu will be displayed. If a password prompt appears,
type the correct password.
3. Locate the UEFI BIOS Version line.
"UEFI BIOS version (BIOS ID)" will be shown on the UEFI BIOS Version line.
4. Turn off the computer.
https://download.lenovo.com/pccbbs/mobiles/n1mul43w.txt

Have you tried the default setting you mentioned previously and rebooting?

load-module module-alsa-source device=hw:1,0

Sorry that messed things up for you.

In another thread a Thinkpad X1 Carbon Gen 9 worked with Debian Bookworm.

viewtopic.php?p=772904#p772904

I can't understand why a previous generation fails to work. It's very frustrating.

janba
Posts: 28
Joined: 2023-04-19 18:42
Has thanked: 3 times

Re: [Sound] ThinkPad x1 carbon 5th gen internal microphone recognized but not working

#26 Post by janba »

Sorry that messed things up for you.
To be honest I can't thank you enough anyway for all your effort and help !

UEFI Bios Version: N1MET55W (1.40)
UEFI Bios-Date: 2019-06-20
Embedded Controller Version: N1MET33W (1.22)
ME Firmware Version 11.8.65.3590

There is more info on the hardware, just tell me if you need more.

By default, this line was commented-out. I tried that also..
I recognized that I can't reach pipewire by service or systemctl. When I tried to reload/start/stop pipewire manually (because in /etc/pulse/default.pa the comments at the top say that this script would only work if pulse is started per user ?..)

Code: Select all

# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)
I get an error saying

Code: Select all

~$ systemctl status pipewire
Unit pipewire.service could not be found.

Anyway I wonder why it was working on Ubuntu.. Is there anything I could do, like booting into a live Ubuntu and if it works; give you some outputs ?

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2062
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 221 times

Re: [Sound] ThinkPad x1 carbon 5th gen internal microphone recognized but not working

#27 Post by FreewheelinFrank »

You're welcome. At least we had success with other things!

Latest BIOS is 1.58, at least for the Type 20HR and 20HQ. What model is yours? There is no indication that a IOS upgrade will fix the microphone, but the readme does say
Fixed an issue where system settings may change after firmware update on Linux
which might be causing problems.

Update is done with fwupdmgr, which is fairly user friendly. Install (if it isn't already)

Code: Select all

fwupd
I believe some manufacturers supply BIOS updates to fwupdmgr directly (at least this is what I remember), so you could try

Code: Select all

# fwupdmgr get-updates
and see what is available.

https://www.thegeekdiary.com/fwupdmgr-c ... not-found/

If an update is not available, you would have to do a manual update as per the Lenovo readme at your own risk. A BIOS update carries risk which you should understand before going ahead.

Lenovo seems to support Linux issues, so it might be worth taking out a support ticket: does my model have a digital microphone? If it does, there is no sign that Debian recognises it. Do I need to file a SOF bug report? If it is analogue, why is it not working?

Some manufacturers who ship with Linux installed (Ubuntu) will supply a fix to Ubuntu to get the hardware working. I've seen this before with sound. They may tell you if they have done so in this case. Seems like a possibility as the microphone works OK in Ubuntu.

If they can confirm it's definitely a digital microphone in your model, and it's not working even in a live boot of Bookworm, then it looks like a SOF driver issue, and you would have to file a bug report.

Wait! Let me just kick myself repeatedly. Ouch! Ouch! There is a page called Suggestions before filing an SOF bug:

https://thesofproject.github.io/latest/ ... tions.html

with some things we haven't tried, including a microphone test with the right frequency.

Code: Select all

$ arecord -Dhw:0,0 -c2 -r48000 -f S16_LE -d 10 test.wav
followed by

Code: Select all

$ aplay test.wav
This will tell us if the microphone is working at the hardware level.

Edit: correction $ aplay /tmp/test-mic.wav changed to $ aplay test.wav.

janba
Posts: 28
Joined: 2023-04-19 18:42
Has thanked: 3 times

Re: [Sound] ThinkPad x1 carbon 5th gen internal microphone recognized but not working

#28 Post by janba »

Code: Select all

~$ arecord -Dhw:0,0 -c2 -r48000 -f S16_LE -d 10 test.wav
ALSA lib confmisc.c:165:(snd_config_get_card) Cannot get card index for 0
arecord: main:831: audio open error: No such file or directory
I think I messed smth up ?..

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2062
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 221 times

Re: [Sound] ThinkPad x1 carbon 5th gen internal microphone recognized but not working

#29 Post by FreewheelinFrank »

What is output of

Code: Select all

$ arecord -L
?

Is Alsa messed up? Try

# /etc/init.d/alsa-utils reset

# /etc/init.d/alsa-utils restart

Edit: OP has pointed out that these commands result in an error.

Code: Select all

Failed to restart alsa-utils.service: Unit alsa-utils.service is masked
They seem to have been masked since Systemd - I obviously didn't check the date of my source. :oops:

janba
Posts: 28
Joined: 2023-04-19 18:42
Has thanked: 3 times

Re: [Sound] ThinkPad x1 carbon 5th gen internal microphone recognized but not working

#30 Post by janba »

Code: Select all

~$ arecord -L
null
    Discard all samples (playback) or generate zero samples (capture)
lavrate
    Rate Converter Plugin Using Libav/FFmpeg Library
samplerate
    Rate Converter Plugin Using Samplerate Library
speexrate
    Rate Converter Plugin Using Speex Resampler
jack
    JACK Audio Connection Kit
oss
    Open Sound System
pipewire
    PipeWire Sound Server
pulse
    PulseAudio Sound Server
speex
    Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
default
    Default ALSA Output (currently PipeWire Media Server)
Still doesn't work D: I'm realy curious about mayby I've messed up something, but I have no clue where or what. I've done nothing else rather than changing that single line..

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2062
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 221 times

Re: [Sound] ThinkPad x1 carbon 5th gen internal microphone recognized but not working

#31 Post by FreewheelinFrank »

No sign of microphone there, or indeed of the cards, as far as I can see.

Anything in

Code: Select all

~/.asoundrc
?

Have you changed the profile in the configuration tab in pavucontrol?

janba
Posts: 28
Joined: 2023-04-19 18:42
Has thanked: 3 times

Re: [Sound] ThinkPad x1 carbon 5th gen internal microphone recognized but not working

#32 Post by janba »

Code: Select all

~/.asoundrc
doesn't even exist.

In pavucontrol it just says: "No cards available for configuration."
No sign of microphone there, or indeed of the cards, as far as I can see.
What would you have expected ? Like how should it look like ?

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2062
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 221 times

Re: [Sound] ThinkPad x1 carbon 5th gen internal microphone recognized but not working

#33 Post by FreewheelinFrank »

janba wrote: 2023-05-29 13:29

Code: Select all

~/.asoundrc
doesn't even exist.

In pavucontrol it just says: "No cards available for configuration."
No sign of microphone there, or indeed of the cards, as far as I can see.
What would you have expected ? Like how should it look like ?
.asoundrc doesn't exist by default, so that is normal.

I would expect to see access to the card something like this.

Code: Select all

hw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC233 Analog
    Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC233 Analog
    Hardware device with all software conversions
It doesn't look like Alsa is seeing the sound card. Did you try resetting/restarting Alsa as per previous post?

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2062
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 221 times

Re: [Sound] ThinkPad x1 carbon 5th gen internal microphone recognized but not working

#34 Post by FreewheelinFrank »

janba wrote: 2023-05-25 16:57
I get an error saying

Code: Select all

~$ systemctl status pipewire
Unit pipewire.service could not be found.
Same on my Bookworm computer.

The correct command to see if PipeWire is configured properly is

Code: Select all

LANG=C pactl info | grep '^Server Name'
https://wiki.debian.org/PipeWire

See link for expected output.

But it got me thinking, do you still have PulseAudio installed? For Pipewire to work, it will need to be uninstalled or masked.

Maybe you missed this step in the upgrade?

Similar issue here: uninstalling PulseAudio fixed it:

viewtopic.php?p=770365#p770365

or for how to mask, see Debian Wiki link.

janba
Posts: 28
Joined: 2023-04-19 18:42
Has thanked: 3 times

Re: [Sound] ThinkPad x1 carbon 5th gen internal microphone recognized but not working

#35 Post by janba »

@FreewheelinFrank
janba wrote: ↑2023-05-25 16:57

I get an error saying
CODE: SELECT ALL

~$ systemctl status pipewire
Unit pipewire.service could not be found.
Same on my Bookworm computer.

The correct command to see if PipeWire is configured properly is
Pipewire is listed in

Code: Select all

systemctl --user

Code: Select all

@debian:~$ systemctl --user | grep pulse
  pipewire-pulse.service                                                                                             loaded active     running   PipeWire PulseAudio
  pipewire-pulse.socket
I restarted it, but still no audio. I was thinking of just reinstalling my whole system with the new .iso (congrats to that and thank you all so much !! *clapping hands* !!!)
Would you say it's worth a try ?

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2062
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 221 times

Re: [Sound] ThinkPad x1 carbon 5th gen internal microphone recognized but not working

#36 Post by FreewheelinFrank »

What is output of

Code: Select all

LANG=C pactl info | grep '^Server Name'
?

Correct output of

Code: Select all

systemctl --user | grep pulse
should be

Code: Select all

pipewire-pulse.service                                                                                           loaded active running   PipeWire PulseAudio
pipewire-pulse.socket                                                                                            loaded active running   PipeWire PulseAudio
For some reason there is a long space between service and status - are you sure you haven't missed something?

Is Pipewire installed correctly, and is PulseAudio masked or uninstalled?

https://wiki.debian.org/PipeWire#Debian ... 2FUnstable

janba
Posts: 28
Joined: 2023-04-19 18:42
Has thanked: 3 times

Re: [Sound] ThinkPad x1 carbon 5th gen internal microphone recognized but not working

#37 Post by janba »

@FreewheelinFrankAfter I did a fresh install with the new stable iso, I got those by default:

Code: Select all

@debian:~$ LANG=C pactl info | grep '^Server Name'
Server Name: pulseaudio

Code: Select all

@debianl:~$ systemctl --user | grep pulse
  pulseaudio.service                                                                     loaded active running   Sound Service
  pulseaudio.socket                                                                      loaded active running   Sound System 

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2062
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 221 times

Re: [Sound] ThinkPad x1 carbon 5th gen internal microphone recognized but not working

#38 Post by FreewheelinFrank »

janba wrote: 2023-07-04 17:36 @FreewheelinFrankAfter I did a fresh install with the new stable iso, I got those by default:

Code: Select all

@debian:~$ LANG=C pactl info | grep '^Server Name'
Server Name: pulseaudio

Code: Select all

@debianl:~$ systemctl --user | grep pulse
  pulseaudio.service                                                                     loaded active running   Sound Service
  pulseaudio.socket                                                                      loaded active running   Sound System 
I think the sound service used depends on DE installed, so PulseAudio is OK.

But does the microphone work?

Fingers crossed.

Post Reply