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

Black screen with an Nvidia GPU #4380

Closed
Jerska opened this issue Feb 5, 2016 · 51 comments
Closed

Black screen with an Nvidia GPU #4380

Jerska opened this issue Feb 5, 2016 · 51 comments

Comments

@Jerska
Copy link

@Jerska Jerska commented Feb 5, 2016

Hi there,

I've recently forced my computer to always use my GPU instead of automatically choosing between the chipset and the GPU.
When I did that, the Slack application started rendering only a black window.
I've submitted a bug report to Slack and Nvidia.

Then I discovered the webview engine for Slack is electron, so to confirm my thoughts, I went ahead and downloaded Atom: same issue.

Imgur

I'm using the latest Nvidia drivers, so I'm unsure if it comes from them or electron which is why I've submitted the bug report at both places.

Information:

  • Electron version : Unknown, the one used in latest released Atom and Slack
  • OS: Windows 10
  • GPU: GTX 870M
@zcbenz
Copy link
Member

@zcbenz zcbenz commented Feb 15, 2016

Does Chrome browser have the same problem?

@CharlieHess
Copy link
Contributor

@CharlieHess CharlieHess commented Feb 24, 2016

We have a couple more users hitting this. It's not exclusive to Nvidia as this user had a Matrox GPU: DxDiag.txt.

Furthermore, starting the Slack app with the --disable-gpu argument fixes the issue.

@PetrJuricaProfiq
Copy link

@PetrJuricaProfiq PetrJuricaProfiq commented Mar 3, 2016

Same thing happened to us on Windows 7 with AMD card.

@ndoeberlein
Copy link

@ndoeberlein ndoeberlein commented Mar 3, 2016

We have found that with the Matrox GPUs, the update.exe app is actually the culprit. --disable-gpu does not have any effect and still shows the black screen.

Changing the shortcut target from the default
C:\Users\xxx\AppData\Local\slack\Update.exe --processStart slack.exe --disable-gpu
to
C:\Users\xxx\AppData\Local\slack\app-2.0.0\slack.exe --disable-gpu

Solved the issue for us. We also had the best luck disabling "Launch app on login"

@CharlieHess
Copy link
Contributor

@CharlieHess CharlieHess commented Mar 9, 2016

@ndoeberlein: Update.exe supports passing arguments, try this instead:

C:\Users\xxx\AppData\Local\slack\Update.exe --processStart slack.exe --process-start-args --disable-gpu

@petrfelzmann
Copy link
Contributor

@petrfelzmann petrfelzmann commented Mar 11, 2016

We also have several customers who suffers from this issue.

@petrfelzmann
Copy link
Contributor

@petrfelzmann petrfelzmann commented Mar 14, 2016

One configuration reported is
Windows 7 64b, ATI Radeon HD 5670

@avoidwork
Copy link

@avoidwork avoidwork commented Mar 14, 2016

Hi,

I've come across this many times over the last few months of building an electron app. When I run the app in a Windows 7 VM with the following settings the window goes black after the app writes to disk (repeatable; sometimes the whole window, sometimes just a part during a reflow). For me, it's always on a DOM reflow.

settings

screen shot 2016-03-14 at 9 44 35 am

initial load (spinner is implying over the wire retrieval)

screen shot 2016-03-14 at 9 45 52 am

when the spinner goes away & reflows, the view breaks

screen shot 2016-03-14 at 9 46 00 am

I originally assumed this was just an issue with the gpu being virtualized, but a small user base is reporting similar problems.

@avoidwork
Copy link

@avoidwork avoidwork commented Mar 14, 2016

The VM I'm using is from https://dev.windows.com/en-us/microsoft-edge/tools/vms/mac/

The machine I'm using is does have an nvidia gpu:

screen shot 2016-03-14 at 9 50 59 am

I've seen this black screen with ^0.34.0

@CharlieHess
Copy link
Contributor

@CharlieHess CharlieHess commented Mar 16, 2016

Windows 7 + AMD Radeon X series; Chrome 49 didn't make a difference. 😞

.

@petrvecera
Copy link

@petrvecera petrvecera commented Mar 17, 2016

