Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fresh install, no sound *SOLVED*
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
todd93
Guru
Guru


Joined: 30 Oct 2006
Posts: 524
Location: Missouri

PostPosted: Tue Nov 27, 2018 11:27 am    Post subject: Fresh install, no sound *SOLVED* Reply with quote

Hi, I just finished installing Gentoo on my machine, and I don't have any sound. The problem is I'm not sure what to do to get my sound working. I know it's something to do with kernel settings, as I used genkernel in order to get the machine booted, and into my gui. I do plan on rolling out my own kernel, but I'm not sure where to get started on getting my sound to work. Any help would be appreciated!

Thanks!

Todd


Last edited by todd93 on Sat Dec 01, 2018 12:03 am; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 22319
Location: here

PostPosted: Tue Nov 27, 2018 12:46 pm    Post subject: Reply with quote

Put with wget paste lspci -k and you kernel config
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Nov 27, 2018 12:52 pm    Post subject: Reply with quote

todd93,

What fedeliallalinea said and post the content of /proc/asound/devices too.
Its quite popular to have several sound cards and send the audio to the wrong card.

e.g. if you want the on board analogue audio to work, having the default be your HDMI or webcam is not what you want.
Which audio output are you listening to?
_________________
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
todd93
Guru
Guru


Joined: 30 Oct 2006
Posts: 524
Location: Missouri

PostPosted: Wed Nov 28, 2018 1:28 am    Post subject: Reply with quote

fedeliallalinea wrote:
Put with wget paste lspci -k and you kernel config


Hi, thanks, Here is the requested materials:

lspci -k

Kernel config

NeddySeagoon,

There's an issue with that, I'm not listening or able to choose any audio output at the moment, Which leads me to believe that it has to be a missing kernel module. Forgive me, I'm not sure what you're asking for with the content of /proc/asound/devices, is this what you need?:
Code:

# ls /proc/asound/
card0/   cards    Generic/ modules  oss/     seq/     version 
card1/   devices  hwdep    NVidia/  pcm      timers


If not, please direct me in the way I need to go.

Thanks!
Todd
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 22319
Location: here

PostPosted: Wed Nov 28, 2018 6:52 am    Post subject: Reply with quote

The sound cards seems correct configures. As NeddySeagoon say try with alsamixer (media-sound/alsa-utils) to see if is active correct sound card (with F6 you can change sound card)
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
todd93
Guru
Guru


Joined: 30 Oct 2006
Posts: 524
Location: Missouri

PostPosted: Wed Nov 28, 2018 11:31 am    Post subject: Reply with quote

fedeliallalinea wrote:
The sound cards seems correct configures. As NeddySeagoon say try with alsamixer (media-sound/alsa-utils) to see if is active correct sound card (with F6 you can change sound card)


Ok, there was one mistake I found, I did not have media-sound/alsa-utils emerged on my system. Somehow I guess I forgot to emerge it, along with anything else alsa. I was looking through the alsa packages, and I'm not sure which ones I don't need. I am assuming this is my problem. If it is, then it makes this not a kernel issue, and apparently I've put this post in the incorrect thread. For that I appologize.

Thanks
Todd
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Nov 28, 2018 1:37 pm    Post subject: Reply with quote

todd93,

Check that your emerge --info shows the alsa USE flag set.
If you have a desktop profile set, it should already be on.

You do have two sound cards but until alsamixer works, thats something for the future.

-- edit --
Code:
09:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1)
   Subsystem: eVga.com. Corp. GP107 [GeForce GTX 1050 Ti]
   Kernel driver in use: nouveau
   Kernel modules: nouveau
09:00.1 Audio device: NVIDIA Corporation GP107GL High Definition Audio Controller (rev a1)
   Subsystem: eVga.com. Corp. GP107GL High Definition Audio Controller
   Kernel driver in use: snd_hda_intel
   Kernel modules: snd_hda_intel
...
12:00.3 Audio device: Advanced Micro Devices, Inc. [AMD] Device 1457
   Subsystem: Gigabyte Technology Co., Ltd Device a0b8
   Kernel driver in use: snd_hda_intel


Your video card will be your default sound card.
Kernel modules: snd_hda_intel
_________________
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
todd93
Guru
Guru


Joined: 30 Oct 2006
Posts: 524
Location: Missouri

PostPosted: Thu Nov 29, 2018 12:22 am    Post subject: Reply with quote

NeddySeagoon,

Yes, I do have the alsa USE flag set. I fear that I need to emerge more of alsa, but I'm not sure what. The only things alsa I have installed are: media-libs/alsa-lib and media-sound/alsa-utils.There's several more packages having to do with alsa, I'm not sure which ones I need.

Thanks

Todd
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7167

PostPosted: Thu Nov 29, 2018 12:52 am    Post subject: Reply with quote

NeddySeagoon wrote:
Your video card will be your default sound card.

You miss this important part of what NeddySeagoon has said, it's normal, he is too wise to be understand by normal human

In human language he said
If you have more than one cards, the default one may not be the one you want use with your speakers, and as sound is played thru default selected card, you have no sound (while in real sound is working, just it work with the "wrong" card)

How to fix that?
Solve is easy and here
Back to top
View user's profile Send private message
todd93
Guru
Guru


Joined: 30 Oct 2006
Posts: 524
Location: Missouri

PostPosted: Thu Nov 29, 2018 2:12 am    Post subject: Reply with quote

krinn,

Ok, yes, I get it now, that is very simple, one thing I'm having a problem with, however, is the link you provided says: "the following kernel command line option will swap the MID and PCM card indicies so that the default card 0 is the PCM card:

snd-hda-intel.index=1,0"

Do I need to add that into the kernel config? OR is there a step I'm missing? The alternative is stated to only work if snd-hda-intel is compiled as a module, and not built in, it was my understanding that this has to be built in to the kernel, and not compiled as a module, or am I incorrect about that?

Thanks,

Todd
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7167

PostPosted: Thu Nov 29, 2018 1:04 pm    Post subject: Reply with quote

if you have built it "build-in" kernel, then you must pass it from kernel command line parameter, you can do this by
* in your boot manager, adding it as boot option, ie: kernel /boot/vmlinuz root=/dev/sd?? snd-hda-intel.index=1,0
* in kernel config, adding it to CONFIG_CMDLINE="snd-hda-intel.index=1,0"

but i'm always using myself modules where i could for the flexibilty provided by loading/unloading them with new settings (that's the same except you don't have to reboot), so myself i keep building all sound related entries (the CONFIG_SND* entries) as module
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Nov 29, 2018 6:29 pm    Post subject: Reply with quote

todd93,

The module parameter has to be available to the kernel when the module is initialised.
There are three cases to consider.

1) The snd-hda-intel code is built into the kernel. The module parameter must be passed on the kernel command line as root is not mounted when snd-hda-intel is initialised, so /etc/conf.d/modules can have no effect.

2) snd-hda-intel is built as a loadable module. The module parameter must be passed at module load time. When the module is on the root filesystem /etc/conf.d/modules is effective, along with all the other alsa fine tuning files.

3) snd-hda-intel is built as a loadable module. The module parameter must be passed at module load time. When the module is in the initrd, its unclear to me if /etc/conf.d/modules can be consulted or not.
Root may be mounted, but it may not be at the right place, so somehow the module parameters need to be made available to the module loading process in the initrd.

For experiment you can do in by hand.
Code:
modprobe -r snd-hda-intel
modprobe snd-hda-intel index=1,0


Your kernel config says that snd-hda-intel is a loadable module.
_________________
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
todd93
Guru
Guru


Joined: 30 Oct 2006
Posts: 524
Location: Missouri

PostPosted: Fri Nov 30, 2018 1:02 am    Post subject: Reply with quote

NeddySeagoon, krinn,

Ok, I understand totally what you're both saying, However when I do the commands you specified, I get the following:
Code:

# modprobe -r snd-hda-intel
modprobe: FATAL: Module snd_hda_intel is in use.

However, the command of:
Code:

modprobe snd-hda-intel index=1,0

completed without error.

There is still no difference, when I open alsamixer, it's still defaulting to the video card, when I choose the right card, I'm able to adjust the volumes, yet I continue to have no sound..

I just don't understand what else needs to be done. Would I be better off to roll my own kernel out? I'm not sure the genkernel is serving the purpuse I need, or does that have nothng to do with my problem?

Thanks

Todd
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Nov 30, 2018 7:00 pm    Post subject: Reply with quote

todd93,

You are not allowed to remove a module in use. Your kernel also needs to support module removal.
Look at the output of
Code:
lsmod
Module                  Size  Used by
...
snd_hda_codec_via      20480  1
snd_hda_codec_generic    65536  1 snd_hda_codec_via
snd_hda_codec_hdmi     45056  1
snd_hda_intel          24576  4
snd_hda_codec          77824  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_via
snd_hwdep              16384  2 snd_usb_audio,snd_hda_codec
snd_hda_core           49152  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_via
snd_pcm                73728  5 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,snd_hda_core
snd_timer              28672  1 snd_pcm
...

before snd_hda_intel can be unloaded, everything using it must be unloaded too. On my system, it doesn't list anything but says its in use by 4 things.

Code:
modprobe snd-hda-intel index=1,0
finds that snd-hda-intel is already loaded and does nothing.
Its not an error to attempt to load an already loaded module.

There is another way ...

You create a file
Code:
/etc/asound.conf
Containing
Code:
defaults.pcm.card 1
defaults.ctl.card 1
defaults.pcm.device X

I don't know what value of X you need but you find out like this. Look in /proc/asound/devices.

You will see something like
Code:
  2: [ 1- 3]: digital audio playback
  3: [ 1- 7]: digital audio playback
  4: [ 1- 8]: digital audio playback
  5: [ 1- 9]: digital audio playback
  6: [ 1-10]: digital audio playback
  7: [ 1- 0]: hardware dependent
  8: [ 1]   : control
  9: [ 0- 0]: digital audio playback
 10: [ 0- 0]: digital audio capture
 11: [ 0- 3]: digital audio playback
 12: [ 0- 0]: hardware dependent
 13: [ 0]   : control
 33:        : timer

The bit of interest is the bit inside the square brackets, which means [card_no - device_on_card_no]
Look at your card 1. Find the device_on_card number for your hardware dependent device. Thats X.

/etc/asound.conf is read every time alsa is used, so trial and error isn't hard.

Instead of swapping cards, this tells alsa to default to the analogue output on card 1.
_________________
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
todd93
Guru
Guru


Joined: 30 Oct 2006
Posts: 524
Location: Missouri

PostPosted: Sat Dec 01, 2018 12:03 am    Post subject: Reply with quote

NeddySeagoon,

We have success!! That did it, I can't tell you how much I appreciate all your help through this!

Thanks again!

Todd
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