Discussion: NVIDIA Display Driver (nvlddmkm.sys) DPC Latency

Status
Not open for further replies.
Today me and glxxmybxy tried to fix his wdf01000 and nvlddmkm issues on his system but unfortunatelly didnt get to the great results.
First of all he use official windows build with a lot of things done wrong like using online microsoft account with windows hello services and other useless services enabled. He have a lot of different software installed like NZXT controll center etc. We tried to install 441.41 driver on his rtx 3090 but no success,even with INF modding it gives error 43. He tried to apply my deadly dword tweak on 527 driver and it didnt change anything.
We checked the IRQ conficts and other things,everything was setup fine,but his wdf01000 gives not thousands but millions of ISR's. So now im starting to think what 3rd party devices and usb peripherals could really impact wdf01000 and nvlddmkm like Hellbovine said.
In conclusion :
I did recommend him to clean install NTLITE windows build 22h2 by FR33THY and start installing drivers manually one by one.
We'll see how it goes,anyway every day we get closer and closer to solving this,step by step.
hi guys! I have too this problem of high latency. I used LatencyMon and I see with nvidia driver a latency between 3000ms and 9000ms, with Wdf01000.sys 11000ms (and also a lot of ISR Count) and of course dxgkrnl.sys the same.

PC Type: Desktop
Operating System/Version: Windows 11 PRO 22H2 original
Processor: AMD RYZEN 7 5800x
Graphics: NVIDIA 3060 on PCIEX16gen4 slot1 & AMD 460(560firmware) on slot 2 PCIEX8gen3
Driver Type: Game Ready
Driver Version: 527.56

