Forum Discussion
Lhun
10 years agoExplorer
WDDM 2.0 drivers and Rift dk2 support.
I know I've been complaining a lot, and for that I apologize. Last night I became a man possessed. I want to be the first person outisde of AMD and Nvidia themselves to use DX12 and the rift in glorious harmony.
My background is a hardware platform and solutions provider. I was one of the first people using AMD's eyefinity and surround, we built simracing rigs, we played around with TrackIR in the early days for our end users.
I now work in software QA in digital signage across 4 operating systems, so testing betas is what I do. But that's a whole other level.
In my spare time I still love to test bleeding edge hardware. I also like to come up with solutions and fixes for complex hardware issues.
I've written fixes for motherboard bioses. I've Jtagged firmware onto harddisks and saved may a raid stripe in my day. I've compiled custom drivers from source to make webcams from windows 95 work on windows 8.1 64bit. I know my way around this stuff.
The community should know that OVR could release a beta display driver injector for the Rift, on windows 10, which would unlock the potential of directX 12's massive improvements across the board (even on non dx12 titles) with about 15 minutes of work.
Obviously they should do some internal QA, but seriously, JUST REPACKAGE THE DRIVER FOR WDDM 2.0.
Microsoft is providing the DSK for free right now. EVERYTHING except the display profile already works in windows 10, on direct x12, tracking, morph, everything. The only thing that needs to be updated is the extended mode display driver to fit the timing of the virtual monitor that the oculus creates. The HMD is detected properly in everything but extended.
I took the time to create a WDDM 1.2 compatible inf for you.
here you go:
Now, if you turn off signature enforcement, this driver will install and help the rift work in extended mode on windows 8.1 and 7 and so on.
However, because oculus display driver is actually INJECTED into the display driver itself, (really just riftenabler.sys, and it's companion inf), it's unable to properly setup the monitor timings necessary (as it's a pnp default) and you will get a flashing blue/amber light on the rift and errors in attempting direct to rift mode with calls to the 32bit aticfx dll in syswow64 and system32.
I suspect the reason for this is that the locations in the registry, as well as where display drivers in windows look to set the timing (as well as the calls to directX, opengl, etc) the driver have changed due to WDDM 2.0 only. Pre-configuring the rift as an ACTUAL display, should allow at least extended mode. This is why standard monitor inf/sys pairs still work in Wddm 2.0. In fact, by this logic they shouldn't, but I suspect windows imports the timings into the new registry locations, IF the EDID stored in the registry previously is valid (the rift's isn't, more accurately, it doesn't exist.)
The rift display driver is the one thing we don't have the source for, and of course I understand why, but why not get this poppin? Simply make a detection for dx12 + wddm 2.0 and write the changes to the driver. At least extended mode would work.
http://i.imgur.com/4AFc59X.png
http://i.imgur.com/d7RkjOt.png
The Display driver examples for KMOD WDDM 2.0 can be found over at microsoft's github:
https://github.com/Microsoft/Windows-dr ... ideo/KMDOD
But I suspect you don't need to go that far. All you need to do is make a display miniport driver visible to the other WDDM components that are now in play - by changing your inf and adding a few lines to the sys.
I didn't have time to modify this for you because I had to go to work. Hopefully my lack of sleep today will be valuable to someone over there.
Here's riftenabler.inf
I think you know what's missing, and mostly....
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}",UpperFilters,0x00010008,RiftEnabler <- is for the Default PNP windows standard display driver, which doesn't work in wddm 2.0. :geek:
Happy friday.
My background is a hardware platform and solutions provider. I was one of the first people using AMD's eyefinity and surround, we built simracing rigs, we played around with TrackIR in the early days for our end users.
I now work in software QA in digital signage across 4 operating systems, so testing betas is what I do. But that's a whole other level.
In my spare time I still love to test bleeding edge hardware. I also like to come up with solutions and fixes for complex hardware issues.
I've written fixes for motherboard bioses. I've Jtagged firmware onto harddisks and saved may a raid stripe in my day. I've compiled custom drivers from source to make webcams from windows 95 work on windows 8.1 64bit. I know my way around this stuff.
The community should know that OVR could release a beta display driver injector for the Rift, on windows 10, which would unlock the potential of directX 12's massive improvements across the board (even on non dx12 titles) with about 15 minutes of work.
Obviously they should do some internal QA, but seriously, JUST REPACKAGE THE DRIVER FOR WDDM 2.0.
Microsoft is providing the DSK for free right now. EVERYTHING except the display profile already works in windows 10, on direct x12, tracking, morph, everything. The only thing that needs to be updated is the extended mode display driver to fit the timing of the virtual monitor that the oculus creates. The HMD is detected properly in everything but extended.
I took the time to create a WDDM 1.2 compatible inf for you.
here you go:
; Extended mode Display INF file generated by Lhun, you're welcome. 4/10/2015
; CopyLeft, use freely.
[Version]
Signature="$WINDOWS NT$"
Class=Monitor
ClassGUID={4d36e96e-e325-11ce-bfc1-08002be10318}
Provider=%MFG%
DriverVer=4/10/2015, 1.0.0.0
;CatalogFile=YourSignedCatalogFile.cat
[DestinationDirs]
DefaultDestDir=23
[SourceDisksNames]
1=%DISC%
[SourceDisksFiles]
;YourColorProfileFile.icm
[Manufacturer]
%VENDOR%=EDID_OVERRIDE,NTx86,NTamd64
[EDID_OVERRIDE.NTx86]
%PRODUCTID%=OVERRIDDEN-EDID.Install, MONITOR\OVR0003
[EDID_OVERRIDE.NTamd64]
%PRODUCTID%=OVERRIDDEN-EDID.Install.NTamd64, MONITOR\OVR0003
[OVERRIDDEN-EDID.Install.NTx86]
DelReg=DEL_CURRENT_REG
AddReg=OVERRIDDEN-EDID.AddReg, MODE1, DPMS
CopyFiles=OVERRIDDEN-EDID.CopyFiles
[OVERRIDDEN-EDID.Install.NTamd64]
DelReg=DEL_CURRENT_REG
AddReg=OVERRIDDEN-EDID.AddReg, MODE1, DPMS
CopyFiles=OVERRIDDEN-EDID.CopyFiles
[OVERRIDDEN-EDID.Install.NTx86.HW]
AddReg=OVERRIDDEN-EDID_AddReg
[OVERRIDDEN-EDID.Install.NTamd64.HW]
AddReg=OVERRIDDEN-EDID_AddReg
[OVERRIDDEN-EDID_AddReg]
;Base EDID
HKR,EDID_OVERRIDE,"0",0x01,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x3E,0xD2,0x03,0x00,0x00,0x00,0x00,0x00,0x0A,0x18,0x01,0x03,0x80,0x00,0x00,0x78,0xE2,0x60,0xB1,0xAA,0x55,0x40,0xB6,0x23,0x0C,0x50,0x54,0x00,0x00,0x00,0xD1,0xCF,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x72,0x40,0x38,0x3A,0x40,0x80,0x0D,0x70,0x21,0x0A,0x16,0x00,0x0E,0xE0,0x11,0x00,0x00,0x1A,0x72,0x40,0x38,0x3A,0x40,0x80,0x0D,0x70,0x21,0x0A,0x16,0x00,0x0E,0xE0,0x11,0x00,0x00,0x1A,0x00,0x00,0x00,0xFC,0x00,0x52,0x69,0x66,0x74,0x20,0x44,0x4B,0x32,0x0A,0x20,0x20,0x20,0x20,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xE9
;Extension bloc #1, e.g., CEA-EXT, DID-EXT, etc.
HKR,EDID_OVERRIDE,"1",0x01,0x02,0x03,0x04,0x03,0x8E,0x33,0x38,0x3A,0x40,0x80,0x0D,0x70,0x21,0x0A,0x16,0x00,0x47,0x7E,0x00,0x00,0x00,0x1A,0xDE,0x3D,0x38,0x3A,0x40,0x80,0x0D,0x70,0x21,0x0A,0x16,0x00,0x47,0x7E,0x00,0x00,0x00,0x1A,0xD9,0x33,0x38,0x3A,0x40,0xB4,0x18,0x30,0x21,0x0A,0xC6,0x00,0x47,0x7E,0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0
[DEL_CURRENT_REG]
HKR,MODES
HKR,EDID_OVERRIDE
HKR,,MaxResolution
HKR,,PreferredMode
HKR,,DPMS
HKR,,ICMProfile
[DPMS]
HKR,,DPMS,,1
HKR,,PreferredMode,,"1080,1920,75"
[MODE1]
HKR,,MaxResolution,,"1080,1920,75"
[OVERRIDDEN-EDID.AddReg]
HKR,"MODES\1080,1920,75",Mode1,,""
[OVERRIDDEN-EDID.CopyFiles]
;YourColorProfileFile.icm for non-sRGB displays
[Strings]
MFG="OVR"
DISC="Rift EDID Override"
PRODUCTID="OVR Rift DK2 (OVR0003 EDID Override)"
VENDOR="OVR"
Now, if you turn off signature enforcement, this driver will install and help the rift work in extended mode on windows 8.1 and 7 and so on.
However, because oculus display driver is actually INJECTED into the display driver itself, (really just riftenabler.sys, and it's companion inf), it's unable to properly setup the monitor timings necessary (as it's a pnp default) and you will get a flashing blue/amber light on the rift and errors in attempting direct to rift mode with calls to the 32bit aticfx dll in syswow64 and system32.
I suspect the reason for this is that the locations in the registry, as well as where display drivers in windows look to set the timing (as well as the calls to directX, opengl, etc) the driver have changed due to WDDM 2.0 only. Pre-configuring the rift as an ACTUAL display, should allow at least extended mode. This is why standard monitor inf/sys pairs still work in Wddm 2.0. In fact, by this logic they shouldn't, but I suspect windows imports the timings into the new registry locations, IF the EDID stored in the registry previously is valid (the rift's isn't, more accurately, it doesn't exist.)
The rift display driver is the one thing we don't have the source for, and of course I understand why, but why not get this poppin? Simply make a detection for dx12 + wddm 2.0 and write the changes to the driver. At least extended mode would work.
http://i.imgur.com/4AFc59X.png
http://i.imgur.com/d7RkjOt.png
The Display driver examples for KMOD WDDM 2.0 can be found over at microsoft's github:
https://github.com/Microsoft/Windows-dr ... ideo/KMDOD
But I suspect you don't need to go that far. All you need to do is make a display miniport driver visible to the other WDDM components that are now in play - by changing your inf and adding a few lines to the sys.
;++
;
; Copyright (c) 2011 Microsoft Corporation
;
; Module Name:
;
; SampleDisplay.inf
;
; Abstract:
;
; Inf file for Kernel mode display only sample driver
;
;--
[Version]
Signature = "$Windows NT$"
Class=Display
ClassGUID={4d36e968-e325-11ce-bfc1-08002be10318}
Provider=%MSSAMPLE%
DriverVer= 03/15/2011, 0.03.15.0011
CatalogFile=SampleDisplay.cat
[DestinationDirs]
KDODSamp.Files = 12
[SourceDisksNames]
0=%SampleDisk%
[SourceDisksFiles]
SampleDisplay.sys=0
[Manufacturer]
%MSSAMPLE%=MS,NTx86,NTamd64,NTarm,NTarm64
;
; Allow the driver to be loaded on VGA and XGA exposed by PCI bus and ACPI
;
[MS.NTx86]
%SampleDeviceName% = KDODSamp_Inst, PCI\CC_0300
%SampleDeviceName% = KDODSamp_Inst, PCI\CC_0301
%SampleDeviceName% = KDODSamp_Inst, ACPI\CLS_0003&SUBCLS_0000
%SampleDeviceName% = KDODSamp_Inst, ACPI\CLS_0003&SUBCLS_0001
[MS.NTamd64]
%SampleDeviceName% = KDODSamp_Inst, PCI\CC_0300
%SampleDeviceName% = KDODSamp_Inst, PCI\CC_0301
%SampleDeviceName% = KDODSamp_Inst, ACPI\CLS_0003&SUBCLS_0000
%SampleDeviceName% = KDODSamp_Inst, ACPI\CLS_0003&SUBCLS_0001
[MS.NTarm]
%SampleDeviceName% = KDODSamp_Inst, PCI\CC_0300
%SampleDeviceName% = KDODSamp_Inst, PCI\CC_0301
%SampleDeviceName% = KDODSamp_Inst, ACPI\CLS_0003&SUBCLS_0000
%SampleDeviceName% = KDODSamp_Inst, ACPI\CLS_0003&SUBCLS_0001
[MS.NTarm64]
%SampleDeviceName% = KDODSamp_Inst, PCI\CC_0300
%SampleDeviceName% = KDODSamp_Inst, PCI\CC_0301
%SampleDeviceName% = KDODSamp_Inst, ACPI\CLS_0003&SUBCLS_0000
%SampleDeviceName% = KDODSamp_Inst, ACPI\CLS_0003&SUBCLS_0001
[KDODSamp_Inst]
FeatureScore=F9
CopyFiles = KDODSamp.Files
;
; Install driver service
;
[KDODSamp_Inst.Services]
AddService = KDODSamp,0x00000002,KDODSamp_Service_Inst,KDODSamp_EventLog_Inst
[KDODSamp_Service_Inst]
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_DEMAND_START%
ErrorControl = %SERVICE_ERROR_IGNORE%
ServiceBinary = %12%\SampleDisplay.sys
;
; Display Adapter Specific Settings
;
[KDODSamp.Files]
SampleDisplay.sys
[KDODSamp_EventLog_Inst]
AddReg = KDODSamp_EventLog_Inst.AddReg
[KDODSamp_EventLog_Inst.AddReg]
HKR,,EventMessageFile,%REG_EXPAND_SZ%,"%%SystemRoot%%\System32\IoLogMsg.dll"
HKR,,TypesSupported,%REG_DWORD%,7
[Strings]
; *******Localizable Strings*******
MSSAMPLE = "Microsoft Sample"
SampleDisk = "Sample Disk"
SampleDeviceName = "Kernel mode display only sample driver"
; *******Non Localizable Strings*******
SERVICE_BOOT_START = 0x0
SERVICE_SYSTEM_START = 0x1
SERVICE_AUTO_START = 0x2
SERVICE_DEMAND_START = 0x3
SERVICE_DISABLED = 0x4
SERVICE_KERNEL_DRIVER = 0x1
SERVICE_ERROR_IGNORE = 0x0
SERVICE_ERROR_NORMAL = 0x1
SERVICE_ERROR_SEVERE = 0x2
SERVICE_ERROR_CRITICAL = 0x3
REG_MULTI_SZ = 0x00010000
REG_EXPAND_SZ = 0x00020000
REG_DWORD = 0x00010001
I didn't have time to modify this for you because I had to go to work. Hopefully my lack of sleep today will be valuable to someone over there.
Here's riftenabler.inf
; RiftEnabler.inf
;
; Installation inf for the DXGI filter driver to manage installed Rifts
;
; Copyright (c) 2013 Oculus VR. All rights reserved.
;
[Version]
Signature="$WINDOWS NT$"
Class=Display
ClassGuid={4d36e97d-e325-11ce-bfc1-08002be10318}
Provider=%Provider%
DriverVer=03/26/2015,13.0.37.676
CatalogFile=RiftEnabler.cat
[DestinationDirs]
DefaultInstall.Files = 12 ; drivers
DefaultInstall.Display = 11 ; system32
DefaultInstall.Wow = 10, SysWOW64
[Manufacturer]
%Provider%=RiftEnabler,NTamd64
[RiftEnabler.NTamd64]
%RiftEnabler.DeviceDesc% = DefaultInstall.ntamd64, Oculus_Filter
[DefaultInstall.ntamd64]
CopyFiles=DefaultInstall.Files, DefaultInstall.Display, DefaultInstall.Wow
AddReg = DefaultInstall.AddReg
RegisterDlls = DefaultInstall.RegisterDlls
[DefaultInstall.ntamd64.Services]
AddService = RiftEnabler,,RiftEnabler_Service_Inst.ntamd64
[DefaultInstall.Files]
RiftEnabler.sys
[DefaultInstall.Wow]
OVRDisplay32.dll,,,0x00004000 ; COPYFLG_IN_USE_TRY_RENAME
OVRDisplayRT32.dll,,,0x00004000 ; COPYFLG_IN_USE_TRY_RENAME
[DefaultInstall.Display]
OVRDisplay64.dll,,,0x00004000 ; COPYFLG_IN_USE_TRY_RENAME
OVRDisplayRT64.dll,,,0x00004000 ; COPYFLG_IN_USE_TRY_RENAME
[DefaultInstall.RegisterDlls]
11,,OVRDisplay64.dll,1
11,,OVRDisplayRT64.dll,1
10,,OVRDisplay32.dll,1
10,,OVRDisplayRT32.dll,1
[DefaultInstall.AddReg]
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}",UpperFilters,0x00010008,RiftEnabler
[RiftEnabler_Service_Inst.ntamd64]
DisplayName = %RiftEnabler.SvcDesc%
LoadOrderGroup = video
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 1 ; SERVICE_BOOT_START
ErrorControl = 0 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\RiftEnabler.sys
[SourceDisksNames]
1 = %DiskId1%,,,""
[SourceDisksFiles]
RiftEnabler.sys = 1,,
OVRDisplay32.dll = 1,,
OVRDisplayRT32.dll = 1,,
OVRDisplay64.dll = 1,,
OVRDisplayRT64.dll = 1,,
[DefaultUninstall.ntamd64]
DelFiles = DefaultInstall.Files, DefaultInstall.Display, DefaultInstall.Wow
DelService = RiftEnabler,0x200
DelReg = RiftEnabler.DelRegistry
[RiftEnabler.DelRegistry]
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}",UpperFilters,0x00010008,RiftEnabler
[Strings]
SPSVCINST_ASSOCSERVICE= 0x00000002
Provider = "Oculus VR, Inc"
DiskId1 = "RiftEnabler Installation Disk #1"
RiftEnabler.DeviceDesc = "RiftEnabler"
RiftEnabler.SvcDesc = "Oculus VR Rift Display Mgr"
I think you know what's missing, and mostly....
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}",UpperFilters,0x00010008,RiftEnabler <- is for the Default PNP windows standard display driver, which doesn't work in wddm 2.0. :geek:
Happy friday.
5 Replies
- LhunExplorerbump. :P
- auritribeHonored Guest
"Lhun" wrote:
https://msdn.microsoft.com/en-us/library/windows/hardware/hh454827(v=vs.85).aspx ...
Links are broken. - LhunExploreryou have to cut and paste them. it's just the .aspx part that's missing:
edit: I wrapped them in url tags, the bb autocomplete for urls was getting choked up, they work now.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 6 months ago
- 7 months ago
- 7 months ago