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

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

@vscodebot vscodebot bot added the new release label Sep 7, 2018

@Tyriar

This comment has been minimized.

Copy link
Member

Tyriar commented Sep 10, 2018

This is a bug in Chromium.

@vscodebot vscodebot bot closed this Sep 10, 2018

@gocarlos

This comment has been minimized.

Copy link

gocarlos commented Oct 31, 2018

@Tyriar reference to that chromium bug?

@Tyriar

This comment has been minimized.

Copy link
Member

Tyriar commented Oct 31, 2018

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

@DarrenCook

This comment has been minimized.

Copy link

DarrenCook commented Dec 27, 2018

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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:

ipc.on('vscode:osResume', () => {
this.getActiveTab().terminalInstances.forEach(instance => instance.forceRedraw());
});

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

@Tyriar Tyriar assigned alexandrudima and unassigned Tyriar Dec 28, 2018

@bpasero

This comment has been minimized.

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.

@alexandrudima

This comment has been minimized.

Copy link
Member

alexandrudima commented Jan 7, 2019

I've adopted the event in the editor too.

@alexandrudima alexandrudima added this to the December/January 2019 milestone Jan 7, 2019

@supirman

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

Tyriar commented Feb 12, 2019

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

@aibtcare

This comment has been minimized.

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

This comment has been minimized.

Copy link

supirman commented Feb 15, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment