What is (Code 31) in Device Manager and How to Fix it?

Device Status (Code 31: Operation Failed) Explained and Solved

Error Code 31 is one of the many Device Manager errors. You will face this error with the Device Manager when an incorrect driver is installed on your device. This prevents the driver from working properly and show the error code 31.

Network Adapter Device Status showing "Code 31"
Device Status showing “Code 31”

In this guide, we will show you some methods you can try to resolve this issue.

1. Update the Driver

An outdated Network driver will also lead to this error. Having an older version of the driver prevents the system from loading properly. Therefore, you must ensure that the driver you are using is fully updated. Below are the steps you must follow to update the driver

  1. Open the Run utility by pressing the Win + R keys together.
  2. Type  “devmgmt.msc” in the search box and click OK to open the Device Manager.
    Opening Device Manager
    Opening Device Manager
  3. Right-click the driver installed on your system and click on the “Update Driver” option.
    Updating the Driver
    Updating the Driver
  4. Allow the device to automatically find the best update for your driver online by clicking on “Search automatically updated driver software.
    Searching updates for drivers automatically
    Searching updates for drivers automatically
  5. After the driver has been found, install and update it. 
  6. Open the Windows Start Menu by pressing the Win key.
  7. Restart your computer by clicking on the Power option and selecting “Restart”
    Restarting the Windows computer
    Restarting the Windows computer
  8. Open the Run command by pressing the Win + R keys together.
  9. Type  “devmgmt.msc” in the search box and click OK.
    Opening Device Manager
    Opening Device Manager
  10. Right-click the driver showing the error code and click on the “Properties” option.
     
    Opening Driver Properties
    Opening Driver Properties
  11. Go to the Details tab on the properties page.
  12. Select “Hardware ids” under “Property” and copy the last value in the Value Box below.
    Copying Hardware ID
    Copying Hardware ID
  13. Now, search for the same value and find the corresponding driver to download and Install. 
  14. Once you have installed the correct drivers, restart your computer and see if this fixed the error.

2. Delete the corrupted registry key

Registry keys contain folders that consist of data from your system. Corruption in these registries will prevent the system from functioning accurately and as a result, will receive such errors. Therefore, you must find the corrupted registry key that is causing this error to occur. Below are the instructions for deleting the corrupted registry keys:

Disclaimer: To perform this method, you must save your registry in the backup file because you will be deleting certain keys hat will not be accessed again. 
  1. Open the Run command by pressing the Win + R keys together.
  2. Type  “regedit.msc” in the search box and click OK to open the Registry Editor.
    Opening the Registry Editor
    Opening the Registry Editor
  3. Now, navigate to the following path (You will need administrative permissions to perform these tasks):
    Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network
  4. Delete the Registry key by right-clicking on it and selecting the “Delete” option.
    Deleting registry key
    Deleting registry key
  5. If the key does not exist, move on to the next method.

3. Reinstall the Driver

If the error still persists, then, as a last resort, you must reinstall the Adapter Wireless Driver. By following the steps listed below, you can reinstall the Adaptor Driver:

  1. Open the Run command by pressing the Win + R keys together.
  2. Type  “devmgmt.msc” in the search box and click OK.
    Opening Device Manager
    Opening Device Manager
  3. Click on the “ Adapters” option.
  4. Right-click the Wireless  Adapter installed on your system and click on the “Uninstall Device” option.
    Note: if your Wireless Adapter is not shown on the Device Manager then restart your system or reconnect the hardware
  5. Confirm the uninstallation by checking the “Delete the driver software for this device” box and clicking the “Uninstall” option on the confirmation prompt.
    Confirming Uninstallation of the device
    Confirming Uninstallation of the device
     
  6. To reinstall the driver, click on “Action” at the top of the page and select “Scan of hardware changes.”
    Scanning for Hardware Changes
    Scanning for Hardware Changes
  7. After the system scans for the hardware changes, you will get the Wireless Driver reinstalled under Adapter.

4. Perform a System Restore

System Restore is a feature in Windows that allows you to revert the state of your system to a particular time. This feature is mostly used to recover malfunctions and other errors. Using System Restore, you can easily create a restore point where the Driver was not facing any type of error.  You can follow the steps below to see how to perform a system restore:

  1. Open the Windows Start Menu by pressing the Win key.
  2. Type “Restore Point” in the Windows Search Box and click on the “Create a Restore Point” option. 
    Opening System Restore
    Opening System Restore
  3. To create a restore point, click on the Create option under Protection Settings. 
  4. Now, type the restore point you prefer to create (for example, restore 12/15/2022) and click Create.
  5. Click on the System Restore Option.
    Creating restore point
    Creating restore point
  6. To create a custom restore point, select “choose a different restore point” and click Next.  

    Choosing a different restore point
    Choosing a different restore point
  7. Select a restore point and click on Next to restore your system.

    Restoring the System to custom time
    Restoring the System to custom time
ABOUT THE AUTHOR

Muhammad Zubyan


Muhammad Zubyan is a certified Google IT Support Professional with over 7 years of extensive experience. He has worked on more than 1500 computers, gaining valuable insights that enable him to detect and troubleshoot any complicated root cause of Windows-related issues and errors. In addition to managing Appuals as a Senior Editor, he is currently developing his own Game Optimization program that caters to both gamers and casual users alike.