notes on running Zoom in a VM 

There's no way I'm letting that stuff on my main OS installs, so I am running it in virtualized Debian Buster in QEMU. Bit tricky getting everything sorted, what with needing passthrough for host OpenGL, USB soundcard, USB webcam, and JACK running in the VM with PulseAudio bridge. I have custom software processing the webcam and sound from the USB soundcard (via JACK), and screensharing the window and system sound (not USB webcam mic, hopefully!) seems to work now.

notes on running Zoom in a VM 

Startup script:

```
#!/bin/bash
QEMU_AUDIO_DRV=pa \
QEMU_PA_SAMPLES=8192 \
QEMU_AUDIO_TIMER_PERIOD=99 \
QEMU_PA_SERVER=/run/user/1000/pulse/native \
qemu-system-x86_64 \
-soundhw hda -device qemu-xhci \
-m 8G -hda zoom.img -cpu host -accel kvm -smp 8 \
-vga virtio -display gtk,gl=on -show-cursor -usb -device usb-tablet \
-usb -device usb-host,vendorid=0x041e,productid=0x4095 \
-usb -device usb-host,vendorid=0x0582,productid=0x0074
```

I don't think that PA stuff is really needed any more now that I added usb-host passthrough for my external soundcard.

Don't forget to `chown` the relevant `/dev/bus/usb/foo/bar` device nodes to the user running QEMU, otherwise the passthrough won't work. Use `lsusb` to see bus address and ids. This resets on host reboot, and USB devices can change bus address too (maybe some udev magic could fix it but I don't need to run Zoom often).

Show thread

notes on running Zoom in a VM 

in the VM, configure JACK to use the USB Audio soundcard. Start jackd.

Set up pulseaudio jack bridge:

/etc/pulse/default.pa:
```
load-module module-jack-source
load-module module-jack-sink
set-default-source jack_in
set-default-sink jack_out
```

restart pulse:

```
pulseaudio - -kill
pulseaudio --start
```

if it doesn't work (no `PulseAudio` in qjackctl patch bay in addition to `system`) try

```
pactl load-module module-jack-source
pactl load-module module-jack-sink
```

Show thread

notes on running Zoom in a VM 

Start the custom visuals program so it can connect to JACK (signal from usb soundcard) and claim the USB webcam (`/dev/video0` or whatever in the VM) before starting Zoom.

Start Pd with the `-sleepgrain 0.1` option so MIDI timing isn't so terrible, configure it to use ALSA MIDI and connect it the USB soundcard in qjackctl connections window (ALSA tab, not MIDI tab). Load the synth control patch and enter some values to start triggering notes.

Adjust the volume of the soundcard input and monitor passthrough level for best fit to the environs. The visuals software should be reacting to the sound and levels should be showing in the Pulse Audio volume control applet.

Show thread

notes on running Zoom in a VM 

Finally start Zoom, and set the settings to share screen with full manual options always. Sound to "same as system", "low" microphone background noise processing ("optimize for music"), don't adjust levels automatically.

Check that Zoom can make noise to the speakers, and hope for the best w.r.t. sharing computer sound when screen sharing (I haven't found a level meter for that...)

Maybe that needs fiddling in Pulse Audio volume controls to get the right sound from the soundcard (disable USB webcam mic) into Zoom (pulse audio jack source seems to do the trick with system X pulseaudio in qjackctl audio connections).

Show thread
Follow

notes on running Zoom in a VM 

finally start or join a meeting, and hope screensharing the visuals window and computer audio does the Right Thing and works at acceptable quality.... fingers crossed... then enjoy the performance!

· · Web · 0 · 0 · 1
Sign in to participate in the conversation
post.lurk.org

Welcome to post.lurk.org, an instance for discussions around cultural freedom, experimental, new media art, net and computational culture, and things like that.