Android Studio, 에뮬레이터 실행시 갑자기 GPU 드라이버 문제 발생
나는 주로 안드로이드 스튜디오에서 안드로이드 개발에 사용하는 노트북을 가지고 있는데, 오늘 내 에뮬레이터를 실행할 때 갑자기이 오류 메시지 (또는 오래된 버전)가 나타납니다.
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.
geforce 드라이버를 업데이트했지만 사용하지 않고 인텔 업데이트를 시도했지만 실패했습니다.이를 비활성화하는 방법이 있습니까? 호환성 렌더러를 우회하고 예전처럼 작동하면 이제 에뮬레이터가 끔찍합니다. 왜 갑자기 일어 났는지 설명이 있습니까?
또한 며칠 전에 업데이트가있는 경우 Windows 7 64 비트를 사용하고 있습니다.
Win10을 사용하고 있지만 같은 문제가 있습니다. 에뮬레이터가 마지막 에뮬레이터 업데이트 후 앱 충돌을 시작했습니다. 제 경우 문제는 GPU에 문제가 없었음에도 불구하고 에뮬레이터가 하드웨어에서 실행되지 않는다는 것입니다. 또한 팝업되는 "GPU 드라이버 문제"창에는 문제라고 생각하는 GPU 중 하나에 레이블이 표시되지 않습니다.
나를 위해 일한 해결책은 터미널에서 에뮬레이터를 실행하여 명령을 사용하여 하드웨어 그래픽을 사용하여 실행하도록하는 것입니다 (에뮬레이터가 명령을 사용하는 대신)
emulator -avd avd_name -gpu mode
여기서 mode 는 호스트 이므로 하드웨어와 함께 실행됩니다.
예를 들면 :
Android Studio 터미널을 사용하여 에뮬레이터가있는 폴더로 이동합니다. Win10의 기본값은 C : \ Users \ userName \ AppData \ Local \ Android \ sdk \ emulator입니다.
사용 가능한 항목을 나열하여 실행할 에뮬레이터를 찾습니다. emulator -list-avds
-gpu host 옵션을 사용 하여 에뮬레이터를 실행합니다 .emulator -avd avd_name -gpu host
이 링크 에 대한 추가 정보
의견 에서의 버그 리포트 구글 직원이이 문제에 관한이 조명된다.
시스템에 개별 GPU가없는 경우 Intel GPU 드라이버에서 에뮬레이터를보다 안정적으로 실행하기 위해이 변경을 의도했습니다. 사용자의 책임하에 설정 페이지로 이동 한 다음 OpenGL ES 렌더러를 "ANGLE (D3D11)", "ANGLE (D3D9)"또는 "데스크탑 기본 OpenGL"로 변경하여 Intel GPU 사용으로 다시 전환 할 수 있습니다.
이 메시지는 특정 버전의 그래픽 드라이버를 실행하는 시스템뿐만 아니라 Intel GPU를 사용하는 모든 시스템에 대해 표시되는 것으로 보입니다.
용액 이며, 가능하면, 에뮬레이터를 실행하는 외부의 GPU를 사용하는 스위치.
Intel GPU가 시스템에서 사용 가능한 유일한 GPU 인 경우 설정에서 기본 OpenGL ES 렌더러를 재정 의하여 OpenGL ES의 가속 렌더링을 다시 활성화 할 수 있습니다 (아래 참조). 옵션은 OpenGL, ANGLE 및 SwiftShader입니다. SwiftShader는 CPU 기반 OpenGL ES 에뮬레이션이므로이 설정은 속도 향상을 제공하지 않습니다. ANGLE은 Direct3d 기반 OpenGL 에뮬레이션입니다.
댓글에 따르면 이것이 작동한다고 보장되지는 않습니다. 실제로 Android 7 에뮬레이터의 하드웨어 가속을 다시 활성화 할 수 있지만 하드웨어 가속을 활성화하면 Android 8 에뮬레이터의 검은 화면 만 표시됩니다.
Ctrl-Shift-S로 설정을 연 다음 에뮬레이터 버전에 따라 Settings -> General -> OpenGL ES renderer
또는Settings -> Advanced -> OpenGL ES renderer
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).
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.
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.
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.
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.
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.
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.
인텔 hd4000이 설치된 Windows 랩톱에서는 그 어느 것도 나를 위해 일하지 않았습니다.
작동하는 것은 리눅스에서 에뮬레이터를 실행 한 후 우분투 리눅스입니다. 속도에 충격을 받았습니다. :)
그래서 인텔과 윈도우의 문제는 곧 해결되지 않을 것 같습니다
'program story' 카테고리의 다른 글
스칼라 : 함수 인수에서 튜플 분해 (0) | 2020.12.25 |
---|---|
GreenDAO 스키마 업데이트 및 데이터 마이그레이션? (0) | 2020.12.25 |
두 개의 Subversion 저장소를 동기화하는 방법은 무엇입니까? (0) | 2020.12.25 |
자바 스크립트에서 함수 선언 후 빈 괄호 ()는 무엇을합니까? (0) | 2020.12.25 |
애플리케이션 레이어와 비즈니스 로직 레이어의 차이점은 무엇입니까? (0) | 2020.12.25 |