Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
No sound on new install
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
jimmyj1776
n00b
n00b


Joined: 12 Sep 2021
Posts: 3

PostPosted: Sun Sep 12, 2021 2:48 pm    Post subject: No sound on new install Reply with quote

I can not get my speakers to work. It appears the driver isn't loading. Can someone please tell me what I am missing? When I open alsamixer it isn't muted, pressing F6 returns :

- (default)
- enter device name...

pressing F2 and selecting /proc/asound/cards returns:

--- no soundcards ---


and the card0 directory is empty:
Code:

/usr/src/linux $ ls -a /proc/asound/card0
.  ..


I have Ubuntu Mate and Windows 10 on the same system and the sound works on both.

I followed https://wiki.gentoo.org/wiki/ALSA (menuconfig below) to install but when I get to the configuration section my system isn't consistent with the guide. The asound files are not on my computer in the directories shown in the guide.

More relevant information:


OS: Gentoo
Kernel: x86_64 Linux 5.10.52-gentoo
Uptime: 23m
Packages: 505
Shell: bash 5.1.8
Resolution: 1920x1080
WM: LG3D
GTK Theme: [GTK3]
Disk: 10G / 30G (36%)
CPU: Intel Core2 Duo T6570 @ 2x 2.1GHz
GPU: GeForce 9300
RAM: 618MiB / 7705MiB

Output of lspci command (cut/paste Audio device section):
Code:
00:08.0 Audio device [0403]: NVIDIA Corporation MCP79 High Definition Audio [10de:0ac0] (rev b1)
        Subsystem: Hewlett-Packard Company MCP79 High Definition Audio [103c:2aa1]
        Kernel driver in use: snd_hda_intel

The same command on working Mate distro:
Code:
00:08.0 Audio device [0403]: NVIDIA Corporation MCP79 High Definition Audio [10de:0ac0] (rev b1)
        Subsystem: Hewlett-Packard Company MCP79 High Definition Audio [103c:2aa1]
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel



Code:

 aplay -l
aplay: device_list:274: no soundcards found...


On working Mate distro:
Code:

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC888 Analog [ALC888 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC888 Digital [ALC888 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


Code:
            --- Advanced Linux Sound Architecture                                             │ │ 
  │ │            [ ]   Enable OSS Emulation                                                        │ │ 
  │ │            <*>   HR-timer backend support                                                    │ │ 
  │ │            -*-   Dynamic device file minor numbers                                           │ │ 
  │ │            (32)    Max number of sound cards                                                 │ │ 
  │ │            [*]   Support old ALSA API                                                        │ │ 
  │ │            -*-   Sound Proc FS Support                                                       │ │ 
  │ │            [*]     Verbose procfs contents                                                   │ │ 
  │ │            [ ]   Verbose printk                                                              │ │ 
  │ │            [ ]   Debug                                                                       │ │ 
  │ │            <M>   Sequencer support                                                           │ │ 
  │ │            <M>     Sequencer dummy client                                                    │ │ 
  │ │            [*]     Use HR-timer as default sequencer timer                                   │ │ 
  │ │            [*]   Generic sound devices  --->                                                 │ │ 
  │ │            [*]   PCI sound devices  --->                                                     │ │ 
  │ │                  HD-Audio  --->                                                              │ │ 
  │ │            (2048) Pre-allocated buffer size for HD-audio driver                              │ │ 
  │ │            [*]   USB sound devices  --->                                                     │ │ 
  │ │            [*]   PCMCIA sound devices  --->                                                  │ │ 
  │ │            < >   ALSA for SoC audio support  ----                                            │ │ 
  │ │            [*]   X86 sound devices  --->                                                     



            <*> HD Audio PCI                                                                  │ │ 
  │ │            [*] Build hwdep interface for HD-audio driver                                     │ │ 
  │ │            [*] Allow dynamic codec reconfiguration                                           │ │ 
  │ │            [ ] Support digital beep via input layer                                          │ │ 
  │ │            [ ] Support initialization patch loading for HD-audio                             │ │ 
  │ │            <*> Build Realtek HD-audio codec support                                          │ │ 
  │ │            <*> Build Analog Devices HD-audio codec support                                   │ │ 
  │ │            <*> Build IDT/Sigmatel HD-audio codec support                                     │ │ 
  │ │            <*> Build VIA HD-audio codec support                                              │ │ 
  │ │            <*> Build HDMI/DisplayPort HD-audio codec support                                 │ │ 
  │ │            <*> Build Cirrus Logic codec support                                              │ │ 
  │ │            <*> Build Conexant HD-audio codec support                                         │ │ 
  │ │            <*> Build Creative CA0110-IBG codec support                                       │ │ 
  │ │            <*> Build Creative CA0132 codec support                                           │ │ 
  │ │            [*]   Support new DSP code for CA0132 codec                                       │ │ 
  │ │            <*> Build C-Media HD-audio codec support                                          │ │ 
  │ │            <*> Build Silicon Labs 3054 HD-modem codec support                                │ │ 
  │ │            -*- Enable generic HD-audio codec parser                                          │ │ 
  │ │            (0) Default time-out for HD-audio power-save mode                                 │ │ 
  │ │            [ ] Enable Silent Stream always for HDMI   



I also included these 2 drivers:
Code:
 <*>   Intel/SiS/nVidia/AMD/ALi AC97 Controller                                     
 <*>   Intel/SiS/nVidia/AMD MC97 Modem     


What am I doing wrong? Any information will be helpful, Thanks in advance, JJ.

Code tags fixed by NeddySeagoon
Back to top
View user's profile Send private message
psycho
Guru
Guru


Joined: 22 Jun 2007
Posts: 398
Location: New Zealand

PostPosted: Sun Sep 12, 2021 11:42 pm    Post subject: Reply with quote

Hi JJ.

It looks to me as though you've got a truckload of unnecessary audio stuff selected to be built into your kernel there, and by forcing the kernel to load it (you're building it in directly instead of building it as modules so that the kernel can decide if it wants it or not), I think it's possible that you're forcing the kernel to use an incompatible driver and/or codec rather than allowing it to use what it needs. I'd start by changing your selections there from built-in drivers to modules, and if that doesn't immediately fix the issue by allowing the kernel to ignore all the junk it doesn't need, I'd have a look at that working kernel (on the Ubuntu install...lsmod to see which of those audio modules it's actually loading) and make sure your custom kernel provides the same modules (no more and no less than what's actually running when all your hardware's connected and functional). Once you know what you actually need, it should be fine to build it into the kernel (as long as you de-select everything else: I'd only expect to see a small handful of the options you've selected there, in a working setup)...however while you're figuring it out, modules are safer.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8184
Location: Saint Amant, Acadiana

PostPosted: Mon Sep 13, 2021 2:29 am    Post subject: Reply with quote

You need codec driver SND_HDA_CODEC_REALTEK. As psycho noted, you have great deal of unnecessary options/drivers enabled there, a cleanup is in order. Make sure you install your new kernel properly, verify the date and time with 'uname -a' after reboot.
_________________
My Gentoo installation notes. (Frequent downtime currently, I was hit by hurricane Ida.)
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
jimmyj1776
n00b
n00b


Joined: 12 Sep 2021
Posts: 3

PostPosted: Mon Sep 13, 2021 9:36 pm    Post subject: Reply with quote

Thanks to both of you for the replies. I will clean up and get the codec. I will update when I get this done. Thanks again.
Back to top
View user's profile Send private message
psycho
Guru
Guru


Joined: 22 Jun 2007
Posts: 398
Location: New Zealand

PostPosted: Sat Sep 18, 2021 12:26 am    Post subject: Reply with quote

JJ, you already have the codec: it's visible there in your list under "HD Audio PCI". Fifth option from the top, "Build Realtek HD-audio codec support". These natural language descriptions (in the make menuconfig menus) are not the option names in the kernel .config file: the effect of selecting the Realtek codec as a built-in (the way you've done it there, with <*> rather than <M>) is to put the line
Code:
CONFIG_SND_HDA_CODEC_REALTEK=y

in the kernel .config (when you save your changes). If you build it as a module that can be loaded and unloaded, the option will be CONFIG_SND_HDA_CODEC_REALTEK=m instead. So Jaglover is just saying that you do need one of the options you've selected in your menu there...not that you need to obtain the codec from elsewhere.

That's probably all you need to select in that whole menu, apart from "HD Audio PCI" at the top of course...I think "Enable generic HD-audio codec parser" will stay compulsory anyway, and you probably don't need anything else. Maybe you'll want the HDMI stuff depending on your setup, I don't know...but most of what you've selected there can be de-selected (just < > next to the options), otherwise you're building in a whole lot of code for a whole lot of hardware that you don't have. As I said, just changing <*> to <M> will probably be enough to make things work by allowing the kernel to ignore all the junk it doesn't need, just loading the modules it's actually going to use...so building everything as modules can be a quick lazy way to figure out what you need.

You can see the module names in the menuconfig menus by choosing "Help" at the bottom when a particular option is highlighted...so for example with "HD Audio PCI", if you view the help for that option you'll see that the module built when you set that option to <M> is called snd-hda-intel. So it's just a case of e.g.
Code:
lsmod | grep snd-hda-intel

to see whether a running kernel is actually using a module you've built for it. If it's not using it while you're using the hardware for which you imagined you were building it, you probably don't need it and can deselect it (< >). It should be a fairly quick and easy fix...maybe a few reboots to get it all perfect, but no big deal. The first kernel build can take a long time, when everything's being built from scratch...but once the compiled code's all there in the source tree and you're only doing stuff like this, just de-selecting hardware drivers, the rebuilds are usually very fast, sometimes just a few seconds. If you start by erring on the side of building a bit too much, but make sure you're building it all as modules, then install the kernel and reboot to see what it really needs, it could be just two very quick kernel builds and two reboots to a tidy working setup. Or even just one, if you research those kernel options carefully and select only what you need in the first place.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 49081
Location: 56N 3W

PostPosted: Sat Sep 18, 2021 12:32 pm    Post subject: Reply with quote

jimmyj1776,

The kernel fragments you posted look promising.

We need to ask if you are actually using the kernel derived from the kernel configuration you posted.
Look at the date/time in
Code:
uname -a
That's the build time of the running kernel.
If its not what you expect, you are not running the kernel you think you are.

Maybe you forgot to
Code:
mount /boot
for the install?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jimmyj1776
n00b
n00b


Joined: 12 Sep 2021
Posts: 3

PostPosted: Mon Oct 04, 2021 12:25 pm    Post subject: Reply with quote

Thanks for all the replies. I reinstalled the kernel, following the book line by line, and this corrected the problem.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia 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