问题描述
我一直在测试 UMDF IddCx 视频驱动程序,此消息刚刚开始出现(在 devcon.exe 安装之后...)以及 WinDbg 中的断点:
(DriverEntry and EVT_WDF_DRIVER_DEVICE_ADD handlers succeed as they did prior to this error message)
.
.
.
<==CDriver::OnWdfDriverDeviceAdd [status: STATUS_SUCCESS]
A mismatch between the PNP/INF version and the KMD file version on the graphics adapter has been detected. The adapter will fail to start.
(WinDbg breaks here -- see stack below)
==>CAdapter::OnWdfDeviceD0Entry(hWdfDevice: <hWdfAdapterDevice>,previousState: 5)
.
.
.
堆栈信息(Windows 10 专业版 | 测试模式 | 内部版本 19041.vb_release.191206-1406):
[0x0] dxgkrnl!DpiFdoValidateKmdAndPnpVersionMatch + 0x88e5c
[0x1] dxgkrnl!DpiFdoInitializeFdo + 0x313
[0x2] dxgkrnl!DpiAddDevice + 0x1942
[0x3] nt!PpvUtilCallAddDevice + 0x3b
[0x4] nt!PnpCallAddDevice + 0x94
[0x5] nt!PipCallDriverAddDevice + 0x827
[0x6] nt!PipProcessDevNodeTree + 0x333
[0x7] nt!PiRestartDevice + 0xba
[0x8] nt!PnpDeviceActionWorker + 0x46a
[0x9] nt!ExpWorkerThread + 0x105
[0xa] nt!PspSystemThreadStartup + 0x55
[0xb] nt!KiStartSystemThread + 0x28
我不明白这是什么意思;我没有更改 INF 中的任何内容,这是一个 UMDF 驱动程序,那么它指的是什么“KMD 文件版本”?我搜索了消息本身以及 DpiFdoValidateKmdAndPnpVersionMatch,但结果为空。
编辑:(添加版本信息)
Windows Version Info:
---------------------
Edition ....... Windows 10 Pro
Version ....... 20H2
Installed on .. 1/5/2021
OS build ...... 19042.685
Experience .... Windows Feature Experience Pack 120.2212.551.0
有人能解释一下吗?
解决方法
该符号在 1909 年不存在,因此该符号必须是 20H2 的新增内容
无论如何,有问题的字符串确实存在于 1909 年
失败应该是在 IoQueryFullDriverPath() 和 GetFileVersion() 之后传播的
int3 在 DebugPrintEx()
之后是硬编码的
有问题的函数 ADAPTER_RENDER::Initialize() 正在与硬编码的 DWORDS 进行大量比较,例如“QCOM”等
C:\> radare2 -Q -qq -c "fs strings;f~mismatch" c:\Windows\System32\drivers\dxgkrnl.sys
0x1c0076940 139 str.A_mismatch_between_the_PNP_INF_version_and_the_KMD_file_version_on_the_graphics_adapter_has_been_detected._The_adapter_will_fail_to_start.
C:\> radare2 -A -Q -qq -c "axt 0x1c0076940" c:\Windows\System32\drivers\dxgkrnl.sys
fcn.1c015be84 0x1c0181f01 [DATA] lea r8,str.A_mismatch_between_the_PNP_INF_version_and_the_KMD_file_version_on_the_graphics_adapter_has_been_detected._The_adapter_will_fail_to_start.
我只是在谷歌上搜索与 inf 和 GetKmdFileVersion 相关的内容,看来您需要提供特定的版本字符串 see if you comply with this
特别引用文档
驱动程序将通过以下方式报告 WDDM 2.1 支持 DXGK_DRIVERCAPS::WDDMVersion 带有新的版本常量: DXGK_WDDMVERSION::DXGKDDI_WDDMv2_1 = 0x2100 Dxgkrnl 不会使用 WDDMVersion 上限作为确定哪些新功能是 支持 - 该任务将留给其他大写字母或 DDI 存在。 但是,如果驱动程序通过 WDDMVersion 上限,dxgkrnl 将验证所需的上限或 DDI WDDM 2.1 存在,如果不存在则无法创建适配器。 不一致的大写将导致无法创建适配器或段。
,请尝试添加以下注册表项:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\DisableVersionMismatchCheck = 1 [DWORD 类型]