Code 31: "Windows cannot load the drivers required for this device"

DeviceInBox editorial team · Last updated October 6, 2026

"This device is not working properly because Windows cannot load the drivers required for this device. (Code 31)" means a driver is assigned to the device, but Windows refused to load it. The device has a name and sits in its proper category, which is what separates Code 31 from the missing-driver errors. Something about the installed driver, or about the registry entries around it, stops it from starting.

Device Manager properties showing the Code 31 status for a network adapter
The device is named and classified, so a driver is assigned to it.

Reinstall the driver cleanly

A damaged driver store entry is the most common cause, and a clean reinstall fixes it more often than anything else.

  1. Right-click the device, choose Uninstall device and tick "Attempt to remove the driver for this device".
  2. Restart. Windows reinstalls its own driver for the device on the way up.
  3. If the device still fails, install a package that matches the hardware ID (how to find the ID) rather than letting Windows pick.

Leftover filter drivers

Code 31 on every device of one class, for example all network adapters at once or all CD drives, points at a filter driver. Filters are small drivers that attach to a whole device class; VPN clients, older antivirus suites, CD burning tools and audio enhancers install them, and an unclean uninstall leaves the registry pointing at a driver file that no longer exists.

  1. Uninstall the software that owned the filter, usually a VPN client or a security suite, and restart.
  2. If that does not help, create a restore point. Then open regedit and go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class.
  3. Find the subkey whose Class value matches the failing device class, for example Net for network adapters. Export it as a backup.
  4. Delete the UpperFilters and LowerFilters values in that key only if they name software you no longer have, then restart.
Registry editor showing UpperFilters and LowerFilters values under a device class key
Filters apply to an entire class, which is why a whole category fails at once.

Code 31 on network adapters

On network adapters Code 31 is often paired with a broken network stack. After the driver reinstall, open an administrator Command Prompt and run these, then restart:

netsh winsock reset
netsh int ip reset
ipconfig /flushdns
Command Prompt running netsh winsock reset and netsh int ip reset
Resetting the stack clears entries a half-removed driver left behind.

When several unrelated devices fail together

Code 31 across devices that have nothing in common usually means system files or the driver store are damaged. Run these from an administrator prompt, in this order, and restart afterwards:

sfc /scannow
DISM /Online /Cleanup-Image /RestoreHealth

If the errors started on a specific day, System Restore to a point before that day is faster than chasing the cause. In Windows 11, Settings, System, Recovery also offers "Fix problems using Windows Update", which reinstalls the current build without touching files.

Recovery options in Windows 11 Settings with the repair install entry
A repair install replaces system files and keeps your data.

Check Memory integrity

Windows Security, Device security, Core isolation. If Memory integrity is on and the device driver is on its incompatible list, the driver will not load, and the device reports Code 31 or Code 39. The fix is a newer driver for that device, not turning the protection off.

Related: Code 10, Code 39 and Code 52.

More guides