ThisCalculator

Everyday

Code 31 in Device Manager: Fixed

Updated · Standard formula, shown below

Code 31 in Device Manager means Windows has stopped the device because the driver or the device itself reported a problem, and the fix usually involves reinstalling or updating the driver, or checking the device’s connection. This error appears as a yellow exclamation mark next to the device, and the status message reads: “This device is not working properly because Windows cannot load the drivers required for this device.” The steps below resolve the majority of Code 31 cases, from simple driver refreshes to deeper system checks.

What Code 31 Actually Means

Device Manager assigns error codes to describe why a hardware device is not functioning. Code 31 is a generic driver-loading failure: Windows has recognized the hardware, but the driver software that lets the operating system talk to it cannot be started. This differs from Code 28 (no driver installed), Code 43 (hardware reported a problem), or Code 10 (device cannot start). With Code 31, the driver exists but fails to initialize, often due to a corrupted driver file, a conflict with another driver, or a hardware fault that the driver detects on startup.

Why This Error Appears

The most common triggers for Code 31 include:

  • A Windows update that replaced a working driver with an incompatible one.
  • A partially installed or interrupted driver update.
  • Outdated or corrupted device firmware that the driver rejects.
  • A registry entry pointing to a missing or renamed driver file.
  • Another driver or service blocking the device’s start (e.g., a filter driver).
  • Physical connection issues, especially for USB, PCIe, or internal SATA devices.

For example, a network adapter that worked fine before a Windows feature update may suddenly show Code 31 because the new OS version uses a different driver stack that conflicts with the old one.

Step-by-Step Fix for Code 31

Work through these steps in order. Most cases resolve at step 1 or 2.

  1. Restart the computer. A simple reboot clears temporary driver states and is the fastest way to rule out a transient glitch.
  2. Uninstall and reinstall the device driver. Open Device Manager, right-click the device with the yellow exclamation mark, select Uninstall device, check Delete the driver software for this device if the option appears, then restart. Windows will reinstall a generic driver automatically.
  3. Update the driver manually. Right-click the device, choose Update driver → Browse my computer for drivers → Let me pick from a list. Select the latest version, or choose Have Disk if you downloaded a driver from the manufacturer’s site.
  4. Run the Hardware and Devices troubleshooter. In Windows 10/11, go to Settings → System → Troubleshoot → Other troubleshooters → Hardware and Devices. This tool scans for common issues and may fix driver registry entries automatically.
  5. Check for Windows updates. Some Code 31 errors are patched by Microsoft. Go to Settings → Windows Update and install all pending updates, then restart.
  6. Disable and re-enable the device. Right-click the device in Device Manager, select Disable device, wait a few seconds, then right-click and Enable device. This forces the driver to reload.
  7. Check the physical connection. For external devices (USB, Thunderbolt), try a different port or cable. For internal cards, reseat the card in its slot. For laptops, ensure the device is not disabled in BIOS/UEFI.

What to Do If the Basic Fixes Fail

If Code 31 persists, the problem is likely deeper. Try these advanced steps:

  • Use System Restore. If the error started after a recent change, restore to a point before that change. Search for “Create a restore point” in the Start menu, then click System Restore.
  • Check the registry for the device’s UpperFilters/LowerFilters. These keys, located under HKLM\SYSTEM\CurrentControlSet\Control\Class\{GUID} for the device class, can block driver loading if corrupted. Backup the key, then delete the filter values and restart. Only do this if you are comfortable editing the registry.
  • Run sfc /scannow and DISM /Online /Cleanup-Image /RestoreHealth in an elevated Command Prompt to repair system files that may be interfering with driver loading.
  • Remove third-party antivirus or driver updater tools. These can lock or replace driver files. Temporarily uninstall them and see if the error clears.
  • Check the manufacturer’s support site for a BIOS/UEFI update or a specific driver that addresses Code 31 for that exact model.

Common Misconceptions About Code 31

One widespread myth is that Code 31 always means the hardware is dead. In reality, most Code 31 errors are software-related and fixable without replacing the device. Another misconception is that using a “driver updater” program will automatically solve it; these tools often install the same broken driver or a wrong version. Also, some users think that deleting the device from Device Manager permanently removes it—it does not; Windows will re-detect it on reboot, which is exactly what you want for a clean reinstall.

How to Prevent Code 31 in the Future

Prevention is mostly about driver hygiene:

  • Only install drivers from the hardware manufacturer’s official website, not from third-party download sites.
  • Before a major Windows update, check the manufacturer’s site for a driver compatibility note.
  • Create a system restore point before installing any driver or firmware update.
  • Avoid using “driver booster” software that automatically updates all drivers; manual updates give you control.
  • If you overclock or tweak hardware settings, revert to defaults if Code 31 appears after a change.

Frequently Asked Questions

Can Code 31 be fixed without reinstalling Windows?
Yes, in the vast majority of cases. The steps above—uninstalling the driver, updating it, or restoring the system—resolve the issue without a full OS reinstall. Only if the system files are severely corrupted and SFC/DISM fail would a reset be considered.

Does Code 31 mean my device is broken?
Not necessarily. While a failing device can cause the error, most Code 31 instances are driver-related. Test the device on another computer or with a live Linux USB to confirm whether the hardware itself is faulty.

Why does Code 31 appear after a Windows update?
Windows updates can replace a driver with a generic one that is incompatible with your hardware, or the update may change a security policy that blocks the driver. Reinstalling the manufacturer’s driver usually fixes it.

Is it safe to delete the device from Device Manager?
Yes. Uninstalling the device only removes the driver and the device entry. Windows will re-detect the hardware on the next boot and attempt to install a driver. It does not delete your files or damage the hardware.

What if Code 31 is on a USB device?
Try a different USB port, preferably a rear port on desktops. Also check the USB controller in Device Manager—if the controller itself has Code 31, update the chipset driver from your motherboard manufacturer.

Can a BIOS setting cause Code 31?
Yes. For internal devices, if the device is disabled in BIOS/UEFI, or if a security feature like Secure Boot or Virtualization is blocking the driver, Code 31 can appear. Reset BIOS to defaults if you suspect this.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.