# The FreeBSD mixer and the "reboot" command



## Niatross (Dec 7, 2012)

Problem:
You setup your mixer settings the way you want them and then you find out that these settings never survive a reboot. You find out that this type of problem only happens when you use the "*reboot*" command.

Resolution:
If you use the "shutdown -r now" or "init 6" commands, your mixer settings are always saved correctly.

-----------------------------------------

Pretty interesting.

Obviously the "shutdown -r now" and "init 6" commands stop the mixer daemon and allow it to save its settings to the "/var/db/mixer<x>-state" file.


----------



## Beastie (Dec 7, 2012)

Yes that's how it should be done.



			
				&quot said:
			
		

> reboot[/man]"]
> *Normally, the shutdown(8) utility is used* when the system needs to be
> halted or restarted, giving users advance warning of their impending doom
> and *cleanly terminating specific programs*.


----------



## gkontos (Dec 7, 2012)

A common misconception is that 'reboot' is an alias for 'shutdown -r now'. 

There are many differences which often lead to data corruption.


----------



## chatwizrd (Dec 7, 2012)

Yup its sad how many Linux/Unix noobs use reboot and think they are doing it right.


----------



## fmw (Dec 11, 2012)

Well, it's not something that will strike you as obvious.


----------



## Sfynx (Dec 11, 2012)

Then I wonder when it would be more appropriate to use reboot(8) rather than a clean shut down?


----------



## kpa (Dec 11, 2012)

Rebooting from a single user mode session after doing make installworld and running mergemaster(8), that's best done with reboot(8).


----------



## gkontos (Dec 11, 2012)

Sfynx said:
			
		

> Then I wonder when it would be more appropriate to use reboot(8) rather than a clean shut down?



IMHO reboot(8) should be removed from FreeBSD the way it works now.


----------



## fonz (Dec 11, 2012)

Niatross said:
			
		

> If you use the "shutdown -r now" or "init 6" commands, your mixer settings are always saved correctly.


Alternatively, if you'd prefer to have your mixer at a certain fixed setting on every boot you could just put a mixer(8) command in your /etc/rc.local file.

Fonz


----------



## Amberleaf (Dec 21, 2012)

fonz said:
			
		

> Alternatively, if you'd prefer to have your mixer at a certain fixed setting on every boot you could just put a mixer(8) command in your /etc/rc.local file.
> 
> Fonz



Would that work in FreeBSD 8.3?


----------



## fonz (Dec 21, 2012)

Amberleaf said:
			
		

> Would that work in FreeBSD 8.3?


Sure.

Fonz


----------

