Vscode: Corrupted terminal and minimap textures after sleep

Created on 7 Sep 2018  路  13Comments  路  Source: microsoft/vscode

  • VSCode Version: 1.27.1
  • OS Version: ubuntu 16.04

Steps to Reproduce:

  1. Open terminal
  2. Sleep laptop
  3. When reopened text in terminal is garbage.

screenshot from 2018-09-07 09-13-01

bug editor-minimap gpu integrated-terminal verified

Most helpful comment

@Tyriar reference to that chromium bug?

All 13 comments

This is a bug in Chromium.

@Tyriar reference to that chromium bug?

I don't have a link, I believe the first report for this was https://github.com/Microsoft/vscode/issues/30292

Same here (I would have left a comment on #30292, but it is locked)

I've been assuming it is something to do with the nvidia driver; though it only happens in vscode. It is not just the terminal, also the minimap, and sometimes other bits of the UI, such as the search box.

Typing reset in the terminal did not reset it. Resizing the pane also did not.

What does work (both for terminal and the minimap) is altering the zoom. E.g. ctrl + then ctrl - and it is back. So, as long as vscode has a way to recognize when a suspend/restart has happened, it should be able to force the screen rewrite? I.e. what function is triggered by changing the font size, that doesn't get triggered by just changing the pane size?

@DarrenCook while there aren't any web APIs that I'm aware of to track suspend, I just found an Electron one https://electronjs.org/docs/api/power-monitor

@bpasero do you have a recommendation for which electron-main service electron.powerMonitor calls should go into? It's needed to redraw the terminal and minimap on 'resume'.

@Tyriar maybe here and then send a IPC message to all windows. Alternatively we could expose an event on IWindowService everyone in the renderer could register to.

This is now fixed for the terminal.

@alexandrudima you can fix the minimap issue by forcing a redraw when this event fires:

https://github.com/Microsoft/vscode/blob/1c7194ad5d3b07faddf1297a8e332bf406213c96/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts#L72-L74

I would have done it, but I don't know enough about using electron APIs in monaco components.

I think to be able to use this in the standalone editor it has to be wrapped around some service, unless we want to move this into the codeEditor contrib of the workbench.

I've adopted the event in the editor too.

@alexandrudima does fb4f36c fix apply to terminal also?

I am running 1.31.0 on Ubuntu. My vscode integrated terminal still has this issue. The minimap is working though.

I don't know if this is the right place to post this, but I was getting similar issues in Chrome and VS Code, so I posted a bug report on their website. Link if anyone has anything to add to it: https://bugs.chromium.org/p/chromium/issues/detail?id=932219

@Tyriar probably that is more accurate, since it no longer corrupted, morelike invisible.
Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrkiley picture mrkiley  路  3Comments

omidgolparvar picture omidgolparvar  路  3Comments

shanalikhan picture shanalikhan  路  3Comments

curtw picture curtw  路  3Comments

borekb picture borekb  路  3Comments