USB passthrough to VM dropping bytes

j1a2o

Member
Feb 14, 2021
34
4
13
39
I'm using rtl-sdr with a RTL USB dongle and testing with rtl_test program. On the host, it looks pretty stable with pretty much no bytes dropped. When the USB device is passed through to an Ubuntu VM, running the same rtl_test program results in lots of dropped bytes. Is this a known issue with USB passthrough? Is there a way to make it more stable / have better perofrmance?

Code:
Found 1 device(s):
  0:  Generic, RTL2832U, SN: 77771111153705700

Using device 0: Generic RTL2832U
Found Rafael Micro R820T tuner
Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6
[R82XX] PLL not locked!
Sampling at 2048000 S/s.

Info: This tool will continuously read from the device, and report if
samples get lost. If you observe no further output, everything is fine.

Reading samples in async mode...
Allocating 15 zero-copy buffers
lost at least 48 bytes
lost at least 172 bytes
lost at least 36 bytes
lost at least 52 bytes
lost at least 56 bytes
 
Last edited:
I know this is an old post but wanted to reply for anyone who stumbles across this...

I was able to solve this by disabling USB Auto Suspend on just the client.

Bash:
cat /sys/module/usbcore/parameters/autosuspend
(if the result is 2, then autosuspend is enabled)

sudo nano /etc/default/grub

Change
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1"

sudo update-grub

reboot system

After reboot
cat /sys/module/usbcore/parameters/autosuspend
(result should be -1)

https://www.reddit.com/r/RTLSDR/comments/17zn03g/rtl_sdr_keeps_dropping_samples_on_ubuntu_no/