microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.55k stars 8.31k forks source link

Too much output on terminal makes monitor screen distorted. #11866

Closed egeakman closed 2 years ago

egeakman commented 2 years ago

Windows Terminal version

1.11.2921.0

Windows build number

10.0.22000.0

Other Software

Any version of python and pip

Steps to reproduce

An example command that reproduces the issue:

pip install --upgrade {a lot of packages which will generate a lot of output}

or:

A vision processing application that detects the object and prints information about it. It prints as long as the app is running.

The repo of the application below, if it is going to help: https://github.com/Scorpions-Robotics/vision-2021

(Some variables, functions, imports are defined before. Just trying to show the idea.)

while True:
    grabbed, frame = camera.read()

    if grabbed == True:

        result, x, y, w, h = functions.vision(frame, cascade_classifier)
        print(f"X: {x} Y: {y} W: {w} H: {h} D: {d} R: {r} B: {b}")

I tried to reproduce the issue with PowerShell language but it didn't reproduce the issue:

while($true)
{
    $i++
    Write-Host "i is $i"
}

Expected Behavior

No distortions on the screen.

Actual Behavior

When I run python-based commands (pip, python) from Windows Terminal which generates long outputs, the screen becomes distorted. The distortion persists for several minutes even in BIOS, and other OS (Linux). So the problem somehow damages the monitor temporarily. (There are no distortions at all on bare PowerShell without Windows Terminal)

The distortions are:

zadjii-msft commented 2 years ago

Can you take a video of this? I've never heard of anything like this happening. I'd suspect if there's parts of the display that are being affected outside the window of the Terminal, then I'd guess that the root cause is a bad graphics driver, not something the Terminal itself is doing.

You might be able to mitigate this with one of these two settings: experimental.rendering.forceFullRepaint, experimental.rendering.software

egeakman commented 2 years ago

I have an NVIDIA GeForce GTX 1650 Super with NVIDIA Studio Driver version 472.47 installed from GeForce Experience (NVIDIA's app for installing drivers, etc.). I am experiencing this issue since I first started using Windows Terminal which was a few months ago. Everything is up to date including Windows, Windows Terminal, graphics driver. The issue was persisting with the previous versions of the graphics driver. The video and images of the issue are attached below.

(There are distortions before running the command in the video because I ran the command a few times trying to shoot the video.)

Video: https://youtu.be/RLfQcc78nTU


WhatsApp Image 2021-12-02 at 17 49 33 (1) WhatsApp Image 2021-12-02 at 17 49 33 (2) WhatsApp Image 2021-12-02 at 17 49 33 WhatsApp Image 2021-12-02 at 17 49 34 (1)

It persists even when the HDMI cable is unplugged.

WhatsApp Image 2021-12-02 at 17 49 34 (2) WhatsApp Image 2021-12-02 at 17 49 34

zadjii-msft commented 2 years ago

It persists even when the HDMI cable is unplugged.

woah uh WHAT. There's... no way that's the Terminals fault. I'd suspect your monitor might just be dying

egeakman commented 2 years ago

It persists even when the HDMI cable is unplugged.

woah uh WHAT. There's... no way that's the Terminals fault. I'd suspect your monitor might just be dying

Yeah, I thought the same first. But it doesn't occur unless I execute a python based command from the Windows Terminal. I play video games (CS:GO, Valorant, Assassin's Creed, etc.) these games use my graphics card too, but they do not have any effects like this on my monitor. I am really confused. It is just so specific that it occurs when I execute a python command. Also, another thing is, it disappears over time.

zadjii-msft commented 2 years ago

Did the experimental rendering settings change anything? I'd guess that one of the DX api's that the Terminal is using is the one that's getting the monitor into this state, and wouldn't necessarily be super useful for games. If either of those settings changed something, that might help narrow the problem space.

egeakman commented 2 years ago

I changed the settings you mentioned but it didn't change anything.

Would it help if I share the settings JSON?

{
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "actions": 
    [
        {
            "command": 
            {
                "action": "copy",
                "singleLine": false
            },
            "keys": "ctrl+c"
        },
        {
            "command": "find",
            "keys": "ctrl+shift+f"
        },
        {
            "command": "paste",
            "keys": "ctrl+v"
        },
        {
            "command": 
            {
                "action": "splitPane",
                "split": "auto",
                "splitMode": "duplicate"
            },
            "keys": "alt+shift+d"
        }
    ],
    "copyFormatting": "none",
    "copyOnSelect": false,
    "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
    "experimental.rendering.forceFullRepaint": false,
    "experimental.rendering.software": false,
    "initialRows": 40,
    "profiles": 
    {
        "defaults": {},
        "list": 
        [
            {
                "commandline": "powershell.exe",
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "hidden": false,
                "name": "Windows PowerShell"
            },
            {
                "commandline": "cmd.exe",
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "hidden": false,
                "name": "Command Prompt"
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            },
            {
                "guid": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}",
                "hidden": false,
                "name": "Git Bash",
                "source": "Git"
            },
            {
                "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
                "hidden": false,
                "name": "Ubuntu",
                "source": "Windows.Terminal.Wsl",
                "startingDirectory": "%USERPROFILE%"
            },
            {
                "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
                "hidden": false,
                "name": "PowerShell",
                "source": "Windows.Terminal.PowershellCore"
            }
        ]
    },
    "schemes": 
    [
        {
            "background": "#0C0C0C",
            "black": "#0C0C0C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#CCCCCC",
            "green": "#13A10E",
            "name": "Campbell",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },
        {
            "background": "#012456",
            "black": "#0C0C0C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#CCCCCC",
            "green": "#13A10E",
            "name": "Campbell Powershell",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },
        {
            "background": "#282C34",
            "black": "#282C34",
            "blue": "#61AFEF",
            "brightBlack": "#5A6374",
            "brightBlue": "#61AFEF",
            "brightCyan": "#56B6C2",
            "brightGreen": "#98C379",
            "brightPurple": "#C678DD",
            "brightRed": "#E06C75",
            "brightWhite": "#DCDFE4",
            "brightYellow": "#E5C07B",
            "cursorColor": "#FFFFFF",
            "cyan": "#56B6C2",
            "foreground": "#DCDFE4",
            "green": "#98C379",
            "name": "One Half Dark",
            "purple": "#C678DD",
            "red": "#E06C75",
            "selectionBackground": "#FFFFFF",
            "white": "#DCDFE4",
            "yellow": "#E5C07B"
        },
        {
            "background": "#FAFAFA",
            "black": "#383A42",
            "blue": "#0184BC",
            "brightBlack": "#4F525D",
            "brightBlue": "#61AFEF",
            "brightCyan": "#56B5C1",
            "brightGreen": "#98C379",
            "brightPurple": "#C577DD",
            "brightRed": "#DF6C75",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#E4C07A",
            "cursorColor": "#4F525D",
            "cyan": "#0997B3",
            "foreground": "#383A42",
            "green": "#50A14F",
            "name": "One Half Light",
            "purple": "#A626A4",
            "red": "#E45649",
            "selectionBackground": "#FFFFFF",
            "white": "#FAFAFA",
            "yellow": "#C18301"
        },
        {
            "background": "#002B36",
            "black": "#002B36",
            "blue": "#268BD2",
            "brightBlack": "#073642",
            "brightBlue": "#839496",
            "brightCyan": "#93A1A1",
            "brightGreen": "#586E75",
            "brightPurple": "#6C71C4",
            "brightRed": "#CB4B16",
            "brightWhite": "#FDF6E3",
            "brightYellow": "#657B83",
            "cursorColor": "#FFFFFF",
            "cyan": "#2AA198",
            "foreground": "#839496",
            "green": "#859900",
            "name": "Solarized Dark",
            "purple": "#D33682",
            "red": "#DC322F",
            "selectionBackground": "#FFFFFF",
            "white": "#EEE8D5",
            "yellow": "#B58900"
        },
        {
            "background": "#FDF6E3",
            "black": "#002B36",
            "blue": "#268BD2",
            "brightBlack": "#073642",
            "brightBlue": "#839496",
            "brightCyan": "#93A1A1",
            "brightGreen": "#586E75",
            "brightPurple": "#6C71C4",
            "brightRed": "#CB4B16",
            "brightWhite": "#FDF6E3",
            "brightYellow": "#657B83",
            "cursorColor": "#002B36",
            "cyan": "#2AA198",
            "foreground": "#657B83",
            "green": "#859900",
            "name": "Solarized Light",
            "purple": "#D33682",
            "red": "#DC322F",
            "selectionBackground": "#FFFFFF",
            "white": "#EEE8D5",
            "yellow": "#B58900"
        },
        {
            "background": "#000000",
            "black": "#000000",
            "blue": "#3465A4",
            "brightBlack": "#555753",
            "brightBlue": "#729FCF",
            "brightCyan": "#34E2E2",
            "brightGreen": "#8AE234",
            "brightPurple": "#AD7FA8",
            "brightRed": "#EF2929",
            "brightWhite": "#EEEEEC",
            "brightYellow": "#FCE94F",
            "cursorColor": "#FFFFFF",
            "cyan": "#06989A",
            "foreground": "#D3D7CF",
            "green": "#4E9A06",
            "name": "Tango Dark",
            "purple": "#75507B",
            "red": "#CC0000",
            "selectionBackground": "#FFFFFF",
            "white": "#D3D7CF",
            "yellow": "#C4A000"
        },
        {
            "background": "#FFFFFF",
            "black": "#000000",
            "blue": "#3465A4",
            "brightBlack": "#555753",
            "brightBlue": "#729FCF",
            "brightCyan": "#34E2E2",
            "brightGreen": "#8AE234",
            "brightPurple": "#AD7FA8",
            "brightRed": "#EF2929",
            "brightWhite": "#EEEEEC",
            "brightYellow": "#FCE94F",
            "cursorColor": "#000000",
            "cyan": "#06989A",
            "foreground": "#555753",
            "green": "#4E9A06",
            "name": "Tango Light",
            "purple": "#75507B",
            "red": "#CC0000",
            "selectionBackground": "#FFFFFF",
            "white": "#D3D7CF",
            "yellow": "#C4A000"
        },
        {
            "background": "#000000",
            "black": "#000000",
            "blue": "#000080",
            "brightBlack": "#808080",
            "brightBlue": "#0000FF",
            "brightCyan": "#00FFFF",
            "brightGreen": "#00FF00",
            "brightPurple": "#FF00FF",
            "brightRed": "#FF0000",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#FFFF00",
            "cursorColor": "#FFFFFF",
            "cyan": "#008080",
            "foreground": "#C0C0C0",
            "green": "#008000",
            "name": "Vintage",
            "purple": "#800080",
            "red": "#800000",
            "selectionBackground": "#FFFFFF",
            "white": "#C0C0C0",
            "yellow": "#808000"
        }
    ]
}
zadjii-msft commented 2 years ago
    "experimental.rendering.forceFullRepaint": false,
    "experimental.rendering.software": false,

you need to set those to true 😉

egeakman commented 2 years ago
    "experimental.rendering.forceFullRepaint": false,
    "experimental.rendering.software": false,

you need to set those to true 😉

I changed them but since it didn't fix the issue, I sent the original one.

I will try to reproduce this issue on another machine and get back to here as soon as possible.

ianjoneill commented 2 years ago

This may sound really weird, but does going to #9164, and expanding the "Simple monochromatic images" section in the original post trigger this?

I had this exact same effect happen on a Lenovo Y25g-30 monitor when viewing that image. I ended up sending it back, as the "ghosting" would stay there even when switching input methods on the monitor (e.g. DVI for PC to HDMI for my Xbox One).

egeakman commented 2 years ago

This may sound really weird, but does going to #9164, and expanding the "Simple monochromatic images" section in the original post trigger this?

I had this exact same effect happen on a Lenovo Y25g-30 monitor when viewing that image. I ended up sending it back, as the "ghosting" would stay there even when switching input methods on the monitor (e.g. DVI for PC to HDMI for my Xbox One).

No, it didn't trigger any distortion. Did the place you bought the monitor from return your money or replace it?

ianjoneill commented 2 years ago

I got the option of both - and went for full refund because I wasn't sure if it was an intrinsic issue with the design of the monitor. Worth noting though that it was brand new - I only had it two weeks.

Ghosting

egeakman commented 2 years ago

Interesting news: the issue applies only to Powershell. Not Git Bash, not cmd, not WSL shell, only Powershell. I have two versions of Powershell installed: 7.2.0 and 5.1. It happens on both. All profiles are exactly the same except the executables. What do you think the issue is @zadjii-msft? Thanks in advance.

egeakman commented 2 years ago

There have been no distortions since I connected a second monitor. It doesn't make any sense. The defective monitor seems to be working just fine now. 😮‍💨