• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Customize background process limit

Search This thread

Sotureg

Member
Oct 13, 2020
8
0
My phone is running lineageos 16.0. Sometimes the touch screen will freeze randomly for a few seconds and it can become extremely annoying. I have found that limiting background processes to 4 in developer options or having the phone being charged removes the issue entirely. Would there be any way I could create a custom background process limit to automatically turn on or off when the phone is disconnected/connected to power?
 

jwoegerbauer

Senior Member
Jul 11, 2009
7,126
21
1,657
European Union
Set option Limit background process to "No background process" and your phone will work fine, with no hanging problems or no slowness.
Doing so forces Android to stop each process ( read: app ) as soon as it is empty ( that is
when you’re not using the app or any of its services ).
Note that this will also help in saving your battery life, in most cases.
 

Sotureg

Member
Oct 13, 2020
8
0
Set option Limit background process to "No background process" and your phone will work fine, with no hanging problems or no slowness.
Doing so forces Android to stop each process ( read: app ) as soon as it is empty ( that is
when you’re not using the app or any of its services ).
Note that this will also help in saving your battery life, in most cases.
Yes, I am aware of this, though I only want it enabled when my phone is not being charged. Would there be a way to automate this?
 

jwoegerbauer

Senior Member
Jul 11, 2009
7,126
21
1,657
European Union
All can get automated. :)

If phone's Android is rooted then you for example can use Tasker app ( or an init.d if Android supports init.d ) to reach your goal.


Road map:

1. Get phone's battery status
2. Depending on this configure Android's LMK
3. Reboot so new LMK's settings get activated