- Timeout detection and recovery windows
- TDR in Windows 8 and later
- Requirements
- TDR device driver interface (DDI)
- Nodes
- Engines
- Engine ordinal value at context creation
- Timeout detection and recovery (TDR)
- Overview
- Timeout detection in WDDM
- Preparation for recovery
- Desktop recovery
- Timeout Detection & Recovery (TDR)
- Local Debugging with a Single GPU
- Local Debugging with Multiple GPUs or Remote Debugging
- TDR (Timeout Detection and Recovery) и сбор файлов дампов
Timeout detection and recovery windows
Aida64 отправила мне следующее предупреждение при открытии теста стабильности системы (окно со всеми графиками):
Я хочу узнать больше об этом TdrDelay, что это? Кроме того, я должен принять предложение Aida64?
Тайм-аут обнаружения и восстановления (TDR)
В Windows Vista и более поздних версиях операционная система пытается обнаружить ситуации, в которых компьютеры кажутся полностью «замороженными». Затем операционная система пытается динамически восстанавливаться из замороженных ситуаций, чтобы настольные компьютеры снова реагировали. Этот процесс обнаружения и восстановления известен как тайм-аут обнаружения и восстановления (TDR). В процессе TDR планировщик графического процессора операционной системы вызывает функцию DxgkDdiResetFromTimeout драйвера минипорта дисплея для повторной инициализации драйвера и сброса графического процессора.
Вот еще несколько объяснений :
TDR означает «Обнаружение и восстановление тайм-аута». Это функция операционной системы Windows, которая обнаруживает проблемы с откликом графической карты и восстанавливает рабочий стол путем сброса карты. Если операционная система не получает ответ от графической карты в течение определенного периода времени (по умолчанию 2 секунды), операционная система сбрасывает графическую карту.
Вы можете настроить промежуток времени до того, как TDR включится и убьет водителя. Продолжительность по умолчанию составляет 2 секунды, но если вы знаете, что вам нужно больше времени, это можно увеличить. В основном это задерживает TDR
Настройка стоимости
Нажмите кнопку Пуск, введите regedit в поле поиска, а затем дважды щелкните файл regedit.exe из приведенных выше результатов. Если вас попросят ввести пароль администратора или подтверждение, введите пароль или предоставьте подтверждение. Найдите и затем щелкните следующий раздел реестра:
В меню «Правка» нажмите «Создать», а затем выберите следующее значение реестра в раскрывающемся меню, соответствующее вашей версии Windows (32-разрядная или 64-разрядная):
Для 32-битного Windows Select DWORD (32-bit ) значение. Введите TdrDelay в качестве имени и нажмите Enter. Дважды щелкните TdrDelay и добавьте 8 данные значения и нажмите ОК.
Для 64-битной Windows
Выберите QWORD (64-bit) значение. Введите TdrDelay в качестве имени и нажмите Enter. Дважды щелкните TdrDelay и добавьте 8 для данных значения и нажмите OK. Закройте редактор реестра и перезагрузите компьютер, чтобы изменения вступили в силу.
NB: я использовал значение 8, но вы всегда можете настроить его. Но в вашем случае я заметил, что у вас уже есть инструмент, который сделает это автоматически для вас.
TDR in Windows 8 and later
Starting with WindowsВ 8, GPU timeout detection and recovery (TDR) behavior allows parts of individual physical adapters to be reset, instead of requiring an adapter-wide reset.
See Timeout detection and recovery (TDR) for more information about TDR.
Requirements
- Minimum WDDM version: 1.2
- Minimum Windows version: 8
- Driver implementation—Full graphics and Render only: Mandatory
- WHLK requirements and tests : Device.Graphics…TDRResiliency
TDR device driver interface (DDI)
To accommodate this behavior change, display miniport drivers implement these functions:
A display miniport driver indicates support for these functions by setting the DXGK_DRIVERCAPS.SupportPerEngineTDR member, in which case it must implement all of the above functions.
A driver that supports these functions must also support level zero synchronization for the DxgkDdiCollectDbgInfo function. This is to ensure that level zero miniport calls not affected by the reset operation can continue. See Remarks of DxgkDdiCollectDbgInfo.
The following structures are associated with the above functions:
Nodes
As used in the above TDR functions, a node is one of multiple parts of a single physical adapter that can be scheduled independently. For example, a 3-D node, a video decoding node, and a copy node can all exist in the same physical adapter, and each can be assigned a separate node ordinal value in the DXGKARG_QUERYDEPENDENTENGINEGROUP.NodeOrdinal member in a call to DxgkDdiQueryDependentEngineGroup.
The number of nodes in the physical adapter is reported by the display miniport driver in the NbAsymetricProcessingNodes member of DXGK_DRIVERCAPS.GpuEngineTopology.
The node ordinal value is passed in the NodeOrdinal member of the DXGKARG_CREATECONTEXT structure when a context is created.
Engines
As used in the above TDR functions, an engine is one of multiple physical adapters (or GPUs) that together act as one logical adapter. The DirectX graphics kernel subsystem supports such configurations but requires that each engine must have the same number of nodes.
As an example, the GPU scheduler considers engine 0 to correspond to physical adapter 0. Engine 0 must have the same number of nodes as engine 1, which corresponds to adapter 1.
Engine ordinal value at context creation
When a context is created, a single bit corresponding to the engine ordinal value is set in the EngineAffinity member of the DXGKARG_CREATECONTEXT structure. The EngineOrdinal member of this and other scheduler-related structures is a zero-based index. The value of EngineAffinity is 1 —>
Timeout detection and recovery (TDR)
This page describes timeout detection and recovery (TDR) for driver developers. See also TDR in Windows 8 and later for additional implementation details.
Overview
One of the most common stability problems in graphics occurs when a computer «hangs», or when it appears to be completely «frozen» while, in reality, it is processing an end-user command or operation. The user typically waits a few seconds and then decides to reboot the computer. The frozen appearance of the computer typically occurs because the GPU is busy processing intensive graphical operations, typically during game play, and hence does not update the display screen. TDRs enable the operating system to detect that the UI is not responsive.
The figure below shows the TDR process.
The operating system (OS) attempts to detect situations in which computers appear to be «frozen». The OS then attempts to dynamically recover from the frozen situations so that desktops are responsive again, alleviating the situation where end users needlessly reboot their systems.
If the OS detects that six (6) or more GPU hangs and subsequent recoveries occur within one (1) minute, the OS bug-checks the computer on the next GPU hang.
Timeout detection in WDDM
The GPU scheduler, which is part of the DirectX graphics kernel subsystem (Dxgkrnl.sys), detects that the GPU is taking more than the permitted amount of time to execute a particular task. The GPU scheduler then tries to preempt this particular task. The preempt operation has a «wait» timeout, which is the actual TDR timeout. The default timeout period in WindowsВ Vista and later operating systems is 2 seconds. If the GPU cannot complete or preempt the current task within the TDR timeout period, the OS diagnoses that the GPU is frozen.
To prevent timeout detection from occurring, hardware vendors should ensure that graphics operations (that is, direct memory access (DMA) buffer completion) take no more than 2 seconds in end-user scenarios such as productivity and game play.
Preparation for recovery
The GPU scheduler calls the display miniport driver’s DxgkDdiResetFromTimeout function to inform the driver that the OS detected a timeout. The driver must then reinitialize itself and reset the GPU. In addition, the driver must stop accessing memory and should not access hardware. The OS and the driver collect hardware and other state information that can be useful for post-recovery diagnosis.
See TDR in Windows 8 and later for additional implementation details.
Desktop recovery
The OS resets the appropriate state of the graphics stack. The video memory manager, which is also part of Dxgkrnl.sys, purges all allocations from video memory. The display miniport driver resets the GPU hardware state. The graphics stack takes the final actions and restores the desktop to the responsive state.
The only visible artifact from the hang detection to the recovery is a screen flicker. This flicker results when the OS resets some portions of the graphics stack, which causes a screen redraw. It is eliminated if the display miniport driver complies with WDDM 1.2 and later (see Providing seamless state transitions in WDDM 1.2 and later).
When the OS has successfully recovered the desktop, it does the following:
- Displays an informational message to the end user, saying «Display driver stopped responding and has recovered.»
- Logs the preceding message in the Event Viewer application and collects diagnosis information in the form of a debug report. If the end user opted in to provide feedback, the OS returns this debug report to Microsoft through the Online Crash Analysis (OCA) mechanism.
Some legacy DirectX applications might just render black at the end of this recovery, which requires the end user to restart these applications. Well-written DirectX 9Ex and DirectX 10 and later applications that handle Device Remove technology continue to work correctly. An application must release and then re-create its Microsoft Direct3D device and all of the device’s objects.
Timeout Detection & Recovery (TDR)
NVIDIAВ® Nsightв„ў Development Platform, Visual Studio Edition 4.7 User Guide
Send Feedback
TDR stands for Timeout Detection and Recovery. This is a feature of the Windows operating system which detects response problems from a graphics card, and recovers to a functional desktop by resetting the card. If the operating system does not receive a response from a graphics card within a certain amount of time (default is 2 seconds), the operating system resets the graphics card.
Before TDR existed, problems of this nature would have resulted in a system freeze and required a reboot of the operating system. If TDR is enabled and you see the TDR error message, «Display driver stopped responding and has recovered,» this means that the Windows operating system reset the display driver.
There are three different possible debugging configurations:
- Local debugging with a single GPU,
- Local debugging with multiple GPUs, or
- Remote debugging.
Choose the one that most closely reflects your NVIDIA Nsight setup:
Local Debugging with a Single GPU
Disabling TDR removes a valuable layer of protection, so it is generally recommended that you keep it enabled.
However, setting the TDR delay too low can cause the debugger to fail for one of two reasons:
- Debugging on some GPUs will fails with a TDR delay of less than 10 seconds.
- Debug builds of CUDA kernels run more slowly and may intrinsically require additional time to complete. With too low of a TDR delay, the kernels may not have enough time to complete.
Therefore, if you are using local debugging with a single GPU, it’s recommended that you leave TDR enabled, and set the delay to 10 seconds.
To enable TDR and change the delay, do the following:
- Right-click the Nsight Monitor icon in the system tray.
- Select Options.
Change the WDDM TDR Delay from the default setting to 10.
Local Debugging with Multiple GPUs or Remote Debugging
When using either a local debugging configuration with multiple GPUs, or a remote debugging configuration, it’s important to disable TDR. This is because with most CUDA applications, a TDR means that any debugging operation after the TDR will fail. You will not be able to step, set breakpoints, view variables, etc. The application will receive a grid launch failure, and the CUcontext will begin to report errors.
Having TDR enabled can interfere with GPU debugging because the graphics card is perceived by the operating system as unresponsive when the execution of a target application is paused or when the debugger is performing certain operations.
To disable TDR, do the following:
- Right-click the Nsight Monitor icon in the system tray.
- Select Options.
TDR (Timeout Detection and Recovery) и сбор файлов дампов
ID 3335
TDR означает Timeout Detection and Recovery. Это особенность операционных систем Windows (Windows Vista и выше), которая обнаруживает проблемы с откликом от видеокарты, и восстанавливает рабочий стол, проводя сброс драйвера видеокарты. Если операционная система не получает отклик от видеокарты в течение определенного времени (по умолчанию — 2 секунды), операционная система сбрасывает драйвер видеокарты. Если операционная система не может сбросить драйвер видеокарты, ваша система скорее всего закроется или вы увидите синий экран смерти.
До существования TDR, подобные проблемы драйвера видеокарт приводили к зависанию системы и требовали перезагрузки ОС. Если TDR включена и вы видите сообщение, связанное с TDR, «Видеодрайвер перестал отвечать и был восстановлен», это означает что ОС Windows успешно сбросила драйвер видеокарты.
Эта статья объясняет как получить файл дампа, связанный со сбоем. Агенты службы поддержки NVIDIA могут попросить Вас предоставить файл дампа, связанного с TDR, который содержит важную информацию о видеокарте и драйвере во время сбоя.
Типы файлов дампа о сбоях
Существует два основных типа сбоев:
Сбой Kernel Mode — Также называемый Синим Экраном Смерти (BSOD). Это сбой системы. Система или будет показывать синий экран или автоматически перезагрузит Вашу систему.
Сбой User Mode — Этот тип сбоев вызван нарушениями доступа, которые приводят к тому, что Ваше приложение, такое как игра или веб браузер, дадут сбой, но не приведут к зависанию/перезагрузке всей системы.
Системный сбой (BSOD)
Файлы дампа о сбое Kernel Mode бывают разных вариантов:
Минидамп (Minidump)
Полный дамп памяти (Complete Memory Dump)
Дамп памяти Kernel (Kernel Memory Dump)
Малый дамп памяти (Small Memory Dump)
В большинстве случаев Вас попросят предоставить файлы минидампа, так как они имеют небольшой размер и их легко прикрепить к электронному письму. По умолчанию, Windows сохраняет минидамп каждый раз, когда компьютер выдает синий экран (BSOD). По умолчанию, файлы дампа kernel mode могут быть найдены в папке:
Файлы названы «MiniDDMMYY-NN.dmp». DDMMYY означает дату в формате день/месяц/год. NN это число, начинающееся со значения 01 и увеличивается каждый раз, когда новый минидамп создан в конкретный день.
Что касается дамп файлов, связанных с TDR, но не связанных с Синим Экраном Смерти, они находятся в:
Сбой приложения
Файлы дампа User Mode доступны в полном и мини вариантах. Процесс автоматического получения файла дампа user mode детально описан Microsoft по ссылке:
Чтобы перейти к месту на жестком диске, в котором по умолчанию хранятся дамп файлы сбоев:
1) Нажмите сочетание клавиш Win+R, чтобы вызвать окно «Выполнить».
2) Введите следующее в поле «Открыть»:
3) Нажмите кнопку Ок
4) Это должно открыть расположение, в которое Windows по умолчанию сохраняет логи сбоев. Ищите самые недавние файлы, основываясь на дате, так как они означают сбои, возникшие с самым недавним драйвером.
Если ваше приложение часто и стабильно выдает сбои, и сотрудник поддержки NVIDIA просит полный дамп файл, чтобы получить более подробную информацию, будет легче вручную получить полный файл дампа о сбое User Mode, во время сбоя приложения.
1) Когда приложение даст сбой и Windows покажет вам сообщение об ошибке, не закрывайте никаких окон.
2) В это же время, одновременно нажмите клавиши «Control» + «Alt» + «Delete» чтобы вызвать экран блокировки. Выберите «Диспетчер задач» с экрана блокировки. Нажмите на «Подробнее», чтобы получить больше информации.
3) Ищите программу, которая дала сбой и нажмите на нее правой кнопкой мыши. Затем выберите «Создать файл дампа».
4) Это создаст полный файл дампа большого размера. Когда дамп будет создан, его имя и расположение покажет вам Windows.
5) Полные файлы дампа обычно имеют размер между 1 Гб и 1.5 Гб. Из-за большого размера, полные файлы дампа не могут быть приложены к электронному письму и отправлены как приложение. Они должны быть загружены на хостинг для файлов или использовать сервис передачи файлов. Сотрудник службы поддержки NVIDIA может помочь вам с этим.
Чтобы получить больше информации о TDR, посетите сайт Microsoft по ссылке: