Android Emulator, graphical glitches on Windows 11
Asked Answered
S

6

10

I have a Windows 11 machine, with a RTX 3050 graphics card. It's a Dell G15 laptop. I cannot find a (good) solution to the graphical glitches that appears on an Android Emulator.

The only "solution" I found was to change the hw.gpu.mode in the config.ini file from auto to guest. That fixes the glitches, but causes really bad performance issues and one app I developed with Flutter for my company straight up doesn't load. (loads when hw.gpu.mode=auto).

I'd appreciate if you can point me to the right direction to solving this. Let me know if you need any other details about my machine:

OS: Windows 11 Home Single Language [64-bit]
Kernel: 10.0.22000.0
CPU: 11th Gen Intel(R) Core(TM) i5-11260H @ 2.60GHz
GPU: NVIDIA GeForce RTX 3050 Laptop GPU
Nvidia driver version: 516.94 (Downloaded the "Game ready driver" from GeForce Experience)

Demonstration of the glitch

Supper answered 8/9, 2022 at 10:23 Comment(1)
Nice! Mine is NVIDIA GeForce Inno3D GTX 1650 Twin X2 OC — and I have the same issue! :)Edan
N
2

I had the same issue, it's because Nvidia GPU's don't support GPU acceleration for android emulators yet.

When you enable hardware acceleration in emulator settings, the emulator actually doesn't get anything from the GPU. I monitored my GPU stats and found out that it doesn't even show the emulator running on it. Hence the choppy screen.

For now, only option is to run the emulator on software accelertors. To improve performance a bit, you can try allocating more RAM to your emulator and maybe keep a low end device :)

I hope Nvidia looks into it and adds support for android emulators :[

My system:
Ryzen 5 5600H
RTX 3060
16 GB Ram

Neutral answered 21/4, 2023 at 6:53 Comment(2)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Centroclinal
Thank you. On my side running the emulator with the Graphics settings set to "Software - GLES 2.0" indeed fixed this issue.Finegrain
O
1

This problem is only on emulators with android 12+, personally i installed a device with android 11 and a second device with android13 for tests.

Otes answered 16/10, 2022 at 11:15 Comment(1)
Or you can try to change graphic option on creation a emulator in android studio to (Software - GLES 2.0) > prnt.sc/F5AEtHEnZQGv, but you will notice decrease performance. this issue has submit to google issue tracker.Otes
C
1

As stated in the official android studio website, you need to consider the following points if you want to run the emulator with proper hardware acceleration :

  • HAXM is getting deprecated and may be completely removed in future releases, so you should use either The Android Emulator hypervisor driver (AEHD) or The Windows Hypervisor Platform (WHPX).

HAXM deprecation

  • Using the Android Emulator hypervisor driver (AEHD) requires turning off Hyper-V (disabling hyper-v is kinda tricky)

AEHD requirements

  • Using The Windows Hypervisor Platform (WHPX) requires Android Studio 3.2 Beta 1 or higher

WHPX requirements

I would suggest either disabling hyper-v to use AEHD (I haven't tested that), or updating to the beta channel to use hyper-v (Tested on Android 11 and 14, it got rid of the glitches and the performance is very acceptable on my i5-12400F)

Cleasta answered 9/10, 2023 at 23:3 Comment(0)
G
0

It seems like dedicated Nvidia GPU's are causing the problem. I have a 3060 laptop and I have the same issue and when I set it to guest it seems to work. My guess is that setting changes it from using the GPU to the CPU. I would recommend you try setting android studio to use integrated graphics instead of dedicated. Since I have a 8 core CPU compared to a 4 core CPU of yours, I'm guessing that's the reason I don't get as bad performance

Grasping answered 29/12, 2022 at 20:12 Comment(0)
C
0

I solved the issue by changing the following values inside the emulators config.ini file

From

hw.gpu.mode = auto
hw.audioInput = yes

To

hw.audioInput = no
hw.gpu.mode = host

Easy way to find the file is through Android Studio -> Device Manager -> Tap on the options on your designated emulator -> Show on Disk -> Open the config.ini file within the Emulator folder -> Change the specified fields.

Solution ref: https://developer.android.com/studio/run/emulator-troubleshooting

Condensed answered 11/12, 2023 at 13:51 Comment(0)
R
0

You must use older versions of the emulator and SDK version must under 30.

This link can help you change your emulator version: https://developer.android.com/studio/emulator_archive

Rheta answered 10/4 at 8:48 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Centroclinal

© 2022 - 2024 — McMap. All rights reserved.