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

Corrupted terminal and minimap textures after sleep #58167

Closed
dazzag24 opened this issue Sep 7, 2018 · 13 comments
Closed

Corrupted terminal and minimap textures after sleep #58167

dazzag24 opened this issue Sep 7, 2018 · 13 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-minimap Code/Text minimap widget issues gpu Issues concerning GPU related items terminal Integrated terminal issues verified Verification succeeded

Comments

@dazzag24
Copy link

dazzag24 commented Sep 7, 2018

  • 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

@Tyriar
Copy link
Member

Tyriar commented Sep 10, 2018

This is a bug in Chromium.

@Tyriar Tyriar added the *out-of-scope Posted issue is not in scope of VS Code label Sep 10, 2018
@vscodebot vscodebot bot closed this as completed Sep 10, 2018
@gocarlos
Copy link

@Tyriar reference to that chromium bug?

@Tyriar
Copy link
Member

Tyriar commented Oct 31, 2018

I don't have a link, I believe the first report for this was #30292

@DarrenCook
Copy link

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?

@Tyriar
Copy link
Member

Tyriar commented Dec 27, 2018

@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 Tyriar reopened this Dec 27, 2018
@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug terminal Integrated terminal issues editor-minimap Code/Text minimap widget issues gpu Issues concerning GPU related items and removed *out-of-scope Posted issue is not in scope of VS Code labels Dec 27, 2018
@Tyriar Tyriar changed the title Corrupted Terminal Text on Linux after sleep Corrupted terminal and minimap textures after sleep Dec 27, 2018
@microsoft microsoft deleted a comment from vscodebot bot Dec 27, 2018
@bpasero
Copy link
Member

bpasero commented Dec 28, 2018

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

Tyriar added a commit that referenced this issue Dec 28, 2018
@Tyriar
Copy link
Member

Tyriar commented Dec 28, 2018

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.

@Tyriar Tyriar assigned alexdima and unassigned Tyriar Dec 28, 2018
@bpasero
Copy link
Member

bpasero commented Dec 29, 2018

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.

@alexdima
Copy link
Member

alexdima commented Jan 7, 2019

I've adopted the event in the editor too.

@alexdima alexdima added this to the December/January 2019 milestone Jan 7, 2019
@alexdima alexdima closed this as completed Jan 7, 2019
@roblourens roblourens added the verified Verification succeeded label Feb 1, 2019
@supirman
Copy link

supirman commented Feb 11, 2019

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

@Tyriar
Copy link
Member

Tyriar commented Feb 12, 2019

@supirman 1c7194a fixed it for the terminal, you might be seeing this issue? #68346

@aibtcare
Copy link

aibtcare commented Feb 14, 2019

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

@supirman
Copy link

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

@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 21, 2019
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 editor-minimap Code/Text minimap widget issues gpu Issues concerning GPU related items terminal Integrated terminal issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

9 participants