# Set permanently mixer volume to 100% of USB DAC



## hanhtm (Aug 3, 2015)

Hi all,
Is there a way set permanently mixer volume to max (100%)
of given USB DAC in /etc/sysctl.conf? or other way?
thank you.


----------



## protocelt (Aug 3, 2015)

Hi.

mixer(8) states _should_ be automatically updated and saved in /var/db as mixer(%n)-state. Some GUI mixer applications such as audio/kmix store the volume settings separately unless configured otherwise, which can be confusing to some people. What entries do you have set for the device in /etc/sysctl.conf right now?


----------



## hanhtm (Aug 3, 2015)

Thank you for response. You mean it's no need to set value in /etc/sysctl.conf, but set value with mixer command with -state parameter, right?
Currently I don't have any value in /etc/sysctl.conf right now regarding mixer.


----------



## protocelt (Aug 3, 2015)

That's odd then. The settings should be saved at shutdown. Are you rebooting the machine from the console or a terminal in X? The mixer(8) command is used to change the volume levels. The mixer(%n)-state file I mentioned above is where those settings are stored when the computer is shutdown or rebooted. Please don't edit that file. If you use the reboot(8) command instead of `shutdown -r now` when manually rebooting the PC from the console or terminal, the running services will be immediately killed instead of shutting down cleanly which would cause the mixer state not to be saved. Some new users coming from Linux make this mistake sometimes.

You can set 
	
	



```
hint.pcm.%d.vol="100"
```
 (where %d is the number of your device) in /boot/device.hints to set the default master volume level to 100 on every reboot as you asked.


----------



## hanhtm (Aug 3, 2015)

Thank you. I think I did the wrong way. I will try your advice.


----------

