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

Terminal shows corrupt texture sometimes when resuming the OS from a sleep state #69665

Closed
Tyriar opened this issue Mar 1, 2019 · 145 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug electron Issues and items related to Electron gpu Issues concerning GPU related items terminal Integrated terminal issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-fixed The underlying upstream issue has been fixed upstream-issue-linked This is an upstream issue that has been reported upstream
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Mar 1, 2019

Workaround: Press ctrl++ and ctrl+- (mac: cmd++, cmd+-) to zoom VS Code in and out which will do a complete redraw of the terminal.


Repro:

  1. Open a terminal, run some commands
  2. Sleep system
  3. Resume the system (I think the delay between 2 and 3 has to be a while)

What happens exactly differs across machines, I've seen full black, full transparent and things like this:

screen shot 2019-03-01 at 10 54 08 am

It seems like both the main terminal canvas texture as well as the texture atlas textures can become corrupted.

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug upstream Issue identified as 'upstream' component related (exists outside of VS Code) terminal Integrated terminal issues gpu Issues concerning GPU related items labels Mar 1, 2019
@Tyriar Tyriar added this to the March 2019 milestone Mar 1, 2019
@Tyriar Tyriar self-assigned this Mar 1, 2019
@jchv
Copy link

jchv commented Mar 3, 2019

Does this particular flavor of issue happen outside of Linux with NVIDIA Proprietary drivers? It does seem some people report issues with terminal resume on macOS, but NVIDIA's proprietary drivers on Linux seem to have an endemic issue with sleep/resume.

@Tyriar
Copy link
Member Author

Tyriar commented Mar 4, 2019

I think I've seen it on my Macbook (Intel UHD Graphics 630 1536 MB) and my home PC on Windows (GTX 600 series I think).

@chrsmrtn-
Copy link

I have this too and I'm using the on board video card. Intel HD Graphics 630

@chrsmrtn-
Copy link

I resumed from a sleep state and I didn't immediately reproduce this issue.

@chrsmrtn-
Copy link

chrsmrtn- commented Mar 5, 2019

@Tyriar you mentioned a "delay between 2 and 3 has to be a while". Is that 2 to 3 hours? My sleep state duration was just under 2 hours

@Tyriar
Copy link
Member Author

Tyriar commented Mar 5, 2019

@chrsmrtn- yeah it's pretty hard to reproduce intentionally

@chrsmrtn-
Copy link

I've also noted deuteriation of the window. As in initially all is well after my computer wakes back up, but over time artifacts started appearing (using npm packages to host, monitor changes, and auto compile on change). After a while the window flashes and goes black.

@chrsmrtn-
Copy link

updated to 1809 and again ran into the issue where the terminal text was no longer visible. I could see a cursor, but interacting (even hitting enter to get the command prompt to print out) didn't work.

I closed and re-opened the terminal, but no text was displayed. I could get the command prompt to display if I hit enter

@chrsmrtn-
Copy link

note the above occurred with a working terminal and sleep was not involved. Just like my original ticket that was logged.

@achary
Copy link

achary commented Mar 24, 2019

Same weird artefacts after wake-up from sleep on laptop with NVidia graphics card, Ubuntu 16.04 LTS. Reloading window action is required.

@Tyriar Tyriar modified the milestones: March 2019, On Deck Mar 25, 2019
@dan-dr
Copy link

dan-dr commented Mar 28, 2019

@Tyriar Do you have an idea how to fix it? I could PR..

@Tyriar
Copy link
Member Author

Tyriar commented Mar 31, 2019

I've pushed e531682 which might be a fix for this problem. For those seeing this a lot could you add this to your settings file and let me know if you still observe the problem:

"terminal.integrated.experimentalRefreshOnResume": true

I can make this the default behavior if it works and doesn't cause any other issues.

@Tyriar
Copy link
Member Author

Tyriar commented Oct 25, 2021

@dinosaurchi was your problem specifically after OS sleep/resume?

@sguillia
Copy link

@Tyriar Still reproduces specifically after OS sleep/resume on 1.62.0-insider
Capture du 2021-10-26 11-04-35

@Tyriar
Copy link
Member Author

Tyriar commented Oct 26, 2021

@sguillia @dinosaurchi does it fix itself after resizing the terminal, or only when changing zoom level (ctrl++/ctrl+-)?

@dinosaurchi
Copy link

dinosaurchi commented Oct 26, 2021

@dinosaurchi was your problem specifically after OS sleep/resume?

Yes, when I resumed from sleep or simply login back (not sleep), it happened

@sguillia @dinosaurchi does it fix itself after resizing the terminal, or only when changing zoom level (ctrl++/ctrl+-)?

So far, I fix it by closing the terminal and reopen a new one

  • It is inconvenient as all of my bash history will be wiped out

Resizing the terminal does not solve the problem in my case

@sguillia
Copy link

sguillia commented Oct 27, 2021

does it fix itself after resizing the terminal, or only when changing zoom level (ctrl++/ctrl+-)?

After resizing the terminal, the black squares are gone but some characters are not displayed
Capture du 2021-10-27 09-40-52
Example with ls (notice missing chars on third line)
Capture du 2021-10-27 09-42-47

When changing zoom level (ctrl++/ctrl+-) it works perfectly again

Corrupt texture seems to never happen when terminal was restored (when Session contents restored is in the terminal, I can't reproduce)

@Tyriar
Copy link
Member Author

Tyriar commented Oct 27, 2021

I guess this is not fixed for some cases then, can you open devtools (Help > Toggle Developer Tools), inspect the terminal and put a screenshot there so we can tell which renderer this is happening on?

@Tyriar Tyriar reopened this Oct 27, 2021
@Tyriar Tyriar removed the verified Verification succeeded label Oct 27, 2021
@Tyriar Tyriar modified the milestones: September 2021, Backlog Oct 27, 2021
@sguillia
Copy link

@Tyriar
Capture du 2021-10-27 19-14-58
Capture du 2021-10-27 19-16-29

@Tyriar
Copy link
Member Author

Tyriar commented Oct 28, 2021

@sguillia oh that's even more interesting, so the webgl renderer fails which I believe just reverts to the DOM renderer for the remainder of the session and that fails for some reason (or it retries?).

@Tyriar Tyriar modified the milestones: Backlog, November 2021 Oct 28, 2021
@Tyriar Tyriar modified the milestones: November 2021, Backlog Nov 29, 2021
@egaznep
Copy link

egaznep commented Jan 11, 2022

The terminal I left open before suspended my PC
image

Things are good if I start a new terminal using (+)
image

Console log upon inspection
image

I also have the same issue on my PC with Ubuntu 20.04.2, NVIDIA proprietary drivers but I see a different console log upon inspection of the terminal. Similar to what @sguillia experienced I can zoom in to get the contents back.

@simontims
Copy link

I see this in 1.64.2 via Remote Desktop with the PowerShell Integrated Console.

  1. RDP to a Windows 10 Pro machine running VSCode
  2. Have a ps1 file open
  3. Have some content in the terminal window
  4. Close RDP (don't log out, just close it)
  5. Reconnect to the same session. Terminal window is blank with only the cursor present. Cursor responds to carriage returns, clear [return] places the cursor back to the top etc, but no text is visible
  6. Ctrl +- Ctrl ++ fixes the issue and reveals text
  7. Close the Integrated Console and click Yes when asked if you want to relaunch also fixes this

@lmaxeniro
Copy link

I have had such an issue on Ubuntu18.04 for a long time (maybe two years), the simple solution is just to zoom in/out a bit-- it is not much harmful but rather annoying.. would be good to have some solution

@cmey
Copy link

cmey commented Apr 15, 2022

Still annoying

VSCode:

Version: 1.66.2
Commit: dfd34e8260c270da74b5c2d86d61aee4b6d56977
Date: 2022-04-11T07:49:24.808Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Linux x64 5.16.15-76051615-generic

OS: Linux Pop!_OS 21.10

GPU: Nvidia 1080 w/ nvidia-driver-510

Easy to repro (100% reproducible):

  • Suspend the computer, and upon return the integrated terminal display is corrupt (looks all black for me).
  • Zooming (in or out) fixes it.

@codebrainz
Copy link

Since I upgraded to Ubuntu 22.04, my vscode terminal doesn't show the random coloured pixels anymore but text in the console (it seems apart from those fancy ohmyposh prompts) goes missing with the occasional character showing up randomly more like @egaznep first screenshot above).

Not sure if it helps, but I have also noticed since the upgrade, Firefox's client area (but not toolbar/tabs/wm frame) started doing the random colours just like the screenshot in the OP when resuming from sleep, or sometimes it just has garbage textures on it, which go away when you click in the client area.

It seems like it's maybe not just a vscode/electron/chrome issue but something with graphics drivers or window server or such.

Ubuntu 22.04, using GNOME with X11 session, NVidia GeForce GTX 970 with proprietary driver (470)

lemanschik pushed a commit to code-oss-dev/code that referenced this issue Nov 25, 2022
lemanschik pushed a commit to code-oss-dev/code that referenced this issue Nov 25, 2022
Adds canvas renderer texture atlas clearing

Fixes microsoft#69665
@Tyriar
Copy link
Member Author

Tyriar commented Dec 12, 2022

@codebrainz that was a regression that has since been fixed.

Since there haven't been any comments saying this still happens since April I'm going to close this off. Let me know if you see this, and if so run the new Show Terminal Texture Atlas command and upload the image is puts in your workspace root:

image

@Tyriar Tyriar closed this as completed Dec 12, 2022
@ionics
Copy link

ionics commented Jan 4, 2023

Hi folks, this still seems to be an issue. Zooming IN or OUT fixes it.

After suspend, terminal output broken.

image

image

System: Ubuntu 20.04 LTS AMD Ryzen 5 - NVIDIA GeForce GTX 1060 6GB
Linux username 5.15.0-53-generic #59~20.04.1-Ubuntu SMP Thu Oct 20 15:10:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] (rev a1) (prog-if 00 [VGA controller])
Subsystem: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB]
Flags: bus master, fast devsel, latency 0, IRQ 80
Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
Memory at e0000000 (64-bit, prefetchable) [size=256M]
Memory at f0000000 (64-bit, prefetchable) [size=32M]
I/O ports at e000 [size=128]
Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
Capabilities:
Kernel driver in use: nvidia
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

@github-actions github-actions bot locked and limited conversation to collaborators Jan 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug electron Issues and items related to Electron gpu Issues concerning GPU related items terminal Integrated terminal issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-fixed The underlying upstream issue has been fixed upstream-issue-linked This is an upstream issue that has been reported upstream
Projects
None yet
Development

No branches or pull requests