This is an old revision of the document!


Controller Disconnects During Long Tests - Check Windows Power Management

  • The Spider connection drops during a long test, often overnight or after the PC has been left alone for a while.
  • EDM shows the front-end as disconnected, and the test stops or aborts.
  • The connection comes back after you reconnect the cable, restart EDM, or wake the PC.
  • It happens most often when the Spider is connected through a USB-to-Ethernet adapter, a USB-C dongle, or a docking station.

A likely cause is Windows power management. Windows saves power by turning off devices it thinks are idle. A USB-to-Ethernet adapter can be suspended, or lose power when the PC goes to sleep. Some adapter power-saving features can also drop the link. Energy-Efficient Ethernet normally keeps the link up, but with some adapters and drivers it can cause disconnects. When the link is lost, EDM cannot reach the controller.

These are Windows and adapter driver settings. You can usually fix the problem yourself with one of the solutions below. Do not make these changes while a test is running.

If you have not set up the network connection yet, see Connecting the Spider System to the PC first.

This is the fastest fix. The script makes the same changes as the manual solutions below, on the adapter that connects to the Spider:

  • Turns off Energy-Efficient Ethernet, Green Ethernet, and the other standard power-saving properties.
  • Clears Allow the computer to turn off this device to save power for the adapter, and for the USB hubs it is connected through.
  • When the PC is plugged in: turns off USB selective suspend, sets sleep and hibernate to Never, and sets closing the lid to Do nothing.

Close EDM and do not run a test while you run the script.

  1. Find the name of the adapter that connects to the Spider (see the first part of the next solution). Use the name in Network Connections, for example Ethernet 2, not the device name.
  2. Click Start and type PowerShell. Right-click Windows PowerShell, click Run as administrator, and click Yes.
  3. Type this line, with your adapter name between the quotes, and press Enter: $name = 'Ethernet 2'
  4. Copy the block below, paste it into the PowerShell window, and press Enter.
  5. If PowerShell shows red error text, change that setting with the manual steps below.
  6. Restart the PC.
Get-NetAdapterAdvancedProperty -Name $name | Where-Object RegistryKeyword -match '^\*?(EEE|AdvancedEEE|EnableGreenEthernet|GreenEthernet|SelectiveSuspend|PowerSavingMode|SipsEnabled|ULPMode)$' | Set-NetAdapterAdvancedProperty -RegistryValue 0 -NoRestart
$ids = @(); $id = (Get-NetAdapter -Name $name).PnPDeviceID
while ($id -and ($ids.Count -eq 0 -or $id -like 'USB\*')) { $ids += $id; $id = (Get-PnpDeviceProperty -InstanceId $id -KeyName DEVPKEY_Device_Parent).Data }
Get-CimInstance -Namespace root\wmi -ClassName MSPower_DeviceEnable | Where-Object { ($_.InstanceName -replace '_0$') -in $ids } | Set-CimInstance -Property @{ Enable = $false }
powercfg /setacvalueindex SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0
powercfg /setacvalueindex SCHEME_CURRENT SUB_SLEEP STANDBYIDLE 0
powercfg /setacvalueindex SCHEME_CURRENT SUB_SLEEP HIBERNATEIDLE 0
powercfg /setacvalueindex SCHEME_CURRENT SUB_BUTTONS LIDACTION 0
powercfg /setactive SCHEME_CURRENT

If your company does not allow PowerShell scripts, or you want to change the settings yourself, use the manual solutions below. You can also use them to undo any change the script made.

First find the adapter that connects to the Spider:

  1. Press Windows + R, type ncpa.cpl, and press Enter.
  2. Right-click an Ethernet adapter and click Status.
  3. Click Details and look at IPv4 Address. The adapter that connects to the Spider has an address in the Spider subnet (for example 172.0.0.x or 169.254.x.x).
  4. If it is not the right adapter, close the windows and check the next Ethernet adapter.
  5. Write down the device name. It is shown under the adapter name in Network Connections. USB adapters usually have “USB” in the device name, for example Realtek USB GbE Family Controller or ASIX AX88179 USB 3.0 to Gigabit Ethernet Adapter.

Then change its power-saving options:

  1. Right-click Start and click Device Manager.
  2. Expand Network adapters.
  3. Right-click the adapter and click Properties.
  4. Click the Advanced tab.
  5. For each property in the table below that is in the list, select it and set Value to Disabled (or Off).
  6. Click OK.
