# No sound from realtek alc...



## llpPc (Apr 25, 2020)

I have been skimming through similar threads to see any possible solutions.  I was reluctant to post but here i go...i did a cat /dev/sndstat to display my installed devices.  


```
$ doas cat /dev/sndstat
Installed devices:
pcm0: <NVIDIA (0x0083) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0083) (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA (0x0083) (HDMI/DP 8ch)> (play)
pcm3: <NVIDIA (0x0083) (HDMI/DP 8ch)> (play)
pcm4: <Realtek ALC887 (Rear Analog)> (play/rec)
pcm5: <Realtek ALC887 (Front Analog)> (play/rec) default
No devices installed from userspace.
$
```
my default was pcm4, i switched it to pcm5, still no audio output.  i wasnt sure if i ws supposed to reboot after changing my default settings.  not sure where to proceed from here.  Any guidance would be very much appreciated.  cpu i5 6600k gpu geforce nvidia 1070 16g ram.  I really love freebsd so far.  wish i would have discovered it waaaay earlier.


----------



## Minbari (Apr 25, 2020)

What  about mixer levels? They could be on zero.


----------



## llpPc (Apr 25, 2020)

How do I check for the mixer levels?


----------



## Minbari (Apr 25, 2020)

Simply just run mixer in your terminal.


----------



## llpPc (Apr 25, 2020)

```
$ mixer
Mixer vol      is currently set to  84:84
Mixer pcm      is currently set to 100:100
Mixer speaker  is currently set to  74:74
Mixer line     is currently set to   1:1
Mixer mic      is currently set to  67:67
Mixer mix      is currently set to  74:74
Mixer rec      is currently set to  35:35
Mixer igain    is currently set to   0:0
Mixer ogain    is currently set to 100:100
Recording source: mic
$
```
this is my output.  it looks like the volume is turned up.   thank you for your help btw


----------



## llpPc (Apr 26, 2020)

```
$ dmesg | grep pcm
pcm0: <NVIDIA (0x0083) (HDMI/DP 8ch)> at nid 4 on hdaa0
pcm1: <NVIDIA (0x0083) (HDMI/DP 8ch)> at nid 5 on hdaa0
pcm2: <NVIDIA (0x0083) (HDMI/DP 8ch)> at nid 6 on hdaa0
pcm3: <NVIDIA (0x0083) (HDMI/DP 8ch)> at nid 7 on hdaa0
pcm4: <Realtek ALC887 (Rear Analog)> at nid 20 and 24,26 on hdaa1
pcm5: <Realtek ALC887 (Front Analog)> at nid 27 and 25 on hdaa1
```
my Nvidia gpu has a sound card?  i should be focusing on the realtek correct?  when i change my default  and edit /etc/sysctl.conf file, is a reboot necessary to confirm the changes?


----------



## Minbari (Apr 26, 2020)

Did you load the sound driver into the kernel?! `kldload snd_hda`
To make it load at every boot add in /boot/loader.conf:
`# Sound module
sound_load="YES"
snd_hda_load="YES"`


----------



## mickey (Apr 26, 2020)

llpPc said:


> ```
> pcm4: <Realtek ALC887 (Rear Analog)> (play/rec)
> pcm5: <Realtek ALC887 (Front Analog)> (play/rec) default
> ```
> my default was pcm4, i switched it to pcm5, still no audio output.  i wasnt sure if i ws supposed to reboot after changing my default settings.  not sure where to proceed from here.  Any guidance would be very much appreciated.  cpu i5 6600k gpu geforce nvidia 1070 16g ram.  I really love freebsd so far.  wish i would have discovered it waaaay earlier.


As you can see pcm4 corresponds to the analog audio connectors on the rear, whereas pcm5 is your front-panel audio connectors (provided those are properly connected in your chassis). So the first question is, what kind of audio output device do you have (speakers, headhones, analog/digital, USB) and where did you plug it in?


----------



## meine (Apr 26, 2020)

Maybe this thread helps, although I used it to get a 5-1 sound system working...


----------



## llpPc (Apr 26, 2020)

```

```


```
cpu_microcode_load="YES"
cpu_microcode_name="/boot/firmware/intel-ucode.bin
snd_hda_load="YES"
```
I loaded the the sound driver into the kernel, i did not see in the handbook that i also have to include "sound _load="YES"  i executed the command kldload snd_hda and it said it was already loaded onto the kernel.  in my /boot/loader.conf i should edit it exactly as "Sound module sound_load="YES" snd_hda_load="YES", just to clarify?  

the sound is coming from my samsung surround sound speakers, a sound bar connected to my tv and a subwoofer and 2 other smaller speakers.  the setting on my surround sound is set to digital in.  honestly i am not sure.  the only thing plugged to my computer is the ethernet cable and my hdmi cord going from computer to the tv.  I have gaming desktop and i am using a sony tv as my monitor.  I am not sure if my front panel audio connectors are properly connected in my chasis.  I will revert back to the rear default and add the missing lines to my /boot/loader.conf.  

@meinie i will also check the thread link you dropped to see if it can help me since i have a surround sound.  thank you for all of your help and support guys!


----------



## llpPc (Apr 26, 2020)

ok i feel dumb, i need to observe closer, the front panel on my chasis has 2 jacks for headphones and a mic.  so the default should be the rear analog


----------



## llpPc (Apr 26, 2020)

i have rear jacks for headphones, mic as well....on the back of my computer.


----------



## llpPc (Apr 26, 2020)

I would like to clarify and apoligise for not being more clear. My surround sound setup is not connected to my computer at all. I have a soundbar that connects directly to my TV and the subwoofer and I have a wireless receiver that 2 small rear speakers are wired to. Only connection to my computer is my ethernet cable and HDMI to my TV. Sigh, with that being said will I be able to get sound in a setup like this or do I need to purchase speakers to connect to my mainboard directly? Is it possible to just get sound from my TV's speakers thru the HDMI connection?


----------



## SirDice (Apr 28, 2020)

llpPc said:


> Is it possible to just get sound from my TV's speakers thru the HDMI connection?


Switch to one of the pcm0-3 devices. Which one is going to require some trying. Each output corresponds to a connector on the graphics card, so it's going to depend on which one you used to connect to the TV.


----------



## llpPc (Apr 28, 2020)

Thank you for your reply.  I am getting a new cpu ryzen 3600 and a new main board.  I have a better understanding of the steps you guys have provided to try and get sound working.  When I get my new parts all set up I will try again.  The picture quality on freebsd seems to superior compared to what I have seen on windows and Linux distros.  Many from the freebsd community of attested to the sound quality as well.


----------



## Dave Lister (Jun 14, 2020)

llpPc said:


> i have rear jacks for headphones, mic as well....on the back of my computer.



Have you tried to see if you can get sound output playing a youtube video? I get Youtube sound in Firefox but I can't get mp3, wave or CD tracks to play.  I'm using the rear analogue sound output jack socket - I get nothing from the front socket.

I followed the steps in the Chapter 7.2 of the Handbook but I needed the following for sound in Youtube to work :-

```
# kldload snd_driver
```

or put `snd_driver_load="YES"` in /boot/loader.conf

My sound status is

```
# cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC882 (Rear Digital 10ch/2.0)> (play/rec)
pcm1: <Realtek ALC882 (Analog 2.0/5.1)> (play/rec) default
No devices installed from userspace.
```

I get the same "No devices installed from userspace." as you, I don't know if this is relevant.

DMESG yields the following on mine:-

```
# dmesg | grep pcm
pcm0: <Realtek ALC882 (Rear Digital 10ch/2.0)> at nid 20,22,21,23,30 and 31 on hdaa0
pcm1: <Realtek ALC882 (Analog 2.0/5.1)> at nid 27 and 26,28,24 on hdaa0
```

In Applications->Sound & Video -> Sound under Input I have /dev/dsp1 selected and under Output I have /dev/dsp0 Stereo selected. If I swap them I lose the Youtube sound.


----------



## llpPc (Jun 19, 2020)

I apologize for not getting back to you sooner.  I have an HDMI going from my tv into my Nvidia card.  That is where my sound was coming from.  I needed to switch the default settings on my sound card which was set to realtek to pcm1 on my Nvidia card.  Doing that produced sound for me.  For my situation the "No devices installed in userspace was not relevant.  My mistake was not recognizing that my HDMI connected to my Nvidia card was the source of my sound.


----------



## hunk (Oct 14, 2020)

It's only a quick hint and not a clean solution: Check your HD-Audio and front panel (audio) settings in your BIOS.

I've got no sound output on rear (green) analog audio jack.
Only pcm1 NVIDIA-DisplayPort plays sound.


```
hunk@powerslave:~ % cat /dev/sndstat
Installed devices:
pcm0: <NVIDIA (0x0060) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0060) (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA (0x0060) (HDMI/DP 8ch)> (play)
pcm3: <Realtek ALC892 (Analog)> (play/rec) default
No devices installed from userspace.
```

Disabling front panel audio in the BIOS did the magic trick on the rear analog audio jack.


----------

