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

Broken text after system hibernation #2876

Closed
mojoaxel opened this issue Apr 19, 2018 · 29 comments
Closed

Broken text after system hibernation #2876

mojoaxel opened this issue Apr 19, 2018 · 29 comments
Labels
help wanted Contributions wanted towards the issue 🐧 Platform: Linux Issue pertains to Linux 🐛 Type: Bug Issue pertains to something wrong within Hyper

Comments

@mojoaxel
Copy link
Contributor

mojoaxel commented Apr 19, 2018

I have a problem after returning from hibernation of my Ubuntu linux system:
After I "wake up" from hibernation Hyper seems to have crashed or something. 😕
It is still responsive but the text output is broken. Same thing for multible tabs. See below:

peek 2018-04-19 10-37

It looks to me like a problem with electron on linux but I don't have this problem with any other electron app.

  • system: Ubuntu 16.04 LTS 64bit
  • hyper: Hyper 2.0.0-canary.18 (canary)
@albinekb
Copy link
Contributor

Seems like the Character Atlas map (in GPU memory) is gone and it didn't regenerate, I don't know why macOS and Windows does not have these issues 🤔 Do you have multiple GPUs?

@albinekb albinekb added 🐛 Type: Bug Issue pertains to something wrong within Hyper 🐧 Platform: Linux Issue pertains to Linux help wanted Contributions wanted towards the issue labels Apr 19, 2018
@mojoaxel
Copy link
Contributor Author

Do you have multiple GPUs?

Not that I know of. I have a GeForce GTX 760/PCIe/SSE2
But I use multiple displays.

@albinekb
Copy link
Contributor

albinekb commented Apr 19, 2018

Ok, could you try using VS Code and the built in terminal in there, hibernate and see if you get the same issue? https://code.visualstudio.com/

We're using the same library (xterm) that has an in memory pre-baked map of all characters, if the issue is also in VS Code, we know it's an issue with xterm and we need to investigate how to detect that the map is gone from memory and re-generate, if not, we have done something in hyper that makes this happen.

Thanks and sorry for the inconvenience.

@mojoaxel
Copy link
Contributor Author

Ok, could you try using VS Code and the built in terminal, hibernate and see if you get the same issue?

I could not reproduce this problem with Visual Studio Code. After a hibernation cycle the integrated terminal is still open and working.

Thanks and sorry for the inconvenience.

Not a problem at all! Please let me know If I can help in any way.

@mojoaxel
Copy link
Contributor Author

I can not reproduce this issue on another System also with Ubuntu 16.04 LTS 64bit and multible screens.
I suspect it has something to do with the specific graphics-card driver!?
Please consider this issue a low priority and feel free to close it at any time.

@szmarczak
Copy link

BTW, zooming in and out fixes the issue (possibly a workaround?)...

peek 2018-05-07 15-38

@szmarczak
Copy link

It seems like it's a color issue. Current color (in my case #fff) becomes black. Changing it for example to white or any other fixes it.

peek 2018-05-07 15-44

@szmarczak
Copy link

I don't think it's caused by xterm. Check out Atom and install minimap package. Hibernate, wake up and tada:

peek 2018-05-08 16-25

@albinekb
Copy link
Contributor

albinekb commented May 8, 2018

Zooming in & out confirms that the issue is with xterm CharAtlas, it's basically a big spritemap in-memory with the most common combinations of characters and colors, to speed up rendering in the canvas.

It must be that after hibernation in linux with some combinations loses/corrupts this memory? I have no idea how to fix it though, but one workaround would be to re-generate the CharAtlas after sleep? 🤔

@szmarczak
Copy link

It must be that after hibernation in linux with some combinations loses/corrupts this memory?

Ubuntu is good at losing memory, that's true.

one workaround would be to re-generate the CharAtlas after sleep

That seems to be pretty good solution. It'd amazing if this could possibly come as a experimental feature.

@szmarczak
Copy link

Ubuntu is good at losing memory, that's true.

Here's a proof:

peek 2018-05-08 20-16

@albinekb
Copy link
Contributor

albinekb commented May 8, 2018

That seems to be pretty good solution. It'd amazing if this could possibly come as a experimental feature.

I think we could do it as a plugin? And this close this issue with that since this is pretty rare and the plugin would solve it, thoughts?

@szmarczak
Copy link

I think we could do it as a plugin?

Definitely yes. The easiest way to fix this issue.

And this close this issue with that since this is pretty rare and the plugin would solve it, thoughts?

I agree. I'm sure that's Ubuntu's fault... Just look at the GIF above. Sometimes tooltips are noisy too. But yeah, regenerating CharAtlas is the best workaround we have come up with 😃

@meotimdihia
Copy link

meotimdihia commented May 17, 2018

  • I am on the latest Hyper.app version
  • I have searched the issues of this repo and believe that this is not a duplicate

Issue

when i suspend ubuntu and start computer again, hyper screen is crash:

Repost above issue:
selection_001_09 50 16_16_05_2018

The problem just happen when i use NDIVIA binary driver:

selection_001_09 51 27_16_05_2018

All other programs have no problem but hyper.
I think the problem relate with Electron but i don't see the problem on Visual Studio Code.

@mojoaxel
Copy link
Contributor Author

I now also see this in vscode:
image
(Image: vscode in the background, hyper in the foreground)

@mojoaxel
Copy link
Contributor Author

mojoaxel commented Aug 29, 2018

I just saw the same problem on a canvas element in Chrome. Looks like this is a problem in chromium and therefore electron!?
image
(Image a plotls.js chart broke after system hibernation)

@albinekb
Copy link
Contributor

I think it's an issue with your graphics drivers/OS @mojoaxel, doesn't happen on every distro and not on macOS nor Windows.

@mojoaxel
Copy link
Contributor Author

This is obviously not an hyper issue. I'll close this here.

@mojoaxel
Copy link
Contributor Author

mojoaxel commented Aug 29, 2018

It might help to run your electron app with deactivated GPU support. e.g. code --disable-gpu

@albinekb
Copy link
Contributor

Yes but that will probably give horrible performance for canvas? @mojoaxel have you found any issue about this in electron we can link to?

@albinekb
Copy link
Contributor

Also I think it's possible to work around this if we want. The issue is that the atlas map is lost from GPU memory during hibirnation, so if we detect when the app comes back from hibirnation, we could make a plugin to fix this for users that experience this.

Plugin could be made that reloads the character atlas and draws the canvas again using xterm internals, I'm not sure how to do this but I'm sure it's possible.

@thornjad
Copy link

I have experienced this problem with every electron app I've used, except, interestingly, Slack. But I have experienced it for at least a couple years. I can't find any issues submitted to Electron, Atom nor Chromium after a decent search attempt.

I do think @albinekb and @mojoaxel are right that this is something far upstream from Hyper, and might be tied to OS and/or drivers. I'm on Mint 18.3, currently using the NVIDIA driver 384.130, though I've also had the issue with Nouveau.

The problem is solved in Hyper and in Atom by simply doing something to re-render the text, like zooming or opening modal windows (like find-and-replace in Atom), and this is usually good enough for me.

@marius311
Copy link

I also suffer from the same thing, Ubuntu 18.04, Gnome 3.28.2, nvidia-driver-430 (also tested 390, 396, 415). Below is a sample of what I see.

I do want to point out that maybe theres some motivation to try to do something on the Hyper side to ease our pain, because while I also see this same kind of corruption in other Electron apps, Hyper is unique in that I can't get rid of it with resizing, etc... nor with restarting Gnome (Alt+F2 + r) which fixes all other apps except Hyper. Reload is the only thing that works. A simple plugin that does that automatically would be much appreciated! (I've already got a script automatically reloads Gnome, but Hyper remains the lone corrupted app otherwise)

out

@JimWhiteheadUCSC
Copy link

Just a quick note to mention that I am also experiencing this problem. I'm seeing this running Hyper from Windows 10, then running bash. My machine has both Intel graphics as well as NVidia graphics (Dell XPS laptop).

@SleepWalker
Copy link

btw. This bug is fixed in Ubuntu 19.10 and in 19.04 and 18.10 possibly too. I think this is due to new Gnome version

@szmarczak
Copy link

@SleepWalker What nvidia drivers are you using? What is your kelner version?

@SleepWalker
Copy link

@szmarczak kernel 5.3.0-24-generic and no nvidia drivers currently :) I've forgot, that I've switched my notebook to the new one. If I'll find the time to upgrade my old laptop to the latest ubuntu, I'll re-check how does hyper work there.

@szmarczak
Copy link

@SleepWalker Then perhaps nouveau got fixed.

@kalradivyanshu
Copy link

kalradivyanshu commented Jan 6, 2021

Its an nvidia chrome issue, https://askubuntu.com/questions/1273399/problems-with-chrome-browser-after-suspending-the-computer-on-ubuntu-20-04, is there a way to set chrome flags in hyper? enable-features=Vulkan seems to fix it for chrome browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributions wanted towards the issue 🐧 Platform: Linux Issue pertains to Linux 🐛 Type: Bug Issue pertains to something wrong within Hyper
Projects
None yet
Development

No branches or pull requests

9 participants