Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll invalidation seems broken on an RTX 2070? #8371

Closed
tommai78101 opened this issue Nov 23, 2020 · 23 comments
Closed

Scroll invalidation seems broken on an RTX 2070? #8371

tommai78101 opened this issue Nov 23, 2020 · 23 comments
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Milestone

Comments

@tommai78101
Copy link

tommai78101 commented Nov 23, 2020

Environment

Windows build number:  Win32NT 10.0.19042.0 (Microsoft Windows NT 10.0.19042.0)
Windows Terminal version (if applicable): Version: 1.4.3243.0

Any other software?
Ubuntu WSL2 4.19.104-microsoft-standard

Steps to reproduce

  1. Launch Windows Terminal.
  2. Launch an Ubuntu WSL2 session. (Not WSL). This is the Windows 10 Store app, called "Ubuntu". It's currently running 20.04 in WSL2.
  3. In Ubuntu WSL, find a directory location where there's a known cloned .git repository.
  4. In the repository, run git log or git status, if you have a lot of modified changes yet to be committed. This should at least print enough characters in Windows Terminal, that you will definitely need to scroll up/down to view everything that was printed in the window.
  5. Use your mouse and drag the Windows Terminal scrollbar up or down very quickly.
  6. Observe the error. I think the display is not refreshing correctly. (See below)

Expected behavior

I should be able to view text normally.

Actual behavior

GIF

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Nov 23, 2020
@tommai78101 tommai78101 changed the title Running "git log" or "git status" in Ubuntu WSL causes Windows Terminal to break buffer when scrolling up/down Printing a lot of text in Ubuntu WSL causes Windows Terminal to break buffer when scrolling up/down Nov 23, 2020
@tommai78101
Copy link
Author

tommai78101 commented Nov 23, 2020

I made it easier to see the actual behavior, which is better than seeing all those red text which is really hard to view:

GIF

@tommai78101 tommai78101 changed the title Printing a lot of text in Ubuntu WSL causes Windows Terminal to break buffer when scrolling up/down Printing anything and scrolling quickly up and down in Ubuntu WSL causes Windows Terminal to break console buffer Nov 23, 2020
@tommai78101 tommai78101 changed the title Printing anything and scrolling quickly up and down in Ubuntu WSL causes Windows Terminal to break console buffer Printing anything and scrolling quickly up and down in Ubuntu WSL2 causes Windows Terminal to break console buffer Nov 23, 2020
@DHowett
Copy link
Member

DHowett commented Nov 23, 2020

Whoa! What GPU do you have? We only used to see this when partial presentation was broken...

@DHowett DHowett added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Nov 23, 2020
@skyline75489
Copy link
Collaborator

And does experimental.rendering.software or experimental.rendering.forceFullRepaint make a difference here?

See: https://docs.microsoft.com/en-us/windows/terminal/customize-settings/global-settings#rendering-settings

@zadjii-msft
Copy link
Member

Or, does selecting (and deselecting) the text in the buffer reveal what you'd actually expect to be visible?

@tommai78101
Copy link
Author

Whoa! What GPU do you have? We only used to see this when partial presentation was broken...

Dual GPUs setup. One GTX 1060, and one RTX 2070 Turbo.

And does experimental.rendering.software or experimental.rendering.forceFullRepaint make a difference here?

See: https://docs.microsoft.com/en-us/windows/terminal/customize-settings/global-settings#rendering-settings

Just the setting "experimental.rendering.forceFullRepaint": true is good enough for me to fix the issue. I didn't know about this setting configuration before.

Or, does selecting (and deselecting) the text in the buffer reveal what you'd actually expect to be visible?

Selecting and deselecting the text in the buffer reveals the text I expected it to print out after doing a simple ls -a.

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Nov 23, 2020
@zadjii-msft
Copy link
Member

Out of curiosity, does this bug only repro for one of the GPUs? If forceFullRepaint fixes this, then it might be a sign that either partial presentation doesn't work for that GPU, or we're not doing something right for that specific one.

@zadjii-msft zadjii-msft added Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Product-Terminal The new Windows Terminal. and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Nov 23, 2020
@tommai78101
Copy link
Author

Repaint fixes this, then it might be a sign that either partial presentation doesn't work for that GPU, or we're not doing something right for that specific one.

How should I test this? Do I just disable the device, then reboot for each of these graphics card?

image

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Nov 23, 2020
@tommai78101
Copy link
Author

Actually, another question: How do you determine what rendering device the Windows Terminal is using for rendering? Maybe if that information is included somewhere when creating a diagnostic file, would it help to pinpoint which device the rendering is malfunctioning?

If these are not viable, then nevermind.

@onomatopellan
Copy link

onomatopellan commented Nov 23, 2020

@tommai78101 I don't have more than one GPU but did you try this?

@tommai78101
Copy link
Author

tommai78101 commented Nov 23, 2020

@onomatopellan That's actually a better option for running single GPUs on multi-GPUs setups. Let me try that and see how it goes.

@tommai78101
Copy link
Author

@onomatopellan @zadjii-msft

Apparently, Windows Terminal runs on RTX 2070, and that's what's causing the screen tearing/partial rendering issue when scrolling up/down fast enough.

image

Also it is strange that my GTX 1060 is gone from this menu...

@tommai78101
Copy link
Author

tommai78101 commented Nov 23, 2020

And if I switch to Intel UHD Graphics 630, I don't get that screen tearing.

In both cases, the experiment rendering option, forceFullRepaint is set to false.

GIF

@onomatopellan
Copy link

onomatopellan commented Nov 23, 2020

@tommai78101 It seems you need to specify which one is the High Performance GPU. Can you find something like this? (option should be at the top of Graphics Settings)

EDIT: It seems this is something that was added on insider build 20190 but you are on build 19042.

@tommai78101
Copy link
Author

tommai78101 commented Nov 23, 2020

@onomatopellan

@tommai78101 It seems you need to specify which one is the High Performance GPU. Can you find something like [this]

No, I'm not on the Windows 10 Insider, since this is is home personal computer. I do not want to be an Insider.

I'm still on the 19042 build, per OP at the top.

@DHowett DHowett changed the title Printing anything and scrolling quickly up and down in Ubuntu WSL2 causes Windows Terminal to break console buffer Scroll invalidation seems broken on an RTX 2070? Nov 25, 2020
@DHowett DHowett added Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Nov 25, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Nov 25, 2020
@DHowett DHowett added Help Wanted We encourage anyone to jump in on these. Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. labels Nov 25, 2020
@DHowett
Copy link
Member

DHowett commented Nov 25, 2020

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.

I think there might be some tracing we can use to help determine what exactly is happening, but I'll need to consult.

@tommai78101
Copy link
Author

Cool, let me know if you need anything.

For now, I'm going to stick to using the experimental.rendering.forceFullRepaint option, since it works perfectly.

@zadjii-msft
Copy link
Member

Hey so I know it's been a few years - You still seeing this/? If you are, could you try out the new rendering engine in the Preview builds? I'm curious if that new engine just fixes this for you.

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Aug 12, 2022
@tommai78101
Copy link
Author

@zadjii-msft Hello, I installed the Windows Terminal Preview, and just checked. Unfortunately, the issue is still not fixed when I turned off the experimental.rendering.forceFullRepaint option.

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Aug 12, 2022
@tommai78101
Copy link
Author

tommai78101 commented Aug 12, 2022

In action, using Visual Studio Code repository for this test.

GIF

@zadjii-msft
Copy link
Member

Ah okay that's my bad. The experimental.useAtlasEngine setting actually goes in your profile settings, rather than the globals (like the other rendering settings). Can you try there instead? (also, that setting doesn't hot-reload, so you'll need to reboot the terminal).

Thanks for bearing with me!

@zadjii-msft zadjii-msft added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Aug 12, 2022
@tommai78101
Copy link
Author

tommai78101 commented Aug 12, 2022

@zadjii-msft I moved the settings under the profile setting, and redid the test. The new rendering engine settings seems to be working now.

Seems to be working now.

GIF

What was the issue found that would cause the error with the rendering issue before the new Atlas engine?

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Aug 12, 2022
@zadjii-msft
Copy link
Member

What was the issue found that would cause the error with the rendering issue before the new Atlas engine?

Honestly, I don't know! The two engines have pretty different paths by which they interact with the GPU. Perhaps the set of calls we're using with the old renderer (most likely Present1) just don't play nice with your GPU.

This bumps a discussion topic we've been putting off. What exactly should we do with bugs like this? Where there's a bug in the dxrenderer, but it's resolved in the new renderer. We're ultimately planning on defaulting to the new engine for everyone (once it's a bit more stable).

I'm proposing we add a Resolution-FixedByAtlasRenderer label. Use that to tag issues we know are fixed already. Maybe just close those out right now? Maybe we could add a rule to the bot so that /atlas would give a little blurb about the new renderer and how to enable it for now.

@zadjii-msft zadjii-msft added Needs-Discussion Something that requires a team discussion before we can proceed and removed Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Discussion Something that requires a team discussion before we can proceed labels Aug 12, 2022
@zadjii-msft
Copy link
Member

Oh we looped back on this but never actually closed it out. 🤦

We did end up tracking a whole pile of "fixed by atlas" things, but this escaped.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

5 participants