Interesting note: We are seeing this issue on machine which have both Windows 7 and Windows 8 in dual boot. (AMD graphic card)
Windows 7 - error (black screen)
Windows 8 - everything OK

So this might be caused by specific HW/SW configuration.
Also we have quite a lot of users reporting this issue to us. Mostly from W7.

@avoidwork
Copy link

@avoidwork avoidwork commented Mar 17, 2016

I only see the issue in a Win7 VM; I moved to 8 & 10 for dev.

@pavelzaruba
Copy link

@pavelzaruba pavelzaruba commented Mar 17, 2016

The black screen appears after downloading a big file on Windows 32 bit as well. It might be a memory problem, accessing an array out of bounds, etc.

#4814

@pavelzaruba
Copy link

@pavelzaruba pavelzaruba commented Mar 17, 2016

There are more black screen bugs out there, e.g.: #4828.

@petrvecera
Copy link

@petrvecera petrvecera commented Mar 18, 2016

@zcbenz You asked if there is the same problem also in Chrome so I looked into it.
Google Chrome suffered from this issue too but they fixed it.
https://productforums.google.com/forum/#!msg/chrome/E6auRoL3p3w/ftSy9a8y8gIJ

The users are reporting that launching with these params fixed the issue.
--disable-gpu or
--disable-d3d11

So I looked how they solved it. When I launch the Chrome on the W7 system where Electron works without any problem the Chrome has just normal parameters.

But when I launch Chrome on W7 system where Chrome works, Electron not. The Chrome is launched automatically with param --disable-d3d11 !!

The whole command on the affect computer looks like this:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --type=gpu-process --channel="4348.0.1693403075\1912414666" --disable-d3d11 --supports-dual-gpus=false --gpu-driver-bug-workarounds=3,9,11,16,25,54 --gpu-vendor-id=0x1002 --gpu-device-id=0x0000 --gpu-driver-vendor="Advanced Micro Devices, Inc." --gpu-driver-version=15.200.1062.1004 --ignored=" --type=renderer " /prefetch:2

@CharlieHess
Copy link
Contributor

@CharlieHess CharlieHess commented Mar 18, 2016

@zcbenz: Is there any way we could tap into the abundance of GPU information Chrome is collecting, and potentially reuse the same command-line arguments within Electron? Seems like this would resolve a number of rendering glitches.

@frenchbread
Copy link

@frenchbread frenchbread commented Mar 23, 2016

Same issue here.

App build on OSX 10.11 works smoothly.

When running same app's build for win32 on Windows 10 (on Virtual Box VM) also works fine. Black screen appears sometimes after dialog.showSaveDialog has been opened. (In my case only when showSaveDialog window is opened)


Update: black-screen no longer appears. Update to electron-prebuilt@0.37.2 solved the issue.

@zcbenz
Copy link
Member

@zcbenz zcbenz commented Mar 27, 2016

Chromium ships with a blacklist for GPU drivers and models, and should be able to disable GPU for troubling machines, somehow it is not working.

@anaisbetts
Copy link
Contributor

@anaisbetts anaisbetts commented Mar 27, 2016

@petrvecera
Copy link

@petrvecera petrvecera commented Mar 28, 2016

Unfortunately I don't have reproducible environment anymore. But our users are reporting that they didn't have a problem with version 0.36.1 - so it means that the automatic gpu disable most likely worked before.

Could anyone confirm this and perhaps found the exact version when the issue started?

@frenchbread
Copy link

@frenchbread frenchbread commented Mar 29, 2016

@petrvecera For me it was v0.36.0, then I've jumped straight to v0.37.2 which seems not to have this issue.

@petrbrzek
Copy link

@petrbrzek petrbrzek commented Jul 5, 2016

Still happening in Electron 1.2.1. The --disable-gpu flag helped one of our customers.

@l0k18
Copy link

@l0k18 l0k18 commented Feb 23, 2018

I can confirm --disable-gpu fixed the problem also, and I have Nvidia driver 390.25. it's pretty much an intolerable problem, and cpu rendering is woeful, so I will try a different Nvidia driver version.

@perlun
Copy link

@perlun perlun commented Aug 29, 2018

