Q100688: Preventing Mari freezes and crashes on Windows by increasing the TDR registry keys

Follow

SYMPTOMS

While using Mari on Windows, Mari can freeze and eventually crash during complex GPU computations, such as those performed by the Bakery.

 

CAUSE

This rare occurrence is often caused by the Timeout Detection and Recovery (TDR) registry keys set on Windows. 

To prevent a GPU computation from locking up your system, Windows cancels any operation that reaches a specified “processing time limit”, and then restarts your GPU driver. This causes a freeze or crash of the application that triggered the long operation.

This processing time limit is set by two registry keys that tell Windows how long it should wait before cancelling the operation and restarting the GPU driver:

  • TDRDelay indicates in seconds how long Windows waits before considering that the GPU is unresponsive during a computation.
  • TdrDdiDelay indicates in seconds how long Windows waits before considering that a software operation is taking too long to leave the GPU drivers.

As Mari uses the GPU intensely, some calculations can last longer than 2 seconds, which is the default TdrDelay limit.

 

 

RESOLUTION

If Mari often freezes or crashes while performing heavy GPU computations on your Windows computer, you may want to edit the TdrDelay and the TdrDdiDelay keys in the registry to a higher value, such as 60 seconds.

  • WARNING: Editing the registry incorrectly can have serious, unexpected consequences that can prevent the system from starting and may require you to reinstall your operating system. The registry keys mentioned on this page shouldn't create such issues, but we do not recommend editing the registry without a complete understanding of the process. Foundry takes no responsibility for any damage caused to your system by modifying the system registry.

    For more information about the TDR registry keys, please refer to the following Microsoft article: Timeout detection and recover (TDR)

  • If the following steps fix any issues you’re encountering in Mari, please still report these issues to Foundry’s Support team, as we aim for all our software to perform well with the default TDR values. Information on how to open a Support ticket can be found here:
    Q100064: How to raise a support ticket

 

To edit the TdrDelay and the TdrDdiDelay registry keys:

  1. Search for Registry Editor in the Windows start menu and select it to launch.



  2. Select the GraphicsDrivers key by adding the following path to the search path and pressing Enter:
    Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers

  3. You should now see the following:



  4. If, as in the image above, the TdrDelay key doesn’t exist yet, right-click in the right pane and select New > DWORD (32bit) Value. Name it TdrDelay while making sure that the correct case is used and that there are no trailing spaces.



  5. Double-click the newly created TdrDelay key to open the edit window.

  6. Change the Base setting to Decimal. Then, set Value data to a value higher than the default 2, such as 60. This value indicates in seconds how long the operating system will wait before considering that the GPU is unresponsive during a computation.



  7. Select OK.

  8. Perform steps 4-7 again to create a TdrDdiDelay key. The default value is 5 seconds, and we recommend changing it to the same Decimal value you set for the TdrDelay key.



  9. Close the Registry Editor and restart your computer, so that the changes take effect.

NOTE: Windows updates or GPU driver updates may reset these keys to their default values.

 

 

FURTHER READING

There are many other things the user can do to improve performance and avoid crashes. To learn more, please refer to the following article:
Q100188: Improving performance in Mari and in specific Projects

To learn more about how Mari uses the GPU and other hardware components, please refer to the following article:
Q100078: Mari's usage of hardware components

 

 

FURTHER HELP

If you are still experiencing difficulties please create a support ticket and provide us with the information requested in this article:
Q100090: Information to send Support when reporting a Mari issue

For more information on how to open a Support ticket, please refer to this article:
Q100064: How to raise a support ticket

    We're sorry to hear that

    Please tell us why