Solved Need to get audio and mic working in Lenovo Yoga C940-15IRH with no official Linux support

Solved issue

gauthamh

New Member
Joined
Feb 2, 2024
Messages
10
Reaction score
8
Credits
124
Hello Linux Forum Users,

Hope you are well.

I need to get the audio and also hopefully the microphone working on my Lenovo Yoga C940-15IRH laptop. The laptop was purchased a few years ago, and came with Windows.
According to this page:https://support.lenovo.com/in/en/solutions/pd031426 there is no official support for Linux for this model of Lenovo laptop. This means that the Lenovo Support page for this model provides no drivers that can be downloaded for Linux based OSes.

Nonetheless, I took the help of a semi-professional to get BOSS Linux (https://bosslinux.in) installed.

I have read through this thread: https://www.linux.org/threads/how-to-easily-fix-problems-with-the-sound-for-newbies.22729/ and it has not helped my audio issue.

Reading through the Lenovo support pages, it does seem that technically is should be possible to get the audio working even with Linux:

Could someone please guide me in the right direction on how to get the audio working?

Thank you for your time.
 
Last edited:


The first thing worth checking is whether or not the sound system has been muted. To check that one can run in a terminal:
Code:
alsamixer
and hit F5 to show all controls and make sure the volumes are high and nothing is muted. Elements that are muted would have: MM, at the base of the bars which can be toggled off using the m key.

Another check can be made with the GUI program: pavucontrol where you can click off the mute boxes if they are showing that mute is on.

If you have no luck with that, it would be helpful to provide more information. The output from the following commands would help.
What audio hardware and drivers are running?
Code:
lspci -nnkd ::403

Which sound server are you running:
Code:
systemctl --user status pulseaudio.service
systemctl --user status pipewire.service

Does alsa see everything?
Code:
aplay -l

What's controlling the sound card?
Code:
lsof /dev/snd/*

If you provide the output, please copy and paste it into code blocks so the exact info can be seen. That helps. If unsure about using code blocks, check the code section here:
or use the code block facility in the "Post Reply" top panel ... click on the icon of the three vertical dots, and then click on the icon which looks like </> and enter the code.
 
Maybe it does not matter but your kernel was originally released in 2019. Your laptop has Intel Ice Lake released in 2021. If this is correct, maybe update your kernel? Also you may need SOF drivers (I don't use Ubuntu so I am not sure if these are installed automatically). I have Intel Tiger Lake and mic issues were solved relatively recently.
 
One way around the issue could be to purchase a USB microphone and external sound card. These invariably have their own dedicated chipsets built-in, and plenty of these will work quite happily under Linux. The only bit the kernel is really concerned with here is the fact that it's connecting to the system via the USB protocol. I use USB headsets, with their own built-in sound card; ya plug 'em in.....they just "work".

Otherwise, you obviously don't have the "new hardware" issue where you need to play the waiting game while the kernel catches up (which can be anywhere from 4-6 weeks, and up to 6 months or so for some items, depending on the amount of time the (usually) unpaid dev working on that particular item can dedicate to it outside of his regular job).

A newer kernel will in all likelihood have the relevant hardware support by now. When it comes to Linux support, most "official" manufacturer's websites are totally useless for this kind of thing; they're all chasing Windows certification, so spend all their time bending over backwards to accommodate M$.......and everybody else can go whistle.

(Just because an "official" site doesn't list something as having "official" Linux support is completely irrelevant for the purpose of this exercise. There's always a way to get things working.......IF you're determined enough.)

We need to know exactly what your audio hardware is. @osprey 's suggested commands will help to narrow the field of investigation considerably, so.......if you can respond to these, then with a little luck, we can probably move forward from there.


Mike. ;)
 
Last edited:
Last edited:
Have a look at this thread - https://forums.linuxmint.com/viewtopic.php?t=401052

Looks like they used kernel 6.6 to get it working which they compiled it themselves

patch for 6.6 is here - https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/tag/?h=v6.6
As I mentioned above, I have newer system with Tiger Lake and 6.6.x - 6.7.x support mic. So simple upgrade to 6.6 will do. No need to patch anything (this particular patch was for 6.6-rc and the latest from 2023 system. Not what OP has)


Also the command mentioned abowe while useful, do not provide any information about mic status. OP indicated that sound works but mic does not.
 
The first thing worth checking is whether or not the sound system has been muted. To check that one can run in a terminal:
Code:
alsamixer
and hit F5 to show all controls and make sure the volumes are high and nothing is muted. Elements that are muted would have: MM, at the base of the bars which can be toggled off using the m key.

Another check can be made with the GUI program: pavucontrol where you can click off the mute boxes if they are showing that mute is on.
Thanks for the detailed response. So the first thing is that, I did get my audio partially working. By partial, I mean that I got my Bluetooth speakers to connect to my laptop and was able to stream music from Youtube to these Bluetooth speakers.

The problem is still lingering because the on-board speakers within the Laptop don't seem to work. It has to do with lack of driver support and needs manual tinkering to get it working. This is a problem that I still need to solve. So I am working through all the replies I have received and trying them one by one.

Specifically, alsamixer confirmed that the volume was not muted. Also confirmed the same with Pavucontrol. Further, using Pavucontrol it can be seen from the "Output Devices" and "Input Devices" tabs, that the in built speakers and in built microphone are not even detected. So this is the issue that needs to be solved.
linuxa1.png
linuxa2.png


Also, please see the following screen shots from the Sound Settings Menu:
linuxa7.png
linuxa8.png

If you have no luck with that, it would be helpful to provide more information. The output from the following commands would help.
What audio hardware and drivers are running?
Code:
lspci -nnkd ::403
That code didn't return anything, just like in this thread: https://www.linux.org/threads/sound-not-working-after-updating-to-23-04.45736/ But then I used:
Code:
lspci -nnk |grep -A3 -i aud
Which returned the following:
linuxa3.png

Thank you again for the previous response in that thread.

Which sound server are you running:
Code:
systemctl --user status pulseaudio.service
systemctl --user status pipewire.service
systemctl --user status pulseaudio.service
Returned the following:
linuxa4.png

systemctl --user status pipewire.service
Returned the following:
linuxa5.png

I then followed the steps in this link: https://linux.debian.bugs.dist.nark...-pipewire-amd64-fails-to-play-audio-and-video and did
Code:
$ sudo touch /etc/pipewire/media-session.d/with-pulseaudio
Following this I restarted Pipewire service by following this thread:
Code:
systemctl --user restart pipewire.socket
systemctl --user --now enable pipewire
After this, the result I get is as follows:
systemctl --user status pipewire.service
linuxa6.png

I couldn't find a way to solve that error. It seems it is marked as a low priority item. Does this help you proceed, or do you need me to completely get rid of the errors/warnings I receive on running:
systemctl --user status pipewire.service

Does alsa see everything?
Code:
aplay -l
Returns:
aplay: device list:274: no soundcards found...

What's controlling the sound card?
Code:
lsof /dev/snd/*
This returns no output. Is there a different command to create this result?

If you provide the output, please copy and paste it into code blocks so the exact info can be seen. That helps. If unsure about using code blocks, check the code section here:
or use the code block facility in the "Post Reply" top panel ... click on the icon of the three vertical dots, and then click on the icon which looks like </> and enter the code.
Followed it as much as I could. Thank you again. :)
 

Attachments

  • linuxa3.png
    linuxa3.png
    29.8 KB · Views: 59
Last edited:
Maybe it does not matter but your kernel was originally released in 2019. Your laptop has Intel Ice Lake released in 2021. If this is correct, maybe update your kernel? Also you may need SOF drivers (I don't use Ubuntu so I am not sure if these are installed automatically). I have Intel Tiger Lake and mic issues were solved relatively recently.
Thanks for the inputs @Aristarchus :)

I ran the following:
Code:
uname -r
Returned:
5.10.0-25-amd64
From this website: https://www.kernel.org/category/releases.html it seems 5.10 was released on 2020-12-13

My laptop was purchased in 2020. Running the following code:
Code:
sudo apt install neofetch
neofetch
I got the following:
OS: BOSS GNU/Linux 9 (urja) x86_64
Host: 81TE Lenovo Yoga C940-1IRH
Kernel: 5.10.0-25-amd64
CPU: Intel i-9750H (12) @ 4.50GHz
From this link: https://ark.intel.com/content/www/u...9750h-processor-12m-cache-up-to-4-50-ghz.html, it seems this series of CPUs are called Intel Coffee Lake and that is was released in Q2 2019.

Do you still think updating my kernel is a must do? From the actual details it seems the Kernel was released 18 months after the CPU was released.

I am reading up on SOF Drivers from https://www.sofproject.org/

It seems the steps to install it are as follows: https://thesofproject.github.io/latest/getting_started/setup_linux/prepare_build_environment.html Is this what you have followed as well? Please let me know.
 
One way around the issue could be to purchase a USB microphone and external sound card. These invariably have their own dedicated chipsets built-in, and plenty of these will work quite happily under Linux. The only bit the kernel is really concerned with here is the fact that it's connecting to the system via the USB protocol. I use USB headsets, with their own built-in sound card; ya plug 'em in.....they just "work".

Otherwise, you obviously don't have the "new hardware" issue where you need to play the waiting game while the kernel catches up (which can be anywhere from 4-6 weeks, and up to 6 months or so for some items, depending on the amount of time the (usually) unpaid dev working on that particular item can dedicate to it outside of his regular job).
Thanks for the inputs @MikeWalsh :)

I do have a Bluetooth speaker that I got working. Ultimately I would like to get the in built speakers and mic to work as well. I am not used to solving these issues on Linux, but I don't mind spending some time to learn to solve them.

As I noted in my reply to @Aristarchus above. My CPU is Intel i-9750H (12) @ 4.50GHz and was released in Q2 in 2019. My Linux Kernel is 5.10.0-25-amd64 and was released on 2020-12-13. Do you still think this is a case of Kernel catching up to the new hardware? It seems to me that both are quite dated at this point.

A newer kernel will in all likelihood have the relevant hardware support by now. When it comes to Linux support, most "official" manufacturer's websites are totally useless for this kind of thing; they're all chasing Windows certification, so spend all their time bending over backwards to accommodate M$.......and everybody else can go whistle.
It seems in this case, Lenovo does support Linux for most of their models in certain series such as Thinkpad. I happen to have a different series (Yoga) and specifically the model among two models that are not given native support for drivers. It does seem intentional.

(Just because an "official" site doesn't list something as having "official" Linux support is completely irrelevant for the purpose of this exercise. There's always a way to get things working.......IF you're determined enough.)

We need to know exactly what your audio hardware is. @osprey 's suggested commands will help to narrow the field of investigation considerably, so.......if you can respond to these, then with a little luck, we can probably move forward from there.


Mike. ;)
Thanks for the inputs. It does make a lot of sense. It took some time but I have replied to @osprey above. I hope we can work towards solving the audio+mic issues. I am glad there are so many people willing to share their valuable time, and I appreciate it very much.
 
Thanks @gauthamh for the info.

The oddness in the outputs is that the kernel is detecting the sound card and supplying the appropriate driver and modules which is shown by the lspci output but the alsa output fails to see the sound card. Presumably the package: firmware-sof-signed, is installed. If by chance not, then it needs to be installed.

The zero output of alsa (after the kernel's detection), shown from the aplay command, and consequently from the pavucontrol output, mean that, the sound card can't be used since the alsa software provides the basic audio functions that any sound servers like pulseaudio or pipewire provide from a software layer over alsa.

Have a look here: https://wiki.debian.org/ALSA
where it suggests starting alsa up as root with the command:
Code:
alsactl init
It's also possible to ask, as root, alsa to restart:
Code:
alsactl kill rescan

Since your system appears to have alsa-utils installed (since the aplay command in included in that package) you can use the command: speaker-test, to either confirm or not the sound card detection problem after starting alsa with the above command. There's a man page for "speaker-test". It produces white noise and takes quite a few seconds to run.

The kernel 5.10.0-25-amd64 is old. Reports show that a 6.6 kernel had some success in other circumstances. Since Boss is debian based, it's possible to download a later kernel and install it ... and remove it if necessary later. Debian has 6.6.13 in trixie as of this writing.

In relation to an alternative command to: lsof /dev/snd/*, one could try:
Code:
fuser -v /dev/snd/*
but it's likely to provide very similar results.

You could consider asking directly on the lenovo linux discussion list with your precise details. There's some info there but not of your exact machine that I could see in a brief glance. I'm sorry I can't see a quick fix on this at this point in time if starting alsa fails. Hopefully it's not an impaired hardware issue.
 
Last edited:
firmware-sof-signed ....is available in the Linux Mint software repository....aka Synaptic Package Manager.

Not sure if it is available in BOSS Linux
 
Thanks for the inputs @Aristarchus :)

I ran the following:
Code:
uname -r
Returned:
5.10.0-25-amd64
From this website: https://www.kernel.org/category/releases.html it seems 5.10 was released on 2020-12-13

My laptop was purchased in 2020. Running the following code:
Code:
sudo apt install neofetch
neofetch
I got the following:
OS: BOSS GNU/Linux 9 (urja) x86_64
Host: 81TE Lenovo Yoga C940-1IRH
Kernel: 5.10.0-25-amd64
CPU: Intel i-9750H (12) @ 4.50GHz
From this link: https://ark.intel.com/content/www/u...9750h-processor-12m-cache-up-to-4-50-ghz.html, it seems this series of CPUs are called Intel Coffee Lake and that is was released in Q2 2019.

Do you still think updating my kernel is a must do? From the actual details it seems the Kernel was released 18 months after the CPU was released.

I am reading up on SOF Drivers from https://www.sofproject.org/

It seems the steps to install it are as follows: https://thesofproject.github.io/latest/getting_started/setup_linux/prepare_build_environment.html Is this what you have followed as well? Please let me know.
Installation of SOF drivers is easy and well explained on their site. Unfortunately, you have pretty old kernel which does not support your hardware. If your distro supports newer kernels then get 6.5 or better. For mic to work SOF only may not be enough. I am not certain about this in your case though. Just comparing to my hardware: Tiger Lake.

Also running
dmesg | grep mics
is enough to check if your Lake mic is recognized by current kernel

Good luck
 
Thanks @gauthamh for the info.

The oddness in the outputs is that the kernel is detecting the sound card and supplying the appropriate driver and modules which is shown by the lspci output but the alsa output fails to see the sound card. Presumably the package: firmware-sof-signed, is installed. If by chance not, then it needs to be installed.

The zero output of alsa (after the kernel's detection), shown from the aplay command, and consequently from the pavucontrol output, mean that, the sound card can't be used since the alsa software provides the basic audio functions that any sound servers like pulseaudio or pipewire provide from a software layer over alsa.

Have a look here: https://wiki.debian.org/ALSA
where it suggests starting alsa up as root with the command:
Code:
alsactl init
It's also possible to ask, as root, alsa to restart:
Code:
alsactl kill rescan

Since your system appears to have alsa-utils installed (since the aplay command in included in that package) you can use the command: speaker-test, to either confirm or not the sound card detection problem after starting alsa with the above command. There's a man page for "speaker-test". It produces white noise and takes quite a few seconds to run.

I got my in built speakers and mic working!! :D

Thanks again for all the help @osprey. Also thanks to @Aristarchus @MikeWalsh @GatorsFan @Condobloke for the various inputs and ideas. It was very educational to discuss with you guys.

I did a couple of things. I installed the firmware-sof-signed package, did the "alsactl init" after which I restarted the machine. I don't believe it was installed previously. I also took a look at a few Lenovo threads which specifically focused on this issue, and realized that someone got their speakers working after adding "snd_hda_intel" and "snd_soc_skl" to a blacklist file in /etc/modprobe.d/

Now the output of:
Code:
aplay -l
Is as follows:
linuxa11.png


The output of:
Code:
lsof /dev/snd/*
Is as follows:
linuxa12.png


Also the Sound Settings menu now shows the following under "Output" and "Input":
linuxa9.png
linuxa10.png


The kernel 5.10.0-25-amd64 is old. Reports show that a 6.6 kernel had some success in other circumstances. Since Boss is debian based, it's possible to download a later kernel and install it ... and remove it if necessary later. Debian has 6.6.13 in trixie as of this writing.

In relation to an alternative command to: lsof /dev/snd/*, one could try:
Code:
fuser -v /dev/snd/*
but it's likely to provide very similar results.

You could consider asking directly on the lenovo linux discussion list with your precise details. There's some info there but not of your exact machine that I could see in a brief glance. I'm sorry I can't see a quick fix on this at this point in time if starting alsa fails. Hopefully it's not an impaired hardware issue.
I did read about updating the Kernel. But I didn't need to do it at this point.
 
Have a look at this thread - https://forums.linuxmint.com/viewtopic.php?t=401052

Looks like they used kernel 6.6 to get it working which they compiled it themselves

patch for 6.6 is here - https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/tag/?h=v6.6
Thanks for the input @GatorsFan

I did get the in built speakers and mic to working by installing firmware-sof-signed package and doing a few other steps. I didn't need to update my kernel at this point. But I will read up on it again.

Appreciate your time and help.
 


Top