Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
help me get audio working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
lf84217
n00b
n00b


Joined: 26 Jul 2022
Posts: 31

PostPosted: Wed Aug 03, 2022 10:43 pm    Post subject: help me get audio working Reply with quote

Hello,
I am a newbie gentoo user. Struggling to get audio working on my laptop.
I've installed ALSA, and tweaked my kernel config a bit, but still I get the message:

Code:

arecord: device_list:274: no soundcards found...


I will show my USE flags, dmesg, kernel config and output of lspci.
Many thanks for any help you can provide.

lspci --- https://dpaste.com/BGUWF74CQ
/etc/portage/make.conf --- https://dpaste.com/FL5HMTFM4
kernel config --- http://dpaste.com/BSKF6ZLNX
dmesg --- https://dpaste.com/99EK6ZD57
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30917
Location: here

PostPosted: Thu Aug 04, 2022 4:54 am    Post subject: Reply with quote

Code:
[    1.635449] i915 0000:00:02.0: Direct firmware load for i915/tgl_dmc_ver2_12.bin failed with error -2
[    1.635500] i915 0000:00:02.0: [drm] Failed to load DMC firmware i915/tgl_dmc_ver2_12.bin. Disabling runtime power management.
[    1.635512] sof-audio-pci-intel-tgl 0000:00:1f.3: Direct firmware load for intel/sof/sof-tgl.ri failed with error -2
[    1.635553] i915 0000:00:02.0: [drm] DMC firmware homepage: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915
[    1.635587] sof-audio-pci-intel-tgl 0000:00:1f.3: error: sof firmware file is missing, you might need to
[    1.635681] sof-audio-pci-intel-tgl 0000:00:1f.3:        download it from https://github.com/thesofproject/sof-bin/
[    1.635711] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to load DSP firmware -2
[    1.636089] sof-audio-pci-intel-tgl 0000:00:1f.3: error: sof_probe_work failed err: -2

Maybe you need to install firmware sys-kernel/linux-firmware and sys-firmware/sof-firmware
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
nvaert1986
Tux's lil' helper
Tux's lil' helper


Joined: 05 May 2019
Posts: 120

PostPosted: Thu Aug 04, 2022 8:34 am    Post subject: Reply with quote

What is the brand and type of the laptop? Have you checked what audio chip the laptop has? Have you verified whether it uses the the PCI Bus, USB bus or I2C bus?
Back to top
View user's profile Send private message
lf84217
n00b
n00b


Joined: 26 Jul 2022
Posts: 31

PostPosted: Thu Aug 04, 2022 7:48 pm    Post subject: Reply with quote

This is my computer https://psref.lenovo.com/syspool/Sys/PDF/ThinkPad/ThinkPad_X1_Carbon_Gen_9/ThinkPad_X1_Carbon_Gen_9_Spec.pdf

The audio device is being detected when I run lspci, but not detected by ALSA when I run arecord -l or aplay -l

This is my audio device:
Code:

00:1f.4 SMBus: Intel Corporation Tiger Lake-LP SMBus Controller (rev 20)


I've already installed sof-firmware and linux-firmware
Back to top
View user's profile Send private message
xineg
Tux's lil' helper
Tux's lil' helper


Joined: 14 Mar 2006
Posts: 115
Location: Australia.

PostPosted: Fri Aug 05, 2022 3:29 am    Post subject: Reply with quote

I cant see any of your config files. So taking a stab in the dark until you repost them.
Have you built the snd-hda-intel either as a module or into your kernel:

Code:
Device-Drivers->Sound card support ->Advanced Linux Sound Architecture->HD Audio-> Build Realtek HD-audio codec support


That's the Realtek (yours is a High Definition RealTek ALC 3306) HD driver I think... If you have it as a module, is it loaded?
you can see using lsmod. And load it with modprobe snd-hda-intel.
Have you got a .asoundrc in your user directory or a asound.conf in /etc
in mine I have

Code:
defaults.pcm.!card 1


.
Back to top
View user's profile Send private message
lf84217
n00b
n00b


Joined: 26 Jul 2022
Posts: 31

PostPosted: Fri Aug 05, 2022 6:40 am    Post subject: Reply with quote

Thanks for your help.
Sorry! I will repost my configs with a longer expiration date!

dmesg - http://dpaste.com/3ZMFCXSPF
kernel config - http://dpaste.com/FLJFR6HFH
global USE flags - http://dpaste.com/FM8PM9252
lspci - http://dpaste.com/4PCDPKEMG

I did already build that codec support into the kernel
Back to top
View user's profile Send private message
Spanik
l33t
l33t


Joined: 12 Dec 2003
Posts: 943
Location: Belgium

PostPosted: Fri Aug 05, 2022 9:16 am    Post subject: Reply with quote

Don't know if it is important to that level, but you are part of the "audio" user group?
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
xineg
Tux's lil' helper
Tux's lil' helper


Joined: 14 Mar 2006
Posts: 115
Location: Australia.

PostPosted: Fri Aug 05, 2022 11:47 am    Post subject: Reply with quote

Looking through your dmesg and your config. This is set in your config

Code:
CONFIG_SND_HDA_CODEC_REALTEK=y

but in dmesg it's not being loaded, or at least that's what it shows. For example IN MY DMESG
it shows a few of the following, but in yours, nothing.

Code:
snd_hda_codec_realtek hdaudioC1D0:

Perhaps you need firmware? That wouldnt take long to work out.
Here is an interesting bug from the kernels bugtracking system with a lenovo laptop and your exact card
the ALC3306. Many people have it working and just a few have speaker problems. From a quick read
there seems a few howtos on getting the cards working here:

https://bugzilla.kernel.org/show_bug.cgi?id=213159

Interestingly on your spec sheet it states one of the operating systems as Fedora Linux and
Ubuntu, so it might be worth ripping a livecd with one of those OS, running it and seeing if your card works, and if so, find out why.
Back to top
View user's profile Send private message
lf84217
n00b
n00b


Joined: 26 Jul 2022
Posts: 31

PostPosted: Fri Aug 05, 2022 3:43 pm    Post subject: Reply with quote

I just happened to have an Ubuntu live usb lying around, booted from it and audio works fine.

I wonder, is it possible to just copy my kernel configs from a working Ubuntu install?
Back to top
View user's profile Send private message
xineg
Tux's lil' helper
Tux's lil' helper


Joined: 14 Mar 2006
Posts: 115
Location: Australia.

PostPosted: Fri Aug 05, 2022 5:40 pm    Post subject: Reply with quote

Well most likely it would, but your much better to just use something like (say)
Code:
lspci -k

which will list all the devices and what drivers the kernel is using to run them.
This will teach you quickly the names of the drivers and what to configure
it will also get you to know your system very well and linux in general, rather
than just copying the config, it working, but you having not much
better idea. I highly recommend using lscpi -k.
You will also learn more about the commands as you run the man pages on them just to
see the flags you can set. This will become second nature to you.
Back to top
View user's profile Send private message
lf84217
n00b
n00b


Joined: 26 Jul 2022
Posts: 31

PostPosted: Fri Aug 05, 2022 9:53 pm    Post subject: Reply with quote

Pasting this here for my own reference, and in case I need further help.

https://dpaste.org/UrnYu
Back to top
View user's profile Send private message
xineg
Tux's lil' helper
Tux's lil' helper


Joined: 14 Mar 2006
Posts: 115
Location: Australia.

PostPosted: Sat Aug 06, 2022 1:43 am    Post subject: Reply with quote

lf84217 wrote:
Pasting this here for my own reference, and in case I need further help.

https://dpaste.org/UrnYu

We will help you as much as you want, but I think you got this now,
at least the next step, and I'm tipping it will work. Now, here's the thing, over the years I've seen
people pretty much fall into two problem solving groups. Many users 'fix' problems via looking
everywhere for solutions that somebody else has solved, but they do it in such a way as they
neither care how it works, nor seemingly want to know how it works as long as it's fixed quick
and they don't really have to do any work. Many are happy with this and many kind of fall into it.
However, this way isn't very rewarding. It's far better to spend time early on gaining the skills to work
out exactly what's going on, how to diagnose the problem, and do it all yourself. That's the end goal
and of course this isn't always practical or even feasible. But it is the end goal. My advice is this:
put in the time now and it will pay off for you. Not only will it pay off, you will have gained a very
valuable skill set with a lifetime of rewards. This is off topic and long winded, but you're in a really
good community with many very skilled people that are willing to help you obtain these skills and
develop a problem solving mindset, you seem like a smart fellow and if your into the geeky side of
computer tech, then I say go for it, that is, make your kernel compiling pay off for you, because if
you learn of the many utilities, what they can do for you and where to start looking to solve problems
you will be off to a flying start. I am too happy to assist you and I know all of the other people here
with many years experience will help you also. Gentoo has for 20+ years now got some of the best
social policy with outstanding technical experience.
Back to top
View user's profile Send private message
lf84217
n00b
n00b


Joined: 26 Jul 2022
Posts: 31

PostPosted: Sat Aug 06, 2022 2:57 am    Post subject: Reply with quote

