wireplumber reliably ends up using 100% CPU some time after boot
I'm using Arch Linux and current kernel (6.8.7-arch1-1), wireplumber (0.5.2) and pipewire (1.0.5). This started happening IIRC the release before 0.5, but as such issues tend to have a habit of being resolved by the time I delve into it I was slack in investigating what's going on and reporting.
In case it's relevant, my audio hardware is Intel Jasper Lake HD Audio, using the snd_hda_intel kernel module of course.
Audio works fine for a while after boot, but after some time wireplumber ends up using 100% even with nothing playing and audio typically ceases to work at that point. This is not addresses by systemctl --user restart wireplumber
.
Stealing some suggested investigatory commands from pipewire#3439 (closed):
$ timeout 10 perf record --debuginfod="https://debuginfod.archlinux.org" -p $(pidof wireplumber)
$ perf report | cat
# To display the perf.data header info, please use --header/--header-only options.
#
#
# Total Lost Samples: 0
#
# Samples: 37K of event 'cycles:Pu'
# Event count (approx.): 25365762436
#
# Overhead Command Shared Object Symbol
# ........ ........... .............................................. ................................................
#
52.99% wireplumber libgobject-2.0.so.0.8000.0 [.] handler_lookup.part.0
32.20% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_event_get_priority
11.97% wireplumber libwireplumber-0.5.so.0.502.0 [.] event_cmp_func
1.01% wireplumber libglib-2.0.so.0.8000.0 [.] g_list_insert_sorted_real
0.21% wireplumber liblua.so.5.4.6 [.] propagatemark
0.18% wireplumber libc.so.6 [.] __strcmp_sse2_unaligned
0.08% wireplumber liblua.so.5.4.6 [.] sweepstep
0.07% wireplumber libgobject-2.0.so.0.8000.0 [.] g_type_check_instance_is_fundamentally_a
0.06% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_interest_event_hook_runs_for_event
0.04% wireplumber libc.so.6 [.] malloc
0.04% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_object_interest_matches_full
0.04% wireplumber libglib-2.0.so.0.8000.0 [.] g_variant_get_type
0.04% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_properties_get
0.04% wireplumber libspa-alsa.so [.] spa_pod_builder_add.lto_priv.7.lto_priv.0
0.04% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_object_interest_validate
0.02% wireplumber liblua.so.5.4.6 [.] reallymarkobject
0.02% wireplumber libgobject-2.0.so.0.8000.0 [.] g_type_value_table_peek
0.02% wireplumber libglib-2.0.so.0.8000.0 [.] g_hash_table_lookup
0.02% wireplumber libc.so.6 [.] __strlen_sse2
0.02% wireplumber liblua.so.5.4.6 [.] singlestep.lto_priv.0
0.02% wireplumber libc.so.6 [.] __memmove_sse2_unaligned_erms
0.02% wireplumber libglib-2.0.so.0.8000.0 [.] g_bit_lock
0.02% wireplumber libpipewire-module-client-device.so [.] spa_pod_builder_add
0.02% wireplumber libc.so.6 [.] __printf_buffer
0.02% wireplumber libwireplumber-0.5.so.0.502.0 [.] spa_debug_type_find
0.02% wireplumber libspa-alsa.so [.] report_jack_state
0.02% wireplumber libc.so.6 [.] _int_free
0.02% wireplumber libc.so.6 [.] cfree@GLIBC_2.2.5
0.02% wireplumber libc.so.6 [.] pthread_rwlock_rdlock@GLIBC_2.2.5
0.02% wireplumber libc.so.6 [.] _int_malloc
0.02% wireplumber libglib-2.0.so.0.8000.0 [.] g_slice_free1
0.01% wireplumber libspa-alsa.so [.] build_profile
0.01% wireplumber libgobject-2.0.so.0.8000.0 [.] g_object_unref
0.01% wireplumber libpipewire-0.3.so.0.1005.0 [.] do_replace
0.01% wireplumber libgobject-2.0.so.0.8000.0 [.] object_ref
0.01% wireplumber libglib-2.0.so.0.8000.0 [.] g_list_last
0.01% wireplumber libgio-2.0.so.0.8000.0 [.] g_task_finalize
0.01% wireplumber libpipewire-module-client-device.so [.] device_marshal_result
0.01% wireplumber libc.so.6 [.] pthread_rwlock_unlock@@GLIBC_2.34
0.01% wireplumber libpipewire-module-protocol-native.so [.] process_remote
0.01% wireplumber libglib-2.0.so.0.8000.0 [.] g_hash_table_insert_node.lto_priv.0
0.01% wireplumber libc.so.6 [.] malloc_consolidate
0.01% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_event_collect_hooks
0.01% wireplumber liblua.so.5.4.6 [.] luaH_newkey
0.01% wireplumber libglib-2.0.so.0.8000.0 [.] g_malloc0
0.01% wireplumber liblua.so.5.4.6 [.] internshrstr.lto_priv.0
0.01% wireplumber libglib-2.0.so.0.8000.0 [.] g_pointer_bit_lock_and_get
0.01% wireplumber libgobject-2.0.so.0.8000.0 [.] destroy_closure_array
0.01% wireplumber libpipewire-module-protocol-native.so [.] spa_pod_parser_get.lto_priv.0.lto_priv.0
0.01% wireplumber [vdso] [.] __vdso_clock_gettime
0.01% wireplumber libpipewire-module-protocol-native.so [.] core_event_demarshal_done
0.01% wireplumber libgobject-2.0.so.0.8000.0 [.] g_type_interface_peek
0.01% wireplumber libwireplumber-module-standard-event-source.so [.] wp_standard_event_source_create_event
0.01% wireplumber liblua.so.5.4.6 [.] luaH_resize
0.01% wireplumber libgobject-2.0.so.0.8000.0 [.] g_object_get_valist
0.01% wireplumber libwireplumber-module-standard-event-source.so [.] wp_standard_event_source_push_event
0.01% wireplumber libglib-2.0.so.0.8000.0 [.] g_ref_count_dec
0.01% wireplumber libpipewire-0.3.so.0.1005.0 [.] pw_core_find_proxy
0.01% wireplumber libgobject-2.0.so.0.8000.0 [.] g_type_free_instance
0.01% wireplumber libglib-2.0.so.0.8000.0 [.] g_bit_unlock
0.01% wireplumber libpipewire-module-protocol-native.so [.] spa_pod_builder_add.lto_priv.0.lto_priv.0
0.01% wireplumber libpipewire-module-protocol-native.so [.] device_demarshal_info.lto_priv.0
0.01% wireplumber libwireplumber-0.5.so.0.502.0 [.] WP_IS_EVENT_DISPATCHER.lto_priv.0
0.01% wireplumber libgobject-2.0.so.0.8000.0 [.] signal_emit_unlocked_R.isra.0
0.01% wireplumber libglib-2.0.so.0.8000.0 [.] g_data_set_internal
0.01% wireplumber libc.so.6 [.] __memset_sse2_unaligned_erms
0.01% wireplumber libglib-2.0.so.0.8000.0 [.] g_pattern_spec_match
0.01% wireplumber libglib-2.0.so.0.8000.0 [.] g_variant_type_is_subtype_of
0.01% wireplumber liblua.so.5.4.6 [.] luaH_realasize
0.01% wireplumber libgobject-2.0.so.0.8000.0 [.] g_closure_unref
0.01% wireplumber libspa-alsa.so [.] build_route
0.01% wireplumber libglib-2.0.so.0.8000.0 [.] g_main_context_check_unlocked.lto_priv.0
0.01% wireplumber libglib-2.0.so.0.8000.0 [.] g_atomic_ref_count_inc
0.01% wireplumber libgobject-2.0.so.0.8000.0 [.] param_spec_pool_hash
0.01% wireplumber libglib-2.0.so.0.8000.0 [.] g_source_iter_next
0.01% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_event_dispatcher_push_event
0.01% wireplumber libgio-2.0.so.0.8000.0 [.] g_task_return
0.01% wireplumber libglib-2.0.so.0.8000.0 [.] g_free
0.01% wireplumber libgobject-2.0.so.0.8000.0 [.] type_node_check_conformities_UorL.lto_priv.0
0.01% wireplumber libpipewire-0.3.so.0.1005.0 [.] pw_properties_free
0.01% wireplumber libgobject-2.0.so.0.8000.0 [.] g_type_check_value_holds
0.01% wireplumber libc.so.6 [.] _int_free_merge_chunk
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_spa_pod_new.lto_priv.0
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_value_type_compatible
0.00% wireplumber libpipewire-module-protocol-native.so [.] pw_protocol_native_connection_get_next
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_value_unset
0.00% wireplumber libgio-2.0.so.0.8000.0 [.] g_task_set_task_data
0.00% wireplumber libpipewire-0.3.so.0.1005.0 [.] pw_properties_get
0.00% wireplumber libpipewire-module-client-device.so [.] device_demarshal_enum_params
0.00% wireplumber libpipewire-0.3.so.0.1005.0 [.] pw_loop_check
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_hash_table_steal_extended
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] invalid_closure_notify
0.00% wireplumber libgio-2.0.so.0.8000.0 [.] g_task_return_now
0.00% wireplumber libpipewire-module-client-device.so [.] spa_pod_parser_get
0.00% wireplumber libspa-alsa.so [.] spa_pod_builder_primitive.isra.0
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_iterator_new
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_variant_get_child_value
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_session_item_get_type
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_ptr_array_maybe_expand
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_loop_source_dispatch
0.00% wireplumber libpipewire-module-protocol-native.so [.] on_client_need_flush
0.00% wireplumber libspa-alsa.so [.] profile_set_available
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_param_spec_pool_lookup
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_ptr_array_ref
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_iterator_next
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_global_proxy_get_global_properties
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_event_source_dispatch
0.00% wireplumber libc.so.6 [.] clock_gettime@@GLIBC_2.17
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_type_class_unref
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_hash_table_remove
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] ptr_array_iterator_next
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_cclosure_marshal_VOID__POINTER.part.0
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_pattern_spec_new
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_spa_id_value_short_name
0.00% wireplumber libspa-alsa.so [.] impl_enum_params.lto_priv.0
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_properties_item_unref
0.00% wireplumber libc.so.6 [.] __strchrnul_sse2
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_event_hook_runs_for_event
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_realloc_n
0.00% wireplumber libwireplumber-module-lua-scripting.so [.] _wplua_isgvalue_userdata
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_type_check_is_value_type
0.00% wireplumber libgio-2.0.so.0.8000.0 [.] g_cancellable_is_cancelled
0.00% wireplumber libspa-support.so [.] loop_iterate
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_port_get_type
0.00% wireplumber libpipewire-0.3.so.0.1005.0 [.] pw_properties_new
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_pointer_bit_unlock_and_set
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_value_get_boxed
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_event_hook_get_runs_before_hooks
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_async_event_hook_transition_get_next_step
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_hash_table_replace
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_private_get
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_properties_peek_dict
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_ptr_array_new_with_free_func
0.00% wireplumber libgio-2.0.so.0.8000.0 [.] g_cancellable_get_type
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_type_check_instance
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_signal_connect_object
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_object_ref
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_object_init.lto_priv.0
0.00% wireplumber libc.so.6 [.] __libc_recvmsg
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_object_class_find_property
0.00% wireplumber liblua.so.5.4.6 [.] luaH_getint
0.00% wireplumber liblua.so.5.4.6 [.] luaV_objlen
0.00% wireplumber libc.so.6 [.] realloc
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] value_free_string
0.00% wireplumber libwireplumber-module-lua-scripting.so [.] event_get_source.lto_priv.0
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_object_new
0.00% wireplumber libpipewire-module-protocol-native.so [.] device_marshal_set_param.lto_priv.0
0.00% wireplumber libspa-support.so [.] loop_check
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_type_class_ref
0.00% wireplumber libpipewire-0.3.so.0.1005.0 [.] pw_reallocarray
0.00% wireplumber liblua.so.5.4.6 [.] luaL_getmetafield
0.00% wireplumber liblua.so.5.4.6 [.] luaS_new
0.00% wireplumber liblua.so.5.4.6 [.] luaV_execute
0.00% wireplumber libwireplumber-module-lua-scripting.so [.] wplua_lua_to_gvalue
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_iterator_get_user_data
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_rc_box_release_full
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] signal_emit_valist_unlocked
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_pw_object_mixin_handle_event_info
0.00% wireplumber libspa-support.so [.] source_io_func
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_spa_pod_iterator_next
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_main_context_query_unlocked.lto_priv.0
0.00% wireplumber liblua.so.5.4.6 [.] luaD_precall
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_core_get_type
0.00% wireplumber liblua.so.5.4.6 [.] luaD_pcall.constprop.0
0.00% wireplumber libgio-2.0.so.0.8000.0 [.] g_task_get_source_tag
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_list_delete_link
0.00% wireplumber libpipewire-module-protocol-native.so [.] pw_protocol_native_connection_end.isra.0
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_type_is_a
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_variant_get_string
0.00% wireplumber libpipewire-module-protocol-native.so [.] device_demarshal_param.lto_priv.0
0.00% wireplumber libspa-support.so [.] impl_eventfd_write
0.00% wireplumber libc.so.6 [.] __vasprintf_chk
0.00% wireplumber libc.so.6 [.] __printf_buffer_write
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] value_init_string
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_type_class_peek
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_value_init
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] enum_params_done
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_main_context_release
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] datalist_append
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_value_get_object
0.00% wireplumber libc.so.6 [.] __GI___ioctl
0.00% wireplumber libc.so.6 [.] __GI___pthread_enable_asynccancel
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_hash_table_insert
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_main_loop_run
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_signal_connect_closure
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_source_ref
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_value_set_object
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_malloc
0.00% wireplumber libpipewire-module-protocol-native.so [.] spa_pod_builder_raw.lto_priv.0.lto_priv.0
0.00% wireplumber libc.so.6 [.] __GI___libc_open
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_datalist_id_set_data_full
0.00% wireplumber [unknown] [k] 0xffffffff9080194c
0.00% wireplumber libwireplumber-module-lua-scripting.so [.] push_luapod
0.00% wireplumber liblua.so.5.4.6 [.] luaC_checkfinalizer
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_pw_object_mixin_get_data
0.00% wireplumber libgobject-2.0.so.0.8000.0 [.] g_value_get_string
0.00% wireplumber libspa-support.so [.] loop_update_io
0.00% wireplumber libc.so.6 [.] __libc_sendmsg
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_clear_error
0.00% wireplumber libwireplumber-0.5.so.0.502.0 [.] wp_transition_get_type
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_main_current_source
0.00% wireplumber libpipewire-module-client-device.so [.] device_marshal_info
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_main_context_pop_thread_default
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_variant_type_get_string_length
0.00% wireplumber libc.so.6 [.] __GI___pthread_self
0.00% wireplumber libc.so.6 [.] __libc_calloc
0.00% wireplumber libglib-2.0.so.0.8000.0 [.] g_ptr_array_add
0.00% wireplumber libc.so.6 [.] __close
0.00% wireplumber libc.so.6 [.] __poll
0.00% wireplumber libc.so.6 [.] fsync
0.00% wireplumber [unknown] [k] 0xffffffff908001d1
#
# (Tip: To show context switches in perf report sample context add --switch-events to perf record.)
#
See attached for output from $ sudo timeout 5 strace -f -tt -T -p $(pidof wireplumber) -o strace_output.txt
strace_output.txt
And for $ timeout 10 perf record --debuginfod="https://debuginfod.archlinux.org" -p $(pidof wireplumber) --call-graph dwarf; perf report > perf_callgraph.txt
perf_callgraph.txt
Please let me know if there's any other info I can provide.
I don't believe I have any custom wireplumber config. e.g. $HOME/.config/wireplumber
does not exist.