# Sound volume doesn't stay



## erdos (Aug 23, 2015)

Every time I started the FreeBSD10.1 on my desktop, the volume is so low that I can barely heart it.  I have to turn up the volume through `alsamixer` and adjust the Master/PCM levels etc.

How to save the sound settings and keep it from one session to next?


----------



## wblock@ (Aug 23, 2015)

mixer(8) is the native command.  It saves the settings on shutdown and restores them on startup.  Those settings might not be saved if a different program is used, unless it has been made to work with the FreeBSD system.  xfce's Audio Mixer seems to do the right thing, for example.


----------



## erdos (Aug 23, 2015)

wblock@ said:


> mixer(8) is the native command.  It saves the settings on shutdown and restores them on startup.  Those settings might not be saved if a different program is used, unless it has been made to work with the FreeBSD system.  xfce's Audio Mixer seems to do the right thing, for example.




```
$ mixer
Mixer vol is currently set to 100:100
Mixer pcm is currently set to 100:100
Mixer speaker is currently set to 75:75
Mixer line is currently set to 97:97
Mixer mic is currently set to 16:16
Mixer cd is currently set to 75:75
Mixer rec is currently set to 75:75
Mixer igain is currently set to 0:0
Mixer ogain is currently set to 50:50
Mixer line1 is currently set to 75:75
Mixer phin is currently set to 0:0
Mixer phout is currently set to 100:100
Mixer video is currently set to 100:100
Recording source: mic
```
These settings should be saved automatically without me doing anything?


----------



## wblock@ (Aug 23, 2015)

Yes, as long as the system is correctly shut down, not just power disconnected.


----------



## shepper (Aug 23, 2015)

You setup is more complex with the alsa and its linux wrapper.  The native FreeBSD mixer settings can be set at boot with an entry in
/boot/device.hints

```
hint.pcm.0.vol="70"
```

I do not use linux wrappers but if it outputs through the native FreeBSD sound driver, then this would also modulate the sound level.


----------



## cpm@ (Aug 25, 2015)

Will the `systcl hw.snd.vpc autoreset=0` command cure this illness as well?

```
% sysctl -d hw.snd.vpc_autoreset
hw.snd.vpc_autoreset: automatically reset channels volume to 0db
```
Add it to /etc/sysctl.conf


----------

