Desktop window manager's affect on input latency

Everything about latency. Tips, testing methods, mouse lag, display lag, game engine lag, network lag, whole input lag chain, VSYNC OFF vs VSYNC ON, and more! Input Lag Articles on Blur Busters.
deama
Posts: 370
Joined: 07 Aug 2019, 12:00

Desktop window manager's affect on input latency

Post by deama » 25 Jun 2020, 12:04

So after some experimentation and through the use of presentmon.exe, I was able to find out that the desktop window manager (dwm.exe) is giving me a latency of 7.83ms, and this is just for the desktop, in games this increases to about 10.5ms. Well actually it's much higher in games, but through the use of RTSS, I was able to lower it down to 10.5ms, originally it was 16.5ms, and for a friend of mine, he said it was over 20ms for him.

Anyway, I basically can't disable dwm.exe on window 8.1 without breaking most of the user interface, so I basically have to live with this. And for some reason, unlike in windows 7, microsoft thought it'd be best to remove the ability to disable it and make it still work...

So what I'm asking for is, is there any way to further reduce the input lag that dwm has? I know that going exclusive fullscreen fixes this, but it seems to make it hard to alt-tab in games, and in addition I am running ambibox (it allows you to attach a pair of LED lights behind your monitor and it shines the colour that is displayed on the edges of the screen), and ambibox doesn't work in exclusive fullscreen.

So anyone got any ideas? I can live with it being 1-2ms, but 7-8 is a tad much, especially since it makes games run above 10ms. Is there maybe a way to force vsync off for dwm.exe? Maybe that's the problem?


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

Re: Desktop window manager's affect on input latency

Post by RealNC » 25 Jun 2020, 13:17

Last time this was measured years ago, it was 1 frame. So at 60Hz, it's 16.7ms. At 144Hz, 6.9ms. I don't know if something changed since then, but I doubt it.

Note that when running games in exclussive fullscreen mode, DWM is disabled, even in W8. In W10, DWM is also disabled when running games in borderless windowed mode if it's possible to use "independent flip" mode. Many games will use that mode now in W10. So it might be a good idea to upgrade to W10.
SteamGitHubStack 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.

deama
Posts: 370
Joined: 07 Aug 2019, 12:00

Re: Desktop window manager's affect on input latency

Post by deama » 25 Jun 2020, 14:15

Mr1991 wrote:
25 Jun 2020, 12:36
26:19: https://m.youtube.com/watch?v=cutsuVbvork
So I tried his method but I'm stuck on the fake dwm.exe part. I used rundll32.exe, made a copy of it and renamed it to dwm.exe, whilst deleting the old dwm.exe. However, when I restart my PC, it goes into a black screen and basically nothing works.
I managed to revert this by going through the cmd from the windows 8.1 USB boot repair stick I have, but anyway, I can't get it to work, any ideas?
RealNC wrote:
25 Jun 2020, 13:17
Last time this was measured years ago, it was 1 frame. So at 60Hz, it's 16.7ms. At 144Hz, 6.9ms. I don't know if something changed since then, but I doubt it.

Note that when running games in exclussive fullscreen mode, DWM is disabled, even in W8. In W10, DWM is also disabled when running games in borderless windowed mode if it's possible to use "independent flip" mode. Many games will use that mode now in W10. So it might be a good idea to upgrade to W10.
Yes but going exclusive fullscreen makes it harder for me to alt tab, and it breaks my ambibox, and some other problems I remember having back in windows 7 that make me dislike exclusive fullscreen.
I don't want to go to windows 10 as that has even more issues I don't want to deal with, for me at least.
Last edited by deama on 25 Jun 2020, 14:49, edited 1 time in total.

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

Re: Desktop window manager's affect on input latency

Post by RealNC » 25 Jun 2020, 14:45

deama wrote:
25 Jun 2020, 14:15
Yes but going exclusive fullscreen makes it harder for me to alt tab, and it breaks my ambibox, and some other problems I remember having back in windows 7 that make me dislike exclusive fullscreen.
I don't want to go to windows 10 as that has even more issues I don't want to deal with, for me at least.
Well, g-sync windowed mode seemed to eliminate DWM lag when it was tested back in 2017:

