My Genymotion devices became very laggy, I don't know when this began to happen exactly (maybe after switching to Yosemite).
I tried everything, reinstall Genymotion, latest VirtualBox version, new device images, older Android versions, lower screen resolution, les RAM/CPU, more RAM/CPU, disconnect external screen. I ran open GL benchmarks that seemed OK.
The only weird thing I noticed is a high CPU usage from the VBoxHeadless process when idle (50% ~ 100%). I checked system monitor, Logcat, VirtualBox logs and everything else I could think of.
I am running on an iMac with OS X 10.10.1 on an SSD, 2.5Ghz Core i5, 8GB of RAM and an AMD Radeon 6750M 512 Mo. Genymotion 2.3.1, VirtualBox 4.3.20, the latest 'Custom Phone 5.0.0 Lollipop' image.
The other weird thing is that once in a while (I launched a device a lot of times and this happened only once), the device will run very smoothly (as it was running before).
Any clues on what might be the origin of this problem?
Can you try changing the device's CPU number to 1?
On the devices list, click on the settings button on the right
Then set the CPU number to 1 for each device you want to use
This workaround should work.
If not, I advise you to push the problem to the support team including your host's configuration, genymotion version, ...
Related
HAXM Enabled version 7.1.0 and i verified that it's working when the emulator is running
The emulator is using the Nvidia GPU however it's barely using maximum 7% of the GPU at any given time
I have 27.3.1 of Emulator version ( Latest )
Tried x86 image and x86_x64 image
I tried hardware acceleration
I tried software acceleration
I bumped the emulator ram to 4GB (I have 20 GB)
I set the emulator CPU priority to real time
I have NOTHING but Android Studio, and emulator running
The emulator is running horribly slow and laggy and even gives a black screen when going from activity to another
This has been the case since forever
I tried deleting the entire Android SDK and installing from scratch
I have intel virtual technology enabled in BIOS
I tried Google Apis vs none Google Apis emulators
I tried Nexus 5, X, Pixel 1, 2, XL with android P, O, 16 and all laggy
This is what helped me with my Android 9 emulator:
Use Google Play x86 image instead of Google API x86 image, because the former had a notification "Preparing for setup.." which never finished.
After launching the emulator first time, going through the initial google device setting (skipping what can be skipped..) and setting up the SD card (as an external storage).
If there are some app updates running, wait for it and then force quit 'Google play services' app. If the emulator will be slow again after reboot, you might want to do this after every launch.
Disable mobile data in settings, because it was trying to connect again and again, using up all CPU. And CPU helps with rendering, so if there is no available CPU, it gets slow.
Edit:
5. Go to emulator Settings/Advanced and set OpenGL ES rendered to Desktop native OpenGL and OpenGl ES API level to Renderer maximum and reboot the emulator. In my case, using autoselect/autodetect had far worse performance.
-- this is a follow up for my comment above (it's too long to be written as a comment) --
then we established that the problem is coming from your compute (or your OS) - If you're using a Laptop make sure to check the settings of the laptop performance when plugged and when you're using a batterie. In case you have a desktop check also the settings if there is some sort of limitation set by the OS. That can happen to avoid overhitting and loud fan noises. If any of the above doesn't work and you still really wanna figure this problem out and I'll assume you're using Windows 10, then install Ubuntu or any other Linux distribution as a second OS just to try things out. If The problem is solved then you definitely need to change some settings in your windows.
For anyone looking for an answer. I simply updated windows 10 to a newer version and update my graphics card drivers and the emulator is insanely fast again.
I had the same issue on my laptop and also on my high-end PC. I tried everything I could find on the internet:
updating HAXM to the latest version (in SDK Manager)
disabling Hyper-V on Windows
disabling audio in emulator
disabling multi-core feature
changing the renderer
disabling snapshots [1]
Now, I cannot be 100 % sure that anything from above could not somehow contribute to fixing the issue (even that I changed most of it back), but the issue disappeared immediately after I did this:
Go to SDK Manager -> Install the latest SDK Platform
There is said in Android Developers User Guide [1] that these are the requirements for Graphics Acceleration:
SDK Tools: Latest release recommended (version 17 minimum)
SDK Platform: Latest release recommended (Android 4.0.3, Revision 3, minimum)
Even that I did have SDK Platform version 27, for some reason I believe that HW acceleration was not working, cause even moving the emulator windows was laggy (or even its settings). As I said before, latest SDK Platform version seems to be the thing that fixed it.
Also, do not forget to kill all emulator processes and also Android Studio. But maybe restart the whole computer just to be sure (I was doing it a lot, cause I was also checking a bios virtualization settings few times).
If it won't work for you, try turn off the snapshots as that was the last before I tried this. You will have to wipe the data from that image, or even better - create a new AVD and download the latest image from "Recommended" tab.
Hope this will be helpful to someone as I did spend several frustrating hours fixing it (after few months of living with it).
Disabling mobile data is one way that works if you're not connected already to data (regardless of wifi connection), another debugging tool that could help you is the FPS Meter in the Debugging Options in Android, relevant github guide
If your emulator is SUDDENLY slow, this might be the reason:
I ran through the same issue.
I then realized that it was a picture quality issue.
So if you're using a lot of pictures in your app, it will run slow unless you 'lower the picture quality'.
You can use http://compressimage.toolur.com/ to reduce your image quality.
This is not a rant, and also not a duplicate of the forever "why is Android emulator so slow" problem. So, until a few weeks (maybe months) ago, emulating Android devices on my Win7 64-bit system was at the very least acceptable (x86 emulation was decently fast to be usable). However, trying to create any ("fast" "new" "2.0") emulator instances using the latest version of the SDK, platform tools, etc., is only a source of frustration and pain for several days now. I'm trying to understand if it's an issue on my side or people can actually use the latest version of the Android emulator included in the latest SDK, on Windows 7.
My PC config: Win7 x64 / Intel Core 2 Quad #3.8 GHz / 6 GB RAM / plenty of HDD space / dedicated GPU
What happens when trying to start an emulator with any API level, with either x86 or x86_64:
version 1) emulator starts, Android logo appears, glows for a bit, and that's it. It never reaches the Home screen. Emulator log shows absolutely no errors. Trying to connect using adb freezes Android Studio until I kill the emulator process.
version 2) Same like version 1, but in this case I can't even kill the qemu-system-i386 process (yes, not even with full admin rights). I have to actually restart Windows. Process remains a zombie, using 1 GB of RAM.
version 3) If I'm lucky, sometimes it reaches the Home screen, but becomes completely unusable. Sometimes I can click on things (maybe 2-3 clicks), and then becomes completely unresponsive. Occasional "Launcher has stopped" / "System has stopped" messages appear randomly in the emulator's home screen...
I've installed the latest Intel HAXM 6.0.3 version (the one downloaded by the Android SDK manager). Virtualization is enabled in BIOS.
I've tried all kinds of emulator options (more or less RAM, hardware vs software GPU, x86 / x86_64). Almost same result every time.
I've completely deleted and reinstalled the entire Android SDK and Android Studio.
CPU is not the issue - it's not under load while emulator runs.
Free RAM is not the issue - it's not fully used while emulator runs,
HDD is not the issue - I even defragmented it, and it's not looking like it's under any sort of load while emulator is running.
So, my question is very simple: is anyone out there using Windows 7, who can actually start up, let's say, a Marshmallow x86 emulator just by a simple 2-3 clicks process, and actually have it reach the home screen? Or does the "new, faster" emulator actually need some sort of super-powerful machine which I don't seem to possess anymore? The only thing that apparently changed was the HAXM driver. But it's stating that it has initialized just fine, so I don't know. Oh, and VirtualBox runs just fine. GenyMotion, by contrast, just flies. But I'd like to have the official Android emulator in a working state, or am I asking for too much?
Adrian, in my sad opinion: yes, you would need a powerfull processor, even a litle bit more of ram. The almost-aceptable scenario for you to run api 24 emulation in xxxhdpi resolution is an i7 with 8 of ram.
But this is what hard and software manufacturers want you for: upgrade, upgrade, upgrade. And it's not necessairilly true for you, or not obligatory for today. Maybe tomorrow...
It's my case too. I have a second generation i5 with 6 of ram and plenty of disk. Have a good geforce gpu too. And what I do to have my emulators running, or, how do I emulate in my win7? First of all: unninstalled all the last (about 30) non-security system updates from windows (! yes..., they make your system very heavy, the same with the various distributed c++ packages microsoft want us to carry on with our systems even if we use it once a year, or less - go to control panel and ripp'em off! Keep only the most recent c++ package - if you need it later, update again). Actually I'm even investigating what else "updates" I can delete from my system to have it usable again, mine again. Microsoft...
Second: enabling "power save mode" on your android studio (menu file), only in testing times, seems to make things faster.
Third: do heavy tests on emulators with "low" apis, like android 4 or 5 at max. And emulate devices with small screens or resolution, 5 pol. with 720 points (hor.), at max. If possible use _x86 64 emulation.
With this you can make it happen. The emulator is slow to load and open, but when running it works in a fairly good speed. First thing to do there: enter developer options and "force gpu" on both places. This will instruct your pc to take advantage of your dedicated gpu system.
Do not try to open two or more emulators at the same time, sorry.
When 90% of your debug is done (i do it in an emulator running android version lower than 5, normally 4.0 or 4.1 - 480x800 screen), then you pay the price to load a big screen, big dpi android 5, 6 or N). While it loads, make a coffee and use the bath.
When the beauty (beast?) is loaded, then do the final tests with all your apps that stayed waiting for this special moment. I maintain all my apps waiting for it. When I load the "big" emu I use this oportunity to do all tests I was needing - because it's not a simple task open this everytime I want.
In the future, as said: i7, 8ram, powerfull gpu and, very important: a good SSD drive (until 10x faster) to throw up damn nasty harddisk to the garbage. :) Best.
EDIT: when you create an AVD image with the latests APIs, Android Studio defines the ram and disk space values for the emulation and, in my opinions, these values are too big and too hard for the hostage computer to deal with. First point: your testing app never will demand all those resources. Two: your pc suffers hard to deal with a very fragmented Gb data from here to there, and there to here. Three: the virtual image created on your hard disk gets bigger with the use. So: 1 - lower the default values from your avd images, ram and disk sizes; 2 - on the avd launching window dialog, edit the options of each image and rip information everytime before start the emulation OR/AND 3 - uninstall your apps from the emu when not needed.
I recently downloaded the latest Genymotion version,2.7.2 (I had a previous version before, I don't remember which exactly) however whenever I try to launch an emulator, the device pops up for about a minute but before loading completely it freezes. Not only that, but when this happens the entire Desktop freezes. I'm able to move the cursor, but nothing else responds (even the clock stops working). No clicks or keys do anything and I'm forced to restart my Desktop via the power button on my machine. I'm running Ubuntu 16.04.
I've tried 3 separate times with 3 separate emulated devices and the same thing happens every time. Until I get this fixed I can't do my job, so I would really like some advice.
Had same problem,
I changed video card driver from Software & Updates -> Additional Drivers
rebooted and no freeze again
Had the same error on 16.04, fixed it by uninstalling virtualbox, then reinstalling from the deb image from the official page here https://www.virtualbox.org/wiki/Linux_Downloads
then running
sudo dpkg-reconfigure virtualbox-dkms
also switched to nvidia proprietary drivers
Some of these VMs from Genymotion are using more memory than you know. When creating a Virtual Device in Genymotion, I used the down-arrow to ensure I had enough system memory to run. Look at the attached screenshots.
I have a 6GB system and I didn't realize a Samsung Galaxy S8 was using 4GB RAM. Switching to the Google Nexus 9, which is running 2GB RAM, I was able to launch without the sluggishness.
1Genymotion seems to run with VirtualBox. Therefore, launching VirtualBox will show you the created VMs from Geny. From there, you can use the Settings in VirtualBox to change the RAM size.
I hope this helps someone because it drove me crazy.
Genymotion showing how much RAM is used
To increase performance, I want to allocate 1024 MB RAM to a tablet emulator. Problem is that it won't start, i.e. no windows/consoles show up when I click Start in the Virtual Device Manager. If I let the device to its default 256 MB, it starts. How can I fix this?
I'm using Windows 7 Ultimate with Intel i7-2.2 GHz and 8 GB RAM DDR3. It used to work fine on 32-bit windows.
I know this isn't an answer to the particular question you have asked, but it may help with the underlying issue: you can increase the performance of your emulated device by switching to an x86 version.
The Android emulator has always been painfully slow for me, even on a quad core rig with 8 gigs of RAM, so I started following the Android x86 project. Not long ago, I finally took the plunge into getting it set up, and it was easier than I expected--and it's really, really fast.
If you have VirtualBox installed, all you have to do is download eeepc.iso from the project's website (for whichever Android version you prefer), create a VM for it in VirtualBox with however much RAM you want it to have, and boot it up. Pick VESA mode from the menu, disable mouse integration on the VM, and skip the google account login process. You'll be good to go.
Then just set up port forwarding for ADB from guest:5555 to localhost:whatever-port-you-choose, and point ADB at localhost:whatever-port-you-choose, and it'll work even better than the ARM emulator that ships with the SDK.
I disabled the camera support and I was able to use 1024MB of RAM.
I am using the Android Emulator to debug my application, first off it is ridiculously slow, I mean like 15mins to load slow and on top of it, my Alarm Clock application fails?
Am I the only one, or do other people experience this? Is there a fix or will I just have to go cook steaks while the emulator is booting?
EDIT: I am running it on a Vista laptop, which as fixxed describe does not work well with the alarm clock failing, but I don't think it could be my laptop, its 2GB RAM Intel Dual CPU T2390 1.87GHz, its not even a year old. Could it be that I am creating new AVD's each time I run the emulator?
Anthony
You never mentioned what environment you're running in. Is it perhaps Vista? We had a discussion recently and it seems like the combination of the emulator and Vista just doesn't want to run well for some reason.
Either way something's definitely wrong. I have a laptop with a 2GHz Core2-Duo w/ 4GB RAM (rarely use more than 1.5) running Ubuntu 9.04 (32bit) and the emulator gets to a usable state in less than 30 seconds w/ Eclipse, Firefox, etc all eating more than their share of resources.
The very first time you launch the emulator on a new AVD, it will take a lot longer to start up, because it is creating copies of disk images and customizing them for the hardware parameters you specified.
Beyond that, you may need a faster PC. Android supplies an emulator -- you are running actual ARM opcodes in a virtualized phone. Converting and interpreting opcodes on the fly takes a fair bit of horsepower in terms of CPU and RAM, on top of any other tools you might use (e.g., Eclipse, which needs a ton of resources in its own right).
On a Pentium M 2.0 notebook with 2GB RAM and no Eclipse, in either XP or Linux, the emulator will start in maybe 90 seconds and will run tolerably well.
On a dual- or quad-core CPU with 2.5GHz or better speed, with 4GB RAM and no Eclipse, in either Vista or Linux, the emulator will start in under a minute and will run rather nicely.
I see the Alarm clock crashing problem in on Mac OS X 10.5 Leopard. 2.4 GHz , 4GB RAM.
My development environment is: Eclipse 3.4.2, Using Android 1.6 SDK
The emulator takes about 2 minutes for me to start up. I think even 2 minutes is too slow. The iPhone simulator takes only a few seconds.
Are you deleting the old avds that you have created?.....If not then it will slow up your computer as i tried it with different target machines......Is it necessary to create new avds every time you are trying to run the emulator?...If not i'll suggest you to stick with an avd(or delete the old ones).Hope this helps.