Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jul 2026 17:53:41 -0700
From:      Kevin Bowling <kevin.bowling@kev009.com>
To:        Tomoaki AOKI <junchoon@dec.sakura.ne.jp>
Cc:        Gleb Popov <arrowd@freebsd.org>,  "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>,  "freebsd-hackers@FreeBSD.org" <freebsd-hackers@freebsd.org>,  "freebsd-stable@FreeBSD.org" <freebsd-stable@freebsd.org>
Subject:   Re: Tragic State of FreeBSD Audio/Sound
Message-ID:  <CAK7dMtBDQTwFkQ2UKgz1LtniZBdaWBnfL4iwUo1kFT5d34xSdQ@mail.gmail.com>
In-Reply-To: <20260722085416.407316d393dce1884c29a3c7@dec.sakura.ne.jp>
References:  <hkttyyfmuguexmliuhmg@ewtn> <sirudbjwrqwlhpzjpfqf@abqv> <CAK7dMtCRpXO71v=AEsrtuQufVJHjN%2B%2BhsN6CT_MkXhMa1-JOzw@mail.gmail.com> <CALH631mZWS9e9FDXPUT8N8W8WnNnpfYaoPuRyqXhqNTW9=atLw@mail.gmail.com> <CAK7dMtC0f7SgU7k6Yvbqg94eksd5UJ1meX7o2_0ukAteZPb-9g@mail.gmail.com> <20260722085416.407316d393dce1884c29a3c7@dec.sakura.ne.jp>

index | next in thread | previous in thread | raw e-mail

On Tue, Jul 21, 2026 at 4:54 PM Tomoaki AOKI <junchoon@dec.sakura.ne.jp> wrote:
>
> On Tue, 21 Jul 2026 11:02:27 -0700
> Kevin Bowling <kevin.bowling@kev009.com> wrote:
>
> > On Tue, Jul 21, 2026 at 3:13 AM Gleb Popov <arrowd@freebsd.org> wrote:
> > >
> > > On Tue, Jul 21, 2026 at 12:57 PM Kevin Bowling <kevin.bowling@kev009.com> wrote:
> > > >
> > > > Only major outstanding work is pipewire/pipewire-pulse don't know how to
> > > > elevate their priority on FreeBSD and they really should be RT.
> > >
> > > What's needed for that?
> >
> > There are multiple issues:
> >
> > 1) Either a fix for the priority in PipeWire (SCHED_FIFO, don't set a
> > negative nice.level = -11 as a normal user) or something to make RTKit
> > work
> > 2) Use the process ID, _gettid().
> > 3) kldload mac_priority and user in realtime group
> >
> > > > Disable the stock PulseAudio autostart.
> > >
> > > Why, what's wrong with it?
> >
> > Try killing it with KDE running and see what happens.
>
> Putting others aside, if anyone want to use pipewire,
> pulseaudio shouldn't be installed alongside.

Not quite yet.  You _need_ pulseaudio installed, because it defines
the API and ABI presently.  I'm not aware of any way to build pulse
software with i.e. pipewire as the bdep?

> IIUC, pipewire was (at least initially) developed as
> the "successor" of pulseaudio and not intended to be installed
> alongside (choose one basis), and provides pulseaudio
> compatibility for apps not yet natively support pipewire.

pipewire-pulse (included in our default install) is a stand in.
"Eventually," software should write directly to the pipewire graph.
But that will take a long time, if ever, because Pulse wasn't awful as
a client API (which is an easy problem space).

Overall, pipewire is pretty nice.  It is analagous to something like
Apple's coreaudio.  It can do bitperfect with my sink, and you can
build graphs that avoid any SRC (Sample Rate Conversions) for proaudio
and such.  I've basically reached a local maxima on the sink to where
the kernel would need some work to support things like digital
passthrough or more pro audio oriented stuff, but I think it's
basiaclly feature complete for desktop audio.

> And when I've tried pipewire a bit in early days it appeared
> in ports tree, I've experienced the same on Mate DE.
> The only workaround was to deinstall pulseaudio, but as
> pulseaudio is depended upon by many ports, upgrading ports
> forcibly pull pulseaudio in again unless nothing depending
> upon pulseaudio is upgraded.

Read my instructions again and let me know how it goes.  All you need
to do is prevent pulseaudio from starting.  But it needs to remain
installed.

> So, I think
>   *Make pulseaudio and pipewire conflicting each other
>   *Add USES to pull in whichever pulseaudio or pipewire
>   *Add DEFAULT_VERSIONS for it to choose whichever as
>    dependency
> would be needed.
>
> I imagine something like this.
>   https://forums.freebsd.org/threads/porting-x11libre-to-freebsd.98455/page-5#post-711350
>
>
> Not sure about current state (at the moment, OSS supports
> was not yet provided and I've become too tired to play
> around ALSA configurations, thus, abandoned further tests),
> but if pulseaudio is still needed to build pulseaudio
> compatibility supports, using distfiles for pulseaudio
> but do NOT depend on pulseaudio port would be needed
> to achieve the above.
>
> Regards.
>
>
> > > >    if [ -z "$XDG_RUNTIME_DIR" ]; then
> > > >        export XDG_RUNTIME_DIR="/var/run/user/$(id -u)"
> > > >        mkdir -p "$XDG_RUNTIME_DIR"
> > > >        chmod 700 "$XDG_RUNTIME_DIR"
> > > >    fi
> > >
> > > This is done by pam_xdg, you shouldn't do that yourself.
>
>
> --
> Tomoaki AOKI    <junchoon@dec.sakura.ne.jp>


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAK7dMtBDQTwFkQ2UKgz1LtniZBdaWBnfL4iwUo1kFT5d34xSdQ>