Mailing List Archive

USB random disconnections in VB Win10 VM
Does anyone have experience with what causes random USB disconnects in a
Virtualbox VM and possibly how to fix them?

I have a new external DSP processor box that connects to Windows host
software over USB. If I dual boot my Linux box into Win10 the control
software works fine for as long as I want to use it. Communication is
bi-directional and everything is great.

If instead I'm in Linux with a Win10 VM running I can run the same software
in the VM, and it will always see the external DSP when first started, but
at random times, generally 5-20 seconds but never more than 5 minutes, the
software will tell me the USB connection has been interrupted and I am
forced in the software to reestablish a connection. I am always able to
reconnect but I am so far unable to keep it connected.

I've tried the VB USB 1.1, 2.0 and 3.0 virtual interfaces. Only 3.0 works
at all.

I have tried multiple USB ports on the host machine. All work in native
Windows. All work in Virtualbox but all disconnect.

I see absolutely no messages of any type about USB disconnection in dmesg.
I don't know where else to look.

The Virtualbox logs aren't clear to me so I'm studying those at this time,
as well as asking in the VIrtualbox forums and here.

Thanks in advance,
Mark
Re: USB random disconnections in VB Win10 VM [ In reply to ]
On Thursday, 14 July 2022 18:42:10 BST Mark Knecht wrote:
> Does anyone have experience with what causes random USB disconnects in a
> Virtualbox VM and possibly how to fix them?
>
> I have a new external DSP processor box that connects to Windows host
> software over USB. If I dual boot my Linux box into Win10 the control
> software works fine for as long as I want to use it. Communication is
> bi-directional and everything is great.
>
> If instead I'm in Linux with a Win10 VM running I can run the same software
> in the VM, and it will always see the external DSP when first started, but
> at random times, generally 5-20 seconds but never more than 5 minutes, the
> software will tell me the USB connection has been interrupted and I am
> forced in the software to reestablish a connection. I am always able to
> reconnect but I am so far unable to keep it connected.
>
> I've tried the VB USB 1.1, 2.0 and 3.0 virtual interfaces. Only 3.0 works
> at all.
>
> I have tried multiple USB ports on the host machine. All work in native
> Windows. All work in Virtualbox but all disconnect.
>
> I see absolutely no messages of any type about USB disconnection in dmesg.
> I don't know where else to look.
>
> The Virtualbox logs aren't clear to me so I'm studying those at this time,
> as well as asking in the VIrtualbox forums and here.
>
> Thanks in advance,
> Mark

I don't recall having noticed a similar problem with different USB devices on a
Win10 VM here, but just in case have you checked USB power saving settings?

https://www.windowscentral.com/how-prevent-windows-10-turning-usb-devices
Re: USB random disconnections in VB Win10 VM [ In reply to ]
On Thu, Jul 14, 2022 at 10:58 AM Michael <confabulate@kintzios.com> wrote:
>
> On Thursday, 14 July 2022 18:42:10 BST Mark Knecht wrote:
> > Does anyone have experience with what causes random USB disconnects in a
> > Virtualbox VM and possibly how to fix them?

<SNIP>

>
> I don't recall having noticed a similar problem with different USB
devices on a
> Win10 VM here, but just in case have you checked USB power saving
settings?
>
> https://www.windowscentral.com/how-prevent-windows-10-turning-usb-devices

Michael,
I had all basic power management completely disabled in the VM.

I did not know about the USB Selective Suspend feature. After a reboot I
thought it might have helped but about 4 minutes after starting the app it
once again says connection interrupted.

Still looking,
Mark
Re: USB random disconnections in VB Win10 VM [ In reply to ]
On 14/07/2022 18:42, Mark Knecht wrote:
> If instead I'm in Linux with a Win10 VM running I can run the same
> software in the VM, and it will always see the external DSP when first
> started, but at random times, generally 5-20 seconds but never more than
> 5 minutes, the software will tell me the USB connection has been
> interrupted and I am forced in the software to reestablish a connection.
> I am always able to reconnect but I am so far unable to keep it connected.

Is there a setting in VB to say "take over the USB port"? ISTR something
of the sort, which would basically let Win10 take over the port and
drive it, with linux out of the picture.

Don't trust me on this, I don't play with USB and it's ages since I
stumbled across this, but it's worth taking a look.

