Yep, I did the same thing trying to solve this latency problem. Bought not one, but two external USB audio interfaces and disabled everything from Realtek (rtk). Tried 1001 other great ideas, but LatencyMon still spikes, with ntoskrnl.exe, wdf01000.sys, and sometimes HDAudBus.sys leading the way. My support contact is pushing for a clean install of Windows 11 (aka, the nuclear option), but that will erase 6 months of careful, detailed system configuration. "Just" reinstall your apps? Ha!
Any solution or suggestion or direction would really be appreciated. Or a gift certificate to see a shrink.
- Поскольку Майкрософт ввела коррекцию в системный таймер, он даёт задержки усреднённо к 8 -10 мс, но это никак не соответствует требованиям с воспроизведением качественного звука. Максимальная задержка должна быть 1 мс, от 100 мкс до 500 мкс для основной массы прерываний.
Первым делом этого решается выбором качественной платформы, в которой цепи питания материнской платы качественно питают все (!!!) устройства на шинах.
О таких материнках как Huananzhi или к материнским платам ниже чем на чипсете B650
и с менее, чем 2*7+3 фаз питания это не относится (не питают они качественно).
Во вторых, поскольку используются старые драйвера той же Майкрософт
к мышке или клавиатуре, к многим платам расширения USB и массе других периферийных устройств,
в которых (драйверах) используется код, написанный для старого варианта системного таймера
(часто потому, что на то, как написано, не обращали внимания, хотя могли написать и более корректно, с использованием других команд),
так вот, - использование старого варианта таймера - обязательно, чтобы Вы нормально могли пользоваться компьютером.
У меня мышка отключалась на 15...20 сек на вновь установленной системе - настолько не продумана система прерываний в Windows 11. Это происходит, например, при загрузке программы с требованиями разрешения от системы доступа по безопасности.
Или загрузки многих программ, которые записаны в автозагрузке.
Отключить их? - Это смешно. Зачем тогда компьютер - не только же аудио пользоваться.
Проще плеер иметь.
То же возникает и у игроков в компьютерные игры. У них проблемы с мышью связаны.
Также ужасно не продумано и переключение языков. При каждом переключении вылезает много всяких сочетаний знаков набора при наборе даже в блокноте, чуть менее в Notepad.
Это общая тенденция у Майкрософт - усложнять - не проверяя последствий - пользователи разберутся.
- Поэтому установил старый вариант таймера в системе (то есть тот , что был до Windows 10 2004)/ Настройка таймера и синхронизации прерываний. https://www.ixbt.com/live/sw/ispravlenie-sistemnogo-taymera-hpet-v-novyh-versiyah-windows.html 1. отключить высокоточный таймер событий в диспетчере устройств в меню "системные устройства". Нажимаем правым кликом мыши на «Пуск» и выбираем «Диспетчер устройств». Для отключения HPET и активации таймера TSC мы должны в разделе «Системные устройства» отключить «Высокоточный таймер событий» иногда он подписан как High Precision Even Timer. Правый клик мыши>>"Отключить устройство". 2. внести информацию в реестр с помощью файла timer.reg следующего содержания: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\kernel] "DpcWatchdogProfileOffset"=dword:00002710 "ObUnsecureGlobalNames"=hex(7):6e,00,65,00,74,00,66,00,78,00,63,00,75,00,73,00,\ 74,00,6f,00,6d,00,70,00,65,00,72,00,66,00,63,00,6f,00,75,00,6e,00,74,00,65,\ 00,72,00,73,00,2e,00,31,00,2e,00,30,00,00,00,53,00,68,00,61,00,72,00,65,00,\ 64,00,50,00,65,00,72,00,66,00,49,00,50,00,43,00,42,00,6c,00,6f,00,63,00,6b,\ 00,00,00,43,00,6f,00,72,00,5f,00,50,00,72,00,69,00,76,00,61,00,74,00,65,00,\ 5f,00,49,00,50,00,43,00,42,00,6c,00,6f,00,63,00,6b,00,00,00,43,00,6f,00,72,\ 00,5f,00,50,00,75,00,62,00,6c,00,69,00,63,00,5f,00,49,00,50,00,43,00,42,00,\ 6c,00,6f,00,63,00,6b,00,5f,00,00,00,00,00 "SeTokenSingletonAttributesConfig"=dword:00000003 "obcaseinsensitive"=dword:00000001 "GlobalTimerResolutionRequests"=dword:00000001
- ввести команды для отключения встроенного программного таймера Windows
и технологии экономии электроэнергии для ноутбуков. Вновь нажимаем Win+R и вводим команду CMD.
В появившемся окне вводим команды:
bcdedit /set disabledynamictick yes
bcdedit /set useplatformtick yes
bcdedit /set useplatformclock false
bcdedit /deletevalue useplatformclock
Требуется перезагрузка системы!!!.
- Выполним установку системной службы Windows, отвечающей за минимальное значение системного таймера.
Скачиваем https://disk.yandex.ru/d/irKjRNGVcPq9tg и извлекаем папку архива в корень любого диска.
Переходим в папку установщика и запускаем не от имени администратора файл Installer.bat.
В появившемся окне выбираем желаемый таймер. Я советую 4.
Дожидаемся окончания установки. (После установки не удалять папку установщика).
Проверяем значение таймера, нажав 8.
Если всё прошло успешно, то значение системного таймера будет равняться 0.5 мс.
- Замечания к предыдущему пункту:
Замечания. Включение данных значений зависит от Вашей платформы: http://xn--https-3vea//forums.blurbusters.com/viewtopic.php?t=8643&start=10 : Re: useplatformtick and/or disabledynamictick on mouse input lag Post by Slender » 23 May 2021, 21:03 do not listen to people who say that hpet off in the bios affects the hitreg (lol). Turning it off does affect mouse latency, but on systems newer than 1803 with useplatformtick yes causes a large dpc delay and jitter lag. All you have to do is disable the dynamic tick, deletevalue clock, and test the useplatformtick yes/no. On newer systems, it behaves differently. on 21h1 and 20h2 with usetick enabled, I get 530point single-core performance and delta in maustester 960-1040, with deletevalue usetick (no), I get 580point (0.5 ms res), and maustester delta 990-1010. But for my friend on the z490 and i9, there is no difference in performance, it all depends on the system. Also setting deletevalue useclock/tick (no, no) completely ignores the hpet settings in the bios, showing a minimum timer of 0.496 for 1803+ and 0.513 for versions below. For systems such as 1607, 1709, 8.1, 7, I advise you to leave useplatformtick yes. You can also experiment with turning off hpet in the bios, but you need to keep in mind that the version should not be higher than 1803. This will certainly reduce your performance (for example, from 580 to 530), but your mouse will feel much better. You can turn it off without modifications, via grub. do not listen to those people who just throw in some tests and drown for them without any reason, test everything yourself. Re: useplatformtick and/or disabledynamictick on mouse input lag by MatrixQW » 27 May 2021, 04:58 Even e.g. disableplatformtick makes mouse more accurate, it lags and I don't like lag... Also many new mobos can't even disable HPET in BIOS, which is annoying...
- Отключить сбережение энергии в опциях планов расхода энергии в системе Windows 11:
а) для USB в чекбоксах выбрать без сбережения.
б) для шин PCIExpress (отключить в чекбоксах опцию сбережения).
в) в диспетчере устройств отключить все опции сбережения портов и хабов USB, поскольку не отключение этой опции может вызвать существенную задержку при соответствующем прерывании, а отключить вообще опцию соответствующего интерфейса, например Realtec audio будет приводить к другим сбоям в системе, в чём убедился в предыдущей установке Windows 11.
В настоящее время использую план энергосбережения с опцией процессора 15% - минимум производительности от максимальной и 80% - максимальное значение для режима от максимальной производительности. Материнская плата Aorus Elite B650 AX, NVME SSD Samsung 970 EVO, рабочий SSD Samsung 960, память GSkills (это не лучшая, но терпимая) 2*16 GB c основной задержкой 38 нс от Samsumg (как выяснил) - работает с профилем Интел в БИОС на частоте 6000 МГц. Процессор - AM5 7500f.
Остальные настройки по умолчанию. Оптимизация curve проведена программой от AMD, разница - не видна.
Драйверы материнской платы были обновлены на последние. В некоторых моментах - быстрее, но с системным прецизионным таймером - хуже в задержках. Задержки составляют в основном до 250 мкс, максимальные 1000-1200 для аудио.
После установки старого таймера и настроек
bcdedit /set disabledynamictick yes
bcdedit /set useplatformtick yes
bcdedit /set useplatformclock false
bcdedit /deletevalue useplatformclock
мышка работает быстро без проблем. Задержки аудио до 250, изредка - до 500, очень редко -1000 мкс.
- Установить драйверы asio
У меня они есть разные:
- от USB аудио платы US366
- от ПО Cubase LE AI Elements 10
- бесплатные ASIO4ALL_2_13_Russian.exe (есть английская версия).
- Установить плеер, использующий эти драйверы, что уберёт в определённой степени компьютерный джиттер:
Bug_head_Emperor_Infinity_blade_v7.23_2.13 или другие.
Вот результаты тестирования после проведённых изменений:
Здесь полный отчёт о задержках (статистика):
CONCLUSION
_________________________________________________________________________________________________________
Your system appears to be suitable for handling real-time audio and other tasks without dropouts.
LatencyMon has been analyzing your system for 0:24:21 (h:mm:ss) on all processors.
_________________________________________________________________________________________________________
SYSTEM INFORMATION
_________________________________________________________________________________________________________
Computer name: PC3
OS version: Windows 10 , 10.0, build: 22631 (x64)
Hardware: B650 AORUS ELITE AX, Gigabyte Technology Co., Ltd.
CPU: AuthenticAMD AMD Ryzen 5 7500F 6-Core Processor
Logical processors: 12
Processor groups: 1
RAM: 32405 MB total
_________________________________________________________________________________________________________
CPU SPEED
_________________________________________________________________________________________________________
Reported CPU speed: 3693 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.
WARNING: the CPU speed that was measured is only a fraction of the CPU speed reported. Your CPUs may be throttled back due to variable speed settings and thermal issues. It is suggested that you run a utility which reports your actual CPU frequency and temperature.
_________________________________________________________________________________________________________
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): 714.20
Average measured interrupt to process latency (µs): 14.921503
Highest measured interrupt to DPC latency (µs): 709.70
Average measured interrupt to DPC latency (µs): 4.438725
_________________________________________________________________________________________________________
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): 88.938262
Driver with highest ISR routine execution time: Wdf01000.sys - Среда выполнения платформы драйвера режима ядра, Microsoft Corporation
Highest reported total ISR routine time (%): 0.002019
Driver with highest ISR total time: Wdf01000.sys - Среда выполнения платформы драйвера режима ядра, Microsoft Corporation
Total time spent in ISRs (%) 0.002019
ISR count (execution time <250 µs): 459097
ISR count (execution time 250-500 µs): 0
ISR count (execution time 500-999 µs): 0
ISR count (execution time 1000-1999 µs): 0
ISR count (execution time 2000-3999 µs): 0
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): 618.740590
Driver with highest DPC routine execution time: nvlddmkm.sys - NVIDIA Windows Kernel Mode Driver, Version 555.85 , NVIDIA Corporation
Highest reported total DPC routine time (%): 0.522722
Driver with highest DPC total execution time: Wdf01000.sys - Среда выполнения платформы драйвера режима ядра, Microsoft Corporation
Total time spent in DPCs (%) 0.561673
DPC count (execution time <250 µs): 3907891
DPC count (execution time 250-500 µs): 0
DPC count (execution time 500-999 µs): 11358
DPC count (execution time 1000-1999 µs): 0
DPC count (execution time 2000-3999 µs): 0
DPC count (execution time >=4000 µs): 0
_________________________________________________________________________________________________________
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: system
Total number of hard pagefaults 1537
Hard pagefault count of hardest hit process: 760
Number of processes hit: 23
_________________________________________________________________________________________________________
PER CPU DATA
_________________________________________________________________________________________________________
CPU 0 Interrupt cycle time (s): 200.569870
CPU 0 ISR highest execution time (µs): 88.938262
CPU 0 ISR total execution time (s): 0.311350
CPU 0 ISR count: 416406
CPU 0 DPC highest execution time (µs): 593.412673
CPU 0 DPC total execution time (s): 96.675381
CPU 0 DPC count: 3822712
_________________________________________________________________________________________________________
CPU 1 Interrupt cycle time (s): 61.283337
CPU 1 ISR highest execution time (µs): 67.177092
CPU 1 ISR total execution time (s): 0.042543
CPU 1 ISR count: 42600
CPU 1 DPC highest execution time (µs): 618.740590
CPU 1 DPC total execution time (s): 1.691165
CPU 1 DPC count: 84538
_________________________________________________________________________________________________________
CPU 2 Interrupt cycle time (s): 59.971298
CPU 2 ISR highest execution time (µs): 0.0
CPU 2 ISR total execution time (s): 0.0
CPU 2 ISR count: 0
CPU 2 DPC highest execution time (µs): 91.733550
CPU 2 DPC total execution time (s): 0.010664
CPU 2 DPC count: 1555
_________________________________________________________________________________________________________
CPU 3 Interrupt cycle time (s): 57.666669
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): 170.011644
CPU 3 DPC total execution time (s): 0.004194
CPU 3 DPC count: 620
_________________________________________________________________________________________________________
CPU 4 Interrupt cycle time (s): 73.865101
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): 171.083672
CPU 4 DPC total execution time (s): 0.004407
CPU 4 DPC count: 614
_________________________________________________________________________________________________________
CPU 5 Interrupt cycle time (s): 73.272214
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): 47.860547
CPU 5 DPC total execution time (s): 0.002409
CPU 5 DPC count: 443
_________________________________________________________________________________________________________
CPU 6 Interrupt cycle time (s): 59.531363
CPU 6 ISR highest execution time (µs): 1.172218
CPU 6 ISR total execution time (s): 0.000067
CPU 6 ISR count: 87
CPU 6 DPC highest execution time (µs): 234.84430
CPU 6 DPC total execution time (s): 0.055493
CPU 6 DPC count: 5115
_________________________________________________________________________________________________________
CPU 7 Interrupt cycle time (s): 52.269333
CPU 7 ISR highest execution time (µs): 1.112104
CPU 7 ISR total execution time (s): 0.000003
CPU 7 ISR count: 4
CPU 7 DPC highest execution time (µs): 218.513404
CPU 7 DPC total execution time (s): 0.021702
CPU 7 DPC count: 2737
_________________________________________________________________________________________________________
CPU 8 Interrupt cycle time (s): 78.427299
CPU 8 ISR highest execution time (µs): 0.0
CPU 8 ISR total execution time (s): 0.0
CPU 8 ISR count: 0
CPU 8 DPC highest execution time (µs): 109.867858
CPU 8 DPC total execution time (s): 0.002647
CPU 8 DPC count: 367
_________________________________________________________________________________________________________
CPU 9 Interrupt cycle time (s): 78.053468
CPU 9 ISR highest execution time (µs): 0.0
CPU 9 ISR total execution time (s): 0.0
CPU 9 ISR count: 0
CPU 9 DPC highest execution time (µs): 139.473869
CPU 9 DPC total execution time (s): 0.001693
CPU 9 DPC count: 234
_________________________________________________________________________________________________________
CPU 10 Interrupt cycle time (s): 70.381552
CPU 10 ISR highest execution time (µs): 0.0
CPU 10 ISR total execution time (s): 0.0
CPU 10 ISR count: 0
CPU 10 DPC highest execution time (µs): 159.010831
CPU 10 DPC total execution time (s): 0.002012
CPU 10 DPC count: 194
_________________________________________________________________________________________________________
CPU 11 Interrupt cycle time (s): 70.953080
CPU 11 ISR highest execution time (µs): 0.0
CPU 11 ISR total execution time (s): 0.0
CPU 11 ISR count: 0
CPU 11 DPC highest execution time (µs): 169.490658
CPU 11 DPC total execution time (s): 0.001734
CPU 11 DPC count: 120
_________________________________________________________________________________________________________
Имеет смысл переключить аудио программы на ядро 5.