Bug 261692

Summary: /var/db/mixer[x]-state files are ignored
Product: Base System Reporter: Stuart McLaren <stuartinhavana>
Component: confAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed DUPLICATE    
Severity: Affects Only Me CC: lwhsu
Priority: ---    
Version: 13.0-STABLE   
Hardware: Any   
OS: Any   

Description Stuart McLaren 2022-02-03 18:10:04 UTC
Expected behaviour:

Adding values to a mixer state file such as this:

$ cat /var/db/mixer4-state 
vol 77:77 bass 50:50 treble 50:50 pcm 75:75 mic 68:68 =rec mic

should result in those values being set after a reboot.

Actual behaviour:

Values in /var/db/mixer4-state are ignored.

As a workaround I changed  /etc/rc.d/mixer to have:

# REQUIRE: FILESYSTEMS 

to

# REQUIRE: FILESYSTEMS ntpdate

with that change present the values were picked up on reboot:

$ mixer
Mixer vol      is currently set to  77:77
Mixer bass     is currently set to  50:50
Mixer treble   is currently set to  50:50
Mixer pcm      is currently set to  75:75
Mixer mic      is currently set to  68:68
Recording source: mic

It seems that /etc/rc.d/mixer runs before the /dev/mixer* files exist. In my case the device is a usb one, but I don't think any of the others (eg built in sound card) are present either.
Comment 1 Li-Wen Hsu freebsd_committer freebsd_triage 2022-02-03 18:24:04 UTC

*** This bug has been marked as a duplicate of bug 261693 ***