How to Fix ‘Windows Cannot Load the Device Driver for This Hardware’ (Code 39)

When connecting an external keyboard, USB audio interface, webcam, or optical drive in Windows 11, you may find the hardware completely unresponsive. Opening Device Manager reveals a dreaded yellow warning triangle next to the hardware category, and double-clicking the device presents the Device Status error: Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39).

Device Manager Error Code 39 occurs when the Windows Plug and Play (PnP) subsystem cannot load the necessary driver binaries into kernel space. This fault is predominantly caused by corrupted filter driver entries (specifically UpperFilters and LowerFilters) left behind in the Windows Registry by uninstalled third-party software, missing digital signature certificates, or damaged INF registry keys. Follow the solutions below to eliminate Code 39.

Remove Corrupted UpperFilters and LowerFilters Registry Values

The vast majority of Code 39 errors across keyboards, optical drives, and audio devices stem from obsolete third-party filter drivers registered in the device class key:

  1. Press Windows + R, type regedit, and press Enter to open the Registry Editor.
  2. Navigate to the following master device class branch:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class
  3. Under the Class key, locate the subkey corresponding to your affected device class GUID:
    • DVD/CD-ROM drives: {4D36E965-E325-11CE-BFC1-08002BE10318}
    • Keyboards: {4D36E96B-E325-11CE-BFC1-08002BE10318}
    • Mice and pointing devices: {4D36E96F-E325-11CE-BFC1-08002BE10318}
    • Sound, video and game controllers: {4D36E96C-E325-11CE-BFC1-08002BE10318}
    • Universal Serial Bus (USB) controllers: {36FC9E60-C465-11CF-8056-444553540000}
  4. In the right-hand pane of the matching GUID key, check for entries named UpperFilters and LowerFilters.
  5. Right-click UpperFilters and select Delete.
  6. Right-click LowerFilters and select Delete.
  7. Close Registry Editor and restart your computer. Windows will rebuild the default driver stack upon reboot.

Reinstall the Hardware Driver in Device Manager

If corrupted registry filter removal does not immediately revive the hardware, force Windows to re-enumerate the device stack:

  1. Press Windows + X and select Device Manager.
  2. Locate the device bearing the yellow exclamation mark.
  3. Right-click the device and select Uninstall device.
  4. If a checkbox appears saying “Attempt to remove the driver for this device”, leave it unchecked and click Uninstall.
  5. Click Action in the top menu bar and select Scan for hardware changes.
  6. Windows will automatically detect the physical hardware and bind the clean default Microsoft driver.

Run System File Checker (SFC) and DISM

If core Microsoft driver binaries (such as kbdclass.sys or usbehci.sys) are corrupted, the operating system cannot load them into memory:

  1. Press the Windows Key, type cmd, right-click Command Prompt, and select Run as administrator.
  2. Execute:
    DISM /Online /Cleanup-Image /RestoreHealth
  3. Once completed, execute:
    sfc /scannow
  4. Reboot your computer once repairs finish.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.