[SOLVED] Extremely High Latency

Page 2 - Seeking answers? Join the Tom's Hardware community: where nearly two million members share solutions and discuss the latest tech.
Apr 5, 2022
93
2
35
Got a new laptop recently, it's a Lenovo Ideapad Gaming 3, but i'm getting random freezes and audio is popping
I used latencymon to see what's going on and i'm getting extremely high levels of latency
_
CONCLUSION
_
Your system appears to be having trouble handling real-time audio and other tasks. You are likely to experience buffer underruns appearing as drop outs, clicks or pops. One or more DPC routines that belong to a driver running in your system appear to be executing for too long. Also one or more ISR routines that belong to a driver running in your system appear to be executing for too long. At least one detected problem appears to be network related. In case you are using a WLAN adapter, try disabling it to get better results. One problem may be related to power management, disable CPU throttling settings in Control Panel and BIOS setup. Check for BIOS updates.
LatencyMon has been analyzing your system for 0:11:37 (h🇲🇲ss) on all processors.


_
SYSTEM INFORMATION
_
Computer name: LAPTOP-11QI23AL
OS version: Windows 10, 10.0, version 2009, build: 22000 (x64)
Hardware: 82K2, LENOVO
CPU: AuthenticAMD AMD Ryzen 5 5600H with Radeon Graphics
Logical processors: 12
Processor groups: 1
RAM: 5996 MB total


_
CPU SPEED
_
Reported CPU speed: 3294 MHz

Note: reported execution times may be calculated based on a fixed reported CPU speed. Disable variable speed settings like Intel Speed Step and AMD Cool N Quiet in the BIOS setup for more accurate results.


_
MEASURED INTERRUPT TO USER PROCESS LATENCIES
_
The interrupt to process latency reflects the measured interval that a usermode process needed to respond to a hardware request from the moment the interrupt service routine started execution. This includes the scheduling and execution of a DPC routine, the signaling of an event and the waking up of a usermode thread from an idle wait state in response to that event.

Highest measured interrupt to process latency (µs): 420227.60
Average measured interrupt to process latency (µs): 55.763570

Highest measured interrupt to DPC latency (µs): 420223.50
Average measured interrupt to DPC latency (µs): 46.648393


_
REPORTED ISRs
_
Interrupt service routines are routines installed by the OS and device drivers that execute in response to a hardware interrupt signal.

Highest ISR routine execution time (µs): 33685.626594
Driver with highest ISR routine execution time: HDAudBus.sys - High Definition Audio Bus Driver, Microsoft Corporation

Highest reported total ISR routine time (%): 0.008110
Driver with highest ISR total time: Wdf01000.sys - Motor en tiempo de ejecución del marco de controlador en modo kernel, Microsoft Corporation

Total time spent in ISRs (%) 0.013960

ISR count (execution time <250 µs): 91359
ISR count (execution time 250-500 µs): 0
ISR count (execution time 500-1000 µs): 0
ISR count (execution time 1000-2000 µs): 2
ISR count (execution time 2000-4000 µs): 13
ISR count (execution time >=4000 µs): 0


_
REPORTED DPCs
_
DPC routines are part of the interrupt servicing dispatch mechanism and disable the possibility for a process to utilize the CPU while it is interrupted until the DPC has finished execution.

Highest DPC routine execution time (µs): 95914.540073
Driver with highest DPC routine execution time: dxgkrnl.sys - DirectX Graphics Kernel, Microsoft Corporation

Highest reported total DPC routine time (%): 0.076425
Driver with highest DPC total execution time: dxgkrnl.sys - DirectX Graphics Kernel, Microsoft Corporation

Total time spent in DPCs (%) 0.214949

DPC count (execution time <250 µs): 1135439
DPC count (execution time 250-500 µs): 0
DPC count (execution time 500-10000 µs): 260
DPC count (execution time 1000-2000 µs): 45
DPC count (execution time 2000-4000 µs): 324
DPC count (execution time >=4000 µs): 1170


_
REPORTED HARD PAGEFAULTS
_
Hard pagefaults are events that get triggered by making use of virtual memory that is not resident in RAM but backed by a memory mapped file on disk. The process of resolving the hard pagefault requires reading in the memory from disk while the process is interrupted and blocked from execution.

NOTE: some processes were hit by hard pagefaults. If these were programs producing audio, they are likely to interrupt the audio stream resulting in dropouts, clicks and pops. Check the Processes tab to see which programs were hit.

