(Solved) Pulseaudio passthrough problem with auto start vm

Hi everyone. I have just finished my first setup with qemu kvm looking glass every thing is work except for pulseaudio passthrough.

Followed a by mathiashueber guide with option 2 and it worked / works when selecting audio device in sound settings

However when using the default device there is no audio from the vm but still from the Ubuntu host

I feel this is a permission problem, or am I missing something obvious?

So problem is: sound only works via passthrough if I switch sound output after login.

So this seems to be a permissions problem i have encountered. i use virt-manager and had setup the vm to start with host startup. and it was actually not reselecting the audio device that caused the fix. it was restarting the vm. meaning that getting virt-manager to auto start the vm probally results in it being run as root giving problems with permissions.

the fix is to use ubuntu’s startup and add virsh -c qemu:///system start “vm” making it runwith as user