right now I'm available to do any test you want, I'll also leave here my telegram contact (https://t.me/vorshim92). Ask what you want xD (i have also dual gpu so there is a problem if nvidia driver crash) and don't worry for any trouble, I'm perfectly capable of reversing any problem if we fail.
 
Last edited:
I'm in a rush this morning so I'm gonna throw all this text on here and don't have time to clean it up. But I don't want to forget anything so I want to pass it along since I may be unable to work on things for a while, due to real life being busy and wife is yelling at me right now to hurry up so we can run errands lol.

INTRODUCTION
I worked on this quite a bit last night, I felt like I made progress, but it just continues to affirm that I don't think it's something we can fix. While we can of course reduce and fix DPC in general by tweaking Windows and identifying bad drivers and trying other versions, etcetera, I think this Nvidia+OS is likely not going away until it's patched by those companies.

This problem is actually extremely rampant, like here's how bad it is: Not only did this thread manage to reach the first page in the NTLite "General" forum in 5 months due to so many views, but if you type in "nvlddmkm" into Google this thread here is now on the first page and is rank 8. When I went to bed last night it was rank 10.

Anyone that knows about SEO (search engine optimization) knows that it is extremely difficult to reach page 1 on Google, there are a lot of factors (literally 200+) that go into it, and this NTLite thread managed to do it in a very short time period, beating out all the other forums and sites that discuss the issue which have been posted for many years.

TESTING
What I was looking at last night was ProcMon (from sysinternals) and I set it up so that I would run LatencyMon and then start logging in ProcMon, and as soon as an Nvidia spike occurred I would stop the logger and then try to identify what happened in background acitivity (files being written, threads opened/closed, registry keys queried) that correlated to the spike. I did this about 50 times trying to isolate the issue.

The result was that nearly every time Nvidia spikes, the Lsass.exe and DWM (Desktop Windows Management) are kicking in. This isn't a sure thing though, because these 2 items are running all the time, so it could be coincidence. Further tests are needed. If they are the problem, then this is probably bad for us. Lsass.exe is a critical component you can't manhandle without serious consequences, and it's why viruses targeted it in past years. DWM started in Windows Vista. Somewhere along the line apparently DWM now enforces Vsync on the Windows Desktop too, and DWM as well as the Vsync change is when people started experiencing issues with latency.

Vsync by nature is something that adds latency, so it makes sense if it is a contributing factor, and additionally helps explain why the FSE (full screen exclusive) and borderless changes to Windows started causing poor gaming performance in W10 and W11. So maybe the real key is in FSE/FSB which is handled in the Xbox registry. Xbox is actually the wrong word, Microsoft should not have labeled it that way because it isn't xbox related at all.

Lsass.exe is it's own DPC nightmare because it's stack is huge, and it just handles so much stuff. Together, it makes sense why these 2 things would cause spikes. How to fix it though? I don't know that we can. We can investigate every single file inside the Lsass stack and try to figure out which ones are tweakable and see if we can fix the problem, but this is really something Microsoft/Nvidia need to do.

DWM on the other hand can be tweaked to a fair degree. You cannot straight up disable it though without it breaking desktop/taskbar components however. But I think the reason I have good latency (without the Nvidia driver installed) is largely in part because of the way I tweak my DWM settings, which is much different than how everyone else does. This is theory though, I haven't had time to remove my tweaks and compare yet, since I added those tweaks as a fix to different issues in Windows and DPC wasn't the motivation.

POSSIBLE SOLUTIONS
If anyone wants to experiment with my DWM method, I have a post (link1) on it already.

For anyone having general DPC issues that aren't coming from Nvidia, I would strongly urge them to try this (link2) and see how that install works in comparison. It's a very "safe" image that does not break anything at all, it was specifically designed to be "for everyone". I know on this forum we tend to say "there is no one size fits all" but this image was designed to be one size fits all. I approached it in a way that was entirely "official". Meaning, Microsoft could have made these changes, and it doesn't include any snakeoil, or any controversial stuff with perhaps the exception of the pagefile, which is disabled, but you can easily enable it again or remove it from the tweaks. My DWM changes are included in that, as well as my power plan which is better than high/ultimate/bitsum combined.

Lastly, at this point I think the right way to solve this is for as many people as we can get to go file support tickets with Nvidia, as well as Microsoft (you can use FeedBack Hub to do it from the start menu), and link to this thread in your report. I would then urge everyone to contact all the computer/gaming news article sites and link this thread too. I already did all 3 of these, I contacted 20 news sites and none of them responded.
 
Last edited:
I'm in a rush this morning so I'm gonna throw all this text on here and don't have time to clean it up. But I don't want to forget anything so I want to pass it along since I may be unable to work on things for a while, due to real life being busy and wife is yelling at me right now to hurry up so we can run errands lol.

INTRODUCTION
I worked on this quite a bit last night, I felt like I made progress, but it just continues to affirm that I don't think it's something we can fix. While we can of course reduce and fix DPC in general by tweaking Windows and identifying bad drivers and trying other versions, etcetera, I think this Nvidia+OS is likely not going away until it's patched by those companies.

This problem is actually extremely rampant, like here's how bad it is: Not only did this thread manage to reach the first page in the NTLite "General" forum in 5 months due to so many views, but if you type in "nvlddmkm" into Google this thread here is now on the first page and is rank 8. When I went to bed last night it was rank 10.

Anyone that knows about SEO (search engine optimization) knows that it is extremely difficult to reach page 1 on Google, there are a lot of factors (literally 200+) that go into it, and this NTLite thread managed to do it in a very short time period, beating out all the other forums and sites that discuss the issue which have been posted for many years.

TESTING
What I was looking at last night was ProcMon (from sysinternals) and I set it up so that I would run LatencyMon and then start logging in ProcMon, and as soon as an Nvidia spike occurred I would stop the logger and then try to identify what happened in background acitivity (files being written, threads opened/closed, registry keys queried) that correlated to the spike. I did this about 50 times trying to isolate the issue.

The result was that nearly every time Nvidia spikes, the Lsass.exe and DWM (Desktop Windows Management) are kicking in. This isn't a sure thing though, because these 2 items are running all the time, so it could be coincidence. Further tests are needed. If they are the problem, then this is probably bad for us. Lsass.exe is a critical component you can't manhandle without serious consequences, and it's why viruses targeted it in past years. DWM started in Windows Vista. Somewhere along the line apparently DWM now enforces Vsync on the Windows Desktop too, and DWM as well as the Vsync change is when people started experiencing issues with latency.

Vsync by nature is something that adds latency, so it makes sense if it is a contributing factor, and additionally helps explain why the FSE (full screen exclusive) and borderless changes to Windows started causing poor gaming performance in W10 and W11. So maybe the real key is in FSE/FSB which is handled in the Xbox registry. Xbox is actually the wrong word, Microsoft should not have labeled it that way because it isn't xbox related at all.

Lsass.exe is it's own DPC nightmare because it's stack is huge, and it just handles so much stuff. Together, it makes sense why these 2 things would cause spikes. How to fix it though? I don't know that we can. We can investigate every single file inside the Lsass stack and try to figure out which ones are tweakable and see if we can fix the problem, but this is really something Microsoft/Nvidia need to do.

DWM on the other hand can be tweaked to a fair degree. You cannot straight up disable it though without it breaking desktop/taskbar components however. But I think the reason I have good latency (without the Nvidia driver installed) is largely in part because of the way I tweak my DWM settings, which is much different than how everyone else does. This is theory though, I haven't had time to remove my tweaks and compare yet, since I added those tweaks as a fix to different issues in Windows and DPC wasn't the motivation.

POSSIBLE SOLUTIONS
If anyone wants to experiment with my DWM method, I have a post on it already here.

For anyone having general DPC issues that aren't coming from Nvidia, I would strongly urge them to give my optimized image guide a try, and see how that install works in comparison. It's a very "safe" image that does not break anything at all, it was specifically designed to be "for everyone". I know on this forum we tend to say "there is no one size fits all" but this image was designed to be one size fits all. I approached it in a way that was entirely "official". Meaning, Microsoft could have made these changes, and it doesn't include any snakeoil, or any controversial stuff with perhaps the exception of pagefile (it's disabled, but you can easily enable it again). My DWM changes are included in that, as well as my power plan which is better than high/ultimate/bitsum combined.

