Help! After installing Windows 8.1, my device fails with error code 19
Published Oct 12 2018 03:45 PM 7,059 Views
Copper Contributor
First published on MSDN on Dec 10, 2013

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.


How to fix code 19 caused by class filter drivers


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…



  1. Did you notice this error code after installing certain software? If so, uninstall that software and reboot the system. If the issue is not fixed, go to the next step.

  2. In Device Manager, uninstall the driver. Right-click the device node showing the error and select Uninstall . From the Action menu, select Scan for hardware changes . This will let the system reinstall the drivers for the device. If the error code 19 issue is caused by a device filter driver, then reinstalling the driver might resolve the issue. If the issue is not fixed, go to the next step.

  3. Determine whether a class filter driver is causing the issue.



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.



  • Edit the UpperFilters or LowerFilters registry entry and remove the service that’s broken and reboot the system. In this example, I removed the “testfilter” value from UpperFilter and rebooted the system. This will fix the code 19 issue but this is not the ideal solution because you may lose functionality of that filter driver. If removing the filter doesn’t compromise the user experience, then this might be the best option.



  • A software package might have incorrectly installed the filter drivers. To get the name of the provider of the software package, search the internet for the service name or the driver filename, you retrieved in the previous steps. From the provider, you might be able to identify the software package that you installed recently before or after the upgrading to Windows 8.1. With that information, uninstall the software or find the latest update from the IHV/OEM Web site and reinstall it.


What are filter drivers, device and class filters…


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.


Important registry keys for filter drivers

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.


Feedback

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.

Version history
Last update:
‎Oct 12 2018 03:45 PM
Updated by: