No Sound in Wayland

Code:
sudo service pipewire restart                                                        ──(Fri,May09)─┘
Password:
pipewire not running? (check /var/run/pipewire.pid).
Starting pipewire.
[E][12:38:01.438374] mod.rt       | [     module-rt.c:  295 pw_rtkit_bus_get()] Failed to connect to session bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[E][12:38:01.439013] mod.protocol-native | [module-protocol-:  758 init_socket_name()] server 0x4406d4481480: name pipewire-0 is not an absolute path and no runtime dir found. Set one of PIPEWIRE_RUNTIME_DIR, XDG_RUNTIME_DIR or USERPROFILE in the environment
[E][12:38:01.439066] pw.conf      | [          conf.c:  603 load_module()] 0x4406d445a000: could not load mandatory module "libpipewire-module-protocol-native": No such file or directory
[W][12:38:01.439384] mod.rt       | [     module-rt.c:  330 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][12:38:01.439398] mod.rt       | [     module-rt.c:  995 do_rtkit_setup()] RTKit does not give us MaxRealtimePriority, using 1
[W][12:38:01.439510] mod.rt       | [     module-rt.c:  330 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][12:38:01.439515] mod.rt       | [     module-rt.c: 1000 do_rtkit_setup()] RTKit does not give us MinNiceLevel, using 0
[W][12:38:01.439613] mod.rt       | [     module-rt.c:  330 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][12:38:01.439619] mod.rt       | [     module-rt.c: 1005 do_rtkit_setup()] RTKit does not give us RTTimeUSecMax, using -1
[E][12:38:01.439900] default      | [      pipewire.c:  124 main()] failed to create context: No such file or directory
/etc/rc.d/pipewire: WARNING: failed to start pipewire

sudo service dbus start                                                         
dbus already running?  (pid=1465).

 pkg info pipewire | grep -A10 Options                                    
Options        :
    ALSA           : off
    AVAHI          : off
    DOCS           : on
    DOXYGEN        : off
    EBUR           : on
    GSTREAMER      : on
    JACK           : on
    LV2            : off
    PULSEAUDIO     : off
    VULKAN         : off

echo $XDG_RUNTIME_DIR                                                          
/run/user/1001

In .profile:
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/ttyv1" ]; then
  if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
    eval $(dbus-launch --sh-syntax)
  fi
  export XDG_RUNTIME_DIR=/run/user/1001

  # Ensure PipeWire is running
  if ! pgrep -x "pipewire" > /dev/null; then
    service pipewire start
    sleep 2
  fi

  # Start Wayfire
  wayfire &

  # Wait for Wayfire to settle before starting WirePlumber
  sleep 3

  # Start WirePlumber
  wireplumber &
fi

 uname -r                                                                             ──(Fri,May09)─┘
14.2-RELEASE

I cant get sound to work, had it once but now can't it's very difficult. Do we use pulseaudio? pipewire? wireplumber? something else?
 
FreeBSD uses sound(4) natively which implement OSS-compatible API. If you want PipeWire not just for video install audio/pipewire-spa-oss. Applications using OSS or PulseAudio won't automatically switch to PipeWire, so your audio issues are likely unrelated.

To diagnose try playing an audio file using CLI like multimedia/mpv. It uses OSS by default but can be rebuilt with PULSEAUDIO or PIPEWIRE options.
 
I don't understand, makes no sense. Just a bunch of words. I need something more than "read the manual" type of response. I have one system that uses x11 the sound works, the other one with wayland/wayfire no sound, seems to have something to do with that. I have no idea how to get it working in wayland. I asked that POS chatgpt and it said use pipewire, pulseaudio, wireplumber. but who knows, that thing will say anything.
 
Code:
sudo service pipewire restart                                                        ──(Fri,May09)─┘
Password:
pipewire not running? (check /var/run/pipewire.pid).
Starting pipewire.

/etc/rc.d/pipewire: WARNING: failed to start pipewire


echo $XDG_RUNTIME_DIR                                                          
/run/user/1001

I cant get sound to work, had it once but now can't it's very difficult. Do we use pulseaudio? pipewire? wireplumber? something else?

What happens here ?
Where did you get /etc/rc.d/pipewire ? There is no such thing in FreeBSD, especially in base.

Why XDG_RUNTIME_DIR is not either /var/run/xdg/username or /var/run/user/1001
There is a pam_xdg module that is enabled by default that would set XDG_RUNTIME_DIR to the correct path: /var/run/xdg/username.