@akayami I am seeing the exact same problem as you - all Chromium-based apps (Chrome, Slack, Spotify) dies on suspend. I also have an nVidia card and the nouveau drivers are not an option for me unfortunately, so --disable-gpu might be the workaround for now.

For reference:

$ uname -a
Linux alladin 4.17.0-3-amd64 #1 SMP Debian 4.17.17-1 (2018-08-18) x86_64 GNU/Linux
$ dpkg -l nvidia-driver
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                          Version             Architecture        Description
+++-=============================-===================-===================-===============================================================
ii  nvidia-driver                 396.51-1            amd64               NVIDIA metapackage

perlun added a commit to perlun/dotfiles that referenced this issue Aug 29, 2018
@huanhulan
Copy link

@huanhulan huanhulan commented Aug 31, 2018

This issue also happened on my computer, which is win10 with integrated graphics

@mariorodriguespt
Copy link

@mariorodriguespt mariorodriguespt commented Jan 21, 2019

This issue is annoying.
After opening my laptop lid, every Electron based app crashes. Sometimes it's a black screen, sometime the app stills runs but fails to render the UI correctly.

Google Chrome works fine without any issue.
Screenshot of vscode:
screenshot from 2019-01-21 19-20-13

in case you're wondering: The entire UI doesn't work, I can not open a file on even scroll. Only fix is to reopen the app again.

@ArfyFR
Copy link

@ArfyFR ArfyFR commented Jun 11, 2019

Hi,
For information, I face the same after upgrading video drivers @Home or @work with some electron clients like

  • Visual studio code in the console
  • Hyper console
  • Mudlet client
    after a video driver update.

Usually NVIDIA GPU update.
But this morning on my DELL XPS 15 9570 also with the Intel video driver update.

@gengshenghong
Copy link

@gengshenghong gengshenghong commented Mar 3, 2020

Any update/fix on this issue (except disable gpu fully always)? I've also got black screen in Windows 7 installed in Parralls Desktop in MacBook air, with 3D accelerator off, it works. Also, when I am using VirtualBox with the same Windows 7 image, it work with/without 3D accelerator. Chrome always work in the same VM.

Thanks,
Shenghong

@gengshenghong
Copy link

@gengshenghong gengshenghong commented Mar 3, 2020

In the same VM, using Chrome, "chrome://gpu" show 3D accelerator is enabled. Why does Electron not support?

@Nikit-Singh
Copy link

@Nikit-Singh Nikit-Singh commented Apr 30, 2020

Not a black screen issue but this issue keeps happening with electron based apps on my windows machine with Nvidia GPU. Any suggestions on how to fix this?
Error

@teebu
Copy link

@teebu teebu commented Jun 26, 2020

My VS Code also having issues, when I have a lot of tabs open in chrome. Whole computer goes black after a few minutes I can recover but, VS freezes, all chrome windows go black. When hardware acceleration is enabled.

Graphics card: Nvidia RTX 2070 Super, driver: 446.14

From VS Code:

Version: 1.46.1 (system setup)
Commit: cd9ea6488829f560dc949a8b2fb789f3cdc05f5d
Date: 2020-06-17T21:13:20.174Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.19041

@BacnNguyen
Copy link

@BacnNguyen BacnNguyen commented Sep 29, 2020

I have the same problem with VS on my PC. I have a GTX card and driver but no monitor. Then I connected to a monitor. It worked fine. Maybe VS needs displayed in a monitor and have GPU/CPU. Hope this help

@adespawn
Copy link

@adespawn adespawn commented Nov 25, 2020

I have similar problems with electron apps on my computer with my Nvidia Gpu in linux after booting up from hibernation

@electron-triage
Copy link
Collaborator

@electron-triage electron-triage commented Mar 10, 2021

The Electron version reported on this issue is no longer supported. See our supported versions documentation.

If you're still experiencing this issue on a supported version, please open a new issue with an updated repro - a Fiddle is very appreciated.

Electron has a large issues backlog. To help our team prioritize, we're closing older issues and asking for new issues with updated repro steps if it affects a supported version. This helps sort what issues are still relevant and helps us fix them more quickly.

Thanks for your patience and understanding!

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