Cheers,
Wol
Re: USB random disconnections in VB Win10 VM [ In reply to ]
On Thu, Jul 14, 2022, 4:25 PM Wol <antlists@youngman.org.uk> wrote:
>
> On 14/07/2022 18:42, Mark Knecht wrote:
> > If instead I'm in Linux with a Win10 VM running I can run the same
> > software in the VM, and it will always see the external DSP when first
> > started, but at random times, generally 5-20 seconds but never more than
> > 5 minutes, the software will tell me the USB connection has been
> > interrupted and I am forced in the software to reestablish a connection.
> > I am always able to reconnect but I am so far unable to keep it
connected.
>
> Is there a setting in VB to say "take over the USB port"? ISTR something
> of the sort, which would basically let Win10 take over the port and
> drive it, with linux out of the picture.
>
> Don't trust me on this, I don't play with USB and it's ages since I
> stumbled across this, but it's worth taking a look.
>
> Cheers,
> Wol


Good questions. I'm not sure with USB. As I understand it there
are options in Virtualbox to pass through complete pieces of hardware.
I've read that people do this with complete graphics cards. In theory
possibly it could be done with USB but my guess is it might be
difficult as most USB controllers are part of the chipset. Still, it's worth
some study.

As this DSP processor is identified as an audio device I wondered
today if possibly pulseaudio might be trying to grab it. I intend to
look into configuring PA not to touch it.

There's also (possibly) blacklisting certain USB device IDs. In the
VM I configured it to understand the device ID and hook to it.
Possibly I can tell the Linux USB stack to ignore this device so that
PA or some other part of the system just stays away.

But being that the DSP device is an guitar amplifier modeler
and my new Tele came back from my guitar tech at lunchtime
I spent the afternoon playing the guitar! Nonproductive but fun!

Thanks for the ideas,
Mark
Re: USB random disconnections in VB Win10 VM [ In reply to ]
On Thu, Jul 14, 2022 at 4:53 PM Mark Knecht <markknecht@gmail.com> wrote:
>
>
>
>
> On Thu, Jul 14, 2022, 4:25 PM Wol <antlists@youngman.org.uk> wrote:
> >
> > On 14/07/2022 18:42, Mark Knecht wrote:
> > > If instead I'm in Linux with a Win10 VM running I can run the same
> > > software in the VM, and it will always see the external DSP when first
> > > started, but at random times, generally 5-20 seconds but never more
than
> > > 5 minutes, the software will tell me the USB connection has been
> > > interrupted and I am forced in the software to reestablish a
connection.
> > > I am always able to reconnect but I am so far unable to keep it
connected.
> >
> > Is there a setting in VB to say "take over the USB port"? ISTR something
> > of the sort, which would basically let Win10 take over the port and
> > drive it, with linux out of the picture.
> >
> > Don't trust me on this, I don't play with USB and it's ages since I
> > stumbled across this, but it's worth taking a look.
> >
> > Cheers,
> > Wol
>
>
> Good questions. I'm not sure with USB. As I understand it there
> are options in Virtualbox to pass through complete pieces of hardware.
> I've read that people do this with complete graphics cards. In theory
> possibly it could be done with USB but my guess is it might be
> difficult as most USB controllers are part of the chipset. Still, it's
worth
> some study.
>
> As this DSP processor is identified as an audio device I wondered
> today if possibly pulseaudio might be trying to grab it. I intend to
> look into configuring PA not to touch it.
>
> There's also (possibly) blacklisting certain USB device IDs. In the
> VM I configured it to understand the device ID and hook to it.
> Possibly I can tell the Linux USB stack to ignore this device so that
> PA or some other part of the system just stays away.
>
> But being that the DSP device is an guitar amplifier modeler
> and my new Tele came back from my guitar tech at lunchtime
> I spent the afternoon playing the guitar! Nonproductive but fun!
>
> Thanks for the ideas,
> Mark

>
More or less solved this morning apparently. We'll see after more time
has elapsed.

My desktop environment is KDE. MY sound environment is then, by
default, pulseaudio. By disabling the DSP processor as a sound
device in KDE System Settings I've now been running the VM
and support software for about 90 minutes with only 1 disconnection
which came the very first time I did something in KDE (started a
new chrome window) after starting the control software in the VM.

Since then I have had no more disconnections.

I will have to see how it does over the rest of the day and weeks
ahead but it's certainly acting better right now.

Cheers,
Mark