# pcm hint won't set mixer



## pacija (Aug 9, 2012)

Dear forum members,

I am trying to set my mixer to a higher value at system boot as described in the Handbook, but it is always reset to starting value at reboot.

System information:


```
[pacija@kaa:/home/pacija]> uname -a
FreeBSD kaa.mimar.rs 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Fri Aug  3 13:13:39 CEST 2012 \
   root@kaa.mimar.rs:/usr/obj/usr/src/sys/KAA02  amd64

[pacija@kaa:/home/pacija]> dmesg | grep pcm
pcm0: <HDA NVidia (Unknown) PCM #0 DisplayPort> at cad 0 nid 1 on hdac0
pcm1: <HDA NVidia (Unknown) PCM #0 DisplayPort> at cad 1 nid 1 on hdac0
pcm2: <HDA NVidia (Unknown) PCM #0 DisplayPort> at cad 2 nid 1 on hdac0
pcm3: <HDA NVidia (Unknown) PCM #0 DisplayPort> at cad 3 nid 1 on hdac0
pcm4: <HDA Realtek ALC269 PCM #0 Analog> at cad 0 nid 1 on hdac1
pcm5: <HDA Realtek ALC269 PCM #1 Digital> at cad 0 nid 1 on hdac1

[pacija@kaa:/home/pacija]> mixer
Mixer vol      is currently set to  75:75
Mixer pcm      is currently set to  75:75
Mixer mic      is currently set to   0:0
Mixer mix      is currently set to   0:0
Mixer rec      is currently set to  75:75
Mixer igain    is currently set to   0:0
Mixer monitor  is currently set to  75:75
Recording source: mic
```

Any hints, besides

```
hint.pcm.0.vol="90"
```
which apparently does not work for me?

Thank you in advance.


----------



## SirDice (Aug 9, 2012)

Do you have any /var/db/mixer*-state files?


----------



## pacija (Aug 9, 2012)

Thank you for looking into it, SirDice. I do have these:


```
[pacija@kaa:/]> ls -lh /var/db/ | grep mixer
-rw-r--r--    1 root        wheel         19B Jul 12 12:08 mixer0-state
-rw-r--r--    1 root        wheel         19B Jul 12 12:08 mixer1-state
-rw-r--r--    1 root        wheel         19B Jul 12 12:08 mixer2-state
-rw-r--r--    1 root        wheel         19B Jul 12 12:08 mixer3-state
-rw-r--r--    1 root        wheel         78B Jul 12 12:08 mixer4-state
-rw-r--r--    1 root        wheel         19B Jul 12 12:08 mixer5-state
```


----------



## SirDice (Aug 9, 2012)

The script /etc/rc.d/mixer loads and saves these. This script is run by default during boot.


----------



## pacija (Aug 9, 2012)

I edited mixer*-state file of my default pcm device:


```
[pacija@kaa:/]> cat /var/db/mixer4-state 
vol 90:90 pcm 90:90 mic 0:0 mix 0:0 rec 0:0 igain 0:0 monitor 0:0 =rec mic
```

...and I got entered values at reboot:


```
[pacija@kaa:/]> mixer
Mixer vol      is currently set to  90:90
Mixer pcm      is currently set to  90:90
Mixer mic      is currently set to   0:0
Mixer mix      is currently set to   0:0
Mixer rec      is currently set to   0:0
Mixer igain    is currently set to   0:0
Mixer monitor  is currently set to   0:0
Recording source: mic
```

So I could say the load part of the script works well.

Thank you once again, this solves my problem.


----------

