[PR #5353] [MERGED] Add support for renderer backoff, don't FAIL_FAST on 3x failures, add UI #26267

Open
opened 2026-01-31 09:15:03 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/5353
Author: @DHowett-MSFT
Created: 4/14/2020
Status: Merged
Merged: 4/14/2020
Merged by: @undefined

Base: masterHead: dev/duhowett/eyes_off_the_prize


📝 Commits (4)

  • c2fcdf3 Renderer: Add support for backoff and auto-disable on failed retry
  • 57ead2d Wire TermControl's Render Failed handler up to show some auxiliary UI
  • eb934e4 Constantize
  • 621e595 Commentize

📊 Changes

9 files changed (+106 additions, -2 deletions)

View changed files

📝 src/cascadia/TerminalControl/Resources/en-US/Resources.resw (+7 -1)
📝 src/cascadia/TerminalControl/TermControl.cpp (+32 -0)
📝 src/cascadia/TerminalControl/TermControl.h (+2 -0)
📝 src/cascadia/TerminalControl/TermControl.xaml (+17 -0)
📝 src/renderer/base/renderer.cpp (+35 -1)
📝 src/renderer/base/renderer.hpp (+5 -0)
📝 src/renderer/base/thread.cpp (+6 -0)
📝 src/renderer/base/thread.hpp (+1 -0)
📝 src/renderer/inc/IRenderThread.hpp (+1 -0)

📄 Description

Summary of the Pull Request

Renderer: Add support for backoff and auto-disable on failed retry

This commit introduces a backoff (150ms * number of tries) to the
renderer's retry logic (introduced in #2830). It also changes the
FAIL_FAST to a less globally-harmful render thread disable, so that we
stop blowing up any application hosting a terminal when the graphics
driver goes away.

In addition, it adds a callback that a Renderer consumer can use to
determine when the renderer has failed, and a public method to kick it
back into life.

Fixes #5340.

This PR also wires up TermControl so that it shows some UI when the renderer tastes clay.

image

image

PR Checklist

Validation Steps Performed

I tested this by dropping the number of retries to 1 and forcing a TDR while doing wsl cmatrix -u0. It picked up exactly where it left off.

As a bonus, you can actually still type into the terminal when it's graphically suspended (and exit still works.). The block is entirely graphical.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/5353 **Author:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Created:** 4/14/2020 **Status:** ✅ Merged **Merged:** 4/14/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/duhowett/eyes_off_the_prize` --- ### 📝 Commits (4) - [`c2fcdf3`](https://github.com/microsoft/terminal/commit/c2fcdf3d395262f6a4d4739fc746e53c09169158) Renderer: Add support for backoff and auto-disable on failed retry - [`57ead2d`](https://github.com/microsoft/terminal/commit/57ead2d0674c35e4b0cddbde5188aff193adfdaa) Wire TermControl's Render Failed handler up to show some auxiliary UI - [`eb934e4`](https://github.com/microsoft/terminal/commit/eb934e409e2e63a9fa43b253acd2248568cce173) Constantize - [`621e595`](https://github.com/microsoft/terminal/commit/621e595170204e980488c55655b492dcf8559476) Commentize ### 📊 Changes **9 files changed** (+106 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/Resources/en-US/Resources.resw` (+7 -1) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+32 -0) 📝 `src/cascadia/TerminalControl/TermControl.h` (+2 -0) 📝 `src/cascadia/TerminalControl/TermControl.xaml` (+17 -0) 📝 `src/renderer/base/renderer.cpp` (+35 -1) 📝 `src/renderer/base/renderer.hpp` (+5 -0) 📝 `src/renderer/base/thread.cpp` (+6 -0) 📝 `src/renderer/base/thread.hpp` (+1 -0) 📝 `src/renderer/inc/IRenderThread.hpp` (+1 -0) </details> ### 📄 Description ## Summary of the Pull Request Renderer: Add support for backoff and auto-disable on failed retry This commit introduces a backoff (150ms * number of tries) to the renderer's retry logic (introduced in #2830). It also changes the FAIL_FAST to a less globally-harmful render thread disable, so that we stop blowing up any application hosting a terminal when the graphics driver goes away. In addition, it adds a callback that a Renderer consumer can use to determine when the renderer _has_ failed, and a public method to kick it back into life. Fixes #5340. This PR also wires up TermControl so that it shows some UI when the renderer tastes clay. ![image](https://user-images.githubusercontent.com/14316954/79266118-f073f680-7e4b-11ea-8b96-5588a13aff3b.png) ![image](https://user-images.githubusercontent.com/14316954/79266125-f36ee700-7e4b-11ea-9314-4280e9149461.png) ## PR Checklist * [x] Closes #5340 * [x] cla * [ ] Tests added/passed * [ ] Requires documentation to be updated * [x] I've discussed this with core contributors already. ## Validation Steps Performed I tested this by dropping the number of retries to 1 and forcing a TDR while doing `wsl cmatrix -u0`. It picked up exactly where it left off. As a bonus, you can actually still type into the terminal when it's graphically suspended (and `exit` still works.). The block is _entirely graphical_. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:15:03 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26267