Thank you so much for your advice, and for being so kind.
Indeed, I want to learn how everything works, and not just how to type commands.
This is why I chose to install Gentoo as my main operating system on my brand new laptop.
My life could have been easier had I stuck with Ubuntu or Fedora.
I've been a Gentoo user only for a week or two, and am very impressed and grateful with how friendly the community is and their willingness to help me.
Back to top
View user's profile Send private message
xineg
Tux's lil' helper
Tux's lil' helper


Joined: 14 Mar 2006
Posts: 115
Location: Australia.

PostPosted: Sat Aug 06, 2022 3:35 am    Post subject: Reply with quote

I thought gee I hope I didn't type too much, and it wasn't until I looked at this thread on my
phone and nearly died when confronted with my ENORMOUS block of text. I'll try be more
efficient from now on.
Back to top
View user's profile Send private message
lf84217
n00b
n00b


Joined: 26 Jul 2022
Posts: 31

PostPosted: Sat Aug 06, 2022 9:03 pm    Post subject: Reply with quote

Not at all, your post is exactly the right size. Many thanks for every word!
Back to top
View user's profile Send private message
xineg
Tux's lil' helper
Tux's lil' helper


Joined: 14 Mar 2006
Posts: 115
Location: Australia.

PostPosted: Sun Aug 07, 2022 9:26 pm    Post subject: Reply with quote

What's happening with your box, have you got it working, or is there still an issue?
Back to top
View user's profile Send private message
lf84217
n00b
n00b


Joined: 26 Jul 2022
Posts: 31

PostPosted: Mon Aug 08, 2022 10:05 pm    Post subject: Reply with quote

Still no luck, I've checked that all those modules are installed and modprobe'd them
Back to top
View user's profile Send private message
xineg
Tux's lil' helper
Tux's lil' helper


Joined: 14 Mar 2006
Posts: 115
Location: Australia.

PostPosted: Mon Aug 08, 2022 11:02 pm    Post subject: Reply with quote

On Ubuntu See what information you can extract from both the sound drivers
using modinfo. This should show you if they need any firmware etc
Code:
modinfo snd_hda_intel

and
Code:
modinfo snd_sof_pci_intel_tgl
Back to top
View user's profile Send private message
lf84217
n00b
n00b


Joined: 26 Jul 2022
Posts: 31

PostPosted: Mon Aug 08, 2022 11:17 pm    Post subject: Reply with quote

UPDATE:
Actually I just got it to work
I built snd_sof_pci_intel_tgl as a module instead of building it into the kernel, and that solved it. I have sound now!

Interestingly, those "firmware failed to load" error messages in my dmesg didn't disappear.
This is the most recent dmesg:
http://dpaste.com/HED79FM9L

Do I need to worry about that? It says some power management is being disabled
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30917
Location: here

PostPosted: Tue Aug 09, 2022 4:45 am    Post subject: Reply with quote

lf84217 wrote:
Interestingly, those "firmware failed to load" error messages in my dmesg didn't disappear.

Only the problem with video card firmware has not disappeared
Code:
[    1.704484] i915 0000:00:02.0: Direct firmware load for i915/tgl_dmc_ver2_12.bin failed with error -2
[    1.704527] i915 0000:00:02.0: [drm] Failed to load DMC firmware i915/tgl_dmc_ver2_12.bin. Disabling runtime power management.

But for the sound now firmware is loaded
Code:
[    3.814994] Loading firmware: intel/sof/sof-tgl.ri
[    3.816966] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 1:9:3-a9780
[    3.816968] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:20:0 Kernel ABI 3:18:0
[    3.915449] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 1:9:3-a9780
[    3.915452] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:20:0 Kernel ABI 3:18:0

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
xineg
Tux's lil' helper
Tux's lil' helper


Joined: 14 Mar 2006
Posts: 115
Location: Australia.

PostPosted: Tue Aug 09, 2022 11:08 pm    Post subject: Reply with quote

Some things won't work unless built as modules and some things only work built into the kernel!
You've learned quite a lot with this experience, both with tools and method. Good work.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Wed Aug 10, 2022 1:06 am    Post subject: Reply with quote

With the right configuration, both a fully monolithic kernel and a fully modular kernel should be functional. Some setups are easier to make work in one style or the other, but none should be impossible.
Back to top
View user's profile Send private message
lf84217
n00b
n00b


Joined: 26 Jul 2022
Posts: 31

PostPosted: Fri Aug 12, 2022 10:33 pm    Post subject: Reply with quote

Hu -- That makes total sense to me, but since I am new and struggled with this issue for about a week, at this point I am just happy to get it working.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Fri Aug 12, 2022 10:37 pm    Post subject: Reply with quote

I understand. My point was to state that egenx's claim that some things were only possible one way or the other is incorrect. Some things are easier one way or the other, but not impossible when done the difficult way.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum