Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Choosing a sound driver
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
Dylanus
n00b
n00b


Joined: 02 Jun 2018
Posts: 40

PostPosted: Wed Aug 01, 2018 1:44 am    Post subject: [SOLVED] Choosing a sound driver Reply with quote

Hi all,
I have Gentoo installed running KDE, and I have no sound. When I play a video online there is no sound, and there is no sound widget on the panel. I checked my kernel configuration and I realised I have ALSA enabled, but I did not compile any drivers. The output of lspci for audio is
Code:
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)

I looked on the ALSA matrix under Intel, but the names mentioned for Intel do not show up in the menuconfig for the kernel. Am I supposed to pick the one entry that mentions Intel? Or do I download and compile a different module?
Is ALSA what I need to get this working? This is my first installation of Gentoo, and I forgot about audio, as my only use for audio is watching course material, which I don't do often.
If the ALSA wiki entry is the right option to solve this, I can follow that, I just need some guidance on getting the right driver.
Thanks


Last edited by Dylanus on Thu Aug 02, 2018 7:44 am; edited 1 time in total
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Wed Aug 01, 2018 2:47 am    Post subject: Reply with quote

Hello,

from the root tree of Menuconfig go to Device Drivers/Sound card support/Advanced Linux Sound Architecture/HD-Audio/ Select HD Audio PCI and the codec for your sound card. If in doubt about the codec select all of them. You will be able to keep only the usefull one later as Linux will load it automatically.

Put everything you can in modules about sound.
_________________
Paul
Back to top
View user's profile Send private message
Dylanus
n00b
n00b


Joined: 02 Jun 2018
Posts: 40

PostPosted: Wed Aug 01, 2018 7:10 am    Post subject: Reply with quote

Thanks. I've done that now. I ran make && make modules_install, but lsmod doesn't show any sound drivers, even after a reboot. Why aren't they showing up? Did I miss a step?
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Wed Aug 01, 2018 8:03 am    Post subject: Reply with quote

It depend if you compile the sound support in modules or directly in the kernel image. In the second case there is no module to load. You must install alsa-utils if not and see with alsamixer and
Code:
aplay -l

what is the output and if there's a sound card. I have not tell you all about configuring the sound support in the Linux sources because there is a lot of options but the snd-hda-intel and the good codec for your sound card are where I conduct you.
_________________
Paul
Back to top
View user's profile Send private message
Dylanus
n00b
n00b


Joined: 02 Jun 2018
Posts: 40

PostPosted: Wed Aug 01, 2018 8:09 am    Post subject: Reply with quote

So the output of aplay -l is
Code:
aplay: device_list:268: no soundcards found...

I selected all the codecs with M instead of Y, so I would expect to see modules.
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Wed Aug 01, 2018 10:40 am    Post subject: Reply with quote

What does output
Code:
find /lib/modules -iname *snd*

Are you sure you are using the kernel version you have compiled for snd-hda-intel? Do you have a boot partition?
_________________
Paul
Back to top
View user's profile Send private message
Dylanus
n00b
n00b


Joined: 02 Jun 2018
Posts: 40

PostPosted: Wed Aug 01, 2018 11:10 am    Post subject: Reply with quote

Turns out the modules are there. I loaded each one with modprobe. I still don't have sound when I play a video. I'm using KDE and the panel does not have a speaker widget for some reason. So I'm not sure whether I have no sound because the volume is at zero, or because the sound module is not working. Do you know how to get the speaker widget to show up in KDE so I can check this? All the documentation assumes that it will be there.
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Wed Aug 01, 2018 11:24 am    Post subject: Reply with quote

What does output
Code:
lsmod | grep snd

If you are using pulseaudio ou are better tu use pavucontrol to setup the sound card to use and the mixer level.
Code:
ps aux | grep pulse

_________________
Paul
Back to top
View user's profile Send private message
Dylanus
n00b
n00b


Joined: 02 Jun 2018
Posts: 40

PostPosted: Wed Aug 01, 2018 11:28 am    Post subject: Reply with quote

lsmod | grep snd:
Code:
snd_hda_codec_cmedia    16384  0
snd_hda_codec_cirrus    20480  0
snd_hda_codec_hdmi     57344  0
snd_hda_codec_analog    20480  0
snd_hda_codec_ca0110    16384  0
snd_hda_codec_via      24576  0
snd_hda_codec_si3054    16384  0
snd_hda_codec_idt      53248  0
snd_hda_codec_realtek    81920  0
snd_hda_codec_conexant    20480  0
snd_hda_codec_generic    73728  8 snd_hda_codec_ca0110,snd_hda_codec_conexant,snd_hda_codec_cmedia,
    snd_hda_codec_analog,snd_hda_codec_realtek,snd_hda_codec_via,
    snd_hda_codec_cirrus,snd_hda_codec_idt

