Bug 295560 - virtual_oss: actions in /etc/devd/snd.conf are broken.
Summary: virtual_oss: actions in /etc/devd/snd.conf are broken.
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 15.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Christos Margiolis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-05-24 23:57 UTC by Chris Mangin
Modified: 2026-06-17 22:54 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Mangin 2026-05-24 23:57:02 UTC
This is observed in FreeBSD 15.1-RC1

This error occurs at boot when the microphone from my webcam is recognized:

sysrc: unknown variable:`virtual_oss_default_control_device'
virtual_oss_cmd : could not open /dev/

The source of the error is found in /etc/devd/snd.conf from the lines:

action			"/usr/sbin/virtual_oss_cmd \
	/dev/$(sysrc virtual_oss_default_control_device) -P /dev/$cdev";

The problem here is that the variable is not found in /etc/defaults/rc.conf and therefore needs to be explicitly defined in /etc/rc.conf or /etc/rc.conf.local in order for sysrc to find it.

Moreover the syntax needs to be 'sysrc -n' because sysrc returns a key/value pair by default.
Comment 1 Christos Margiolis freebsd_committer freebsd_triage 2026-05-25 11:28:51 UTC
The fix has already been submitted for review: 

https://ron-dev.freebsd.org/FreeBSD/src/pulls/33

The -n fix was also committed a few days ago:

https://cgit.freebsd.org/src/commit/?id=bc2055b94576078453b372f537ef40bc4e3c18e4
Comment 2 commit-hook freebsd_committer freebsd_triage 2026-05-28 14:07:14 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=a576e5140ef352af6cf227528d1bfc6b964516c8

commit a576e5140ef352af6cf227528d1bfc6b964516c8
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-05-21 11:38:22 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-05-28 14:06:06 +0000

    rc: virtual_oss: Define some variables in rc.conf

    They will now be part of /etc/defaults/rc.conf and be accessible by
    sysrc(8).

    Fixes:          70e27ecba518 ("virtual_oss: Introduce virtual_oss_default_control_device rc variable")
    PR:             295560
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Reviewed by:    0mp, jrm
    Pull-Reqeust:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/33

 libexec/rc/rc.conf          |  6 +++++-
 libexec/rc/rc.d/virtual_oss | 12 +-----------
 2 files changed, 6 insertions(+), 12 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-06-07 21:19:55 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=4910c5a7d518411ba39a9228316cc572f3857a7c

commit 4910c5a7d518411ba39a9228316cc572f3857a7c
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-05-21 11:38:22 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-06-07 21:19:34 +0000

    rc: virtual_oss: Define some variables in rc.conf

    They will now be part of /etc/defaults/rc.conf and be accessible by
    sysrc(8).

    Fixes:          70e27ecba518 ("virtual_oss: Introduce virtual_oss_default_control_device rc variable")
    PR:             295560
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Reviewed by:    0mp, jrm
    Pull-Reqeust:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/33

    (cherry picked from commit a576e5140ef352af6cf227528d1bfc6b964516c8)

 libexec/rc/rc.conf          |  6 +++++-
 libexec/rc/rc.d/virtual_oss | 12 +-----------
 2 files changed, 6 insertions(+), 12 deletions(-)
Comment 4 jakub_lach 2026-06-14 06:04:46 UTC
(In reply to commit-hook from comment #3)

I'm on FreeBSD 15.1-STABLE #0 stable/15-f0d6eb11b74c and after update/reboot I've got -

Starting devd.
virtual_oss_cmd: Could not open control device: /dev/vdsp.ctl: No such file or directory
virtual_oss_cmd: Could not open control device: /dev/vdsp.ctl: No such file or directory
Comment 5 Christos Margiolis freebsd_committer freebsd_triage 2026-06-15 14:33:35 UTC
(In reply to jakub_lach from comment #4)
This issue is not related to this PR, but it has been fixed already as well: https://cgit.freebsd.org/src/commit/?id=439b219fed3eea8ad3e1204393a8605826b8bbca
Comment 6 jakub_lach 2026-06-17 22:54:16 UTC
(In reply to Christos Margiolis from comment #5)
Thank you, appreciated!