We have moved to a new Sailfish OS Forum. Please start new discussions there.
6

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

Tracked by Jolla

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

Direc gravatar image

updated 2019-07-21 11:58:28 +0300

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

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, and because this happens with speaker and headset, too.

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.

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

In 3.1 with only Spotify running and over 500MB free memory the audio stops when I navigate back and forth in spotify itself.

ixevix ( 2019-07-19 20:53:44 +0300 )edit

@ixevix That really sounds like an issue in Spotify itself.

Would you like to test a thing for me? Uninstall Spotify, install Deezer and see how it behaves when you listen to music while browsing its menus? I suspect that Spotify is turning into so heavy app that it starts to kneel under its own weight...

Direc ( 2019-07-21 11:34:44 +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

Now with 3.1.0, the situation seems to be better; I only experienced a skip one single time after using and stressing Android side a lot, and then going for a ride just listening to Deezer for an hour or so - previously it would have skipped once or twice per song. Testing continues...

Direc ( 2019-07-19 22:10:18 +0300 )edit
Login/Signup to Answer

Question tools

Follow
5 followers

Stats

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

Seen: 309 times

Last updated: Jul 21 '19