Ask / Submit
4

[XA2] Choppy audio on Android due to memory usage?

Tracked by Jolla

asked 2019-07-02 20:19:03 +0300

Direc gravatar image

This is probably / somewhat likely unrelated to Bluetooth audiostream is choppy when WLAN is on as I only use my LTE data connection to witness.

I have used my XA2 and XA2 Ultra devices (SFOS 3.0.3.10) for a month now, and I noticed that - using Deezer as a test case - XA2 didn't skip a single sound, but my XA2U is very, very choppy using Deezer, no matter if I use Bluetooth speaker, loudspeaker or headset as output. This got me digging the matter deeper; and I think I found something.

XA2U had a lot more Android apps installed, and because most of the apps had background services running all the time, the memory usage was more than 2.5GB constantly, even after Android support restart with no Android apps started. Swap was used up to around 300MB. I uninstalled ten-ish apps I didn't need or use anymore, and restarted Anroid support again. Now my memory usage is around 1.6GB...1.8GB and swap usage dropped to ~30MB after I stopped and restarted Android support.

Yesterday my Deezer was almost useless because the audio chopped every 2-3 seconds. After the above, I just now listened to my favourite music using my Bluetooth speaker for 50 minutes straight, and it didn't chop the audio once.

I just now realized that this is not actually a question, but rather a discovery. I hope this helps others. Discussion welcome - and your RAM findings, too. I simply started htop and grouped by process by typing H.

TL;DR: Uninstall unused Android apps >> less background processes >> more RAM available >> no more choppy audio!

edit retag flag offensive close delete

Comments

I've also noticed chopping on bluetooth earphones while using WhatsApp. Other Android apps work generally okay without chopping. I think it could also be related to this memory case, maybe WhatsApp interrupts the bluetooth in some way

Sakke ( 2019-07-02 20:59:12 +0300 )edit

Thanks for the findings! I have created an internal bug report about the issue.

jiit ( 2019-07-03 14:39:59 +0300 )edit

I suspected WA also, but I have so little data about it that I didn't include any of it.

Direc ( 2019-07-04 14:58:14 +0300 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2019-07-03 12:49:15 +0300

DrYak gravatar image

I would add :

  • consider blocking as many apps as possible from autostarting

    (from all possible starting points: autostart on boot, notifications, cloud messaging, etc.)

  • consider switching to MicroG instead of Google Play Service if its not bothering you, as it's much more lightweight (a lot less tracking/marketing)

    (currently, location service doesn't work in most Android apps, but works in Google Maps. But that isn't a problem if you only use Android to play music and use Sailfish native mapping apps.)

edit flag offensive delete publish link more

Comments

1

Both are valid points, but blocking autostart is not respected at the time of writing (3.0.3.10) (there are questions about it) and I don't use MicroG nor Google Play Services. Some services and apps are not available natively, so I have to keep using Alien Dalvik...

Direc ( 2019-07-04 15:04:04 +0300 )edit

but blocking autostart is not respected at the time of writing (3.0.3.10)

Yes, there are additional steps needed to be taking, hence that howto I wrote.

(there are questions about it)

I wrote said hotwo literally as a reaction to all these questions, documenting how I achieved it.

DrYak ( 2019-07-04 16:35:45 +0300 )edit
Login/Signup to Answer

Question tools

Follow
4 followers

Stats

Asked: 2019-07-02 20:19:03 +0300

Seen: 203 times

Last updated: Jul 03