https://blurbusters.com/gsync/gsync101- ... ettings/10

Whether or not that's still the case though, I don't know.
SteamGitHubStack 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.

deama
Posts: 370
Joined: 07 Aug 2019, 12:00

Re: Desktop window manager's affect on input latency

Post by deama » 25 Jun 2020, 14:49

RealNC wrote:
25 Jun 2020, 14:45
deama wrote:
25 Jun 2020, 14:15
Yes but going exclusive fullscreen makes it harder for me to alt tab, and it breaks my ambibox, and some other problems I remember having back in windows 7 that make me dislike exclusive fullscreen.
I don't want to go to windows 10 as that has even more issues I don't want to deal with, for me at least.
Well, g-sync windowed mode seemed to eliminate DWM lag when it was tested back in 2017:

https://blurbusters.com/gsync/gsync101- ... ettings/10

Whether or not that's still the case though, I don't know.
Yes but I don't have a gsync monitor, nor freesync.

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

Re: Desktop window manager's affect on input latency

Post by RealNC » 25 Jun 2020, 15:24

deama wrote:
25 Jun 2020, 14:49
Yes but I don't have a gsync monitor, nor freesync.
These are the only two solutions I know of. Either get gsync, or update to Windows 10 and hope the game runs in independent flip mode. Microsoft has been improving this in W10 over time. See for example the reply here from a MS engineer:

https://www.reddit.com/r/Windows10/comm ... ndent_flip

If you want to stick to W8, then I don't know of a clean solution. There are hacks like this:

https://forums.guru3d.com/threads/windo ... on.383450/

but I never tried them and cannot tell you how well they work or if they cause any issues with your Windows install.
SteamGitHubStack 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.

deama
Posts: 370
Joined: 07 Aug 2019, 12:00

Re: Desktop window manager's affect on input latency

Post by deama » 25 Jun 2020, 15:40

RealNC wrote:
25 Jun 2020, 15:24
deama wrote:
25 Jun 2020, 14:49
Yes but I don't have a gsync monitor, nor freesync.
These are the only two solutions I know of. Either get gsync, or update to Windows 10 and hope the game runs in independent flip mode. Microsoft has been improving this in W10 over time. See for example the reply here from a MS engineer:

https://www.reddit.com/r/Windows10/comm ... ndent_flip

If you want to stick to W8, then I don't know of a clean solution. There are hacks like this:

https://forums.guru3d.com/threads/windo ... on.383450/

but I never tried them and cannot tell you how well they work or if they cause any issues with your Windows install.
Yeah trying to disable dwm on windows 8+ seems just insane, impossible on 10 even.
I'll have a look at that thread, see if I can find anything there.

Happyalive
Posts: 28
Joined: 13 Jun 2020, 19:56

Re: Desktop window manager's affect on input latency

Post by Happyalive » 25 Jun 2020, 20:04

Fr33thy is a professional comedian roleplaying a tweaker, don't trust him. For what it's worth, you can definitely disable dwm on w10 (I have done it) but its' generally a complete bitch afterwards and I wouldn't bother. If you don't want to lag use 8.1 with dwm disabled (less aids than w10) or w7.

https://sites.google.com/view/meetrevis ... isable-dwm

That is a guide from revision, I don't honestly know if it works outside their stripped windows, never tried it on normal w10.

MT_
Posts: 113
Joined: 17 Jan 2017, 15:39

Re: Desktop window manager's affect on input latency

Post by MT_ » 27 Jun 2020, 15:36

Haha fr33thy. Yeah that guy looks alright but I doubt he has much clue onto what most of his tweaks do and what side effects they can give.
LTSC 21H2 Post-install Script
https://github.com/Marctraider/LiveScript-LTSC-21H2

System: MSI Z390 MEG Ace - 2080 Super (300W mod) - 9900K 5GHz Fixed Core (De-lid) - 32GB DDR3-3733-CL18 - Xonar Essence STX II

Post Reply