Skip to main content

“A Device Attached to the System Is Not Functioning” — Decoding It

Media A Device Attached to the System Is Not Functioning” — Decoding It

Windows displays:

A device attached to the system is not functioning.

The message sounds straightforward. You would expect it to refer to a USB drive, phone, printer or another piece of hardware connected to the computer.

Sometimes it does.

However, the same message can also appear when:

  • Opening or installing an application
  • Copying files from a phone or camera
  • Accessing an external drive
  • Connecting to a mapped network location
  • Installing a device driver
  • Running a Windows feature update
  • Using a VPN or virtual network adapter
  • Accessing data through a dock or USB hub

It may even appear when no obvious external device is connected.

That is because this is a general Windows system error, not a precise diagnosis. Microsoft defines it as Win32 system error 31, named ERROR_GEN_FAILURE. It tells us that a device-related operation failed, but it does not identify which device, driver or storage path caused the failure. 

The correct response is to identify what action triggered the message, then isolate the physical device, driver, network connection or Windows component involved.

What the Error Actually Means

The underlying Windows result is:

ERROR_GEN_FAILURE


 

31 (0x1F)


 

A device attached to the system is not functioning.

The word device is broader than it first appears.

Windows may use the term for:

  • A USB peripheral
  • An internal storage controller
  • A hard drive or SSD
  • A network redirector
  • A mapped drive
  • A virtual adapter
  • A phone-transfer interface
  • A driver-controlled Windows component
  • An internal camera, Bluetooth radio or audio device

The message therefore means:

Windows asked a device or device-related driver to perform an operation, and the operation returned a general failure.

It does not prove that the complete device is dead. The actual cause might be:

  • A damaged or charge-only cable
  • A disconnected network path
  • A driver that failed to load
  • An underpowered USB device
  • A phone that became locked
  • A storage device beginning to fail
  • A file that is unavailable or corrupted
  • An application conflict
  • A Windows upgrade encountering an incompatible peripheral

Do Not Confuse It With Device Manager Code 31

Windows uses the number 31 in more than one error system.

System error 31

ERROR_GEN_FAILURE

A device attached to the system is not functioning.

This can appear in an application, file-transfer operation, installer, network connection or Windows Setup.

Device Manager Code 31

This device is not working properly because Windows cannot load

the drivers required for this device. (Code 31)

This specifically describes a Device Manager driver-loading problem. Microsoft recommends checking and reinstalling or updating the appropriate driver. 

Windows error 0x8007001F

You may also encounter:

0x8007001F

This is the same general Win32 failure represented in another error format. Microsoft’s Windows installation guidance describes 0x8007001F as “A device attached to the system is not functioning” and recommends disconnecting unnecessary devices, checking drivers and retrying the upgrade. 

Record the complete error and where it appeared, not only the number 31.

Start With the Action That Triggered It

The fastest way to diagnose the message is to ask:

What was Windows trying to do at the time?

The error appears while…

Most likely area to investigate

Copying from a phone

Cable, unlocked phone, transfer mode or media conversion

Accessing a USB drive

Cable, USB port, power, file system or failing storage

Opening a downloaded installer

File corruption, storage path, security software or Windows components

Using a mapped drive

Network connection, credentials, VPN, server or redirector

Installing Windows

External devices, drivers, storage or migration software

Connecting to a VPN

Virtual network adapters, VPN client or network drivers

Printing or scanning

Device connection, driver, service or printer status

Opening a file

The drive or network location holding that file

Do not begin with a Registry edit or complete Windows reset. First reproduce the failure and identify its boundary.

Before You Troubleshoot

Protect any important data before testing storage devices or making system-level changes.

Record:

  • The exact error wording
  • Any hexadecimal code
  • What you were doing
  • The file, application or device involved
  • Whether the problem happens every time
  • The date it began
  • Any recent Windows, driver or application updates

Where BitLocker is enabled, confirm that the recovery key is available before updating firmware, repairing Windows or changing storage hardware.

Do not format, initialise or repartition an external drive containing important files merely because Windows cannot currently read it.

The Fastest Isolation Sequence

Use this sequence before moving into advanced repairs.

1. Restart Windows

Select:

Start > Power > Restart

A restart can clear:

  • A driver left in a failed state
  • A stalled USB controller
  • A disconnected network session
  • A locked file handle
  • An incomplete update
  • A temporary phone-transfer process

Use Restart rather than shutting down and switching the machine back on.

2. Disconnect unnecessary devices

Remove devices that are not needed for the test:

  • External storage
  • USB hubs
  • Docking stations
  • Printers
  • Cameras
  • Card readers
  • Phones
  • Audio interfaces
  • Additional displays where practical

Leave connected only the essentials.

Reconnect devices one at a time until the message returns.

3. Test another port

Connect the affected device directly to the computer rather than through a hub or dock.

For USB-C equipment, the port, cable and device must support the required feature. Microsoft notes that some USB-C cables support charging but not every data, display or Thunderbolt capability, and recommends testing a direct connection. 

4. Replace the cable

A cable can supply power while failing to transfer data reliably.

Try:

  • The original manufacturer cable
  • A known-good data cable
  • A shorter cable
  • A different connector where supported

5. Test another computer

Connecting the same device and cable to another computer provides an important dividing line.

  • If it fails everywhere, suspect the device or cable.
  • If it works elsewhere, investigate the original PC, its port, drivers or Windows installation.

When Copying Photos or Files From a Phone

This message commonly appears during phone-to-PC transfers.

Possible causes include:

  • The phone becoming locked
  • A cable that does not support data
  • The phone not granting access
  • The transfer mode changing
  • The phone disconnecting briefly
  • A large or damaged media file
  • On-device media conversion failing
  • Cloud-optimised files not being fully available locally

Use the supported import process

Microsoft recommends:

  1. Connect the phone using a USB cable capable of transferring files.
  2. Turn the phone on and unlock it.
  3. Open the Windows Photos app.
  4. Select Import and choose the connected device. 

Keep the phone unlocked during the import.

On Android, check the notification displayed after connecting the cable and choose an appropriate mode such as:

File transfer

or:

Photos / PTP

The exact wording varies by manufacturer.

Transfer smaller groups

Instead of copying thousands of photos at once:

  1. Create a new folder on the PC.
  2. Copy 20–50 files.
  3. Confirm that they open.
  4. Continue in batches.

If one batch repeatedly fails, divide it further until you identify the problematic file.

A single damaged video or partially downloaded cloud item can interrupt a much larger transfer.

Use cloud transfer as an alternative

When USB importing remains unreliable, consider:

  • iCloud for Windows
  • OneDrive
  • Phone Link where supported
  • The manufacturer’s official transfer application

Apple notes that iCloud Photos maintains original full-resolution files in iCloud and can make them available on a Windows PC without repeatedly importing them over USB. 

Do not delete photos from the phone until you have confirmed that the transferred copies open and are backed up.

When an External Drive or USB Stick Triggers the Error

The message can mean that Windows saw the storage device but could not complete a read or write operation.

Possible causes include:

  • Loose cable
  • Insufficient USB power
  • Damaged enclosure
  • Failing drive
  • File-system corruption
  • A defective USB port
  • Unsafe removal during an earlier transfer
  • A failing USB-to-SATA controller
  • A bad area on the storage media

Check Disk Management

Right-click Start and select:

Disk Management

Find the external device.

Possible states include:

The drive appears normally with a letter

Test whether you can:

  • Open the root folder
  • Copy one small file from it
  • Copy one small file to it
  • Access another folder

If only one directory or file fails, the problem may be localised rather than affecting the entire drive.

The drive appears without a letter

A drive letter may be missing or conflicting.

Do not assign a new letter blindly on a managed business device, particularly where applications depend on fixed drive letters.

The drive shows as RAW

A RAW file system indicates that Windows cannot recognise the normal file-system structure.

Do not format it when the data matters.

Disconnect it and arrange data-recovery assessment.

The drive shows as unallocated or asks to be initialised

Do not initialise it if it previously contained files.

Initialising or repartitioning can overwrite important disk information and complicate recovery.

Listen and observe

