High CPU usage with Android emulator (qemu-system-i386.exe)

前端 未结 20 782
醉话见心
醉话见心 2020-12-04 05:48

The emulator qemu-system-i386.exe cpu usage almost constantly running between 7~9

Android studio 2.1 Android SDK Tools: 25.1.3 Host Operating System: Windows 7 - i7

相关标签:
20条回答
  • 2020-12-04 06:25

    In my case using hardware graphic solved my problem.

    0 讨论(0)
  • 2020-12-04 06:26

    I had that problem on the start of November 2018.

    Virtual device was contently trying to connect to the mobile network data, so I turned it off inside of the device itself. Work great now.

    0 讨论(0)
  • 2020-12-04 06:28

    The same problem with qemu on Win7, HAXM 7.2.0. I've tried switch off audio, it didn't help, qemu consumes about 20% of CPU anytime, Android works very slow on both x86 and x64 images.

    I've found solutions in HAXM's Release Notes file:

    • On Windows, Avast Antivirus may interfere with HAXM and cause Android Emulator or QEMU to run very slowly. A workaround is to uncheck "Use nested virtualization where available" in Avast Settings > Troubleshooting.

    I have Avast Pro Antivirus 18.5. I've unchecked this param, rebooted PC and now qemu consumes 0% in idle, Android works fine.

    UPDATE: if QEMU started consume CPU again, first check Avast's update status. After background update Avast may start to interfere to HAXM again. Just reboot Windows to solve it.

    0 讨论(0)
  • 2020-12-04 06:29

    In my case it was Airplane mode, when turned ON the CPU usage jumps to 99%:

    The issue was noticed on Android 10.0 x86.

    0 讨论(0)
  • 2020-12-04 06:30

    The cause of the constant CPU usage could be the sound. If you do not need sound in your emulator you can disable it by editing the AVD's config file.

    Change/add those two lines

    hw.audioInput=no
    hw.audioOutput=no
    

    Update: As buncis commented you can also try to disable GPS if not needed:

    hw.GPS = no 
    

    On Linux/Mac the file is located at ~/.android/avd/<AVD_Name>.avd/config.ini
    On Windows the file is located at C:\Users\<username>\.android\avd\<AVD_Name>.avd\config.ini

    0 讨论(0)
  • 2020-12-04 06:32

    On Mac I noticed that the emulator was using over 100% CPU after my laptop went to sleep. Turning the audio off as Benjamin suggested didn't fix that problem.

    Restarting the simulated device by long-pressing the power button on the emulator works for me.

    0 讨论(0)
提交回复
热议问题