Property (names vary by driver) Set to
Energy-Efficient Ethernet / EEE Disabled
Advanced EEE Disabled
Green Ethernet Disabled
Idle Power Saving Disabled
Selective Suspend Disabled
Power Saving Mode Disabled
System Idle Power Saver Disabled
Ultra Low Power Mode Disabled

Not every adapter has all of these properties. Change the ones that are there and leave the others.

The adapter may disconnect for a few seconds when you click OK. This is normal.

  1. In Device Manager, right-click the adapter and click Properties.
  2. Click the Power Management tab.
  3. Clear the Allow the computer to turn off this device to save power check box.
  4. Click OK.

Some PCs do not show the Power Management tab for some adapters. If the tab is not there, try the next solution.

If the adapter is connected by USB (for example a USB dongle, or a USB-C dock or hub), also do this for the USB devices between the adapter and the PC:

  1. In Device Manager, click View > Devices by connection.
  2. Expand the items until you find the adapter.
  3. Look at the items above the adapter in the tree, for example Generic USB Hub, USB Root Hub, and USB eXtensible Host Controller.
  4. For each of these items that has a Power Management tab, open Properties and clear the same check box.
  5. Click View > Devices by type to go back to the normal view.

You do not need to change USB hubs that the adapter is not connected to.

Do this if the adapter is connected by USB.

  1. Press Windows + R, type powercfg.cpl, and press Enter.
  2. Next to the selected power plan, click Change plan settings.
  3. Click Change advanced power settings.
  4. Expand USB settings > USB selective suspend setting.
  5. Set Plugged in to Disabled.
  6. Click OK.

If USB settings is not in the list, use the PowerShell script above. It changes this setting directly.

  1. Click Start > Settings > System > Power & battery (on a desktop PC: Power).
  2. Expand Screen, sleep, & hibernate timeouts.
  3. Under Plugged in, set the sleep setting (on a desktop PC: Make my device sleep after) to Never.
  4. If there is a hibernate setting, set it for Plugged in to Never.

If there is no hibernate setting in Settings, check it in Control Panel:

  1. Press Windows + R, type powercfg.cpl, and press Enter.
  2. Next to the selected power plan, click Change plan settings.
  3. Click Change advanced power settings.
  4. Expand Sleep > Hibernate after.
  5. Set Plugged in to Never (or 0).
  6. Click OK.

The screen can still turn off. Only sleep and hibernate must be Never.

On a laptop that runs with the lid closed, also set the lid action:

  1. Press Windows + R, type powercfg.cpl, and press Enter.
  2. Click Choose what closing the lid does.
  3. Set When I close the lid > Plugged in to Do nothing.
  4. Click Save changes.

Keep a laptop plugged in during long tests. These settings apply only when it is plugged in.

If a setting is missing, cannot be changed, or changes back by itself, it may be set by your company IT policy. Contact your IT department.

  1. Restart the PC.
  2. Run a test under the same conditions as the test that failed: the same adapter, dock, and USB port, the same test length, and the same lid position.
  3. Do not use the PC for other work during this test.
  4. Confirm that the test finished without a disconnect.

One test without a disconnect is a good sign, but it does not prove that the problem is fixed. If the disconnects did not happen every time before, repeat the test a few times.

If you want to check the settings, run the diagnostic report below and open it. Check that:

  • The Spider adapter shows AllowTurnOff as False. n/a means that the report could not check this setting. It does not mean that the setting is correct.
  • The power-saving properties of the Spider adapter show Disabled or Off.
  • In the power plan section, the AC (plugged in) value of Sleep after and Hibernate after is 0x00000000. On English Windows, this line is Current AC Power Setting Index.
  • If the adapter is connected by USB: the AC value of USB selective suspend setting is also 0x00000000.
  • On a laptop that runs with the lid closed: the AC value of Lid close action is 0x00000000 (do nothing).

If a section of the report shows an error or is empty, that setting could not be checked.

If the Spider still disconnects after you try these solutions, collect a diagnostic report and send it to Crystal Instruments support at support@go-ci.com. If you can, also send the EDM log files (see Sending the Tech Support Log File).

If you can, also try a different USB-to-Ethernet adapter or the PC's built-in Ethernet port.