Process with highest pagefault count: msmpeng.exe

Total number of hard pagefaults 45023
Hard pagefault count of hardest hit process: 14298
Number of processes hit: 134


_
PER CPU DATA
_
CPU 0 Interrupt cycle time (s): 77.506743
CPU 0 ISR highest execution time (µs): 33685.626594
CPU 0 ISR total execution time (s): 1.135296
CPU 0 ISR count: 83927
CPU 0 DPC highest execution time (µs): 95914.540073
CPU 0 DPC total execution time (s): 15.447351
CPU 0 DPC count: 914610
_
CPU 1 Interrupt cycle time (s): 61.011657
CPU 1 ISR highest execution time (µs): 8025.762295
CPU 1 ISR total execution time (s): 0.023164
CPU 1 ISR count: 870
CPU 1 DPC highest execution time (µs): 16090.355191
CPU 1 DPC total execution time (s): 0.143824
CPU 1 DPC count: 13718
_
CPU 2 Interrupt cycle time (s): 58.754196
CPU 2 ISR highest execution time (µs): 24.514572
CPU 2 ISR total execution time (s): 0.001006
CPU 2 ISR count: 158
CPU 2 DPC highest execution time (µs): 20582.432605
CPU 2 DPC total execution time (s): 0.369622
CPU 2 DPC count: 38870
_
CPU 3 Interrupt cycle time (s): 60.214632
CPU 3 ISR highest execution time (µs): 0.0
CPU 3 ISR total execution time (s): 0.0
CPU 3 ISR count: 0
CPU 3 DPC highest execution time (µs): 42333.820583
CPU 3 DPC total execution time (s): 0.292201
CPU 3 DPC count: 12306
_
CPU 4 Interrupt cycle time (s): 49.135768
CPU 4 ISR highest execution time (µs): 0.0
CPU 4 ISR total execution time (s): 0.0
CPU 4 ISR count: 0
CPU 4 DPC highest execution time (µs): 70948.587432
CPU 4 DPC total execution time (s): 0.150377
CPU 4 DPC count: 18019
_
CPU 5 Interrupt cycle time (s): 51.584330
CPU 5 ISR highest execution time (µs): 0.0
CPU 5 ISR total execution time (s): 0.0
CPU 5 ISR count: 0
CPU 5 DPC highest execution time (µs): 8342.337887
CPU 5 DPC total execution time (s): 0.065866
CPU 5 DPC count: 5317
_
CPU 6 Interrupt cycle time (s): 51.590302
CPU 6 ISR highest execution time (µs): 0.0
CPU 6 ISR total execution time (s): 0.0
CPU 6 ISR count: 0
CPU 6 DPC highest execution time (µs): 49920.765027
CPU 6 DPC total execution time (s): 0.213715
CPU 6 DPC count: 15064
_
CPU 7 Interrupt cycle time (s): 52.001259
CPU 7 ISR highest execution time (µs): 0.0
CPU 7 ISR total execution time (s): 0.0
CPU 7 ISR count: 0
CPU 7 DPC highest execution time (µs): 15918.843352
CPU 7 DPC total execution time (s): 0.050138
CPU 7 DPC count: 6869
_
CPU 8 Interrupt cycle time (s): 53.596208
CPU 8 ISR highest execution time (µs): 5504.698543
CPU 8 ISR total execution time (s): 0.008236
CPU 8 ISR count: 5343
CPU 8 DPC highest execution time (µs): 73796.795993
CPU 8 DPC total execution time (s): 0.955972
CPU 8 DPC count: 63124
_
CPU 9 Interrupt cycle time (s): 43.554839
CPU 9 ISR highest execution time (µs): 4.578324
CPU 9 ISR total execution time (s): 0.000197
CPU 9 ISR count: 226
CPU 9 DPC highest execution time (µs): 8639.247723
CPU 9 DPC total execution time (s): 0.045582
CPU 9 DPC count: 6865
_
CPU 10 Interrupt cycle time (s): 39.447225
CPU 10 ISR highest execution time (µs): 5.419854
CPU 10 ISR total execution time (s): 0.000308
CPU 10 ISR count: 358
CPU 10 DPC highest execution time (µs): 46421.612933
CPU 10 DPC total execution time (s): 0.187660
CPU 10 DPC count: 17964
_
CPU 11 Interrupt cycle time (s): 38.157267
CPU 11 ISR highest execution time (µs): 6.321494
CPU 11 ISR total execution time (s): 0.000443
CPU 11 ISR count: 556
CPU 11 DPC highest execution time (µs): 1857.867942
CPU 11 DPC total execution time (s): 0.071727
CPU 11 DPC count: 24512
_
 
Solution

I did the Nvidia thing, not that mine was bad before, but it could have helped
7fdsWPf.jpg

what he calls good is higher than mine.

if you do anything in registry, backup first - https://neosmart.net/wiki/backup-restore-registry/

Colif

Win 11 Master
Moderator
Was it any different/better without WiFi?

lots of red. I normally only get one not all 3.

so it could be sound drivers. As top user is DirectX. Normally I would blame GPU drivers but it also handles sound.
HDAudioBus.sys is higher on list than Nvidia. its the Microsoft audio drivers.

@johnbl whats best way to work out latency problems?
 

Colif

Win 11 Master
Moderator
autoruns can be used to stop drivers loading at startup but its not exactly a scientific method, its why I asked that person I mentioned if there is a better way to work it out. Blindly stopping drivers might not be ideal approach.

nice if Nahimic wasn't a windows 7 driver
AMD HD Audio driver version 10.0.1.21
realtek HD Audio driver 6.0.9228.1

its possible the AMD Audio is digital and realtek is Analog, I just remembered I have MS drivers running digital and Realtek running analog... although this is a laptop? so not sure if you have digital outs?

when oldest driver is just June last year you wouldn't think it was one of them.

I don't know if simply turning wifi off is enough to stop them running. It might be in which case we could exclude them.

Working out latency isn't something I have tried to do much before I got it myself.

its 2am here, I should go soon... I will see what I can find when i wake up.
 
  • Like
Reactions: rauvel

Colif

Win 11 Master
Moderator
search for powershell
when you find app, right click and choose run as admin
copy/paste this command into window:
Repair-WindowsImage -Online -RestoreHealth
and press enter
Then type SFC /scannow
and press enter

First command repairs the files SFC uses to clean files, and SFC fixes system files

although this may not help as it works fine in safe mode.

try the fixes under ndis here (although above is step 2)
https://www.sweetwater.com/sweetcare/articles/causes-of-dpc-latency-and-how-to-fix-them/#ndis-sys
 
Apr 5, 2022
93
2
35
Repair-WindowsImage -Online -RestoreHealth showed that the system is healthy, SFC /scannow showed the following: Windows Resource Protection found no violations of integrity.
 

Colif

Win 11 Master
Moderator
i expected as much.
you didn't have many of the common causes. Nvidia drivers seem to always be at the top, of every report I have found. So I don't know if thats bad or just normal. its hard to say if they are cause. hard to run without them. even if you remove them windows will just put them back on again
I was going to ask on another forum about my problem, I can remember going to sleep and thinking, I just make a post now on the forums and ask about it, and very same night that AMD FAQ came out and I thought... oh, well, thats it then. A update in May might fix it. So I never did ask how to work out how to narrow down actual cause.

i might give you a link to that forum if I can't figure it out.
 
  • Like
Reactions: rauvel

Colif

Win 11 Master
Moderator
SO i can't find any one else with model reporting latency problems - 3-15ACH6

only results for latency are talking about ram

its not hardware as it works fine... ponders.

there are windows 10 drivers since thats what majority of them are. You don't have a win 10 license tho... install it and win 11 would probably reinstall itself.

Wait and see if I figure anything out... just not tonight. its almost 4am.
 
I have debugged about 6 latancy problems with success each one had a different cause.
examples,
AIO cooler putting out millions of error messages via usb to the point the system still work but really lagged. These all went into a internal log. This was a bug in the AIO software and the fix was to change the usb port to a its own bus, and tune down the aio software.

