74

I have a laptop that I mainly use for android development on android studio, today all of the sudden got this error message (or an outdated version of it) when i ran my emulator

Your GPU driver information:

GPU #1
Make: 8086
Model: Intel(R) HD Graphics Family
Device ID: 0a16
Driver version: 10.18.10.3945
GPU #2
Make: 10de
Model: NVIDIA GeForce 820M
Device ID: 1140
Driver version: 22.21.13.8476 

Some users have experienced emulator stability issues with this driver version. As a result, were selecting a compatibility renderer. Please check with your manufacturer to see if there is an updated driver available. 

Updated the geforce driver, but no use, tried to update the intel one but failed, is there a way to disable this? bypass the compatibility renderer and work as I used to, the emulator is awful now. Any explanation why that occurred all of the sudden?

Also I'm using windows 7 64-bit if that will help with anything, had an update few days ago.

Edward Brey
  • 40,302
  • 20
  • 199
  • 253
newRuser
  • 885
  • 1
  • 7
  • 9

11 Answers11

67

I am using Win10 but have the same problem. Emulator started crashing my app after last emulator update. In my case, problem is that emulator does not run on hardware even though I never had a problem with my GPUs. Also, the "GPU driver issue" window that pops up doesn't even label WHICH one of the GPUs it thinks is the problem.

For me the solution that worked is to run emulator from terminal, forcing it to run using hardware graphics (instead of letting emulator decide on which) using command

emulator -avd avd_name -gpu mode

where mode is host so that it will run with hardware.

For example:

Using Android Studio terminal move to folder where the emulator is located. Default on Win10 is: C:\Users\userName\AppData\Local\Android\sdk\emulator

Find emulator to run by listing available ones: emulator -list-avds

Run emulator with -gpu host option: emulator -avd avd_name -gpu host

More info on this link

Api
  • 808
  • 7
  • 7
  • 1
    It's working like anything, No need to update Android Studio to beta channel.. Thanks a lot!!! :-) – raghav_si Aug 30 '17 at 09:13
  • 2
    Hi Api, I have not found emulator folder inside sdk. and also 'emulator' is not recognized as an internal or external command – vidha Nov 07 '17 at 16:47
  • @vidha how are you running your aps if there is no emulator? are you using 3rd party emulator or android studio avd? maybe you need to install one via avd manager? maybe the folder for android is located somewhere else in the tree directory? – Api Nov 23 '17 at 09:01
  • 1
    `emulator` should be recognized as a command after accessing your emulator folder inside the path specified above. – Panos Gr Dec 12 '19 at 15:13
  • Awesome, and it doesn't crash. It is really a weird solution from Google forcing extremely slow compatibility mode, because it MIGHT crash and I should update the GPU driver which DOESN'T EXIST. – Miloš Černilovský Jun 19 '20 at 12:29
43

A comment in the on the bug report pertaining to this issue by a Google employee is illuminating.

If your system doesn't have a discrete GPU, we intended this change in order to make the emulator more reliably run on Intel GPU drivers. At your own risk, you may switch back to using the Intel GPU by going to settings page, then changing the OpenGL ES renderer to "ANGLE (D3D11)", "ANGLE (D3D9)", or "Desktop native OpenGL".

It appears that this message is being displayed for all systems using Intel GPUs, not just systems running specific versions of a graphics driver.

The solution is to, if possible, switch to using an external GPU for running the emulator.

If an Intel GPU is the only GPU available on system it is possible to re-enable accelerated rendering of OpenGL ES, by overriding the default OpenGL ES renderer in settings (see below). Options are OpenGL, ANGLE and SwiftShader. SwiftShader is CPU based OpenGL ES emulation, so this setting will not provide a speedup. ANGLE is Direct3d based OpenGL emulation.

As per the comment this is not guaranteed to work, indeed I am able to re-enable hardware acceleration for Android 7 emulators, but with hardware acceleration enabled, all I receive is a black screen for Android 8 emulators.

Open settings with Ctrl-Shift-S then, depending on the version of the emulator, either go to Settings -> General -> OpenGL ES renderer or to Settings -> Advanced -> OpenGL ES renderer

Newer emulator versions: Settings illustration

Older emulator versions: Settings illustration

Update #1: Another comment on the bug report provides further illumination on this issue:

If you have just a Intel HD 4xxx running the emulator, it's intended that a compatibility renderer be used. I'm sorry about it, but we need to be able to switch to better-supported Intel GPU drivers especially when running high API levels (25+) of system images. Intel iGPUs of that generation (and older) have many issues with OpenGL compatibility.

It appears that Intel iGPU drivers for Haswell (4th gen) processor and older don't support OpenGL well enough for Android 7.1+ devices. So they are purposely falling back to using software emulation which better supports the new Android emulators.

This matches my experience. Using the Intel iGPU works great on Android 7, but is flaky on Android 7.1 and doesn't work at all on Android 8.

My suggestion, stick with Android 7 emulators when using hardware acceleration for Intel Haswell and older iGPUs.

Update #2: Official communication on this issue was finally provided in the form of comments in the release notes for Emulator 26.1.3:

Which GPUs will be switched to use ANGLE or Swiftshader rendering is determined as follows:

  • Older Intel iGPUs have driver issues on both OpenGL and ANGLE D3D drivers. Users with Intel HD Graphics 3xxx and older will use Swiftshader.
  • Some users reported the inability to use API level 25 images because of a bug in which "Pixel Launcher keeps stopping." This seems to be a driver issue in some Intel HD 4xxx models. So they will be switched to use ANGLE automatically.

For best results with GPU emulation, we recommend either to use a discrete NVIDIA or AMD GPU, or a newer Intel GPU (Iris, HD 5xxx, HD 5xx/6xx).

Andreas
  • 2,665
  • 2
  • 29
  • 38
Jade
  • 3,156
  • 1
  • 34
  • 44
  • 3
    That's a nice screenshot but where exactly do you find that setting? I can't find it anywhere under Settings. – David Elner Sep 04 '17 at 05:19
  • @DavidElner I updated the screenshot and provided more detail on how to access Settings. Make sure that you are in the General tab in Settings, rather than the Proxy tab. – Jade Sep 05 '17 at 15:07
  • You're the man! Switched to "Desktop native OpenGL" in this page and "Hardware GLES 2.0" in AVD config not only solved this issue, it enabled an incredible smooth performance in emulator. It runs as smooth as in the real phone (or even better)!! Thanks! – Luciano Fantuzzi Oct 21 '17 at 01:07
  • for Nvidia graphics card I have adjusted its settings. Look at https://www.drivereasy.com/knowledge/solvednvidia-display-driver-stopped-working-and-has-recovered/ – CodeToLife Jan 11 '18 at 08:42
  • 2
    With Android Studio 3.1.3 and Android Emulator 27.2.9 the **OpenGL renderer** config is under the _Advanced_ section, not in _General_ – Josem Jun 23 '18 at 13:06
  • I tried following this but didn't have an `ANGLE` option. I tried with `Desktop native OpenGL` instead, but it had no effect; after relaunching the emulator the error message was displayed again. Separate question for that if anyone has more insight: https://stackoverflow.com/q/54219868/220820 – Andreas Jan 16 '19 at 15:06
  • For anyone having this problem: Switching to swiftshader worked for me. – Niammi Oct 19 '21 at 06:56
6

I ran into this problem today. Per the suggestion from the Google emulator issue tracker, I installed the beta emulator 26.1.3. Problem fixed.

Lee
  • 105
  • 5
  • 1
    For those wondering how to access the beta channel, check this link http://tools.android.com/preview-channel – rewgoes Aug 07 '17 at 01:56
3

As other suggested, go to Settings -> Appearance & Behaviour -> System settings -> Updates. Change "Automatically check updates for" to "Beta channel". Update emulator to latest beta. Driver issue should be gone. I had problems running fragment with google maps (app chrash) that was solved after update of emulator to latest beta.

AlfaSpider
  • 146
  • 4
2

I did the same thing as @Api, but I did it from the Virtual Device Manager. In the device edit window, in the Graphics dropdown list, I selected "Hardware - GLES 2.0". I believe the default is Automatic. I still get the erroneous GPU Driver popup window, but the emulator does not crash anymore. It is back to normal reliability.

CVD
  • 21
  • 1
  • 4
2

For linux users, go to Android Folder which in my case is under ~/Android. Then proceed to /sdk/emulator. "emulator" is a local command. So, you can run the command as local "./emulator".

The rest is done as the user "Api" stated.

$ ./emulator -avd -avd_name -gpu mode

$ ./emulator -avd Nexus_5X_API_26 -gpu host (#IN MY CASE)

Note: I didn't download SDK, instead copy and pasted it under /home dir. That's why the command was not valid on a global scale. If you setup sdk avd from ground-up, it should work just fine.

Thet Htun
  • 471
  • 5
  • 13
1

I'm having the exact same issue from precisely 4 days ago. I've tried both above answers but none of it work. PS. The emulator works, but just crashes seemingly at random. I prior to this error, the emulator worked fine and i could test certain features, i can also debug completely with no crashes via USB with a few android devices so im almost certain its a problem with the emulator.

Edit: Not sure what eactly the problem was, but was solved by forcing Android Studio to run with nVidia GPU.

Rayzor536
  • 81
  • 1
  • 10
1

I managed to workaround this problem by disabling the use of the GPU so that the AVD uses Software acceleration. It won't be as fast as GPU though, but at least it has better chances to work properly.

I tried other options above but sadly none of them was working.

If you want to try this option, go to the AVD Manager (in Android Studio : Tools -> Android -> AVD Manager), then edit your virtual Device and in the Graphics field, you can set "Software - GLES 1.1" instead if "Hardware - GLES 2.0".

This is not the perfect fix for this problem but it can help.

R. Du
  • 544
  • 4
  • 16
1

On Mac OS (currenly i'm using Catalina)

  1. First move to emulator directory I use the default location

    cd /Users/yourusername/Library/Android/sdk/emulator

  2. Search list of emulator

    ./emulator -list-avds

    example my output is : Pixel_2_XL_API_27

  3. Running emulator using -gpu command

    ./emulator -avd Pixel_2_XL_API_27 -gpu host

0

How do I update my GPU drivers? Select Windows Start > Control Panel. Open Device Manager. (Or Search Start for Device Manager.) Click the arrow next to Display Adapters. Right-click on Intel HD Graphics and choose Update Driver. Choose Search automatically for updated driver software.

Ahmedakhtar11
  • 1,076
  • 11
  • 7
  • Any reason you're asking a question? – Scratte Sep 24 '21 at 19:34
  • I recommend against rhetoric questions in answers. They risk being misunderstood as not an answer at all. You are trying to answer the question at the top of this page, aren't you? Otherwise please delete this post. – Yunnosch Oct 03 '21 at 14:36
-1

none of that worked for me on my windows laptop with intel hd4000

what worked is ubuntu linux after i run emulator on linux i was shocked of its speed :)

so it seems the problem with intel and windows won't be resolved soon

Ahmed D. Sherif
  • 616
  • 6
  • 11