# Difficulty with sound in FreeBSD13/plasma5



## wowie (Jul 13, 2021)

I'm feeling a bit foolish because I had sound working on this machine before, but I'm having issues on reinstall:

updated my default unit from 4 to 5:
`sysctl hw.snd.default_unit=5`

confirmed by issuing command
`cat /dev/sndstat`
which yields output:

```
root@mordor:~ # cat /dev/sndstat
Installed devices:
pcm0: <NVIDIA (0x0040) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0040) (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA (0x0040) (HDMI/DP 8ch)> (play)
pcm3: <NVIDIA (0x0040) (HDMI/DP 8ch)> (play)
pcm4: <Realtek ALC889 (Rear Analog 7.1/2.0)> (play/rec)
pcm5: <Realtek ALC889 (Front Analog)> (play/rec) default
pcm6: <Realtek ALC889 (Onboard Digital)> (play)
pcm7: <Realtek ALC889 (Rear Digital)> (play)
pcm8: <USB audio> (rec)
No devices installed from userspace.
```
Issuing command:
`kldload snd_hda`

yields:

```
"kldload: can't load snd_hda: module already loaded or in kernel"
```
as expected because I have already added:


```
snd_hda_load="YES"
```
to:
/boot/loader.conf

What step am I missing here??


----------



## SirDice (Jul 13, 2021)

wowie said:


> as expected because i have already added:
> 
> 
> ```
> ...


You don't need this. snd_hda(4) is already included in the GENERIC kernel. 





						GENERIC « conf « amd64 « sys - src - FreeBSD source tree
					






					cgit.freebsd.org
				





```
pcm5: <Realtek ALC889 (Front Analog)> (play/rec) default
```
Is the front analog actually connected to the front panel?


----------



## Vull (Jul 13, 2021)

To make your `sysctl` change persist after rebooting, put this line: 
	
	



```
hw.snd.default_unit=5
```
... in the /etc/sysctl.conf file.


----------



## wowie (Jul 13, 2021)

SirDice said:


> You don't need this. snd_hda(4) is already included in the GENERIC kernel.
> 
> 
> 
> ...



For those looking for solutions here: What is meant here is that not only is it not necessary to add:

```
snd_hda_load="YES"
```
to
/boot/loader.conf
it may actually be counterproductive. My audio worked perfectly on reboot, after having deprecated this line of code.


----------