What is the output of cat /dev/sndstat ? And how do you connect to the audio : headset, speaker, monitor speaker ?
What software do you use for the sound ? Some use by default pulseaudio which may have its sound output different than the default one.
What is the output of mixer ?
 
XDG_RUNTIME_DIR absolutely has to be /var/run/user/1001, not /var/run/xdg/username. Most Wayland compositors don't mind either one, but KWin assumes the /var/run/user/1001 value to be able to work under Wayland at all.

But yeah, Pipewire kind of need to work properly under FreeBSD if we are to have usable Wayland there.
 
I don't understand, makes no sense. Just a bunch of words. I need something more than "read the manual" type of response. I have one system that uses x11 the sound works, the other one with wayland/wayfire no sound, seems to have something to do with that. I have no idea how to get it working in wayland. I asked that POS chatgpt and it said use pipewire, pulseaudio, wireplumber. but who knows, that thing will say anything.
You don't need either pipewire or pulseaudio to have sound working in FreeBSD under Wayland . I don't have them installed and sound works just fine for me with both mpv and Librewolf.
 
I'm at a complete loss here. I've been struggling for days and can't get sound to work this is ridiculous, it shouldn't be so hard. I have no idea what to do. I use chatgpt, ya I know big mistake but that's all I got besides here. It says use pipewire and wireplumber. If not that then what? ya that's great you got it working without those. how?

Code:
PIPEWIRE_DEBUG=4 pipewire                                           1 ↵ ──(Sun,May18)─┘
[D][20:27:37.713849] pw.context   | [      pipewire.c:  235 load_spa_handle()] load lib:'support/libspa-support' factory-name:'support.cpu'
[D][20:27:37.713915] spa.cpu      | [           cpu.c:  263 impl_init()] 0x41e8f066d028: count:12 align:32 flags:0007cbdb
[I][20:27:37.713920] pw.context   | [      pipewire.c:  581 pipewire_init()] version 1.4.1
[D][20:27:37.713929] pw.context   | [      pipewire.c:  235 load_spa_handle()] load lib:'support/libspa-support' factory-name:'support.system'
[D][20:27:37.713933] spa.system   | [        system.c:  334 impl_init()] 0x41e8f062c0a8: initialized
[D][20:27:37.713936] pw.context   | [      pipewire.c:  235 load_spa_handle()] load lib:'support/libspa-support' factory-name:'support.loop'
[D][20:27:37.713944] spa.system   | [        system.c:   96 impl_pollfd_create()] 0x41e8f062c0a8: new fd:3
[D][20:27:37.713949] spa.system   | [        system.c:  203 impl_eventfd_create()] 0x41e8f062c0a8: new fd:4
[D][20:27:37.713956] spa.loop     | [          loop.c: 1296 impl_init()] 0x41e8f0673028: initialized
[D][20:27:37.713960] pw.main-loop | [     main-loop.c:   46 loop_new()] 0x41e8f061a6c0: new 'main-loop'
[D][20:27:37.713967] spa.system   | [        system.c:  237 impl_signalfd_create()] 0x41e8f062c0a8: new fd:5
[D][20:27:37.713975] spa.system   | [        system.c:  237 impl_signalfd_create()] 0x41e8f062c0a8: new fd:6
[D][20:27:37.713982] pw.context   | [       context.c:  331 pw_context_new()] 0x41e8f0679000: new
[I][20:27:37.714139] pw.conf      | [          conf.c:  415 conf_load()] 0x41e8f06191c0: loaded config '/usr/local/etc/pipewire/pipewire.conf' with 1 items
[I][20:27:37.714190] pw.conf      | [          conf.c:  415 conf_load()] 0x41e8f0619200: loaded config '/usr/local/share/pipewire/pipewire.conf.d/10-alsa-default.conf' with 1 items
[I][20:27:37.714204] pw.conf      | [          conf.c:  415 conf_load()] 0x41e8f0619200: loaded config '/usr/local/share/pipewire/pipewire.conf.d/10-wireplumber.conf' with 1 items
[I][20:27:37.714220] pw.context   | [       context.c:  388 pw_context_new()] 0x41e8f0679000: parsed 0 context.properties items
[D][20:27:37.714242] pw.data-loop | [     data-loop.c:  100 loop_new()] 0x41e8f062d0a0: new
[D][20:27:37.714246] pw.context   | [      pipewire.c:  235 load_spa_handle()] load lib:'support/libspa-support' factory-name:'support.system'
[D][20:27:37.714250] spa.system   | [        system.c:  334 impl_init()] 0x41e8f06b20a8: initialized
[D][20:27:37.714253] pw.context   | [      pipewire.c:  235 load_spa_handle()] load lib:'support/libspa-support' factory-name:'support.loop'
[D][20:27:37.714257] spa.system   | [        system.c:   96 impl_pollfd_create()] 0x41e8f06b20a8: new fd:7
[D][20:27:37.714261] spa.system   | [        system.c:  203 impl_eventfd_create()] 0x41e8f06b20a8: new fd:8
[D][20:27:37.714266] spa.loop     | [          loop.c: 1296 impl_init()] 0x41e8f0673628: initialized
[I][20:27:37.714271] pw.context   | [       context.c:  269 setup_data_loops()] created data loop 'data-loop.0'
[I][20:27:37.714275] pw.context   | [       context.c:  272 setup_data_loops()] created 1 data-loops
[D][20:27:37.714279] pw.mem       | [           mem.c:  170 pw_mempool_new()] 0x41e8f0610680: new
[D][20:27:37.714281] pw.work-queue | [    work-queue.c:   88 pw_work_queue_new()] 0x41e8f0619200: new
[D][20:27:37.714284] spa.system   | [        system.c:  203 impl_eventfd_create()] 0x41e8f062c0a8: new fd:9
[D][20:27:37.714288] pw.context   | [      pipewire.c:  235 load_spa_handle()] load lib:'support/libspa-dbus' factory-name:'support.dbus'
[D][20:27:37.714639] pw.context   | [      pipewire.c:  129 open_plugin()] loaded plugin:'/usr/local/lib/spa-0.2/support/libspa-dbus.so'
[D][20:27:37.714646] spa.dbus     | [          dbus.c:  522 impl_init()] 0x41e8f066d3e8: initialized
[D][20:27:37.714696] pw.core      | [     impl-core.c:  424 pw_context_create_core()] 0x41e8f065d0c0: new pipewire-rich-29199
[D][20:27:37.714703] pw.global    | [        global.c:   99 pw_global_new()] 0x41e8f06b2280: new PipeWire:Interface:Core 0
[D][20:27:37.714709] pw.global    | [        global.c:  175 pw_global_register()] 0x41e8f06b2280: registered 0
[I][20:27:37.714714] pw.context   | [       context.c:  481 pw_context_new()] 0x41e8f0679000: parsed 0 context.spa-libs items
[I][20:27:37.714717] pw.conf      | [          conf.c: 1111 pw_conf_section_for_each()] handle config '/usr/local/etc/pipewire/pipewire.conf' section 'context.modules'
[I][20:27:37.714723] pw.module    | [   impl-module.c:  157 pw_context_load_module()] 0x41e8f0679000: name:libpipewire-module-rt args:{
            priority = 70
            realtime = true
            threads = 2
        }
