Resolve Android Studio Emulator Slowdown on Linux: Solutions for PopOS, Ubuntu, Arch, and Fedora
Android Studio Emulator is known to be quite heavy on system resources because it uses QEMU for virtualization. This can lead to performance issues, especially on systems that are not optimized for such intensive tasks. Personally, I experienced significant lag while using it on PopOS, even though my machine is equipped with an i7 12700H processor. The lag made development cumbersome and frustrating. After spending a considerable amount of time researching and troubleshooting, I finally found a solution that significantly improved the emulator's performance.
Fix 1: Changing the graphics provider
Go to device manager and launch the Emulator
Open Emulator Settings When Emulator is Launched
Go to Settings
Change "OpenGL ES renderer" to "Desktop Native OpenGL"
Change "OpenGL ES API level" to "Render maximum (up to OpenGL ES 3.1)"
Now Shut Down the Emulator
Cold Boot the Emulator
Now the lag issue would be fixed !
Fix 2: On Pop OS Changing the kernel fixed all my issues.
I switched to "Liquorix Kernel" which is available for all arch and debian based distros. It fixed almost all problems on PopOS including the Shutter in Video Playback issue when Android Studio Emulator is Launched.
*****WARNING! USE AT YOUR OWN RISK!*****
It can be installed using the following command on Debian and Arch based Distros.
curl -s 'https://liquorix.net/install-liquorix.sh' | sudo bash
Reference: Liquorix Kernel
These Steps Should fix most of the Android Emulator related issues on linux.