# No sound new 12.2 installation.



## dalpets (Mar 14, 2021)

My system advises that the sound module is already loaded in the kernel.
cat /dev/sndstat says I have Realtek ALC892's (pcm0 to pcm3). One is shown as 'default', one 'play/rec' & two 'play'.
I have a head set.
How do I know which pcm to select? Is it just trial & error?
What is the code for installation & where do I install that activation code?

Thank You.


----------



## Yampress (Mar 14, 2021)

`cat /dev/sndstat`

`sysctl hw.snd.default_unit=n`

https://docs.freebsd.org/en/books/handbook/sound-setup.html


----------



## Alexander88207 (Mar 14, 2021)

> How do I know which pcm to select? Is it just trial & error?



Yep mostly, just follow the instructions of Yampress and you are good to go.

If you have found the right PCM you can set it as default in /etc/sysctl.conf by just writing `hw.snd.default_unit=3` for example.


----------



## dalpets (Mar 15, 2021)

Thanks guys, now it's working (on all 4 pcms) but volume is low on all.

0=rear (analog) (play/rec)
1=front (analog)
2=rear (digtal) play
3=Kaby Lake (hdmi/DP 8 ch) (play)

mixer vol=50/50
    "     pcm=100/100
    "     speaker=unknown
    "     rec=35/35

Any ideas how to increase volume?

Thanks again


----------



## SirDice (Mar 15, 2021)

Turn the volume knob on your speakers? Or increase the volume on your monitor/TV if it's connected with HDMI? Note that builtin speakers on monitors are generally quite low volume. At least they are on my (rather expensive) monitor, even on Windows.


----------



## Alexander88207 (Mar 15, 2021)

dalpets said:


> Thanks guys, now it's working (on all 4 pcms) but volume is low on all.
> 
> 0=rear (analog) (play/rec)
> 1=front (analog)
> ...



On the systemside you can use audio/mixertui to increase volume and more easily.


----------



## dalpets (Mar 15, 2021)

I'm always using on the ear headsets, either cheapie or quality gaming headset because the family thinks that otherwise it detracts from their TV experience-each to his own! In this case both headsets are at the lower volume end with the latter somewhat louder but not appreciably so. Neither headsets have volume controls.

Could the problem be related to  poor sound from the motherboard sound implementation?

The pkg install requires the `sysctlbyname_improved_load="YES"`entry in the boot/loader.conf file for the function to be used. What 'byname' is it referring to?
Thanks


----------



## Mjölnir (Mar 15, 2021)

`sysctl -d hw.snd.default_auto`: `assign default unit to a newly attached device`


----------



## Deleted member 30996 (Mar 15, 2021)

SirDice said:


> Turn the volume knob on your speakers? Or increase the volume on your monitor/TV if it's connected with HDMI?


It's always the little things that trip you up.  



dalpets said:


> My system advises that the sound module is already loaded in the kernel.
> cat /dev/sndstat says I have Realtek ALC892's (pcm0 to pcm3). One is shown as 'default', one 'play/rec' & two 'play'.


I have a Gateway laptop with Realtek ALC272 Audio that I listen to music through all the time and have been using up till a few days ago. I don't have it running to provide you with more details.

Although it might be outdated like me I use this in all my machines:

/et/rc.conf
snddetect_enable="YES"

And a pair of Koss KTXPRO1 Titanium Portable Headphones with Volume Control. They are the best.


----------



## Yampress (Mar 16, 2021)

try this too:

```
yampress@freebsd ~ % mixer
Mixer vol      is currently set to  90:90
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
yampress@freebsd ~ % mixer --help
usage: mixer [-f device] [-s | -S] [dev [+|-][voll[:[+|-]volr]] ...
       mixer [-f device] [-s | -S] recsrc ...
       mixer [-f device] [-s | -S] {^|+|-|=}rec rdev ...
 devices: vol, pcm, speaker, line, mic, mix, rec, igain, ogain
 rec devices: speaker, line, mic, mix
yampress@freebsd ~ % mixer vol 99
Setting the mixer vol from 90:90 to 99:99.
```


----------



## dalpets (Mar 16, 2021)

Yampress;
what file are you saying this code should go to?
Thanks


----------



## Mjölnir (Mar 16, 2021)

All sysctl(8) knobs that are not needed @boottime, and that can be changed @runtime (some can not, these go into loader.conf(5)), go into sysctl.conf(5).  Note: in loader.conf(5) it is recommended to put the values inside `"double quotes"`, in sysctl.conf(5) you can ommit them.


----------



## alfonsosiciliano (Mar 19, 2021)

Hi dalpets,

thank you for your report,


dalpets said:


> The pkg install requires the `sysctlbyname_improved_load="YES"`entry in the boot/loader.conf file for the function to be used. What 'byname' is it referring to?



Briefly: _mixertui_ does not use _sysctlbyname_improved_, so you can ignore the pkg-message.

When an user presses "F2" or "F7" _mixertui_ uses the _sysctlmibinfo2_ library (devel/libsysctlmibinfo2) to "request" to the kernel some info about the Sound System, properly _sysctlmibinfo2_ uses two kernel modules: _sysctlinfo_ (an interface to explore the sysctl MIB) and _sysctlbyname-improved_ (for a sysctl object name with an empty string level or with an extended name for passing an input to its handler, to know more sysctlbyname-improved). So when you install _mixertui_ -> _libsysctlmibinfo2_, pkg installs also -> _sysctlbyname-improved-kmod_ and tells you to load the module via kldload or boot/loader.conf.
Nevertheless, currently, the Sound System has not sysctl objects with special names so you can ignore _sysctlbyname-improved_.

To know more about 'byname': man.freebsd.org/sysctlbyname/3.


----------

