Authored by Eliyas Yakub [MSFT]
One of the common issues reported in Microsoft answer forum for devices and drivers is: after upgrading to Windows 8.1 or installing software package from a third-party Web site, some devices fail with error code 19 (shown in Device Manager). The error code description is “Windows cannot start this hardware device because its configuration information (in the registry) is incomplete or damaged. To fix this problem you should uninstall and then reinstall the hardware device."
This error might be caused by incomplete installation/migration of class filter drivers. In this blog, I will suggest a fix for the issue and describe filter drivers.
If you are only interested in fixing the issue, read How to fix code 19 caused by class filters . To apply the fix, you should be familiar with registry editor (regedit.exe) and Device Manager (devmgmt.msc).
I do recommend that you read What are filter drivers, device and class filters… This portion of the post contains technical information about filter drivers and will help you understand the fix.
The fix suggested in this section references terms like device and class filter drivers. If you want to know more about those drivers, read What are filter drivers, device and class filters…
a. In Device Manager, right-click the device node showing the error and select Properties . On the Details tab, get the class name of the device as shown in this image for the HID-compliant mouse device:
b. Open registry editor (regedit.exe). Find the class key in the registry by walking the list of GUIDs under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class. For each GUID see if the class name matches the one you noted in the previous step.
c. Check whether the registry key has any UpperFilters or LowerFilters entries. In the preceding image, the value “mouclass” value indicates the name of service. There might be more than one service listed as filters as shown in this image.
d. For each value listed in UpperFilters , determine whether a matching service key exists in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services registry key. In this image, the mouclass service exists and you can see service details on the right side.
e. If the service exists, determine whether the driver file exists in the path specified by the ImagePath entry.
f. If the service is not found in the registry or the driver file is not found, then the device fails with code 19 error. In this case, there is no matching service for the “testfilter” UpperFilter value.
After you have identified the class filter that’s causing the issue, there are two ways you can resolve the issue.
Filter drivers are optional drivers that are loaded by the system, along with a set of other drivers (function and bus) required to service a particular hardware. All drivers are loaded in a stack formation and filter drivers are inserted in that stack to modify the data flow to or from the device. The purpose of class filter is to enhance device experience. For example, legacy touchpads have filter drivers that enhance the touchpad experience by supporting gestures.
Categorizing by functionality, there are mainly two types of filter drivers: device and class filters. A device filter applies to a specific instance of the device. In contrast, a class filter is used for all devices that belong to a specific class. For example, the system might load a device filter for a specific device maker (say Microsoft keyboard) or it can load a filter driver for all types of keyboards, irrespective of the maker.
We can also categorize filter drivers based on where there are loaded in the stack of drivers: UpperFilter or LowerFilter.
The location is specified in the device INF and is with respect to the function driver. An UpperFilter is loaded above the function driver and a LowerFilter is always below the function driver. Let’s enhance the image by applying UpperFilter LowerFilter, device, and class drivers:
So to service a single device, the stack of drivers might include several upper or lower filters that are class or device filters.
Registry settings for device filter drivers are in the device hardware registry key, per device. These entries are under the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\<device hardware id>:
In the preceding image, LcUvcUpper.sys is an upper device filter used by Microsoft Lifecam device. This filter is loaded above the in-box function driver usbvideo.sys.
The class filter drivers are specified under the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Classregistry key.
In the preceding image, kbdclass is a Microsoft-provided in-box class filter driver for all keyboard devices. Irrespective of the maker of your keyboard, this filter is always loaded above the function driver (kbdhid.sys) for the device.
Most code 19 issues are due to third-party class filters. For Microsoft-defined classes, class filters are provided by Microsoft. It’s not a good practice for third parties to install class filter because their filter driver could be loaded on drivers from other vendors, creating reliability issues. However, there are third parties that install class filters to enable new scenarios and workaround device issues. The major issue is that they don’t install the filters in a way that system can migrate the drivers cleanly on upgrade.
Instead of using INF file, some create registry settings programmatically, and store the driver file in a private folder instead of copying it to the system32\drivers folder. When filters are installed in a non-standard way, the system fails to migrate the various pieces required for a device stack to work correctly.
If you are able to get your issue resolved, please post a comment describing what the issue was - whether service or file was missing - and a description of the product name and filename, so that we can work with the provider to address the problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.