google / google/android-emulator-hypervisor-driver

Extremely poor performance when using driver - possible issue with uninstallation

Open
#78 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
887
Forks
263
PR merge metrics
No merged PRs in 30d

Description

I've recently been grappling with a really strange issue with the driver that has resulted in extremely poor performance (worse than when acceleration is disabled) and an inability to get past the Google logo on boot.

The **short version**, is that I think this may have been caused by me accidentally installing the latest version of the driver (1.8) via Android Studio, without first uninstalling the previous version that I had installed manually (1.5). The main reason I'm raising an issue is because I suspect that the uninstall process for the driver doesn't seem to work as I expected (specifically the `gvm.sys` driver is left in `C:\Windows\system32\drivers` even after uninstall).

For the **long version** of the story:

When I first realised my mistake I attempted a fresh reinstall of the driver, but after running the uninstaller (using Android Studio, running the `silent_install.bat` with the uninstall flag, and manually running the `sc delete gvm` command on separate attempts) I was still experiencing the issue with performance and stuck on the Google boot screen. Eventually I dug into INF files, and found where the `gvm.sys` driver was being installed and compared hashes of the file in `system32\drivers` with both a 1.5 and 1.8 version that I downloaded from the release page, and found that it matched the 1.5 file despite reinstalling with the 1.8 version. I manually removed this driver file and attempted another reinstall (confirming that the hash this time matched the 1.8 file) but still seemed to be experiencing the same problems.

Another weird twist is that my original 1.5 installation originally seemed to be working with Hyper-V, WSL, and WHPX enabled without me realising. During the course of trying to fix my issue, I disabled Hyper-V using every mechanism I could find (i.e. the Windows add/remove features panel, running `bcdedit /set hypervisorlaunchtype off` etc) but the problem still occurred and seemed unaffected by removing Hyper-V.

Other things that I tried to try and narrow down the problem (but ultimately seemed to make no difference):

- Wiping image data, cold boots, downloading new images both with and without Google Play
- Running the emulator with every available flag for `-gpu` and `-accel`
- Running the emulator with `-verbose` and `-show-kernel`
- Uninstalling 1.8 and reinstalling 1.5
- Increasing the memory available to the emulator
- Uninstalling Docker (although it wasn't running)
- Following basically every step in the [Android documentation](https://developer.android.com/studio/run/emulator-acceleration) on the topic

My system specs are:
CPU: AMD Ryzen 7 1700 (8 core CPU ~3.0GHz)
RAM: 16GB
GPU: NVIDIA GeForce GTX 1060 6GB
OS: Windows 10 version, Build 19044

All the necessary settings in my BIOS have been enabled and confirmed to be working when running `systeminfo` from the command prompt.

I finally managed to get the emulator working with WHPX by uninstalling the driver entirely, deleting the `gvm.sys` driver from the `system32\drivers`, enabling Hyper-V & WHPX only, and running the emulator with `emulator.exe -avd AVD_NAME -engine qemu2 -wipe-data` (although I'm unsure if those emulator options are required).

I'm unsure what sort of resolution I'm expecting for this issue as I'm definitely not an expert in Windows drivers and I'm reluctant to get my dev machine into such a broken state again - I suppose I'm mainly raising it in case anyone else has experienced a similar set of circumstances, or anything that I've mentioned highlights a possible bug with someone more familiar with the domain.

Thanks for taking the time to read and for any help that can be offered!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.