I use the qemu hook to start looking-glass, but there seems to be no sound

#!/bin/bash
export DISPLAY=:0

guest_name="$1"
libvirt_task="$2"

if [ "$libvirt_task" = "started" ] && [ "$guest_name" = "win10" ]; then
    systemctl stop [email protected]
    systemctl set-property --runtime -- system.slice AllowedCPUs=0,1,2,3,4,5,12,13,14,15,16,17
    systemctl set-property --runtime -- user.slice AllowedCPUs=0,1,2,3,4,5,12,13,14,15,16,17
    systemctl set-property --runtime -- init.scope AllowedCPUs=0,1,2,3,4,5,12,13,14,15,16,17
#    DISPLAY=:0 screen -dmS lg sudo -H -u test looking-glass-client win:size=1920x1080 -S -f /dev/kvmfr0
    sudo -H -u test -g test screen -L -t lg -dmS lg looking-glass-client win:size=1920x1080 spice:audio=yes -S -f /dev/kvmfr0
elif [ "$libvirt_task" = "release" ] && [ "$guest_name" = "win10" ]; then
    systemctl start [email protected]
    systemctl set-property --runtime -- system.slice AllowedCPUs=0-23
    systemctl set-property --runtime -- user.slice AllowedCPUs=0-23
    systemctl set-property --runtime -- init.scope AllowedCPUs=0-23
    sudo -H -u test screen -X -S lg quit
fi

When I start looking-glass manually, it doesn’t seem to have this glitch.
Is it a user or group fault?

This is a very niche case. Most users don’t bother doing this, so you’re probably going to be mostly on your own. Having said that,

  1. What audio server are you using (pipewire or pulse)?
  2. Who is “test”?
  3. Please post the client log while running it through the hook.

A:
1.pipewire.
2.The test user is me.
3.File path for looking glass’s logs?

The client log is the actual terminal output of the looking-glass-client program.