Graphical corruption when Terminal loses/regains focus (on Intel iGPU?) #11430

Closed
opened 2026-01-31 02:47:24 +00:00 by claunia · 19 comments
Owner

Originally created by @Johnlon on GitHub (Nov 16, 2020).

Environment

Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd] Version	10.0.18363 Build 18363

Windows Terminal version (if applicable): Version: 1.4.3141.0


Any other software?

Steps to reproduce

Moving away focus to another app and coming back.

Expected behavior

No corruption

Actual behavior

image

Seems to get worse as I alt tab away and back.

Not consistently happening so not sure how to provoke.

If I force a repaint by dragging over it then this repairs the view

However, if I scroll the window then the corruption moves with it so I guess the canvas data is corrupted somehow?

Originally created by @Johnlon on GitHub (Nov 16, 2020). <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd] Version 10.0.18363 Build 18363 Windows Terminal version (if applicable): Version: 1.4.3141.0 Any other software? ``` # Steps to reproduce Moving away focus to another app and coming back. # Expected behavior No corruption # Actual behavior ![image](https://user-images.githubusercontent.com/836248/99204756-87bc7600-27ae-11eb-95b3-f9f8c54cd3a2.png) Seems to get worse as I alt tab away and back. Not consistently happening so not sure how to provoke. If I force a repaint by dragging over it then this repairs the view However, if I scroll the window then the corruption moves with it so I guess the canvas data is corrupted somehow?
Author
Owner

@zadjii-msft commented on GitHub (Nov 16, 2020):

Well I've certainly never heard of anything like that. What kind of graphics card, driver, do you have? If the corruption scrolls with the buffer, then whatever is corrupted in the graphics memory must be getting moved with the Present1 call we use to scroll the buffer.

@zadjii-msft commented on GitHub (Nov 16, 2020): Well I've certainly never heard of anything like that. What kind of graphics card, driver, do you have? If the corruption scrolls with the buffer, then whatever is corrupted in the graphics memory must be getting moved with the `Present1` call we use to scroll the buffer.
Author
Owner

@Johnlon commented on GitHub (Nov 17, 2020):

This is a Dell XPS 15 laptop running integrated graphics on an i7-9750H cpu.

It just happened again and I recorded a video if you would like me to share
it privately with you.

On this occasion I was in vi inside WSL inside Terminal.

Inside vi I was able to scroll the terminal up/down and the corruption
followed.
However, when vi scrolled up it repainted the screen and refreshed the
corruption fixing it - this may be a vi thing.

When at the terminal prompt instead of being in vi I have seen hitting CR
cause corruption to scroll off the top.
I have a video of this too.

When moving the window then the whole window is freshed, or dragging across
it causes the dragged area to refresh..

JL

@Johnlon commented on GitHub (Nov 17, 2020): This is a Dell XPS 15 laptop running integrated graphics on an i7-9750H cpu. It just happened again and I recorded a video if you would like me to share it privately with you. On this occasion I was in vi inside WSL inside Terminal. Inside vi I was able to scroll the terminal up/down and the corruption followed. However, when vi scrolled up it repainted the screen and refreshed the corruption fixing it - this may be a vi thing. When at the terminal prompt instead of being in vi I have seen hitting CR cause corruption to scroll off the top. I have a video of this too. When moving the window then the whole window is freshed, or dragging across it causes the dragged area to refresh.. JL
Author
Owner

@DHowett commented on GitHub (Nov 17, 2020):

This is amazing!

Can you try these two options? Don't try them at the same time unless you want a significant performance hit 😄

global settings (outside of any profile, outside the defaults section)

"experimental.rendering.forceFullRepaint": true: this will keep GPU acceleration on, but redraw the entire screen every time something changes

"experimental.rendering.software": true: this will disable GPU acceleration, but keep the partial screen repainting

(If you enable both, you get full screen repainting plus software rendering, which while slow is a great fallback compatibility mode.)

@DHowett commented on GitHub (Nov 17, 2020): This is amazing! Can you try these two options? Don't try them at the same time unless you want a significant performance hit :smile: ### global settings (outside of any profile, outside the `defaults` section) `"experimental.rendering.forceFullRepaint": true`: this will keep GPU acceleration on, but redraw the entire screen every time something changes "`experimental.rendering.software": true`: this will disable GPU acceleration, but keep the partial screen repainting (If you enable both, you get full screen repainting plus software rendering, which while slow is a great fallback compatibility mode.)
Author
Owner

@Johnlon commented on GitHub (Nov 18, 2020):

Not happen today. Will see if it reoccurring tomorrow

@Johnlon commented on GitHub (Nov 18, 2020): Not happen today. Will see if it reoccurring tomorrow
Author
Owner

@ghost commented on GitHub (Nov 22, 2020):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Nov 22, 2020): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@Johnlon commented on GitHub (Nov 22, 2020):

I haven't been using the terminal for a few days.
Will get back to you.

@Johnlon commented on GitHub (Nov 22, 2020): I haven't been using the terminal for a few days. Will get back to you.
Author
Owner

@Johnlon commented on GitHub (Nov 23, 2020):

No further issues since .. experimental.rendering.forceFullRepaint": true:
Should I also try other setting?

However, Calculator has exactly the same corruption issue?

What's the theory?

@Johnlon commented on GitHub (Nov 23, 2020): No further issues since .. experimental.rendering.forceFullRepaint": true: Should I also try other setting? However, Calculator has exactly the same corruption issue? What's the theory?
Author
Owner

@zadjii-msft commented on GitHub (Nov 23, 2020):

However, Calculator has exactly the same corruption issue?

w a t. If experimental.rendering.forceFullRepaint fixed it, I'd think that it was some glitch in how we're handling partial presentation for scrolling the buffer, esp. w.r.t. your specific graphics card. This happens from time to time, see #8371 for another instance just this week.

However, if this is happening in Calculator too, then I'm out of theories as to what might be happening. Did you file an issue on the calculator repo? Maybe they've got a better theory?

@zadjii-msft commented on GitHub (Nov 23, 2020): > However, Calculator has exactly the same corruption issue? w a t. If `experimental.rendering.forceFullRepaint` fixed it, I'd think that it was some glitch in how we're handling partial presentation for scrolling the buffer, esp. w.r.t. your specific graphics card. This happens from time to time, see #8371 for another instance just this week. However, if this is happening in Calculator too, then I'm out of theories as to what might be happening. Did you file an issue on the calculator repo? Maybe they've got a better theory?
Author
Owner

@Johnlon commented on GitHub (Nov 24, 2020):

I figured that terminal and calculator might be using some common framework?

The corruption has not reoccurred in terminal since that cfg hack.

I have not raised ticket on calculator

@Johnlon commented on GitHub (Nov 24, 2020): I figured that terminal and calculator might be using some common framework? The corruption has not reoccurred in terminal since that cfg hack. I have not raised ticket on calculator
Author
Owner

@Johnlon commented on GitHub (Nov 24, 2020):

My laptop has integrated graphics and also as 1060 graphics card. However I
believe in the integrated graphics are used for everything

@Johnlon commented on GitHub (Nov 24, 2020): My laptop has integrated graphics and also as 1060 graphics card. However I believe in the integrated graphics are used for everything
Author
Owner

@onomatopellan commented on GitHub (Nov 24, 2020):

@Johnlon You can try this to assign a specific GPU for the Windows Terminal.

@onomatopellan commented on GitHub (Nov 24, 2020): @Johnlon You can try [this](https://www.howtogeek.com/351522/how-to-choose-which-gpu-a-game-uses-on-windows-10/) to assign a specific GPU for the Windows Terminal.
Author
Owner

@zadjii-msft commented on GitHub (Nov 30, 2020):

I think this is gonna end up like #8371. We can't repro it locally, so I'm not sure there's anything else we can do to debug it, but we can keep an eye out for future reports, and maybe help narrow the cause down. I've marked this bug up for our backlog and stuck the "needs repro" tag on it. Probably our best bet is gonna be someone on the team getting this under a debugger . . . but that's going to be difficult.

@zadjii-msft commented on GitHub (Nov 30, 2020): I think this is gonna end up like #8371. We can't repro it locally, so I'm not sure there's anything else we can do to debug it, but we can keep an eye out for future reports, and maybe help narrow the cause down. I've marked this bug up for our backlog and stuck the "needs repro" tag on it. Probably our best bet is gonna be someone on the team getting this under a debugger . . . but that's going to be difficult.
Author
Owner

@epigramx commented on GitHub (Mar 15, 2021):

I see something similar (though not exactly (it has some kind of transparency having the corruption(point me to another report if it exists))) on amd graphics on multi monitor. I suspect it's very related to hardware acceleration (I do not know if it's their bug or this' bug but I suspect it's common hardware acceleration bugs because chrome has some issues with it as well). I will try the setting related to accel above because I'm almost certain it will alleviate it.

@epigramx commented on GitHub (Mar 15, 2021): I see something similar (though not exactly (it has some kind of transparency having the corruption(point me to another report if it exists))) on amd graphics on multi monitor. I suspect it's very related to hardware acceleration (I do not know if it's their bug or this' bug but I suspect it's common hardware acceleration bugs because chrome has some issues with it as well). I will try the setting related to accel above because I'm almost certain it will alleviate it.
Author
Owner

@NeonOdyssey commented on GitHub (Jul 14, 2021):

I am also having this same issue. I did not encounter this issue until today. System resources were all below 10-2%.

System Specs

GTX 1080 Ti
32 GB Ram
i7-9700k

Screenshot

It does not cover the whole screen but does not affect the terminal application.

image

@NeonOdyssey commented on GitHub (Jul 14, 2021): I am also having this same issue. I did not encounter this issue until today. System resources were all below 10-2%. ## System Specs GTX 1080 Ti 32 GB Ram i7-9700k ## Screenshot It does not cover the whole screen but does not affect the terminal application. ![image](https://user-images.githubusercontent.com/45792245/125674647-56bc896d-2ce2-44cc-8887-45f194f8d3ea.png)
Author
Owner

@DanPinGF commented on GitHub (Dec 10, 2021):

Looks like an outdated graphics driver, perhaps? I actually had a similar graphics-related problem (artifacts, screen flickering, etc.), especially outside the Terminal app. My HP Laptop 15-dy1751ms, 10th Gen i5 Quad-Core, has had a faulty Intel UHD Graphics driver shipped with it, and I did not manage to fix it until way later when I upgraded to Windows 11 and downloaded the latest graphics driver software a bit afterwards.

@DanPinGF commented on GitHub (Dec 10, 2021): Looks like an outdated graphics driver, perhaps? I actually had a similar graphics-related problem (artifacts, screen flickering, etc.), especially outside the Terminal app. My HP Laptop 15-dy1751ms, 10th Gen i5 Quad-Core, has had a faulty Intel UHD Graphics driver shipped with it, and I did not manage to fix it until way later when I upgraded to Windows 11 and downloaded the latest graphics driver software a bit afterwards.
Author
Owner

@epigramx commented on GitHub (Apr 5, 2022):

I see something similar (though not exactly (it has some kind of transparency having the corruption(point me to another report if it exists))) on amd graphics on multi monitor. I suspect it's very related to hardware acceleration (I do not know if it's their bug or this' bug but I suspect it's common hardware acceleration bugs because chrome has some issues with it as well). I will try the setting related to accel above because I'm almost certain it will alleviate it.

That didn't fix it by the way. It's probably related to amd drivers. It might be also terminal's fault because when I use ConEmu instead: it does not happen.

@epigramx commented on GitHub (Apr 5, 2022): > I see something similar (though not exactly (it has some kind of transparency having the corruption(point me to another report if it exists))) on amd graphics on multi monitor. I suspect it's very related to hardware acceleration (I do not know if it's their bug or this' bug but I suspect it's common hardware acceleration bugs because chrome has some issues with it as well). I will try the setting related to accel above because I'm almost certain it will alleviate it. That didn't fix it by the way. It's probably related to amd drivers. It might be also terminal's fault because when I use ConEmu instead: it does not happen.
Author
Owner

@epigramx commented on GitHub (Apr 11, 2022):

It's not 100% confirmed yet, but I haven't seen this issue on windows 11 yet, so it could be a windows bug with a fix that never found its way into 10.

@epigramx commented on GitHub (Apr 11, 2022): It's not 100% confirmed yet, but I haven't seen this issue on windows 11 yet, so it could be a windows bug with a fix that never found its way into 10.
Author
Owner

@NeonOdyssey commented on GitHub (Apr 23, 2022):

It's not 100% confirmed yet, but I haven't seen this issue on windows 11 yet, so it could be a windows bug with a fix that never found its way into 10.

I can confirm that this issue has not occurred since upgrading to windows 11

@NeonOdyssey commented on GitHub (Apr 23, 2022): > It's not 100% confirmed yet, but I haven't seen this issue on windows 11 yet, so it could be a windows bug with a fix that never found its way into 10. I can confirm that this issue has not occurred since upgrading to windows 11
Author
Owner

@zadjii-msft commented on GitHub (Aug 23, 2023):

I'm fully expecting that this was either:

  • a bad graphics driver
  • A buggy Windows Insider build (less likely)
  • Fixed by the new text renderer (the "Atlas engine"), circa 1.18.

If anyone is still seeing this on 1.18+, we'll probably want a new thread to track it. The new rendering engine is quite a bit different.

@zadjii-msft commented on GitHub (Aug 23, 2023): I'm fully expecting that this was either: * a bad graphics driver * A buggy Windows Insider build (less likely) * Fixed by the new text renderer (the "Atlas engine"), circa 1.18. If anyone is still seeing this on 1.18+, we'll probably want a new thread to track it. The new rendering engine is quite a bit different.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11430