others were due to changing graphics cards without going into bios and resetting it to defaults. (windows thought there was several gpus, but only one that was currently working and it could not use the main GPU hardware resources. Ended up chained behind a slow device (mouse) Person could shake his mouse for 30 seconds and the GPU would bugcheck. Fix was to go into bios and reset to defaults.

others:
  • early malware running in GPU
  • Plug and play attempting to install driver and trying over and over hundreds of thousands of times. ( net.exe /stop "plug and Play" helps find this type of problem
  • Network programs using windows sockets: microsoft put a limit on the number of connections to slow down malware. Now bad programs can hit this limit and cause a 300 second delay.
you can start cmd.exe as an admin then run
netstat.exe -a -b
this will show the sockets and the name of the binary that is using them
sometimes you can find programs running that you do not expect to be using up all of your network resource. (stupid office update app in this case)

- lots of audio problems, audio can still respond even if no speaker is attached.
these are hard to find, best to disable any audio that has no speaker attached.
(microphone is also considered audio)

- bad drivers on usb. certain old drivers would take packets that were meant for other driver. This would cause the second drive to never get its packet and it would ask again over and over causing lag. This still happens if you remove the first usb device from the machine since windows just hides the driver and leaves it running. fix is to select show hidden devices in device manager then delete the hidden device. (and get a better driver if you want to use it)
these drivers were chained together so the order of the chain determined if you hit the bug.

other network problems. Bugs in the network driver can result in checksum errors that cause the driver to not receive the full packet, this forces TCP/IP to request a resend. the cycle repeats over and over causing lag. fix to update the driver. Same goes for BIOS network enhancement for game cheating (network filtering in bios or software can mess up packets)

I have also seen problems isolated to the firmware of the router that the computer went thru. Fix was to update the router, I have see corruption in packet along the route that the packet went thru to get to the machine.

these all required a sniffer trace to figure out. The only one you can fix are your local devices

most people give up and wipe the machine and the problem might go away

debugging generally requires a kernel dump to figure out. Then isolating the problem to a subsystem and debugging from there.
I have only once gotten someone to take a proper sniffer trace where we were able to show the cause was a server outside of their control. Then they force their router to use a new path to avoid that intermediate router.

I guess I have seen really old examples also but they are not likely on newer hardware. (bad settings of hard drive controllers)

I guess I would also check to see if the system can pass a full verifier check before I spent too much time looking into the problem. You want the machine as clean as you can get it before spending hours debugging it.

as a side note: you should also start cmd.exe as an admin
cd c:\
dir /s *.dmp

Do this for the case where you have windows error reporting enabled.
often windows will report problems to microsoft, then microsoft does a live debug session and saves the debug dump in a certain directory that gets pumped back to microsoft so they can push out a fix. You can look at these and they can be really helpful. For example, A person complained that they would be working and the machine would just reboot. Turned out that microsoft detected a hung USB controller due to a bad chip on their version of the motherboar, then the debugger did a .reboot command remotely when it was done. This fixed the machine until the usb got confused again a few days later.
fix was to disable the USB chip in bios. (no driver fix)

anyway, these are some examples I guess I can think of more but each one is different. There was no easy way to figure them out other than what you are doing with the latency monitor to figure out what subsystem is involved.

I generally focus on looking for things that are wrong in a kernel memory dump to get clues.
 
Last edited:
  • Like
Reactions: rauvel and Colif

Colif

Win 11 Master
Moderator
if you disable WiFi & restart PC, does it load the WiFi drivers at start up anyway?
just curious, we stopped it and restarted and problem still existed, does that show it not wifi or prove nothing?

thanks for commenting, I am going to have to do some digging tomorrow.
 
  • Like
Reactions: rauvel
Apr 5, 2022
93
2
35
The thing is, when it's working fine I guess we can't find the solution to the problem. Audio pops and cracklings continue tho, only when there is no sound and something plays out of nowhere
 
Apr 5, 2022
93
2
35
Last edited:
Quick update, turned off the pc for an hour and it's working fine now, that's what usually fixes my problem, latency seems normal on latencymon now
if you have a solid state drive, clean up file space, turn off virtual memory, reboot and turn it back on (to delete pagefile.sys). Then boot into bios and leave the system powered on but not running windows. After 5 minutes the SSD will run its firmware clean up routines and do its drive repairs. These can get blocked in some cases while windows is running.

I would also see if disconnecting from the internet for 300 seconds has the same effect. (it is the tcp/ip default wait timeout for connections) something that netstat.exe -a -b
would show
 
  • Like
Reactions: rauvel
Apr 5, 2022
93
2
35
if you have a solid state drive, clean up file space, turn off virtual memory, reboot and turn it back on (to delete pagefile.sys). Then boot into bios and leave the system powered on but not running windows. After 5 minutes the SSD will run its firmware clean up routines and do its drive repairs. These can get blocked in some cases while windows is running.

I would also see if disconnecting from the internet for 300 seconds has the same effect. (it is the tcp/ip default wait timeout for connections) something that netstat.exe -a -b
would show
I will try that, for how long should I stay on the Bios after the 5 minutes