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

Open
Jerska opened this issue Feb 5, 2016 · 44 comments

Comments

@Jerska
Copy link

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

This comment has been minimized.

Copy link
Member

commented Feb 15, 2016

Does Chrome browser have the same problem?

@CharlieHess

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link

commented Mar 3, 2016

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

@ndoeberlein

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

commented Mar 11, 2016

We also have several customers who suffers from this issue.

@petrfelzmann

This comment has been minimized.

Copy link
Contributor

commented Mar 14, 2016

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

@avoidwork

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor

commented Mar 16, 2016

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

.

@petrvecera

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Mar 17, 2016

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

@pavelzaruba

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Mar 17, 2016

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

@petrvecera

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Contributor

commented Mar 27, 2016

@petrvecera

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Jul 5, 2016

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

@davidjkrause

This comment has been minimized.

Copy link

commented Jul 23, 2017

FWIW, a personal Electron app I have was exhibiting a black screen 100% of the time for the main window on an OpenSUSE Linux machine with NVidia graphics. Upgraded to Electron v1.7.5 beta, and the black screen issue is resolved. Version 1.7.x of Electron picks up Chrome v58. The Chromium bug referenced above by @zinkkrysty was marked as resolved in Chrome v57.

@purefan

This comment has been minimized.

Copy link

commented Aug 25, 2017

Im seeing partial black outs on apps (for example Slack and VSCode) running on Ubuntu, when hovering over some items that display a tooltip, the tooltip displays maybe a few characters and the rest is blacked out
screenshot showing the partial blackout

purefan added a commit to purefan/purefan.github.io that referenced this issue Aug 27, 2017

@akayami

This comment has been minimized.

Copy link

commented Sep 15, 2017

Hi,

I'm on linux, and I have observed the following.

Slack (and chrome) work fine, when the machine is booted freshly. However, if I suspend it and wake it up, both chrome and slack do not work (chromium on the other hand is fine). I have tested slack, and running it with --disable-gpu fixes the issue.

The problem is recent. It used to work fine. I have changed my nvidia drivers to nouveau recently. When I have a bit of time, I'll try to switch back to nvidia drivers and see if the issue persist.

@2E0PGS

This comment has been minimized.

Copy link

commented Jan 8, 2018

--disable-gpu works for me on applications using electron running inside virtual box (KVM mode).
For example atom IDE.

@sizijee

This comment has been minimized.

Copy link

commented Jan 30, 2018

For Windows 10 Users
Steps

  1. Navigate to C:\Users\{username}\AppData\Local\slack\app-{version}\slack.exe
  2. Select properties
  3. Select compatibility tab
  4. Select compatibility mode windows 8
  5. Launch slack

image

@4avka

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link

commented Aug 31, 2018

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

@mariorodriguespt

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.