Right way to reload *complete* sound system ?
Hello,
my Artix linux is broken after an update, again.
This time: sound system crashes when switching output to bluetooth headphones.
No more sound hardware visible after crash.
What I tried:
#!/bin/bash
#
sudo /etc/init.d/alsasound stop
killall -q pipewire-media-session
killall -q pipewire-pulse
killall -q pipewire
lsmod | sed -n -e 's/^\(snd[-_][^[:space:]]*\)[[:space:]].*/\1/p' | sed -e 's/_/-/g' >/tmp/alsa_modules-removed
for SNDMOD in $(cat /tmp/alsa_modules-removed);do sudo modprobe -v -r "$SNDMOD" ; done
for SNDMOD in $(cat /tmp/alsa_modules-removed);do sudo modprobe -v -r "$SNDMOD" ; done
for SNDMOD in $(cat /tmp/alsa_modules-removed);do sudo modprobe -v -r "$SNDMOD" ; done
sudo modprobe -v snd_hda_codec_realtek
for SNDMOD in $(cat /tmp/alsa_modules-removed);do sudo modprobe -v "$SNDMOD" ; done
rm /tmp/alsa_modules-removed
sudo /etc/init.d/alsasound start
nohup /usr/bin/pipewire >/dev/null 2>&1 &
nohup /usr/bin/pipewire-pulse >/dev/null 2>&1 &
nohup /usr/bin/pipewire-media-session >/dev/null 2>&1 &
But that seems not enough. The sound system get not resurrected.
What is the *right* way to restart my complete sound system ?