This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

USB Device Disconnects and Reconnects Periodically on Windows PC

Updated Feb 25, 2025

Reported In

Hardware

  • USB-6001
  • USB-6002
  • USB-6003
  • USB-6008
  • USB-6009
  • USB-6259
  • cDAQ-9171
  • cDAQ-9174
  • cDAQ-9178
  • cDAQ-9179
  • USB-6218

Driver

  • NI-DAQmx

Operating System

  • Windows

Issue Details

My device connected via USB is continuously disconnecting and reconnecting to my Windows PC. How do I stop this from happening?
My CompactDAQ or CompactRIO device does not show as connected in NI MAX (NI Measurement & Automation Explorer) after my computer wakes up from being suspended or sleeping.
LabVIEW does not show my USB device ports after my computer goes to sleep.
I receive Error -50808 when using a USB device in LabVIEW with NI-DAQ™mx.
I'm running a LabVIEW and DAQmx data acquisition application on a remote machine, using Windows Remote Desktop Connection. When I disconnect from the machine, the LabVIEW application stops acquiring data until I log into the remote machine again.

Solution

This may occur due to a Windows setting called USB selective suspend. By default, this setting is enabled. When enabled, it cuts power to idle USB devices in order to conserve power. 

This setting can be disabled through Performance Settings as follows:

  1. Go to Power Options via: All Control Panel Items » Power Options » Edit Plan Settings
     
    1.png
  2. Select Change advanced power settings.
  3. Expand the USB Settings tab and disable USB selective suspend settings
     
    2.png

Some non-isolated devices may exhibit this issue if their ground is not at the same potential as the computer's power supply ground or if transients or excessive noise is introduced to the device, causing disruptions to the USB communication. To mitigate this, follow the guidelines in the Field Wiring and Noise Considerations for Analog Signals article. 

Additional Information

  • Always try rebooting your computer before having to reinstall the DAQmx drivers.
  • USB 3.0 ports seem to be unaffected by this setting, so using a USB 3.0 port may be a viable solution as well.
  • This feature was added in Windows XP and is present in later versions of the operating system (Windows Vista, 7, 10, etc.). You can find more information about this feature from Microsoft Hardware Help.
  • Some systems do not show the USB settings. To activate it and disable the USB Settings, please refer to this external link to look for some suggestions: Remove 'USB selective suspend setting' in Power Options in Windows.
  • Avoid using USB hubs as based on Using USB Based DAQ Devices on a Bus-Powered Hub, NI recommends against using USB hubs, as the specifications all vary with each manufacturer. 
  • If using USB hubs, ensure that the USB hubs type is tally with the USB Bus Interface. For example, USB-6008 supports USB 2.0 not USB 3.0.