Stop using the device when you notice:

  • Repeated disconnect sounds
  • Clicking or beeping
  • The drive spinning up and down
  • Extremely slow folder access
  • The drive becoming hot
  • Windows freezing whenever it is connected
  • The device disappearing from Disk Management

Repeated copy attempts can worsen a failing drive and reduce the chance of successful recovery.

When the Error Appears While Opening a File

The message may relate to the storage location rather than the application opening the file.

Check whether the file is stored on:

  • An external drive
  • A mapped network drive
  • A disconnected SharePoint or OneDrive location
  • A phone
  • An SD card
  • A NAS
  • A drive that is no longer available

Copy the file to a local folder such as:

C:\Users\<username>\Documents\Test

Then try opening the local copy.

The local copy opens

The application is probably healthy. Investigate the original:

  • Drive
  • Network path
  • Synchronisation service
  • Permissions
  • Connection

The local copy also fails

Try:

  • Another file of the same type
  • Opening the application first
  • Repairing the application
  • Downloading the file again
  • Testing the file on another computer

The original file itself may be incomplete or damaged.

When a Downloaded Installer Shows the Error

It is possible to receive the message while opening an .exe or .msi file even when no visible external device is attached.

Possible explanations include:

  • The installer is on an unavailable drive
  • The download is incomplete
  • Temporary storage is damaged
  • Security software is interfering
  • The installer depends on a missing component
  • A driver or service used by the installation has failed
  • Windows system files are damaged

Download the installer again

Delete only the downloaded copy—not installed program data—and obtain a fresh installer from the official publisher.

Save it to a simple local location such as:

C:\Temp

Avoid running it directly from:

  • A compressed archive
  • An email attachment
  • A network drive
  • A USB stick
  • A cloud placeholder that has not downloaded fully

Check the publisher shown by the Windows security prompt. Do not bypass warnings for an unknown or unsigned installer.

Test a clean boot

A clean boot can determine whether a background application or service is interfering with installation.

Press:

Windows key + R

Enter:

msconfig

Then:

  1. Open Services.
  2. Select Hide all Microsoft services.
  3. Select Disable all.
  4. Open Startup and select Open Task Manager.
  5. Disable enabled startup items.
  6. Restart and test the installer.

Microsoft describes clean boot as a method for isolating background software conflicts affecting applications and installations. Restore normal startup after testing. 

On a business-managed computer, do not disable security, backup or management services without approval.

When a Network Drive or Shared Folder Triggers It

A mapped drive can behave like a local device from the application’s perspective.

The message may appear when:

  • The server is offline
  • The PC is disconnected from the company network
  • The VPN has dropped
  • The mapped session has expired
  • Credentials have changed
  • The share no longer exists
  • A network redirector or WebDAV connection has failed

Microsoft has documented the same system error in network and WebDAV access scenarios, illustrating that the “device” does not have to be physically plugged into the PC. 

Check the network first

Try opening:

  • A normal website
  • Another server share
  • The company VPN
  • The same path from another PC

Then open Command Prompt and run:

net use

This displays active and remembered network connections.

A mapped drive may show:

Disconnected

Do not delete and recreate mapped drives until you have recorded:

  • The server path
  • Drive letter
  • Required credentials
  • Whether the organisation uses a logon script or policy

For business shares, contact IT before changing stored credentials or network mappings.

When a Windows Update or Feature Upgrade Fails

A feature upgrade may stop with:

0x8007001F

and display:

A device attached to the system is not functioning.

Microsoft recommends disconnecting external devices, updating drivers and retrying the installation. 

Disconnect non-essential hardware

Before another attempt, remove:

  • External drives
  • Memory cards
  • Printers
  • Scanners
  • Docks
  • USB hubs
  • Webcams
  • Audio devices
  • Game controllers
  • Additional Bluetooth receivers

Keep only:

  • Power
  • Keyboard and mouse
  • One display
  • Network access where required

Check Device Manager

Right-click Start and open Device Manager.

Look for:

  • Yellow warning triangles
  • Unknown devices
  • Disabled devices
  • Storage-controller errors
  • Audio-device errors
  • USB-controller problems
  • Old hardware no longer in use

Update drivers using Windows Update and the computer manufacturer’s official support service. Windows 11 automatically installs many recommended drivers and lists some additional packages under Optional updates. 

Use SetupDiag

For a feature-upgrade rollback, Microsoft’s SetupDiag analyses Windows Setup logs and attempts to identify the rule or component associated with the failure. It is included with Windows Setup on currently supported Windows versions. 

Important upgrade logs may be found under locations including:

C:\$Windows.~BT\Sources\Panther

and:

C:\$Windows.~BT\Sources\Rollback

Microsoft identifies setupact.log as one of the most useful Windows Setup logs. 

Do not publish complete Setup logs without reviewing them, as they may contain usernames, application paths and device information.

Check Device Manager Even When the Device Appears to Work

Open Device Manager and inspect the category related to the failing operation.

Examples include:

  • Disk drives for external storage
  • Universal Serial Bus controllers for USB problems
  • Portable Devices for phones
  • Network adapters for VPN and network errors
  • Storage controllers for internal-drive problems
  • Cameras for import or webcam issues
  • Printers for printing problems

Right-click the device and select Properties.

Record:

  • Device status
  • Error code
  • Driver provider
  • Driver version
  • Events
  • Hardware IDs

If a yellow triangle is present, follow that specific Device Manager code rather than treating the general system message as the only clue.

Update or Reinstall the Correct Driver

Use this order:

  1. Windows Update
  2. Windows Optional driver updates
  3. The exact laptop or desktop manufacturer
  4. The individual component manufacturer where appropriate

Microsoft supports updating, rolling back and reinstalling drivers through Device Manager. 

Roll back after a recent change

When the problem began immediately after a driver update:

Device Manager > Device Properties > Driver > Roll Back Driver

Restart afterwards.

Reinstall when the driver appears damaged

Before uninstalling:

  • Download the replacement package.
  • Record the existing driver version.
  • Ensure you have another input or network method where necessary.

Then:

  1. Select Uninstall device.
  2. Restart Windows.
  3. Allow Windows to redetect the device.
  4. Install the official manufacturer package if needed.

Do not remove a storage-controller driver casually. An unsuitable replacement can prevent Windows from starting.

Repair Windows System Components

When the error affects several unrelated applications or appears without a clear hardware trigger, check Windows system integrity.

Open Terminal as administrator and run:

DISM.exe /Online /Cleanup-Image /RestoreHealth

When it completes, run:

sfc /scannow

Restart afterwards.

Microsoft recommends running DISM before System File Checker because DISM supplies the component files SFC may need to replace damaged protected system files. 

These tools can repair Windows components. They cannot repair:

  • A physically failing drive
  • A broken USB cable
  • A dead phone port
  • A damaged docking station
  • An unavailable network server

Check Reliability Monitor and Event Viewer

Press:

Windows key + R

Run:

perfmon /rel

Reliability Monitor may show:

  • Application failures
  • Hardware errors
  • Driver installations
  • Windows update failures
  • Unexpected shutdowns

Then open Event Viewer and review:

Windows Logs > System

Look around the exact time the message appeared.

Relevant event sources may include:

  • Disk
  • Ntfs
  • Kernel-PnP
  • USB
  • DriverFrameworks
  • StorPort
  • NetworkProfile
  • DeviceSetupManager
  • The device manufacturer’s driver

Do not attempt to fix every warning in Event Viewer. Focus on events that repeatedly coincide with the failure.

When Hardware Failure Is Likely

Arrange professional assessment when:

  • The device fails on several computers.
  • Different known-good cables produce the same result.
  • An external drive repeatedly disconnects.
  • The device disappears from Device Manager.
  • The drive reports read or write errors.
  • Manufacturer diagnostics report failure.
  • Code 10, 24 or 43 continually returns.
  • The device becomes excessively hot.
  • The computer freezes whenever it is connected.
  • The problem followed impact, liquid or electrical damage.
  • Files are becoming corrupted.

For storage containing important data, stop testing when the device shows physical-failure symptoms.

The priority should become data preservation, not forcing Windows to recognise the drive one more time.