Lastly, at this point I think the right way to solve this is for as many people as we can get to go file support tickets with Nvidia, as well as Microsoft (you can use FeedBack Hub to do it from the start menu), and link to this thread in your report. I would then urge everyone to contact all the computer/gaming news article sites and link this thread too. I already did all 3 of these, I contacted 20 news sites and none of them responded.
I totally agree the fact that it's probably beyond our control. But I will continue to test and try until I'll find a good position. So I will try to install an Optimized Image following your guide as first step. thanks

p.s. can I ask which Windows version is better for gaming?
 
Last edited:
I totally agree the fact that it's probably beyond our control. But I will continue to test and try until I'll find a good position. So I will try to install an Optimized Image following your guide as first step. thanks

p.s. can I ask which Windows version is better for gaming?
Which operating system is best for gaming is subjective to each person's needs. Once cleaned out with Ntlite I found windows 11 better then a clean out Ntlite windows 10.

I had more issues with windows 10 for some weird reason then 11 for most of my stuff I do(this isn't just because it is newer it just worked better for me)
 
Which operating system is best for gaming is subjective to each person's needs. Once cleaned out with Ntlite I found windows 11 better then a clean out Ntlite windows 10.

I had more issues with windows 10 for some weird reason then 11 for most of my stuff I do(this isn't just because it is newer it just worked better for me)
thanks for the answer. maybe I expressed badly my question. I meant which Windows update version, not only W11 vs W10. For me it's not a question of each person's needs, at most it might change based on your hardware but I thinks that there is a version that is better for gaming purpose.
 
thanks for the answer. maybe I expressed badly my question. I meant which Windows update version, not only W11 vs W10. For me it's not a question of each person's needs, at most it might change based on your hardware but I thinks that there is a version that is better for gaming purpose.

Everyone as a rule has their own opinion on which is a better OS for gaming. i don't really know what you mean by which update version.... the update version doesnt really matter to the majority of us who game unless there are issues, but those issues can always be down to an individual case or build.
 
Everyone as a rule has their own opinion on which is a better OS for gaming. i don't really know what you mean by which update version.... the update version doesnt really matter to the majority of us who game unless there are issues, but those issues can always be down to an individual case or build.
Yes of course. For example I think it is indisputable that windows 11 has many problems with amd processor and I was wondering if there is a windows 10 version like 21h2 or 20h2. I ask this just because reading this 3D I see many people saying that maybe there was a old version of windows 10 that gives less troubles on gaming, regarding also driver and DCP latency.
But from your answer I understand that there isn't a precise one . I will try by myself starting with windows 10 pro 22h2 and the gaming preset I found in another 3d. Wish me good luck
 
Last edited:
Re: OS choice

Everything Taosd said is spot on, generally things should be fairly equal, barring any bugs/compatibility issues. The Gaming Lounge (link1) will give you additional information to consider, and we also discuss this topic in the Windows Market Statistics (link2) thread too. Please keep in mind everything I say is targeted at gamers, and it's assuming that you are on this forum because you are tweaking things.

Benchmarking is the only real way to know what is best for your specific machine (combination of bios/hardware/drivers), and because this topic keeps coming up so much I'm going to write up 2 new threads in the future. One will be how to benchmark, walking people through exactly what tools to use, what to click on, etcetera. This way instead of things being subjective, they become objective based on real world data and not just what people heard from a guy on a forum or YouTube, and you can learn how to replicate findings yourself. The other thread I'm going to write up will be benchmarking results of several builds, including the 4 NTLite presets, and some other things, so that people can get an easy summary and better understand what to look for.

MY OPINION ON WINDOWS
I'm personally on W10 21H2 right now. I have no issues on my optimized build, except for this Nvidia problem, but that issue is affecting almost everyone on both W10/W11, and hasn't been narrowed down to a particular version as a culprit. One major thing important to me is that W10 won't be getting as many changes as W11 will each year, so W10 will generally be less hassle to tweak going forward.

W10 reaches end of life in October of 2025, unless Microsoft cannot get people to adopt W11 in which case they will extend it. I suspect this will happen because W11 adoption is low right now, but we'll know more soon by the start of February 2023, since Windows 8.1 and W10 21H1 will have both reached end of life, and most of those users will move to something else. I suspect W12 will get announced before W10 reaches end of life too and that will throw a wrench in things.

One big problem with tweaking and using the latest OS like W11, is that Microsoft is constantly re-wiring things under the hood, changing registry keys, and how things function, like they did in the 14 versions of W10. This matters because various tweaks will be overwritten and break over time, meaning you have to re-test everything quite often and it's not a good use of an enthusiast's time, when a mature OS like W10 still hasn't been mastered yet. W11 22H2 just released for example, and it had to be pulled/blocked by Microsoft because of bugs, and they announced that a lot of registry keys and policies got added and changed.
 
Last edited:
btw I found this interesting paper about latency: CALYPTO's LATENCY
take a look
Its already known pretty much by everyone. Great guide but i think author underestimate AMD power. Im confident it is possible to squeeze great latency from modern Ryzen CPU's,it just needs different reach.
My old screenshots is perfect example.
I guess i should push FCLK to 2000 and memory to 4000mhz,that way i could "breathe in the back" of Intel.
 

Attachments

  • 1.png
    1.png
    51.2 KB
  • 2.png
    2.png
    71.6 KB
Ca
Its already known pretty much by everyone. Great guide but i think author underestimate AMD power. Im confident it is possible to squeeze great latency from modern Ryzen CPU's,it just needs different reach.
My old screenshots is perfect example.
I guess i should push FCLK to 2000 and memory to 4000mhz,that way i could "breathe in the back" of Intel.
Can you make a run of 5 minutes.....a lot can happen in that time.
 
If anyone is having issues with ntoskrnl.exe latency there is now a fix that works well. What needs to happen is download powersettingsexplorer and open it up. What it will do is unlock additional power options in your power settings.

Go down the list and make sure processor idle denote threshold and processor idle promote threshold is unchecked. Then open your control panel and go into your power settings and advanced. Processor should now have two additional settings. Changed those to 100 percent for both and restart. Try again and see if it fixed the issue for you.
This is what I posted the other day already :p

Look at that folder I uploaded for Clanger, inside is a Power_IdleStates.reg and it has both these keys and sets them to 100% on the high performance power plan. It doesn't fully eliminate CPU downclocking though, which is why I didn't include them in V1.0 of my optimized image guide, because there are relevant companion keys that still need to be discovered in order to fully stop the downclocks.
 
Last edited:
power optimised.reg didnt break brick or bugger up my w7.
That's good to know. It wasn't designed for older OS's, but it makes sense according to what I've read in Microsoft documentation. I think the way they tackled that registry tree is that they keep adding keys to it over time, while keeping the older ones. So you could probably even apply that reg to like XP or Vista and it'll be okay. I could be wrong obviously since I haven't tested that aspect, but I think if you export the power tree on the older OS's they probably just have many less options, meaning a bunch of the new ones you applied to W7 just don't *do* anything, good or bad.
 
if i remember correctly(and i usually do) importing a w10.pow plan on w7 os gives a warning that some entries will be skipped.
a lot of the sttings will be common to "most" os with some specific to each os/build(w10).

if you compare os inbox and 3rd party pow files you can see what needs to go up and what needs to go down but there are some settings that are midway/same on all of them, you dont know whether to go up or down.

earlier thoughts were that with those up or downers? was just delete those settings and see what happens.
 
Last edited:
if i delete a power plan with the command line that plan guid still exists in multiple places, im not talking about 5 or 6, they are all over the place, i'll try to grab something for information purposes.

registry search for default high performance, searched and exported from Registrar.
 

Attachments

  • Advanced Registry Search.txt
    220.3 KB
Last edited:
If you or anyone else can export the power tree from any of the older OS's like XP or 7, it might help us to document some of those hard to figure out keys, like the ones you mentioned which all 3 plans have equal values on so we don't know to go up or down. I know what you mean 100% there and it's why those ones are still on my todo list. Since power savings wasn't as important in the old days, it might show us which way to go:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings

The "User" tree isn't the one we want, since that's where the user-modifications are kept. The true "defaults" are in "PowerSettings" instead. So if you were to click "Restore plan to default" in the power control panel, it pulls all the keys from "PowerSettings" to do that.
 
XP Hi-Po default, as it wont have all the power saving muck. Use Registrar Registry Manager, same people for latency mon.
 
Status
Not open for further replies.
Back
Top