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

Open
Tyriar opened this issue Mar 1, 2019 · 141 comments
Open

Comments

@Tyriar
Copy link
Member

@Tyriar 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.

@jchv
Copy link

@jchv 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 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

@chrsmrtn- chrsmrtn- commented Mar 5, 2019

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

@chrsmrtn-
Copy link

@chrsmrtn- chrsmrtn- commented Mar 5, 2019

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

@chrsmrtn-
Copy link

@chrsmrtn- 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 Tyriar commented Mar 5, 2019

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

@chrsmrtn-
Copy link

@chrsmrtn- chrsmrtn- commented Mar 5, 2019

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

@chrsmrtn- chrsmrtn- commented Mar 18, 2019

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

@chrsmrtn- chrsmrtn- commented Mar 18, 2019

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 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 removed this from the March 2019 milestone Mar 25, 2019
@Tyriar Tyriar added this to the On Deck milestone Mar 25, 2019
@dan-dr
Copy link

@dan-dr 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 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.

@connor4312
Copy link
Member

@connor4312 connor4312 commented Oct 1, 2021

I've never seen this so not sure how to repro, any steps?

@meganrogge
Copy link
Contributor

@meganrogge meganrogge commented Oct 1, 2021

I think it's fine to say this is verified because we now detect if the OS is resuming from sleep and clear the texture to prevent this from happening

@MartinWallgren
Copy link

@MartinWallgren MartinWallgren commented Oct 2, 2021

I can verify that this is solved. I used to see this everytime i locked/unlocked my computer. It's not happening anymore.

@dinosaurchi
Copy link

@dinosaurchi dinosaurchi commented Oct 24, 2021

I'm still getting this problem with VSCode 1.61.2 on Ubuntu 18.04.5 LTS, where can I get the patch @MartinWallgren ?

@Tyriar
Copy link
Member Author

@Tyriar Tyriar commented Oct 25, 2021

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

@sguillia
Copy link

@sguillia sguillia commented Oct 26, 2021

@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 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 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 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 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 label Oct 27, 2021
@Tyriar Tyriar removed this from the September 2021 milestone Oct 27, 2021
@Tyriar Tyriar added this to the Backlog milestone Oct 27, 2021
@sguillia
Copy link

@sguillia sguillia commented Oct 27, 2021

@Tyriar
Copy link
Member Author

@Tyriar 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 removed this from the Backlog milestone Oct 28, 2021
@Tyriar Tyriar added this to the November 2021 milestone Oct 28, 2021
@Tyriar Tyriar removed this from the November 2021 milestone Nov 29, 2021
@Tyriar Tyriar added this to the Backlog milestone Nov 29, 2021
@egaznep
Copy link

@egaznep 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

@simontims simontims commented Mar 1, 2022

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

@lmaxeniro lmaxeniro commented Mar 7, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet