Text stays invisible after GPU reset recovery (WebGL context recovers, but shared glyph atlas is stale) - zooming shows text, resetting zoom hides it again
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start in xtermFrontend at recoverRenderer() and attachWebGLAddon(), then compare the existing displayMetricsChanged$ handler that calls clearTextureAtlas(). Verify that the recovery path clears the WebGL and/or canvas atlas after re-attachment, and confirm that text remains visible after a GPU reset and subsequent zoom changes.
Written by the indexing model from the issue text.
Description
Version: 1.0.235
Platform: Windows 11 Pro (22621), NVIDIA GPU
Frontend: xterm-webgl
Describe the problem
After a Windows display driver TDR (System log: Display Event ID 4101 "Display driver nvlddmkm stopped responding and has successfully recovered", plus nvlddmkm 153), Tabby's GPU process restarted and the WebGL context recovery from #11354 appears to succeed, but all terminal text in the affected window is invisible. The cursor and background render fine and the shell keeps working — only the glyphs are missing.
Key symptom: pressing Ctrl+= (zoom in) makes the text appear immediately; pressing Ctrl+0 / Ctrl+- back to the original size makes it disappear again. Focusing the window, switching tabs, and resizing the window have no effect.
Suspected cause
xterm.js keeps the glyph texture atlas in a module-level cache shared by every terminal in the window with the same font config (charAtlasCache / ownedBy[]). The GPU reset wipes the atlas canvas bitmaps, but the atlas bookkeeping still marks the glyphs as rasterized, so they are drawn as empty. Zooming changes the cache key, so a fresh atlas is created and text renders. Zooming back reuses the stale shared atlas (still owned by the other tabs), so the text is blank again.
The recovery path in xtermFrontend (recoverRenderer() → attachWebGLAddon()) re-creates the addon, but never calls clearTextureAtlas(), so the stale atlas survives the recovery.
Possible fix
Call webGLAddon.clearTextureAtlas() (and/or canvasAddon.clearTextureAtlas()) after a successful re-attach in recoverRenderer(), the same way it is already done for displayMetricsChanged$.
To reproduce
- Open several terminal tabs in one Tabby window (xterm-webgl frontend).
- Force a GPU driver reset with
Win+Ctrl+Shift+B. - Text in the tabs is invisible.
Ctrl+=shows it,Ctrl+0hides it again.
Workaround that restores text without restarting (confirmed)
Toggle "Automatically hide the taskbar" on and off in Windows settings. This fires display-metrics-changed, and Tabby's existing handler calls clearTextureAtlas() on every terminal, which immediately restores all text in every tab. This also confirms that the stale atlas is the cause and that clearing it after a successful context recovery would fix the issue.
Logs
- Windows System log: Display 4101 + nvlddmkm 153 at the time of the reset
- Tabby: a new
--type=gpu-processchild process was spawned 2 seconds after the event, while the main process and the renderer kept running
- Dominant language
- TypeScript
- Stars
- 74.6k
- Forks
- 4.3k
- Avg merge
- 8d 1h
- Merged PRs (30d)
- 13
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Eugeny/tabby
-
T: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
T: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100