If your USB device is not working, try device filter

May 11, 2008
21,665
1,294
126
I have an issue that i had for a long time.
Whenever i plug in a mass storage device (ext HDD or USB stick), the driver is not loaded with error code 10. When i pulled out my and insert it again, the driver is loaded and the mass storage device is accessible. This is not beneficial for usb hdd drives to have power cycling all the time.

I thought at first it was my virusscanner, so i set it up to ignore all inserted mass storage usb devices.
But that did not help.

I thought it was my vmware usb arbitrator.
I disabled the service but it did not help.

I googled a bit and found a forum where the people explained that the person should try device filter from bustrace.com
I tried it as well.
As it seems , windows can install all kinds of filter drivers in a stack model for, for example USB.
I had acronis installed. Got the list below and de-installed acronis.

----------------------------------------------------
Filter Driver Load Order http://www.bustrace.com
----------------------------------------------------

Upper Class Filter: fltsrv
Upper Class Filter: PartMgr
Device Object: Kingston DataTraveler II USB Device
Lower Class Filter: vidsflt

Driver Name: fltsrv.sys
File Location: c:\windows\system32\drivers
File Description: Acronis Storage Filter Management Driver
File Version: 1.3.0.2125 [1.3.0.2125]
Product Name: Acronis Storage Filter Management
Product Version: 1.3.0.2125 [1.3.0.2125]
Company Name: Acronis International GmbH

Driver Name: partmgr.sys
File Location: c:\windows\system32\drivers
File Description: Partition Management Driver
File Version: 6.1.7600.16385 (win7_rtm.090713-1255) [6.1.7601.17796]
Product Name: Microsoft® Windows® Operating System
Product Version: 6.1.7600.16385 [6.1.7601.17796]
Company Name: Microsoft Corporation

Driver Name: vidsflt.sys
File Location: c:\windows\system32\drivers
File Description: Acronis Virtual Disk Storage Filter
File Version: 1.1.0.2105 [1.1.0.2105]
Product Name: Acronis Virtual Disk
Product Version: 1.1.0.2105 [1.1.0.2105]
Company Name: Acronis International GmbH

After de-installing acronis :
----------------------------------------------------
Filter Driver Load Order http://www.bustrace.com
----------------------------------------------------

Upper Class Filter: PartMgr
Device Object: Kingston DataTraveler II USB Device
Lower Filter Drivers: No Lower Filter Drivers specified for this device

Driver Name: partmgr.sys
File Location: c:\windows\system32\drivers
File Description: Partition Management Driver
File Version: 6.1.7600.16385 (win7_rtm.090713-1255) [6.1.7601.17796]
Product Name: Microsoft® Windows® Operating System
Product Version: 6.1.7600.16385 [6.1.7601.17796]
Company Name: Microsoft Corporation

Unfortunately that did not help either. I still have the code 10 error messages.
I did not have to de-install acronis either.

Now, knowing there is only windows drivers and nod32 left, i disabled nod32 for a moment and inserted my device. And it loaded the driver without a error message and the drive was accessible.
It seems that my virusscanner still blocks them or scans mass storage devices on mu usb ports.
Now i have to figure out why this happens.
Kind of a bummer, because i always have been pleased with eset nod32.


For the program to see what filter drivers are installed :
www.bustrace.com/downloads/devfilter.exe

General website :
www.bustrace.com

See here for more information about filter drivers.
https://en.wikipedia.org/wiki/Filter_driver

A filter driver is a Microsoft Windows driver that extends or modifies the function of peripheral devices or supports a specialized device in the personal computer. It is a driver or program or module that is inserted into the existing driver stack to perform some specific function. A filter driver should not affect the normal working of the existing driver stack in any major way. Written either by Microsoft or the vendor of the hardware, any number of filter drivers [1] can be added to Windows. Upper level filter drivers sit above the primary driver for the device (the function driver), while lower level filter drivers sit below the function driver and above the bus driver.

Filters may work on a certain brand of device such as a mouse or keyboard, or they may perform some operation on a class of devices, such as any mouse or any keyboard.

The Windows Dev Center - Hardware pages explain upper and lower filter drivers in detail.[2]

For example, the generic USB camera (UVC) driver usbvideo.sys is a function driver, while the bus driver handles USB data from the host controller devices. A lower level filter modifies the behavior of the camera hardware (e.g. watching for interrupt packets from a camera switch) and fits between the function and bus drivers. An upper level filter typically provide added-value features for a camera, such as additional processing of the video stream (e.g. colour changes, identification of objects, applying overlays), and fit between the function driver and the user application that has connected to the camera.

Another type of filter driver is the bus (e.g. USB, PCI, PCIe) filter driver, which may be added on top of the bus driver. For example, an ACPI bus filter is added to support power management for each device.

Microsoft has a list of all filter driver classes but their site is huge and personally i find it a mess. I found it once but when googling for it , i can no longer find it.
 
May 11, 2008
21,665
1,294
126
Sometimes it can be that a usb device is no longer working. But how can you force windows to uninstall the drivers and start new ?

I did the following :

In order to do more test, i tried to uninstall the driver.
How do i do that without plugging in the usb device ?
Well, windows stores in the registry all usb devices that have ever been plugged in and where in the past successfully a driver was loaded and installed. But normally, windows does not show these devices, not even when you check "Show hidden devices" in the device manager.
Microsoft has a hidden feature in windows that can help debug your usb device. I found after a bit of googling.

Open a command prompt box :

Type or copy and paste this :
SET DEVMGR_SHOW_NONPRESENT_DEVICES=1
Press enter.

Now type :
devmgmt.msc


Check "Show hidden devices" in the device manager to see all devices registered by windows.

I uninstalled the driver for my usb stick to see if that would help...

But unfortunately, that did not help me. :(
But for some people it may help to re install the drivers for an usb device or any other device that is currently not connected to the pc.
 
Last edited:
May 11, 2008
21,665
1,294
126
Perhaps i have found it finally.

It works now, it seems that either my virusscanner was the problem or it is my prolific usb to serial converter. I disconnected my serial to usb adaptor from prolific from my hub and now i no longer need to disable my on access virus scanner. I connect my HDD to the HUB and everything else, because it can deliver more current. and protects my pc from any issue that might arise.
I will have to try it a few more times to see if that was the problem all along.
The strange thing is that once it works for a given drive, there is no longer any issue. Until i turn my pc off and on again.
 
Last edited:
May 11, 2008
21,665
1,294
126
I did not insert my prolific usb to rs232 adaptor, turned on my pc and i just plugged in my usb memory sticks with my virus scanner fully enabled and it all works. No more error code 10 and the driver is loaded without any issue.

It used to work until i got an update a few months ago.
I can remember that there was an prolific driver update as one of the windows updates.
Before that update, my prolific usb to rs232 adaptor would not always work, i had to unplug it and plug it in again into my desk hub. I tried it also with a roothub from the mainboard to see if my hub on my desk was the issue but i had the same issues. Until that driver update came. After that, my prolific usb to rs232 adaptor would always work. But for some reason, at around the same time i think, my mass storage devices would come up with error 10 codes. Maybe i have finally found it. Kind of simple issue. That i never thought off. :oops:
 
Last edited:
May 11, 2008
21,665
1,294
126
Tested it again, When windows starts up with the prolific usb to rs232 adaptor in a usb port, mass storage devices will come up with error code 10 (Driver not loaded).
When re-inserting the mass storage devices, the mass storage devices work.
Just now i restarted windows and now leave the prolific usb to rs232 adaptor unconnected, and insert any mass storage device, the driver is loaded correctly. No problems. Now i have proof.
What a strange problem.
 

tommo123

Platinum Member
Sep 25, 2005
2,617
48
91
in win7 and earlier (80% sure it ended with win8) you had a file called infcache.1 and if you had a usb device that failed to work then IME after deleting that file and reconnecting the device it seemed to load the device properly again. haven't had that problem yet (knock wood) in win 10.

will read through this thread properly in case (just in case i need it in future) your links point to an equivalent fix for win10
 
May 11, 2008
21,665
1,294
126
in win7 and earlier (80% sure it ended with win8) you had a file called infcache.1 and if you had a usb device that failed to work then IME after deleting that file and reconnecting the device it seemed to load the device properly again. haven't had that problem yet (knock wood) in win 10.

will read through this thread properly in case (just in case i need it in future) your links point to an equivalent fix for win10

I guess it makes sense that windows 10 also keeps a database in the registry about all connected devices. it makes sense that windows uses that as cache.
I guess filter drivers are still used as well in windows 10.

I have started programming again and i need my prolific usb to rs232 adapter again. When i plug it in, it sometimes does not load the driver and comes with an error 10. So strange. But i rather have it with this adapter than with my usb mass storage devices. I just pull it out and plug it back in. This situation, i can live with.