Windows 10 DWM Priority

Talk about NVIDIA G-SYNC, a variable refresh rate (VRR) technology. G-SYNC eliminates stutters, tearing, and reduces input lag. List of G-SYNC Monitors.
Fluffy
Posts: 8
Joined: 02 Mar 2017, 22:54

Windows 10 DWM Priority

Post by Fluffy » 01 Oct 2018, 09:25

Searched through forums, couldn't find anything specific about that.

I dual-boot Win 10 and Linux and sometimes like to test and see how the same games perform in different OSes. Apparently, some of the games in Linux, have produced a better image clarity. Done some additional tests, and strangely enough, I did eventually get improved results in Windows 10 (much clearer and responsive image). Tested on various openGL and D3D, old and new games, as well as with Oculus Rift (had a very noticeable improvement, maybe due to the lower persistence). All it took was changing dwm.exe (Windows Display Manager) priories to the lowest possible values (EDIT: some NV Profile Inspector settings are also needed).

I think that different display managers behaving differently (unfortunately, in Win 10, we can't completely disable DWM, however, we can set it to the lowest priorities, which (just a guess) might somehow restrict it from interfering with the pipeline). I don't know if it is just my config/system or something that would benefit some other people, but would like to find out.

Nevertheless, could anyone with a G-Sync monitor or Rift, do me a favor and test something out please? Could you change Windows 10 DWM priorities and tell if you notice any difference in image quality (clarity, input lag, blur)?

You can just go to the Task Manager > Details > dwm.exe >right click > set to Low (works straight away, no need to reboot or anything, you can even alt-tab from a game). However, I have noticed that the better way, is to do it through the Process Hacker x64 utility (seems I can get more consistent results).

In the Process Hacker utility find the dwm.exe, then right click and set: Priority to Idle; I/O priority to Very Low; Miscellaneous > Page Priority to Very Low (page file priority, but for good measure). Don't worry, they do reset to defaults after system reboot.

Just in case, some of my system specs:

Windows 10 Pro x64 (1803)
MSI GTX 970 (@1518/4000) (411.70)
i5 6600k (@4.8) + 16GB DDR4
Acer Predator XB241H (@144Hz, OD- Extreme; Capped@140 fps through RTSS)
RTSS (7.1.0.15378)
NVCP (V-Sync - Force ON; Triple buffering OFF; G-Sync - ON; Resolution/Color/Scaling settings - NV default)
NV Profile Inspector (Maximum pre-rendered frames - 1; Maximum frames allowed - 0x00000001; Frame Rate Limiter Mode - V2 Force Off; Frame Rate Limiter - 0x00200000 PS_FRAMERATE_LIMITER_DISALLOWED; MAX_PENDING_CMD_BUFFERS - 0x00000000 Off; Enable Ansel - 0x00000000 ANSEL_ENABLE_OFF)

Update

I have double-checked some variables and done some additional tests.
In order to get the effect you need 2 things. 1) Set the DWM priorities to the lowest states as described above. 2) Use NV Profile Inspector and set: Frame Rate Limiter Mode - Limiter V2 Force Off; Frame Rate Limiter - 0x00200000 PS_FRAMERATE_LIMITER_DISALLOWED. Without one or another, I have struggled to recreate the effect.

Also, maximum pre-rendered frames should be at one, obviously. Don't worry about Command Buffer as it should be off by default.

Update 2

Have done some further testings. Recreated the effect with only one DWM priority. Through the Process Hacker, the Priority was set to Idle. Changing the states of any other priorities was not needed. Although, when testing in-game, and constantly alt-tabbing from full screen and back, it would seem that, sometimes, the dwm.exe had to be restarted in order to get the effect (no need to leave the game, just service restart and then alt-tab back to the game).

Nevertheless, the settings in the NV Profile Inspector had to be kept as described above, as setting any of the two to their defaults, would remove the effect (have not tried any other combinations).

In addition, it seems that the effect is not dependent on the G-Sync mode, as I was able to see similar behavior while in ULMB or Fixed Refresh modes (after all, Rift was getting the same effect as well). Some further tests needed.

Update 3

After some thorough testing, the UFO tests did not show any improvements (the first impression was deceiving). Same goes for applications (e.g. Windows Apps, browsers). However, media players (MPV with the D3D11 render, MPC-HC) did, be it not that noticeable as in games. In comparison with openGL or D3D, Software Rendering modes in several old games (Quake 1, Quake 2, Unreal...), did not provide any improvements. Triple buffering ON, or V-sync ON without capped frames, making the effect more subtle (expected, since they usually introduce more lag/motion blur). Reloading graphic driver in Windows (e.g through CRU), removes the effect, although, after reloading dwm.exe, it comes back.

So far, the effect appears in openGL, D3D and Vulkan applications only (+ MPC-HC EVR). The effect itself is seem to be nothing more, but a slight reduction in motions blur (more noticeable in fast-paced games, especially when no post-processing filters applied). The reduction in motion blur is very similar to the difference between Overdrive OFF and Overdrive Extreme settings on my monitor (OD OFF + tweaks = OD Extreme + No tweaks), but without all the drawbacks of OD.

Would appreciate any feedback. Thank you.

Update 4 - Final

Everything is good now. In fact, never had such a fluid, crisp and responsive image on my G-Sync monitor. Without thorough explanations, the problem was due to the Windows 10 approach to the interrupt requests and priorities scheduling, or more precisely - ISRs (IRQ mode would glitch the ISRs of DirectX Graphic Kernel by constantly executing it). This is why fiddling with DWM priorities or NV Profile Inspector settings would result in improvements. After switching 970 GTX to the MSI mode (thanks to mbk1969 of guru3d) (https://forums.guru3d.com/threads/windo ... ts.378044/) the "effect" I was talking about (in fact, normal operation) is now persistent. By switching to the MSI mode, disabling HPET and providing some additional tweaks to decrease DPC latency, I was able to make Windows 10 even more responsive than my Arch Linux with Zen kernel (Average measured interrupt to process latency - 1.5µs; Average measured interrupt to DPC latency - 0.5µs, @ Timer Resolution - 0.997ms, even less with 0.5ms). Image fluidity and clarity are immense, so is the input lag.
Last edited by Fluffy on 20 Dec 2018, 19:24, edited 23 times in total.

mello
Posts: 194
Joined: 31 Jan 2014, 04:24

Re: Windows 10 DWM Priority

Post by mello » 01 Oct 2018, 09:54

DWM is required for Aero from what i remember, at least on Windows 7. When i disabled Aero/DWM on Windows 7 long time ago i was getting a constant tearline on UFO crosstalk test, meaning it caused synchronization problems. I don't think there are any benefits of either disabling or lowering priority for dwm.exe

Fluffy
Posts: 8
Joined: 02 Mar 2017, 22:54

Re: Windows 10 DWM Priority

Post by Fluffy » 01 Oct 2018, 10:02

Yes, it was, and still is. Although, in Win 7 you could disable it. Unfortunately, In Windows 10, they have removed such possibility. Can't tell anything about your experience, but I do see the benefits of disabling with my own eyes. I just need more information/tests on it.

Edit. While no doubt you might have seen some tearing (as DWM could provide it's own sort of v-sync, e.g. for windows), this time we have G-Sync to counter it. Rift also have some sort of inbuilt G-Sync/Interpolation.

mello
Posts: 194
Joined: 31 Jan 2014, 04:24

Re: Windows 10 DWM Priority

Post by mello » 01 Oct 2018, 10:12

I played around with it on Windows 7 and saw no benefit. It only caused problems with synchronization in browsers, which was apparent on UFO tests. I might give it another try, this time with your method (lowering priority). Also, you should try using Process Lasso, because then you can do these 4 things on a single process:

- change Priority Class (and force it to Below Normal / Idle)
- change CPU affinity (and force it to use only one thread)
- change I/O priority (and force it to Very Low)
- change Memory Priority (and force it to Lowest)

Fluffy
Posts: 8
Joined: 02 Mar 2017, 22:54

Re: Windows 10 DWM Priority

Post by Fluffy » 01 Oct 2018, 10:30

Sorry I can't tell for Windows 7, only tested it with Win 10. Maybe, in Windows 7 you already getting the best possible results/clarity. Also, haven't tried Lasso, but would imagine it would work in exactly the same way as Processor Hacker, as long as we set DWM's priority and I/O priority to idle/very low. All the tests I've done, were with G-Sync enabled. The clarity that I get is somewhere between my everyday 140fps capped G-Sync and 120 Hz ULMB (not that clear but without drawbacks). Oh yeah, the UFO test produced very subtle improvement, almost subjective, games produced more, and the Rift even more.

Edit. With the priorities set as above (Win 10 of course), in the UFO test, I do not get any slightest hint of tearing, the image is very smooth and very clear (G-Sync). Although, I do get tearing (a constant horizontal stripe at the top, sometimes middle) with ULMB 120Hz in Full Screen. Also, it's not like I was getting a bad image quality before, the picture was very smooth, no artifacts or nothing, but with the priorities it's almost like you shaving off just another few milliseconds of lag, everything just a bit cleaner, crisper, feels more natural, responsive.

User avatar
RealNC
Site Admin
Posts: 2827
Joined: 24 Dec 2013, 18:32
Contact:

Re: Windows 10 DWM Priority

Post by RealNC » 01 Oct 2018, 12:38

This is placebo for sure. DWM process priority cannot possibly have any impact on the pixel colors. DWM is going to produce exactly the same results regardless of priority. There is no possible way for it not to. The only possible effect the CPU priority can have is stutter due to DWM not getting enough CPU time.

Also, DWM is disabled for fullscreen games.

You can take screenshots if you want and then compare them. You will see zero difference.
TwitterSteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

Fluffy
Posts: 8
Joined: 02 Mar 2017, 22:54

Re: Windows 10 DWM Priority

Post by Fluffy » 01 Oct 2018, 14:19

This is not a placebo, I do observe an effect. The difference is not huge by any means. In my opinion, it would pretty much resemble a difference between, let's say, 100Hz vs 140Hz, or capped G-Sync with v-sync ON vs uncapped frames. The question is, however, is something wrong with my system and do I just somehow get things to their normal state, or my system is fine and there is actually some improvements? Or, is Win 10 just a bucket of bolts? After all, I have become curios only because I was getting a slightly better quality in Linux.

Also, I'm not talking about colors, I'm talking about perceived clarity/responsiveness. Thus, I cannot provide you with screenshots, as they will not show anything, it should be observed in person.

Moreover, we do not know exact details of how the DWM is actually functioning, what Win10 is actually using it for, what positive and negative effects it can provide, or how it synergises with applications (including full screen) or the introduced Game Mode. Sure we know the well-known assumptions/facts such as that DWM is supposed to work with windows/windowed only, it is needed for composition and effects, and so on. However, there is always a possibility that it can somehow affect the production of the final image nevertheless (beside the stutters caused by the lack of CPU resources, of course). In regards of the priorities, I can only assume here, but idle/low states can, in theory, disable some system calls.

Nevertheless, thanks for the feedback.

User avatar
RealNC
Site Admin
Posts: 2827
Joined: 24 Dec 2013, 18:32
Contact:

Re: Windows 10 DWM Priority

Post by RealNC » 01 Oct 2018, 21:06

Fluffy wrote:Also, I'm not talking about colors, I'm talking about perceived clarity/responsiveness. Thus, I cannot provide you with screenshots, as they will not show anything, it should be observed in person.
You cannot have a change in "clarity" without changing the colors of the pixels. If you take two screenshots and they look the same, then it is placebo.

ANY change to the image on the GPU side rather than on the display side means it will be captured in screenshots or videos. DWM works on the GPU side.
TwitterSteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

Fluffy
Posts: 8
Joined: 02 Mar 2017, 22:54

Re: Windows 10 DWM Priority

Post by Fluffy » 02 Oct 2018, 09:52

You cannot have a change in "clarity"
Perceived clarity/responsiveness. Please, read the posts more thoroughly.
cannot have a change in "clarity" without changing the colors of the pixels
Blur reduction/strobing (ULMB, Lightboost, etc.), lower response time/lower persistence, higher refresh, PWM flicker, reduced artifacts, reduced tearing, reduced micro-stuttering, reduced lag (v-sync, frame limiters, AA, mouse lag), altered signal, and a bunch more. Once again, please, read the posts more thoroughly.
If you take two screenshots and they look the same
If you send me a pursuit camera for a MPRT test, I will.
ANY change to the image on the GPU side rather than on the display side means it will be captured in screenshots or videos
Don't even know how to comment on that... Perceived Image Clarity, I don't know where did you get the "image on the GPU" from. Try and capture reduced input lag and thus, improved motion blur and perceived clarity with a screenshot. Moreover, I thought I have made it clear, I do not know what is causing the change, and simply asked for some tests, in order to see if my results can be reproduced by using the same variables. Also, you might want to try capturing some of the GPU hardware related artifacts through a Print Screen and see how it goes.
it is placebo
Alright, alright, you got me there!
DWM works on the GPU side
Nice find! However, I bet you don't know how the DWM actually works. A quick search through some other forums and message boards, can provide us with an idea, that there are quite a few other users, who, in one way or another, have experienced certain problems with DWM (Win 7-8-10), including higher input lag in full screen applications. Also, you might try to read my original post, this way, you might actually see that there is a little edit, which mentions NVPI frame limiter settings as a synergy with DWM.

Having said all of the above. All of these, is not an area of my expertise, I do not possess the needed scientific knowledge. However, judging by your posts and remarks (lack of any useful information, and absence of any test results), I would imagine, neither do you. So, I don't know about you, but I would rather stop speculating and assuming, and humbly wait for someone who might actually do some tests and come up with some experimental results or replications. This way, I can evaluate and proceed further. But hey, thanks anyway, for your participation and feedback...

All the best

User avatar
RealNC
Site Admin
Posts: 2827
Joined: 24 Dec 2013, 18:32
Contact:

Re: Windows 10 DWM Priority

Post by RealNC » 02 Oct 2018, 10:23

Fluffy wrote:
You cannot have a change in "clarity"
Perceived clarity/responsiveness. Please, read the posts more thoroughly.
To perceive something, it must exist first.
cannot have a change in "clarity" without changing the colors of the pixels
Blur reduction/strobing (ULMB, Lightboost, etc.), lower response time/lower persistence, higher refresh, PWM flicker, reduced artifacts, reduced tearing, reduced micro-stuttering, reduced lag (v-sync, frame limiters, AA, mouse lag), altered signal, and a bunch more. Once again, please, read the posts more thoroughly.
Blur reduction, response time/persistence, refresh rate and PWM flicker are display side. Can you tell us how DWM could possibly affect these? It doesn't.

Artifacts will show up in screenshots or videos.

Tearing cannot happen with vsync.

Micro-stutter will show in videos.

Reduced lag does not affect clarity.

What is "altered signal?"
If you take two screenshots and they look the same
If you send me a pursuit camera for a MPRT test, I will.
You don't need that. That's only for measuring differences between displays. DWM runs on your PC, not on in your monitor. You can just record gameplay video to compare.
ANY change to the image on the GPU side rather than on the display side means it will be captured in screenshots or videos
Don't even know how to comment on that... Perceived Image Clarity, I don't know where did you get the "image on the GPU" from. Try and capture reduced input lag and thus, improved motion blur and perceived clarity with a screenshot.
Input lag does not affect motion blur/clarity.
Moreover, I thought I have made it clear, I do not know what is causing the change, and simply asked for some tests, in order to see if my results can be reproduced by using the same variables.
I did that, and there is zero difference. It looks like placebo, especially since there's no rational reason that could improve motion blur.
Also, you might want to try capturing some of the GPU hardware related artifacts through a Print Screen and see how it goes.
You can capture them just fine. Artifact scanners wouldn't work otherwise.
DWM works on the GPU side
Nice find! However, I bet you don't know how the DWM actually works.
Actually, I do. Which is why I suspect this is placebo.
A quick search through some other forums and message boards, can provide us with an idea, that there are quite a few other users who, in one way or another, have experienced certain problems with DWM (Win 7-8-10), including higher input lag in full screen applications.
Which doesn't affect motion blur.

Also, you might try to read my original post, this way, you might actually see that there is a little edit, which mentions NVPI frame limiter settings as a synergy with DWM. [/quote]
These settings don't do anything. The NV frame limiter is disabled by default unless you actually enable it.
Having said all of the above. All of these, is not an area of my expertise, I do not possess the needed scientific knowledge. However, judging by your posts and remarks (lack of any useful information, and absence of any test results)
What?! You made the claim, you need to prove it. The burden of proof is on you, not me.

My statement still stands: I think this is placebo. Note the "think" part. I leave some room for me to be wrong, but I find it unlikely that I am. In other words, I cannot see a possible reason why your claims could be true, but there could be one I'm not aware of.
TwitterSteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

Post Reply