ps aux | grep pulse gives no output except for grep. I don't have it installed. I've seen some negative comments about it online, so I didn't install it. Do you know of any issues about it? It seemed like people dislike it for the same reasons as systemd, but I don't know enough about these issues. Is there alternative software? Or should I just install pulseaudio?

Wrapped long lines to make the forum layout behave.Chiitoo
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


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

PostPosted: Wed Aug 01, 2018 12:31 pm    Post subject: Reply with quote

PulseAudio is a layer between ALSA and sound applications, it won't work if ALSA does not work.
Is this a laptop? I read laptops require sometimes options passed to the sound module.
Did the sound work from installation media? If yes, check out what modules were needed.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Dylanus
n00b
n00b


Joined: 02 Jun 2018
Posts: 40

PostPosted: Wed Aug 01, 2018 12:55 pm    Post subject: Reply with quote

I installed Pulseaudio, but I'm not really sure what to do with it. I've come from Arch, and everything was taken care of without me noticing.
I just rebooted the system, and none of the sound modules are loaded. The system does automatically load a lot of required hardware modules. Does that mean it's not recognising any of the modules as related to the sound card I have?
This is a laptop. I don't know anything about options I could pass.
When I run pulseaudio as a command all on it's own, this is the output I get:
Code:
W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).
W: [pulseaudio] authkey.c: Failed to open cookie file '/root/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authentication key '/root/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to open cookie file '/root/.pulse-cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authentication key '/root/.pulse-cookie': No such file or directory
E: [pulseaudio] bluez5-util.c: GetManagedObjects() failed: org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez was not provided by any .service files

Does this mean anything? Am I supposed to do something to set pulseaudio up?
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Wed Aug 01, 2018 1:29 pm    Post subject: Reply with quote

If everything work with Arch without passing any parameter to snd-hda-intel, we can suppose that you don't need to do it with Gentoo. Pulseaudio is intended to be use by a normal user not root and Pulseaudio is started automatically with the graphical session of a user because it is a graphical sound server.

The fact that the sound modules are not loaded with the system at boot time may be because something is wrong with the kernel version the modules. If you have kernel stuff in a boot partition and other kernel stuff in the /boot directory of the root partition this can be the cause of a mismatch where you are using an earlier version and/or configuration of the kernel than the modules compiled.

If you have a boot partition this one must always be mounted in the /boot directory at anytime something is read and write in.

Mainly you must be sure that the module snd-hda-intel is loaded and than the good codec after. Your output show only codecs loaded not snd-hda-intel who is the main module to be loaded for your sound card, unless it have been compiled in hard in the kernel image. Give the ouput of
Code:
find /lib/modules -iname *snd*

_________________
Paul
Back to top
View user's profile Send private message
Dylanus
n00b
n00b


Joined: 02 Jun 2018
Posts: 40

PostPosted: Wed Aug 01, 2018 2:15 pm    Post subject: Reply with quote

It's working! I checked the kernel configuration and realised that the snd-hda-intel module was actually built-in. I recompiled the kernel with that as a module and booted from that, and sound is now working. Thanks very much for your help.
I still don't have a convenient way of adjusting the volume and I can't see a widget in the KDE menu for that. Do any of you know of a way to do that?
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Wed Aug 01, 2018 3:00 pm    Post subject: Reply with quote

You can open a graphical terminal and type alsamixer. You have for sure a mixer for Kde in the Portage tree. But understand that if Pulseaudio is started with the Kde session it is Pulseaudio who manage the sound card and you are better to use Pavucontrol to manage the sound. Maybe you have a Kde frontend for Pavucontrol that you can emerge.
_________________
Paul
Back to top
View user's profile Send private message
Dylanus
n00b
n00b


Joined: 02 Jun 2018
Posts: 40

PostPosted: Wed Aug 01, 2018 3:09 pm    Post subject: Reply with quote

I'll give that a go tomorrow. Thanks.
Back to top
View user's profile Send private message
Dylanus
n00b
n00b


Joined: 02 Jun 2018
Posts: 40

PostPosted: Thu Aug 02, 2018 7:45 am    Post subject: Reply with quote

Alsamixer works fine, thanks. I uninstalled Pulseaudio and it still works fine, so I think having the HD module installed as builtin was the problem. Everything's working well now. Thanks for your help.
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