Blokada v5 consumes (drains) too much battery

Recently we receive reports regarding Blokada consuming too much battery and we would like to assist you to narrow it down a bit.

It worth to know the DoH implementation may consumes some additional energy, thus, first turn off DNS encryption: Settings - This device - Use DNS over HTTPS: set it to “No”. Please note the DNS requests won’t be encrypted after you do it. Check if the battery consumption lowers.
If not, open Blokada’s log. Go to the main screen, tap the 3 dots in the top right corner, choose “Logs”. Search for the below messages (in very big numbers):
PLForwarde Forwarder reached 1024 open sockets
It indicates Blokada received a very huge number of DNS requests and the number of open sockets reached the max limit. In such case, Blokada tries to kill this sockets and restart. This is the procedure that consumes the battery, and this is why you see Blokada uses a lot of energy. In such case it is recommended to check the Activity tab in Blokada to see which hosts are being accessed, it can help to identify which app or apps are generating too much traffic.
Additionally you can use a battery analyser app that will show which apps are running. If your device isn’t rooted, you may try AccuBattery. BetterBatteryStats can be used on non-rooted and rooted devices too, however, in the first case you need to grant additional permissions:
adb -d shell pm grant com.asksven.betterbatterystats android.permission.BATTERY_STATS
adb -d shell pm grant com.asksven.betterbatterystats android.permission.DUMP
In case you don’t yet have adb, refer to this guide.
Unfortunately Blokada’s log won’t show which application/s, process/es or service/s querying the DNS server, hence it won’t ship the information to determine what causes the bottleneck.

4 Likes