pop-os / pop

A project for managing all Pop!_OS sources
https://system76.com/pop
2.38k stars 81 forks source link

AVD Emulator Issue with 21.10 #2142

Open Archaeus6 opened 2 years ago

Archaeus6 commented 2 years ago

Distribution (run cat /etc/os-release): 21.10

Hi there. I had a very smooth experience with visual studio code running AVD manager in android studio to use the mobile emulator for Flutter projects before the upgrade to 21.10. Now it just freezes/lags as it tries to build the code to the emulator. I either get an extremely slow experience, or it won't launch at all.

I'm running a Ryzen 9 5950x with 3070 and 32gig ram. I have the latest Nvidia driver installed. It's not a hardware problem. Any help diagnosing what happened after this last upgrade would be appreciated as I really don't enjoy developing in windows. Thanks.

MrBobFreeman commented 2 years ago

Pop_os 21.10 (AMD® Ryzen 5 4600h, 32gb ram, GeForce GTX 1650 Ti Mobile). Install all packadge (https://developer.android.com/studio/run/emulator-acceleration?utm_source=android-studio#vm-linux), increased the ram to 3gb and VM heap to 512mb, disabled all extension, switched integrated and discrete graphics card. Did not help. Android Emulator lags and freezes a lot, it is not possible to work. On Pop_os 21.04 all OK! Need a solution for 21.10.

HackerTon commented 2 years ago

Hi there, in the beginning. I had experienced lagging and freezing as android studio tries to install APK the emulator. But in the end, I managed to get the Android Studio and Emulator running smoothly. Configuration list below shows the current configuration that I have to get it running. Prior to setting android studio. I deleted ~/Android directory.

Could anyone replicate using my configuration. I suspect it is something to do with pop-os/shell.

Configuration:

  1. OS: Pop os 21.10
  2. Kernel: 5.15.8-76051508-generic
  3. Android studio: 2020.3.1 Patch 4
  4. Emulator:
    
    Name: Pixel_5_API_29

CPU/ABI: Google APIs Intel Atom (x86_64)

Path: /home/hackerton/.android/avd/Pixel_5_API_29.avd

Target: google_apis [Google APIs] (API level 29)

Skin: 1080x2340

SD Card: 512 MB

fastboot.chosenSnapshotFile:

runtime.network.speed: full

hw.accelerometer: yes

hw.device.name: pixel_5

hw.lcd.width: 1080

hw.initialOrientation: Portrait

image.androidVersion.api: 29

tag.id: google_apis

hw.mainKeys: no

hw.camera.front: emulated

avd.ini.displayname: Pixel 5 API 29

hw.gpu.mode: auto

hw.ramSize: 1536

PlayStore.enabled: false

fastboot.forceColdBoot: no

hw.cpu.ncore: 4

hw.keyboard: yes

hw.sensors.proximity: yes

hw.dPad: no

hw.lcd.height: 2340

vm.heapSize: 256

skin.dynamic: yes

hw.device.manufacturer: Google

hw.gps: yes

skin.path.backup: /home/hackerton/Android/Sdk/skins/pixel_4

hw.audioInput: yes

image.sysdir.1: system-images/android-29/google_apis/x86_64/

showDeviceFrame: no

hw.camera.back: virtualscene

AvdId: Pixel_5_API_29

hw.lcd.density: 440

hw.arc: false

hw.device.hash2: MD5:3274126e0242a0d86339850416b0ce34

fastboot.forceChosenSnapshotBoot: no

fastboot.forceFastBoot: yes

hw.trackBall: no

hw.battery: yes

hw.sdCard: yes

tag.display: Google APIs

runtime.network.latency: none

disk.dataPartition.size: 800M

hw.sensors.orientation: yes

avd.ini.encoding: UTF-8

hw.gpu.enabled: yes