Common Mistakes to Avoid

Assuming the error identifies a physical USB device

The failure may involve internal storage, a mapped drive, virtual adapter or driver.

Formatting an unreadable drive

Formatting can destroy file-system information needed for data recovery.

Repeatedly reconnecting a failing hard drive

Continued operation may worsen mechanical or electronic damage.

Reinstalling every driver

Change only the component connected to the failure and test after each step.

Using generic driver-updater software

Use Windows Update and the official manufacturer.

Editing the Registry immediately

This general error has many possible causes and no universal Registry fix.

Resetting Windows before testing the device elsewhere

A five-minute cross-device test may show that the external hardware is responsible.

Ignoring the exact context

The same message while copying phone photos requires a different investigation from the same message during a feature upgrade.

A Practical Troubleshooting Checklist

When Windows reports that a device attached to the system is not functioning:

  1. Record the exact message and any additional code.
  2. Note what Windows was doing.
  3. Restart the PC.
  4. Disconnect unnecessary peripherals.
  5. Connect the affected device directly.
  6. Try another port.
  7. Try another data-capable cable.
  8. Test the device on another computer.
  9. Keep phones unlocked during transfers.
  10. Transfer files in smaller batches.
  11. Copy the affected file to local storage.
  12. Check Disk Management for storage devices.
  13. Do not initialise or format a drive containing needed data.
  14. Check network and VPN access for mapped drives.
  15. Open Device Manager.
  16. Record any Device Manager code.
  17. Install Windows and official manufacturer driver updates.
  18. Roll back a recently changed driver where appropriate.
  19. Reinstall only the relevant device.
  20. Run DISM and SFC when Windows corruption is suspected.
  21. Use a clean boot for installer or software conflicts.
  22. Review Reliability Monitor and Event Viewer.
  23. Use SetupDiag for Windows feature-upgrade failures.
  24. Stop using a device that shows signs of physical failure.
  25. Escalate important business or data-recovery cases promptly.

How Hamilton Group Can Help

“A device attached to the system is not functioning” is frustrating because it names neither the device nor the real cause.

Hamilton Group’s experienced IT team can trace the failure to the correct part of the system rather than applying generic fixes.

Device and Driver Diagnosis

We can investigate:

  • USB and USB-C equipment
  • External storage
  • Phones and cameras
  • Printers and scanners
  • Network adapters
  • Bluetooth devices
  • Docks and hubs
  • Internal storage controllers

Windows Error Analysis

Our engineers can interpret:

  • ERROR_GEN_FAILURE
  • 0x8007001F
  • Device Manager codes
  • Windows Setup logs
  • SetupDiag results
  • Reliability Monitor
  • Event Viewer

Storage and Data Protection

Where an external drive may be failing, we can determine whether it is safe to continue troubleshooting or whether the device should be removed from service for data-recovery assessment.

Windows Update and Upgrade Repair

Hamilton Group can:

  • Identify incompatible devices and drivers
  • Remove unnecessary upgrade blockers
  • Repair Windows components
  • Analyse failed feature updates
  • Complete supported repair installations
  • Restore the machine to a secure working state

Business-Wide Remediation

If the message starts appearing across several company devices, we can identify whether the cause is:

  • A deployed driver
  • A docking-station model
  • A Windows update
  • Endpoint-security software
  • A mapped network drive
  • A shared application
  • A failing hardware batch

Hamilton Group aims to make first contact on IT support requests within 15 minutes, helping businesses minimise interruption and avoid unnecessary device replacement.

Decode the Context, Not Just the Words

The message:

A device attached to the system is not functioning

is Windows’ general ERROR_GEN_FAILURE result.

It does not automatically mean a visible external device has failed. The “device” may be the phone you are copying from, the drive containing a file, a network share, a virtual adapter or a driver involved in a Windows upgrade.

Start with the action that triggered the message, remove one variable at a time and stop immediately when storage hardware shows signs of physical failure.

Call 0330 043 0069, book a meeting with one of our experts or visit hgmssp.com for experienced help diagnosing Windows device errors, transfer failures and update problems.