Random lag associated with DWM.exe in Windows 7

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.
Post Reply
RyomaFV
Posts: 4
Joined: 21 Feb 2021, 22:46

Random lag associated with DWM.exe in Windows 7

Post by RyomaFV » 21 Feb 2021, 22:50

Hello. I'm having a strange Issue that's been driving me crazy for months. I have a single display setup. An XG2402 connected via displayport to a gtx 1660ti card. Core i7 3770, 16 gb ram.

The problem is my windows starts lagging out of nowhere. I have reduced the problem and found it this lag is fixed if i disable Aero settings or restart Dwm. exe or Windows desktop manager service. My monitor is currently at 144 hz. I've tried different nvidia drivers, setting it at 120 hz, ran several antimalware programs. My pc is clean and I can't find a fix for it. In my research I found this problem seems to be common with multimonitor setups, but that isn't the case in here. I need some help.

Thanks guys.

empleat
Posts: 42
Joined: 28 Feb 2020, 21:06

Re: Random lag associated with DWM.exe in Windows 7

Post by empleat » 22 Feb 2021, 21:14

RyomaFV wrote:
21 Feb 2021, 22:50
Hello. I'm having a strange Issue that's been driving me crazy for months. I have a single display setup. An XG2402 connected via displayport to a gtx 1660ti card. Core i7 3770, 16 gb ram.

The problem is my windows starts lagging out of nowhere. I have reduced the problem and found it this lag is fixed if i disable Aero settings or restart Dwm. exe or Windows desktop manager service. My monitor is currently at 144 hz. I've tried different nvidia drivers, setting it at 120 hz, ran several antimalware programs. My pc is clean and I can't find a fix for it. In my research I found this problem seems to be common with multimonitor setups, but that isn't the case in here. I need some help.

Thanks guys.
Well since you are using Windows 7, you can safely disable DWM service, or kill process in task manager, forget how it was. Also disable HID service, if you don't need it and use classic theme, no ClearType and everything in Appearance on lowest. God Windows 7 was good on gaming!

RyomaFV
Posts: 4
Joined: 21 Feb 2021, 22:46

Re: Random lag associated with DWM.exe in Windows 7

Post by RyomaFV » 23 Feb 2021, 17:27

I have tried to disable it. And yes, it is great on gaming, that's why I haven't changed yet. I just reenable it to fix the issue, since if I turn DWM off, I get a lot of screen tearing in certain windows. I guess it's because vsync is forced off. Wish I could find where the issue, since I'm hesitant about it being hardware associated, but not sure about it. :shock:

Sometimes it doesn't happen in hours or days. Others, it happens randomly and a lot of times. I think it's related to GPU usage, but can't pinpoint the issue yet.

RyomaFV
Posts: 4
Joined: 21 Feb 2021, 22:46

Re: Random lag associated with DWM.exe in Windows 7

Post by RyomaFV » 23 Feb 2021, 17:51

I have tried that, but it introduces tearing in some windows or in windowed applications. What I usually do is restarting the service or Nvidia driver, and it fixes the issue for a while. However, I'm worried because I'm not sure if it is related to a Hardware failure. I'd love to pinpoint the cause and fix it, but so far most of the issues similar to mine are associated to multi display setups. I only have this monitor and iGPU is disabled on Bios.

What benefits can I get from disabling HID service? :) Not sure if I need it or not. I'm using Cleartype, otherwise fonts look awful on my screen. What's wierd is the problem happens randomly, sometimes goes away for hours, and sometimes it happens every 30 minutes. I have no idea what could be causing it. Is there any chance it will fix itself if I upgrade to win 10? I'm aware Freesync and Nvidia compatibility is not possible in Win 7 as well.

Thanks for your reply!

empleat
Posts: 42
Joined: 28 Feb 2020, 21:06

Re: Random lag associated with DWM.exe in Windows 7

Post by empleat » 26 Feb 2021, 21:12

RyomaFV wrote:
23 Feb 2021, 17:51
I have tried that, but it introduces tearing in some windows or in windowed applications. What I usually do is restarting the service or Nvidia driver, and it fixes the issue for a while. However, I'm worried because I'm not sure if it is related to a Hardware failure. I'd love to pinpoint the cause and fix it, but so far most of the issues similar to mine are associated to multi display setups. I only have this monitor and iGPU is disabled on Bios.

What benefits can I get from disabling HID service? :) Not sure if I need it or not. I'm using Cleartype, otherwise fonts look awful on my screen. What's wierd is the problem happens randomly, sometimes goes away for hours, and sometimes it happens every 30 minutes. I have no idea what could be causing it. Is there any chance it will fix itself if I upgrade to win 10? I'm aware Freesync and Nvidia compatibility is not possible in Win 7 as well.

Thanks for your reply!
Tearing can be many things!

What is your FPS? E.g. for me 60 fps even with G-SYNC is still definition of tearing itself!

DWM forces V-SYNC on in Windows 10 in (Hybrid Fullscreen mode) turned on by FSO. As FSO runs games in windowed borderless mode.

But I don't think DWM on forces V-SYNC in Windows 7, especially in Fullscreen mode (Fullscreen Exclusive)! I wasn't disabling DWM since forever and there were times: I tried V-SYNC on and instantly turned it off coz superlag... So that means: it was disabled before! V-SYNC will add delay of one frame, if 60fps (that's +16.67ms delay)!!! But if you want: you can try fastsync in Nvidia control panel, it should not be as bad, or variable refresh rate. Supposed it is supported in Windows 7!

BTW Free/G-SYNC doesn't work on Windows 7??? However if you can hit 120fps+, there should be less tearing. I used to play on 144hz and tearing wasn't a major problem for me, even G-SYNC helps a lot now!

You should always use Fullscreen option in-game for lowest input lag and smoothness (reduced tearing) - in Windows 7 this is called Fullscreen Exclusive mode and was always the best option! Since 460.09 there is MPO overlay, which should activate automatically in borderless windowed mode. No idea, if it works in Windows 7: https://nvidia.custhelp.com/app/answers ... er-version

If you think it is hardware. Use stress test overnight. But first check for overheating like in 15min stress test, to cancel if it overheats. Still leave it overnight only if confident in your cooling, test 1 hour first mb! Prime95 will heat your CPU using AVX and for GPU OCCT, but it is now limited for 1 hour max! For diagnostics use hwinfo, tick sensors only and click Logging Start after test, click on icon again to disable it. You can use Generic Log Viewer for HWINFO to view logs. In HWINFO program check for for thermal throttling for CPU and every other boxes which have yes, or no. Also check Performance Limit under GPU! Everything should be no pretty much!

For benchmarking you can download 3D Mark free version to check score of a system, if it is performing as it should and compare to people with the same HW!

For RAM/CPU I recommend Memtest, at least 8 runs overnight. May be limited to 4 in free version :/

Also check your disk usage in game. I suppose game is on ssd? Today games will stutter on hdd! Also you can check smart for disk health. Or run something like chkdsk c: /r, which will check for filesystem errors and bad sectors and try to repair them and then reports after login, or in Event Viewer. Data backup is recommended probably!

It is strange that it happens for you randomly and after restarting NVIDIA service, or DWM it helps. It could be something with GPU. Also consider undervolting: https://www.yourtechbro.com/complete-un ... u-and-gpu/
If you have 1 fan gpu and it overheats, thermal throttling will cause underclocking. It is safe, if you don't mess it up colossally and prolongs lifespan. As CPUs, RAMs, GPUs are overvolted from factory settings!

Also do you have any overclocks? If so, try to disable them and see if it helps.

Do you use any monitoring tools?

You can try clean driver uninstall, as even Nvidia installer don't remove all residues! Use DDU, Nvidia recommends it, it should be safe, but you never know! Check it with in PS with: get-filehash "filename.exe" -Algorithm sha256, or sha1. You will see checksum on website (wagnarsoft is official site) to compare it against! Or go to security tab and view certificate, it should say OK. Also 7-zip can check for errors and if there are any warn you! To make sure, it is not corrupted! You should do this when installing sensitive stuff, but Windows should warn you, if there is something wrong with certificate - i think, but not everything has them, so 7-zip is useful. Also you can write on Nvidia, they will help you with setting. It is important to do it right!

Also you can try cleanboot - in case it is Windows. First note checked services in following location, so you can re-enable them. Win+r write msconfig OK, click Services tab, click hide all microsoft services and uncheck everything, restart and try again.

Also I recommend sfc /verifyonly, it will check for corruption, but do nothing, however sfc /scannow will attempt to fix errors, warning you: it can revert some system setting!!!

These are advanced tools, also checks only for corruption, but does nothing:
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth

This will try to repair issues:
DISM /Online /Cleanup-Image /RestoreHealth

About DISM: https://www.windowscentral.com/how-use- ... s-10-image

Also in worst case you can try to repair windows install. It can be used to keep all files, but will mess up many settings. Also you should probably backup first!!!
https://answers.microsoft.com/en-us/win ... 0096ec3085

Also you can try restore points, or restore from backup, if you have any! It is best to backup often using something like Aomei!

Also check Event Viewer for any errors, or critical errors!

Do you use any other usb devices?

Check device manager for yellow signs.


Performance/tearing/input lag:


Did you also try cap fps at your lowest? Best done in-game engine, or Riva Tuner doesn't introduce much of input lag! Riva tuner can monitor min/max fps!

Also in NV control panel should be prefer maximum performance for your 3D apps (i use custom setting) and for low latency mode: use off, or on for low latency. Ultra should be used only if you GPU is constantly maxed at 99%, otherwise it won't be effective and will be worse probably than on!

Also go to Adjust Desktop and position in NV CP. Best settings are: no scalling, display - if your display supports scalling (check manual and OSD) and override the scalling mode...

Make sure in adjust resolution, Nvidia color setting is checked, default setting is limited color range!

Also recommend to download process lasso, which allows to disable dynamically IdleSaver and change power plan based on application running. Also exclude application from probalance by right clicking on it and click induce performance mode. Apps can be added in options/power/performance mode to induce performance mode aka change power plan. And exclusion from pro balance in options/cpu/pro balance setting/configure excluded processes.

Also you can choose default profile in power start process lasso with profile. Also there is setting some apps take priority over others and control current power profile. Also I recommend you to disable gui and run it on background and disable logging to reduce overhead.

Download parkcontrol also from bitsum to unpark cores, can be set per power plan also!

This should show ultimate performance plan, apply in elevated cmd: powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61

Is this even in Windows 7, otherwise use High performance power plan and disable USB selective suspend and turning disk after put 0 minutes! Wears down ssd.

Also put this to cmd: powercfg -attributes SUB_DISK 0b2d69d7-a2a1-449c-9680-f91c70521c60 -ATTRIB_HIDE
To show disk power saving, should be on active for no power savings!

Also I recommend you to find ssd tweaks and check trim is on and disable prefetch and superfetch. Also sysmain service.

Also check, if ssds are not being defragmented. In My computer click on disk and degrag and automatic defrag, there should be under ssd never ran!

Also page file should be on ssd and minimum should be your ram size / 8. And max 1-1.5 size of ram, which is not necessary, best is to leave it on system managed, it will cause some overhead, not terrible.

I recommend strongly to disable C states in BIOS, also eist if you have it and any motherboard specific power saving features!

Also you can try NVCleanInstall for trimming driver installation. To install only necessary driver packages, should be also safe, but I can't guarantee you 100% https://www.techpowerup.com/download/te ... leanstall/

Also in worst case you will reinstall OS, recommend you to check wim tweak. It will allow you to do minimal Windows 7 install, even better!

Disable HID service, will cause some USB devices not to work and disable media keys on keyboard, but reduced input lag a lot!

You can download ClearTypeSwitch to switch ClearType on/off fast!

PS: If none helps, I recommend to try Nvidia forums support!

RyomaFV
Posts: 4
Joined: 21 Feb 2021, 22:46

Re: Random lag associated with DWM.exe in Windows 7

Post by RyomaFV » 03 Mar 2021, 19:45

That's the problem. Games are not affected by this. It only fucks up Windows Desktop. If I start swapping between applications Desktop wll get laggy until I drag a Window around. I can't pinpoint the cause yet. It's killing me. I have no idea if it is associated to nvidia drivers in some way. I doubt it's hardware since, if that were the case, how come it magically fix itself (for a few minutes or hours) and then comes back out of nowhere? Full screen apps are not affected by this. That's what puzzles me. It's similar to that lag you experience when you have two monitors and two different refresh rates, but only in desktop. And I have a single XG2402 monitor, 144hz, plugged to a Nvidia gtx 1660ti through display port. Freesync is not supported because Nvidia compatibility with Freesync only works in Win10. Would work if I had an ATI card.

Already tried reinstalling many drivers. My last option will be clean installing windows, but if that's the case I'll have to migrate to 10 :(

empleat
Posts: 42
Joined: 28 Feb 2020, 21:06

Re: Random lag associated with DWM.exe in Windows 7

Post by empleat » Today, 16:33

RyomaFV wrote:
03 Mar 2021, 19:45
That's the problem. Games are not affected by this. It only fucks up Windows Desktop. If I start swapping between applications Desktop wll get laggy until I drag a Window around. I can't pinpoint the cause yet. It's killing me. I have no idea if it is associated to nvidia drivers in some way. I doubt it's hardware since, if that were the case, how come it magically fix itself (for a few minutes or hours) and then comes back out of nowhere? Full screen apps are not affected by this. That's what puzzles me. It's similar to that lag you experience when you have two monitors and two different refresh rates, but only in desktop. And I have a single XG2402 monitor, 144hz, plugged to a Nvidia gtx 1660ti through display port. Freesync is not supported because Nvidia compatibility with Freesync only works in Win10. Would work if I had an ATI card.

Already tried reinstalling many drivers. My last option will be clean installing windows, but if that's the case I'll have to migrate to 10 :(
Did you try cleanboot, ddu, sfc/dism? You can also do a repair install without losing any files! Only Windows settings.

No you don't have to migrate to 10... Don't you have install medium? There was way to download Windows 7 from MS.

If you have retail CD-key: https://www.microsoft.com/en-us/softwar ... d/windows7

There was way to download Windows 7 from MS (no idea if this still works): https://www.makeuseof.com/tag/download- ... microsoft/

Or mb try ebay, there are cheap keys for 5$

Post Reply