Stuck partial wake locks Android


#1

I recently updated my game to use SDL2 for platform support, since converting my game there have been two new issues one being stuck partial wake locks. Does SDL2 use wake locks anywhere?

I’m pretty sure this is caused by my audio library but wanted to see if SDL2 has them anywhere…

“API that lets developers keep the CPU running after a device’s display turns off (whether due to system timeout or the user pressing the power button). Your app acquires a partial wake lock by calling acquire() with the PARTIAL_WAKE_LOCK flag.”
https://developer.android.com/topic/performance/vitals/wakelock

Via Android Vitals in the Play Store apparently 1.5% of my players are experiencing this: “Percentage of battery sessions during which users experienced at least one partial wake lock of more than one hour while the app was in the background.”


#2

This issue also affects me: Android Vitals reports ~0.15% Stuck partial wake locks (background). Although it seems low, it appears to be quite important and my apps are in the 5% bottom for this criteria.

If I look at this measure by device, affected devices are mostly “Sony Xperia”.