[D][20:27:37.714727] pw.module    | [   impl-module.c:  162 pw_context_load_module()] moduledir set to: /usr/local/lib/pipewire-0.3
[D][20:27:37.714734] pw.module    | [   impl-module.c:  172 pw_context_load_module()] trying to load module: libpipewire-module-rt (/usr/local/lib/pipewire-0.3/libpipewire-module-rt.so) args({
            priority = 70
            realtime = true
            threads = 2
        })
[D][20:27:37.714797] pw.global    | [        global.c:   99 pw_global_new()] 0x41e8f06b2500: new PipeWire:Interface:Module 1
[D][20:27:37.714803] mod.rt       | [     module-rt.c: 1085 pipewire__module_init()] module 0x41e8f0672500: new
[I][20:27:37.714809] mod.rt       | [     module-rt.c: 1114 pipewire__module_init()] invalid nice level 20 (not between -20 and 19). nice level will not be adjusted
[I][20:27:37.714829] mod.rt       | [     module-rt.c:  585 check_realtime_privileges()] failed to set realtime policy: Operation not permitted
[I][20:27:37.714833] mod.rt       | [     module-rt.c:  594 check_realtime_privileges()] can't set rt prio to 83 (try increasing rlimits)
[D][20:27:37.714836] mod.rt       | [     module-rt.c:  943 rtkit_get_bus()] enter rtkit get bus
[I][20:27:37.716745] mod.rt       | [     module-rt.c:  314 pw_rtkit_check_xdg_portal()] Can't find org.freedesktop.portal.Desktop. Is xdg-desktop-portal running?
[I][20:27:37.716754] mod.rt       | [     module-rt.c:  957 rtkit_get_bus()] found session bus but no portal, trying RTKit fallback
[D][20:27:37.717011] pw.thread-loop | [   thread-loop.c:  145 loop_new()] 0x41e8f066d460: new name:module-rt
[D][20:27:37.717018] pw.context   | [      pipewire.c:  235 load_spa_handle()] load lib:'support/libspa-support' factory-name:'support.system'
[D][20:27:37.717025] spa.system   | [        system.c:  334 impl_init()] 0x41e8f06b2728: initialized
[D][20:27:37.717029] pw.context   | [      pipewire.c:  235 load_spa_handle()] load lib:'support/libspa-support' factory-name:'support.loop'
[D][20:27:37.717038] spa.system   | [        system.c:   96 impl_pollfd_create()] 0x41e8f06b2728: new fd:11
[D][20:27:37.717042] spa.system   | [        system.c:  203 impl_eventfd_create()] 0x41e8f06b2728: new fd:12
[D][20:27:37.717048] spa.loop     | [          loop.c: 1296 impl_init()] 0x41e8f0673c28: initialized
[D][20:27:37.717061] spa.system   | [        system.c:  203 impl_eventfd_create()] 0x41e8f06b2728: new fd:13
[D][20:27:37.717103] pw.thread-loop | [   thread-loop.c:  287 do_loop()] 0x41e8f066d460: enter thread
[D][20:27:37.717151] spa.system   | [        system.c:  203 impl_eventfd_create()] 0x41e8f06b2728: new fd:14
[I][20:27:37.717157] spa.loop     | [          loop.c:  261 loop_create_queue()] 0x41e8f0673c28 created queue 0x41e8f06c9000 idx:0 0x41e8f0612000
[D][20:27:37.717163] mod.rt       | [     module-rt.c: 1176 pipewire__module_init()] initialized using RTKit
[D][20:27:37.717171] pw.module    | [   impl-module.c:  359 pw_impl_module_update_properties()] 0x41e8f065d180: updated 4 properties
[D][20:27:37.717175] pw.module    | [   impl-module.c:  359 pw_impl_module_update_properties()] 0x41e8f065d180: updated 3 properties
[D][20:27:37.717178] pw.global    | [        global.c:  175 pw_global_register()] 0x41e8f06b2500: registered 1
[D][20:27:37.717181] pw.module    | [   impl-module.c:  252 pw_context_load_module()] 0x41e8f065d180: loaded module: libpipewire-module-rt
[I][20:27:37.717183] pw.conf      | [          conf.c:  610 load_module()] 0x41e8f0679000: loaded module libpipewire-module-rt
[I][20:27:37.717187] pw.module    | [   impl-module.c:  157 pw_context_load_module()] 0x41e8f0679000: name:libpipewire-module-client-node args:(null)
[D][20:27:37.717189] pw.module    | [   impl-module.c:  162 pw_context_load_module()] moduledir set to: /usr/local/lib/pipewire-0.3
[D][20:27:37.717197] pw.module    | [   impl-module.c:  172 pw_context_load_module()] trying to load module: libpipewire-module-client-node (/usr/local/lib/pipewire-0.3/libpipewire-module-client-node.so) args((null))
[D][20:27:37.717213] mod.rt       | [     module-rt.c:  990 do_rtkit_setup()] enter rtkit setup
[W][20:27:37.717390] mod.rt       | [     module-rt.c:  330 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][20:27:37.717397] mod.rt       | [     module-rt.c:  995 do_rtkit_setup()] RTKit does not give us MaxRealtimePriority, using 1
[D][20:27:37.717443] pw.global    | [        global.c:   99 pw_global_new()] 0x41e8f06b2900: new PipeWire:Interface:Module 2
[D][20:27:37.717450] pw.factory   | [  impl-factory.c:   54 pw_context_create_factory()] 0x41e8f06a0300: new client-node
[D][20:27:37.717453] mod.client-node | [module-client-no:  251 pipewire__module_init()] module 0x41e8f065d780: new
[D][20:27:37.717456] pw.context   | [       context.c: 1995 pw_context_register_export_type()] context 0x41e8f0679000: Add export type PipeWire:Interface:Node to context
[D][20:27:37.717459] pw.context   | [       context.c: 1995 pw_context_register_export_type()] context 0x41e8f0679000: Add export type Spa:Pointer:Interface:Node to context
[D][20:27:37.717465] pw.module    | [   impl-module.c:  359 pw_impl_module_update_properties()] 0x41e8f065d780: updated 3 properties
[D][20:27:37.717467] pw.global    | [        global.c:  175 pw_global_register()] 0x41e8f06b2900: registered 2
[D][20:27:37.717471] pw.factory   | [  impl-factory.c:  144 pw_impl_factory_update_properties()] 0x41e8f06a0300: updated 1 properties
[D][20:27:37.717474] pw.global    | [        global.c:   99 pw_global_new()] 0x41e8f06b2b00: new PipeWire:Interface:Factory 3
[D][20:27:37.717479] pw.global    | [        global.c:  175 pw_global_register()] 0x41e8f06b2b00: registered 3
[D][20:27:37.717481] pw.module    | [   impl-module.c:  252 pw_context_load_module()] 0x41e8f065d780: loaded module: libpipewire-module-client-node
[I][20:27:37.717484] pw.conf      | [          conf.c:  610 load_module()] 0x41e8f0679000: loaded module libpipewire-module-client-node
[W][20:27:37.717486] mod.rt       | [     module-rt.c:  330 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][20:27:37.717492] mod.rt       | [     module-rt.c: 1000 do_rtkit_setup()] RTKit does not give us MinNiceLevel, using 0
[I][20:27:37.717487] pw.context   | [       context.c:  485 pw_context_new()] 0x41e8f0679000: parsed 2 context.modules items
[I][20:27:37.717501] pw.conf      | [          conf.c: 1114 pw_conf_section_for_each()] handle override '/usr/local/share/pipewire/pipewire.conf.d/10-alsa-default.conf' section 'context.objects'
[D][20:27:37.717509] pw.conf      | [          conf.c:  815 create_object()] find factory adapter
[E][20:27:37.717513] pw.conf      | [          conf.c:  820 create_object()] can't find factory adapter
[D][20:27:37.717517] pw.context   | [       context.c:  536 pw_context_destroy()] 0x41e8f0679000: destroy
[D][20:27:37.717520] pw.module    | [   impl-module.c:  302 pw_impl_module_destroy()] 0x41e8f065d780: destroy libpipewire-module-client-node
[D][20:27:37.717523] pw.factory   | [  impl-factory.c:   67 pw_impl_factory_destroy()] 0x41e8f06a0300: destroy
[D][20:27:37.717526] pw.global    | [        global.c:  407 pw_global_destroy()] 0x41e8f06b2b00: destroy 3
[D][20:27:37.717528] pw.global    | [        global.c:  200 global_unregister()] 0x41e8f06b2b00: unregistered 3
[D][20:27:37.717532] pw.global    | [        global.c:  415 pw_global_destroy()] 0x41e8f06b2b00: free
[D][20:27:37.717534] pw.factory   | [  impl-factory.c:   79 pw_impl_factory_destroy()] 0x41e8f06a0300: free
[D][20:27:37.717536] pw.global    | [        global.c:  407 pw_global_destroy()] 0x41e8f06b2900: destroy 2
[D][20:27:37.717539] pw.global    | [        global.c:  200 global_unregister()] 0x41e8f06b2900: unregistered 2
[D][20:27:37.717541] pw.global    | [        global.c:  415 pw_global_destroy()] 0x41e8f06b2900: free
[D][20:27:37.717543] pw.module    | [   impl-module.c:  312 pw_impl_module_destroy()] 0x41e8f065d780: free
[D][20:27:37.717575] pw.module    | [   impl-module.c:  302 pw_impl_module_destroy()] 0x41e8f065d180: destroy libpipewire-module-rt
[W][20:27:37.717577] mod.rt       | [     module-rt.c:  330 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[D][20:27:37.717581] pw.thread-loop | [   thread-loop.c:  350 pw_thread_loop_stop()] 0x41e8f066d460 stopping 1
[W][20:27:37.717583] mod.rt       | [     module-rt.c: 1005 do_rtkit_setup()] RTKit does not give us RTTimeUSecMax, using -1
[D][20:27:37.717584] pw.thread-loop | [   thread-loop.c:  352 pw_thread_loop_stop()] 0x41e8f066d460 signal
[D][20:27:37.717587] mod.rt       | [     module-rt.c:  653 set_rlimit()] rt.time.soft:-1 rt.time.hard:-1
[D][20:27:37.717588] pw.thread-loop | [   thread-loop.c:  354 pw_thread_loop_stop()] 0x41e8f066d460 join
[D][20:27:37.717596] pw.thread-loop | [   thread-loop.c:  119 do_stop()] stopping
[D][20:27:37.717600] pw.thread-loop | [   thread-loop.c:  301 do_loop()] 0x41e8f066d460: leave thread
[D][20:27:37.717638] pw.thread-loop | [   thread-loop.c:  356 pw_thread_loop_stop()] 0x41e8f066d460 joined
[D][20:27:37.717642] pw.thread-loop | [   thread-loop.c:  359 pw_thread_loop_stop()] 0x41e8f066d460 stopped
[D][20:27:37.717650] spa.system   | [        system.c:   69 impl_close()] 0x41e8f06b2728: close fd:13
[D][20:27:37.717654] pw.context   | [      pipewire.c:  194 unref_handle()] clear handle 'support.loop'
[D][20:27:37.717657] spa.loop     | [          loop.c: 1186 impl_clear()] 0x41e8f0673c28: clear
[D][20:27:37.717662] spa.system   | [        system.c:   69 impl_close()] 0x41e8f06b2728: close fd:12
[D][20:27:37.717666] spa.system   | [        system.c:   69 impl_close()] 0x41e8f06b2728: close fd:14
[I][20:27:37.717668] spa.loop     | [          loop.c:  212 loop_queue_destroy()] 0x41e8f0673c28 destroyed queue 0x41e8f06c9000 idx:0
[D][20:27:37.717675] spa.system   | [        system.c:   69 impl_close()] 0x41e8f06b2728: close fd:11
[D][20:27:37.717679] pw.context   | [      pipewire.c:  194 unref_handle()] clear handle 'support.system'
[D][20:27:37.717694] pw.global    | [        global.c:  407 pw_global_destroy()] 0x41e8f06b2500: destroy 1
[D][20:27:37.717697] pw.global    | [        global.c:  200 global_unregister()] 0x41e8f06b2500: unregistered 1
[D][20:27:37.717699] pw.global    | [        global.c:  415 pw_global_destroy()] 0x41e8f06b2500: free
[D][20:27:37.717702] pw.module    | [   impl-module.c:  312 pw_impl_module_destroy()] 0x41e8f065d180: free
[D][20:27:37.717715] pw.global    | [        global.c:  407 pw_global_destroy()] 0x41e8f06b2280: destroy 0
[D][20:27:37.717719] pw.core      | [     impl-core.c:  444 pw_impl_core_destroy()] 0x41e8f065d0c0: destroy
[D][20:27:37.717722] pw.core      | [     impl-core.c:  456 pw_impl_core_destroy()] 0x41e8f065d0c0: free
[D][20:27:37.717724] pw.global    | [        global.c:  200 global_unregister()] 0x41e8f06b2280: unregistered 0
[D][20:27:37.717727] pw.global    | [        global.c:  415 pw_global_destroy()] 0x41e8f06b2280: free
[D][20:27:37.717729] pw.context   | [       context.c:  569 pw_context_destroy()] 0x41e8f0679000: free
[D][20:27:37.717732] pw.data-loop | [     data-loop.c:  163 pw_data_loop_destroy()] 0x41e8f062d0a0: destroy
[D][20:27:37.717735] pw.data-loop | [     data-loop.c:  275 pw_data_loop_stop()] 0x41e8f062d0a0 stopping
[D][20:27:37.717737] pw.data-loop | [     data-loop.c:  291 pw_data_loop_stop()] 0x41e8f062d0a0 stopped
[D][20:27:37.717740] pw.context   | [      pipewire.c:  194 unref_handle()] clear handle 'support.loop'
[D][20:27:37.717743] spa.loop     | [          loop.c: 1186 impl_clear()] 0x41e8f0673628: clear
[D][20:27:37.717748] spa.system   | [        system.c:   69 impl_close()] 0x41e8f06b20a8: close fd:8
[D][20:27:37.717752] spa.system   | [        system.c:   69 impl_close()] 0x41e8f06b20a8: close fd:7
[D][20:27:37.717754] pw.context   | [      pipewire.c:  194 unref_handle()] clear handle 'support.system'
[D][20:27:37.717757] pw.mem       | [           mem.c:  197 pw_mempool_destroy()] 0x41e8f0610680: destroy
[D][20:27:37.717760] pw.mem       | [           mem.c:  185 pw_mempool_clear()] 0x41e8f0610680: clear
[D][20:27:37.717762] pw.work-queue | [    work-queue.c:  117 pw_work_queue_destroy()] 0x41e8f0619200: destroy
[D][20:27:37.717768] spa.system   | [        system.c:   69 impl_close()] 0x41e8f062c0a8: close fd:9
[D][20:27:37.717771] pw.context   | [      pipewire.c:  194 unref_handle()] clear handle 'support.dbus'
[D][20:27:37.717773] pw.context   | [      pipewire.c:  155 unref_plugin()] unloaded plugin:'/usr/local/lib/spa-0.2/support/libspa-dbus.so'
[E][20:27:37.717837] default      | [      pipewire.c:  124 main()] failed to create context: No such file or directory
[D][20:27:37.717847] pw.main-loop | [     main-loop.c:   74 pw_main_loop_destroy()] 0x41e8f061a6c0: destroy
[D][20:27:37.717850] pw.context   | [      pipewire.c:  194 unref_handle()] clear handle 'support.loop'
[D][20:27:37.717852] spa.loop     | [          loop.c: 1186 impl_clear()] 0x41e8f0673028: clear
[D][20:27:37.717858] spa.system   | [        system.c:   69 impl_close()] 0x41e8f062c0a8: close fd:6
[D][20:27:37.717862] spa.system   | [        system.c:   69 impl_close()] 0x41e8f062c0a8: close fd:5
[D][20:27:37.717867] spa.system   | [        system.c:   69 impl_close()] 0x41e8f062c0a8: close fd:4
[D][20:27:37.717871] spa.system   | [        system.c:   69 impl_close()] 0x41e8f062c0a8: close fd:3
[D][20:27:37.717873] pw.context   | [      pipewire.c:  194 unref_handle()] clear handle 'support.system'
[D] pw.context [pipewire.c:194 unref_handle()] clear handle 'support.cpu'
[D] pw.context [pipewire.c:194 unref_handle()] clear handle 'support.log'
[D] pw.context [pipewire.c:155 unref_plugin()] unloaded plugin:'/usr/local/lib/spa-0.2/support/libspa-support.so'
 
I'd say, get sound working under some X11-based WM/DE first. If you succeed there, that should automatically translate into the Wayland compositor you install afterwards... like Wayfire.
 
What is the output of cat /dev/sndstat ?

Code:
cat /dev/sndstat                                                  254 ↵ ──(Sun,May18)─┘
Installed devices:
pcm0: <ATI R6xx (HDMI)> (play)
pcm1: <ATI R6xx (HDMI)> (play)
pcm2: <ATI R6xx (HDMI)> (play)
pcm3: <ATI R6xx (HDMI)> (play)
pcm4: <ATI R6xx (HDMI)> (play)
pcm5: <ATI R6xx (HDMI)> (play)
pcm6: <Realtek ALC887 (Rear Analog)> (play/rec) default
pcm7: <Realtek ALC887 (Front Analog)> (play/rec)
pcm8: <Realtek ALC887 (Onboard Digital)> (play)
No devices installed from userspace.

And how do you connect to the audio : headset, speaker, monitor speaker ?

the little green output on motherboard to desktop speakers. it works with other OSes, it's multiboot so I know hardware is good, sound works in x11/plasma.

What software do you use for the sound ? Software? I don't understand, just playing youtube videos or the weather from websites.


mixer ──(Sun,May18)─┘
pcm6:mixer: <Realtek ALC887 (Rear Analog)> on hdaa1 (play/rec) (default)
vol = 0.50:0.50 pbk
pcm = 0.43:0.43 pbk
speaker = 0.74:0.74 rec
line = 0.01:0.01 rec
mic = 0.67:0.67 rec src
mix = 0.74:0.74 rec
rec = 0.35:0.35 pbk
igain = 0.00:0.00 pbk
ogain = 1.00:1.00 pbk

Code:
wireplumber &                                                           ──(Sun,May18)─┘
[1] 29500
┌─(/usr/ports/multimedia/wireplumber)───────────────────────────────────────────────────(rich@r5-2600x-amd:pts/0)─┐
└─(20:51:52 on 2025Q2 ✭)──> Failed to connect to PipeWire                                           ──(Sun,May18)─┘
W 20:51:52.985225             mod.rt ../src/modules/module-rt.c:330:translate_error: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
W 20:51:52.985358             mod.rt ../src/modules/module-rt.c:995:do_rtkit_setup: RTKit does not give us MaxRealtimePriority, using 1
W 20:51:52.985478             mod.rt ../src/modules/module-rt.c:330:translate_error: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
W 20:51:52.985486             mod.rt ../src/modules/module-rt.c:1000:do_rtkit_setup: RTKit does not give us MinNiceLevel, using 0
W 20:51:52.985571             mod.rt ../src/modules/module-rt.c:330:translate_error: RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
W 20:51:52.985577             mod.rt ../src/modules/module-rt.c:1005:do_rtkit_setup: RTKit does not give us RTTimeUSecMax, using -1

[1]  + 29500 exit 69    wireplumber
┌─(/usr/ports/multimedia/wireplumber)───────────────────────────────────────────────────(rich@r5-2600x-amd:pts/0)─┐
└─(20:52:03 on 2025Q2 ✭)──>

I don't get this forum, am I supposed to quote or reply? When I quote it just seems to copy to clipboard, I can just hightlight and copy myself, I don't get it, alwatys confused.
 
I don't get this forum, am I supposed to quote or reply? When I quote it just seems to copy to clipboard, I can just hightlight and copy myself, I don't get it, alwatys confused.
I just use the 'Reply' link, it's easier to use.

As for getting the sound working, I'd recommend following the Handbook's instructions rather than third-party explanations. The Handbook will say, "Follow steps 1, 2, 3". This makes it easier to ask questions.
 
Sound on FreeBSD doesn't work depending on the display server (wayland, x11). Sound is provided by the "FreeBSD PCM audio device infrastructure" (see sound(4)).

Probably your systems sound device has a wrong codec pin configuration (see snd_hda(4) for details).

Lets check, execute dmesg | grep pcm, look which is the ALC887 HDA CODEC, then dump the pin configuration of it.

Example
Rich (BB code):
% dmesg | grep hda
hdac0: <ATI (0x1637) HDA Controller> mem 0xfd3c8000-0xfd3cbfff at device 0.1 on pci4
hdac1: <AMD Raven HDA Controller> mem 0xfd3c0000-0xfd3c7fff at device 0.6 on pci4
hdacc0: <ATI R6xx HDA CODEC> at cad 0 on hdac0
hdaa0: <ATI R6xx Audio Function Group> at nid 1 on hdacc0
pcm0: <ATI R6xx (HDMI)> at nid 3 on hdaa0
pcm1: <ATI R6xx (HDMI)> at nid 5 on hdaa0
pcm2: <ATI R6xx (HDMI)> at nid 7 on hdaa0
hdacc1: <Realtek ALC257 HDA CODEC> at cad 0 on hdac1
hdaa1: <Realtek ALC257 Audio Function Group> at nid 1 on hdacc1
pcm3: <Realtek ALC257 (Analog 2.0+HP/2.0)> at nid 20,33 and 18 on hdaa1
pcm4: <Realtek ALC257 (Right Analog Mic)> at nid 25 on hdaa1

Here the highlighted HDA CODEC on hdac1 needs to be pindump'ed

(as root)
# sysctl dev.hdac.1.pindump=1
dev.hdac.1.pindump: 0 -> 0

% dmesg
[cut]
hdaa1: Dumping AFG pins:
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1: 18 90a60120 2  0  Mic           Fixed Digital Internal   Unknown 1
hdaa1:     Caps: IN
hdaa1: 19 40000000 0  0  Line-out      None  Unknown 0x00       Unknown 0 DISA
hdaa1:     Caps: IN
hdaa1: 20 90170110 1  0  Speaker       Fixed Analog  Internal   Unknown 1
hdaa1:     Caps:    OUT    EAPD      Sense: 0x00000000 (disconnected)
hdaa1: 24 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa1:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
hdaa1: 25 04a11030 3  0  Mic           Jack  1/8     Right      Black   0
hdaa1:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
hdaa1: 26 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa1:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
hdaa1: 27 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa1:     Caps: IN OUT    EAPD VREF Sense: 0x00000000 (disconnected)
hdaa1: 30 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa1:     Caps:    OUT              Sense: 0x00000000 (disconnected)
hdaa1: 33 0421101f 1  15 Headphones    Jack  1/8     Right      Black   0
hdaa1:     Caps:    OUT HP EAPD      Sense: 0x00000000 (disconnected)
hdaa1: NumGPIO=3 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdaa1:  GPIO0: disabled
hdaa1:  GPIO1: disabled
hdaa1:  GPIO2: disabled
 
Now that's surprising to me, I never had this bite me. Having said that, it really looks like Pipewire needs to be tamed and working reliably under FreeBSD, AFAICT.
I stand by my earlier comment:
You don't need either pipewire or pulseaudio to have sound working in FreeBSD under Wayland . I don't have them installed and sound works just fine for me with both mpv and Librewolf.
I don't even have sndiod installed on my system, it just works out of the box without me doing anything. And BTW, my system is pure Wayland, not even Xwayland is enabled.
 
Back
Top
OSZAR »