Devices assigned to wrong user with Multiseat
Summary
Pulseaudio doesn't respect multiseat configuration. I have assigned a USB soundcard for the second user with loginctl but the second user steals first user's sound devices while switching between built-in soundcard and bluetooth headset.
There are two users. 1st: salih, 2nd: cansu. First user uses soundcard on motherboard, second user uses USB soundcard. I have disabled bluetooth features for the second user to prevent second user from stealing bluetooth devices belong to the first user.
environment
Ubuntu 20.04 pa-info.txt is attached.
Steps to reproduce
While using multiseat with two users connect a bluetooth headset. Bluetooth headset may be assigned to the second user somehow. Sometimes restarting pulseaudio for the first user triggers this. Disconnect bluetooth headset, and sometimes default speaker for the first user will be assigned to the second user. Normally output of "sudo fuser -v /dev/snd/*" should be like this:
USER PID ACCESS COMMAND
/dev/snd/controlC0: salih 889359 F.... pulseaudio
/dev/snd/controlC1: cansu 889913 F.... pulseaudio
/dev/snd/controlC2: cansu 889913 F.... pulseaudio
/dev/snd/pcmC0D0c: salih 889359 F...m pulseaudio
/dev/snd/pcmC0D0p: salih 889359 F...m pulseaudio
/dev/snd/pcmC1D0c: cansu 889913 F...m pulseaudio
/dev/snd/pcmC1D0p: cansu 889913 F...m pulseaudio
/dev/snd/pcmC2D0c: cansu 889913 F...m pulseaudio
/dev/snd/timer: salih 889359 f.... pulseaudio
cansu 889913 f.... pulseaudio
But when all devices are assigned to the second user, output of this command shows "cansu" (second user) as USER for all sound devices. The first user sees "Dummy Output" in sound settings.
What is the current bug behavior?
Sometimes second user owns all sound devices. Especially bluetooth devices.
What is the expected correct behavior?
Second user has his/her own sound card. Second user shouldn't own first user's sound devices. Also, second user doesn't have any bluetooth devices, so when a bluetooth device is connected second user shouldn't own the bluetooth headset.