sodcalculator

10 Tech How-To

Code 45 Error: Hardware Not Connected Fix

Guide 10-4806 · Updated · Step by step

The “Code 45” error in Windows Device Manager means the computer is currently not connected to the hardware device, even though the device is physically plugged in. This usually happens after a driver update, a Windows update, or a sudden power loss, and it can be fixed by reinstalling the device driver or changing the USB port.

What Exactly Does Code 45 Mean?

Windows assigns error codes to devices that fail to start or communicate properly. Code 45 is one of the less common ones: the system sees that a device is present (for example, a USB flash drive, an external hard drive, or a Bluetooth adapter) but reports that it is “not connected.” This is different from Code 43 (Windows has stopped the device because it reported problems) or Code 28 (drivers not installed). With Code 45, the hardware is physically there, but the operating system believes the connection is broken.

The full message in Device Manager reads: “Currently, this hardware device is not connected to the computer. (Code 45). To fix this problem, reconnect this hardware device to the computer.” That message is misleading because the device is usually plugged in. The error often appears after the device is unplugged while the computer is off or asleep, or after a driver update that did not complete cleanly.

Why Does This Happen?

Several common situations trigger Code 45:

  • Unplugging during sleep or shutdown: If you remove a USB device while the PC is off, Windows may not re-enumerate it when you plug it back in.
  • Driver update failure: A partially installed driver can leave the device in a “phantom” state.
  • Power management settings: Windows may turn off the USB port to save power, and the device fails to wake up.
  • Corrupted device node: The registry entry for the device is damaged, so Windows thinks the hardware is gone.
  • Faulty cable or port: A loose connection can make the device appear disconnected intermittently.

Most often, Code 45 appears for USB devices like printers, external drives, or webcams. It can also show up for internal components like a Wi-Fi card if the connection to the motherboard is loose.

How to Fix Code 45 (Step-by-Step)

Try these fixes in order, from simplest to most thorough. You will need administrator access to your Windows PC.

  1. Physically reconnect the device: Unplug the cable from both the device and the computer. Wait 10 seconds, then plug it back into a different USB port (preferably directly on the motherboard, not a hub).
  2. Restart the computer: A full restart clears the temporary device list. After restarting, check Device Manager to see if the error is gone.
  3. Uninstall the device driver: Open Device Manager (right-click the Start button → Device Manager). Find the device with the yellow triangle, right-click it, and select Uninstall device. Check the box that says “Delete the driver software for this device” if it appears, then click Uninstall. Restart the PC. Windows will reinstall the driver automatically.
  4. Scan for hardware changes: In Device Manager, click the Action menu and select Scan for hardware changes. This forces Windows to look for new devices and may clear the phantom state.
  5. Disable USB power management: Open Device Manager, expand Universal Serial Bus controllers, right-click each USB Root Hub, select Properties → Power Management, and uncheck “Allow the computer to turn off this device to save power.” Repeat for all root hubs.
  6. Run the Hardware and Devices troubleshooter: Go to Settings → System → Troubleshoot → Other troubleshooters (Windows 11) or Control Panel → Troubleshooting → Hardware and Sound → Hardware and Devices (Windows 10). Run it and follow the prompts.

When the Basic Fixes Don’t Work

If the error persists after the steps above, the issue may be deeper:

  • Check the cable: A damaged USB cable can cause intermittent disconnects. Try a known-good cable.
  • Test the device on another computer: If the error follows the device, the hardware itself may be failing. If it works on another PC, the problem is in your system.
  • Update the chipset drivers: Your motherboard’s USB controller drivers can become outdated. Visit the motherboard manufacturer’s support page and install the latest chipset driver.
  • Use a powered USB hub: Some external drives need more power than a single port provides. A powered hub can stabilize the connection.
  • Check for Windows updates: A pending Windows update may contain a fix for a known USB bug. Install all optional updates, especially driver updates.

If none of these work, the device may be physically dead. For internal components, reseating the card or drive (removing and reinserting it) can help, but only if you are comfortable opening your computer.

How to Prevent Code 45 in the Future

Prevention is mostly about habit and settings:

  • Always use “Safely Remove Hardware” before unplugging USB devices. This tells Windows to stop communicating with the device cleanly.
  • Don’t unplug devices while the PC is off or sleeping. Wait until the PC is fully on or fully shut down.
  • Keep drivers updated through Windows Update or the manufacturer’s site, but avoid beta drivers unless you know what you’re doing.
  • Use the same USB port for devices you use frequently. Windows remembers the port assignment and is less likely to get confused.
  • Disable fast startup (Control Panel → Power Options → Choose what the power buttons do → Change settings that are currently unavailable → uncheck “Turn on fast startup”). This prevents a partial shutdown that can leave devices in a stale state.

Code 45 vs. Other Device Manager Errors

It helps to know what Code 45 is not. Here are the most similar errors:

  • Code 43: “Windows has stopped this device because it has reported problems.” This means the device is detected but failed to start—often a hardware or driver issue.
  • Code 28: “The drivers for this device are not installed.” Windows sees the device but has no driver for it.
  • Code 10: “This device cannot start.” The device is present but cannot initialize, usually due to a driver problem or missing resources.
  • Code 45 is unique because Windows thinks the device is simply not there. It’s the only code that tells you to “reconnect” the hardware.

If you see Code 45, the first thing to try is unplugging and replugging, because that is the most common fix. If the error changes to a different code after replugging, that tells you the connection issue is resolved and the problem is now driver-related.

Frequently Asked Questions

Can Code 45 damage my hardware?

No. Code 45 is a software-level error. It does not indicate electrical problems or risk to your device. The hardware is simply not being recognized, and the worst case is that the device won’t work until you fix the connection or driver.

Why does Code 45 appear for a device that is plugged in?

Windows stores a record of every device that was connected. If the device is removed without proper notification (e.g., unplugged while the PC is off), the record becomes stale. When you plug it back in, Windows may not update the record, so it thinks the device is still disconnected.

Will a system restore fix Code 45?

Sometimes. If the error started after a recent driver or Windows update, a system restore to a point before that update can clear the stale device state. However, it’s a heavier solution than uninstalling the driver, so try the simpler steps first.

Is Code 45 the same as “Unknown USB Device (Device Descriptor Request Failed)”?

No. That message is a different problem, usually related to a faulty USB port or cable. Code 45 specifically says the device is not connected. The “Unknown USB Device” error appears when Windows detects something but cannot read its descriptor—a sign of a communication failure, not a missing device.

What if Code 45 appears for an internal component like a GPU or SSD?

For internal parts, the same fixes apply, but you should also reseat the component in its slot. Power off the PC, unplug it, open the case, remove the card or drive, and reinsert it firmly. If the error persists, the component may be failing and needs replacement.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →