terminal icon indicating copy to clipboard operation
terminal copied to clipboard

Entire screen randomly tearing and flickering during normal usage

Open giulianob opened this issue 6 years ago • 36 comments

Environment

Windows build number: [Environment]::OSVersion
Windows Terminal version: Version: 0.5.2762.0
LG Ultra HD (3840x2160@60Hz), 150% scale in windows
3072MB ATI AMD Radeon R9 200 Series (Sapphire/PCPartner)
AMD Ryzen 5 1600

No background image set in windows terminal. Removed my profiles.json recently to start fresh.

Steps to reproduce

Just happens after using the terminal for some amount of time. I am not sure what other information may be helpful in tracking this down.

Expected behavior

Screen doesnt flicker/tear

Actual behavior

When the Windows Terminal is focused it will randomly start to cause the entire screen (not just the Windows Terminal) to flicker and tear. I see the windows terminal window flickering in random parts of the screen. The tears show up as individual lines of pixels just randomly tearing/flickering across random parts of the screen.

giulianob avatar Oct 06 '19 15:10 giulianob

Do you happen to have a G*SYNC or FreeSync monitor?

DHowett-MSFT avatar Oct 06 '19 16:10 DHowett-MSFT

My monitor supports Freesync but my video card does not so I don't think it's using it.

giulianob avatar Oct 06 '19 16:10 giulianob

@DHowett-MSFT Here's a video of it happening: https://photos.app.goo.gl/B3jVZUd6wyPvAWJXA

I tried a different cable (hdmi vs displayport). I played around with as many settings as I could on both my video card and monitor. It might be something wrong with my setup but it seems to only happen on Windows Terminal app and nothing else flickers like this.

giulianob avatar Oct 27 '19 14:10 giulianob

This is fascinating. Do other windowed 3D applications not cause the same issue? Are you on the latest stable or latest "bleeding edge" AMD drivers?

DHowett-MSFT avatar Oct 29 '19 20:10 DHowett-MSFT

I'll do some more tests if you can recommend something that runs in a similar mode but I actually do game development which runs with OpenGL and it doesn't cause these issues. I am just running the latest AMD but not bleeding edge.

giulianob avatar Oct 29 '19 20:10 giulianob

No idea how to reproduce this here, but I'm taking all the "we haven't looked at this one yet" tags off and slapping Needs-Repro on. Thanks!

DHowett-MSFT avatar Nov 04 '19 20:11 DHowett-MSFT

I have faced this error and It was because G-SYNC was enabled in Fulllscreen and Windowed mode.

To reproduce:

  • Enable G-SYNC windowed and fullscreen mode
  • Open Terminal
  • Open a video in youtube with picture in picture

Everything will be flickering.

maborak avatar Nov 15 '19 07:11 maborak

I have faced this error and It was because G-SYNC was enabled in Fulllscreen and Windowed mode.

To reproduce:

  • Enable G-SYNC windowed and fullscreen mode
  • Open Terminal
  • Open a video in youtube with picture in picture

Everything will be flickering.

@DHowett-MSFT This also resolved the issue for me as well. Definitely seems to be related to G-SYNC compatibility.

nkasco avatar Nov 28 '19 17:11 nkasco

I can confirm that the same is happening for me when G-SYNC is enabled in Fullscreen and Windowed mode.

When starting the terminal, the screen goes black for 2 seconds and then restores. The terminal flickers noticeably.

HW: GTX 1080 MSI Optix MAG271

driesvb avatar Dec 11 '19 17:12 driesvb

I also have this happening. Whenever the Terminal is in focus, it causes both my Freesync monitors (Samsung C49RG90 @ 120 Hz) to flicker on the sides, and moving the mouse makes it clear that the update frequency has lowered from 120 Hz to somewhere below 60 Hz (ballpark). Is that the Terminal composition/update frequency, I wonder? I'm guessing the Terminal is triggering the variable refresh rate somehow whenever it is in focus.

#649 appears to be the same issue. The workaround posted there worked for me (as I have an NVIDIA card).

jstaro avatar Dec 12 '19 23:12 jstaro

I have the same issue, also a very similar setup as OP:

Windows build number: 10.0.18363.0
Windows Terminal version: Version: 0.7.3451.0
LG Ultra HD (3840x2160@60Hz), 150% scale in windows
2048MB Sapphire Radeon R9 270
Ryzen 3700X

oerpli avatar Jan 03 '20 08:01 oerpli

Same issue for me, only using Terminal with 144Hz, everything fine using 60Hz refresh

Windows build number: 10.0.18363.592 Windows Terminal version: Version: 0.8.10091.0 DELL S2719DGF (2560*1440@144Hz), 100% scale in windows Sapphire Radeon HD 7950

Cncmra avatar Jan 20 '20 10:01 Cncmra

I upgraded my video card and all seems well now. Same monitor and nothing else changed so probably related to that video card.

giulianob avatar Jan 21 '20 02:01 giulianob

I upgraded my video card and all seems well now. Same monitor and nothing else changed so probably related to that video card.

Are you sure the upgrade didn't reset your settings (especially those regarding G-Sync)?

driesvb avatar Jan 21 '20 09:01 driesvb

Can confirm.

If running G-Sync with windowed mode enabled: Terminal will slow refresh rate down to 34hz (monitor FPS counter), when focused. Mouse is choppy. If you happen to have something driving a faster FPS it doesn't occur.

Repro: (most noticeable when running high refresh rates 120hz+)

  • Enable G-SYNC windowed and fullscreen mode
  • Open Terminal
  • With Terminal focused move mouse, observe choppiness (34fps)
  • Change focus to browser, observe smoothness
  • Open YouTube video and play, observe smoothness while focused in Terminal

My setup. Dual monitors, both high refresh (165hz).

shayne avatar Jan 28 '20 18:01 shayne

I've since replaced my 2048MB Sapphire Radeon R9 270 with a RTX 2060 and the problem seems to be gone. Screen is the same as before (60Hz, no free sync due to lack of GPU support).

oerpli avatar Jan 28 '20 18:01 oerpli

Reproducible on:

  • Windows 10 (build 18363.657)
  • GTX 1070 with G-Sync enabled in fullscreen + windowed mode
  • Optix MAG341CQ with FreeSync enabled

michaelkourlas avatar Feb 28 '20 16:02 michaelkourlas

Reproducible on also

  • Windows 10 18363.657
  • GTX 1070 with G-Sync on Fullscreen+windowed
  • AOC AG241QX (G-Sync)

jamievlin avatar Mar 01 '20 22:03 jamievlin

I've since replaced my 2048MB Sapphire Radeon R9 270 with a RTX 2060 and the problem seems to be gone. Screen is the same as before (60Hz, no free sync due to lack of GPU support).

I had a very vague feeling my random, but frequent screen flickering/tearing was only happening when using Terminal. It seems my hunch was right! I also have a Radeon R9 270, but as far as I know, FreeSync is off

GregWoods avatar Mar 02 '20 20:03 GregWoods

Same problem but without any g-sync/free-sync devices.

  • Win 10 pro 18363.657
  • AMD Radeon HD 7950, latest stable driver 20.2.2
  • single screen 4k @ 60Hz, 100% scaling
  • Windows Terminal version: 0.9.433.0

vbruder avatar Mar 05 '20 15:03 vbruder

Same problem, although at the moment i am using Gsync/Freesync - i did try disabling it, restarting windows, did not help.

windows 10 pro 18363.693 using Nvidia gtx 1080ti single 1440p 144hz screen,

just installed windows yesterday, relevant programs today, had not had such issues on laptop with integrated graphics.

Edit: Problem only occurs when application is in focus.

Syth-1 avatar Mar 07 '20 00:03 Syth-1

Same problem here.

Windows 10 version 19041.113 Nvidia GTX 1660Ti Asus ROG PG348 3440x1440@60GHz G-SYNC enabled

once I disable G-SYNC, flickering stops. Flickering affects only top of the screen, only when Windows Terminal is in focus.

Trying to play with these settings did not affect flickering: image

Gorthog avatar Mar 15 '20 02:03 Gorthog

Sam problem here. Win 10 , nvidia 1070 card and LG Gsync monitor. I hate to have to disable GSYNC.

mdalacu avatar Mar 18 '20 09:03 mdalacu

Sam problem here. Win 10 , nvidia 1070 card and LG Gsync monitor. I hate to have to disable GSYNC.

Just disable GSYNC in WINDOWED MODE.

maborak avatar Mar 21 '20 03:03 maborak

Changing your G-Sync settings and thus affecting the refresh rate of every other application on your system seems a bit unreasonable.

https://github.com/microsoft/terminal/issues/649#issuecomment-491288003 Describes a way to work around the frame rate issue for the terminal application only.

Nonag avatar Mar 29 '20 11:03 Nonag

Sam problem here. Win 10 , nvidia 1070 card and LG Gsync monitor. I hate to have to disable GSYNC.

Just disable GSYNC in WINDOWED MODE.

That didn't work for me. However, Nonag method did the trick.

Gorthog avatar Mar 29 '20 12:03 Gorthog

Disabling g-sync on per application basis in the nvidia control panel dues the trick for me, adding the terminal did work for me

PBeckerr avatar May 26 '21 08:05 PBeckerr

What settings did you use @PBeckerr ? I tried this and it still shuts off my monitor when I alt-tab over to terminal. The settings I tried are:

Monitor Technology: Fixed Refresh Preferred refresh rate: Application Controlled Vertical Sync: Use the 3D application setting

moshen avatar Jun 06 '21 14:06 moshen

After closing the Nvidia control panel app it started working...

moshen avatar Jun 06 '21 14:06 moshen

Enabling software rendering should fix the issue: https://github.com/microsoft/terminal/issues/649#issuecomment-759317572

joeltimothyoh avatar Jul 16 '21 08:07 joeltimothyoh