yashsingh1/xdaforums huggingface dataset:
[OnePlus 6T  Guides, News, & Discussion] Lebrun213:
i think this is hardcoded into oneplus rom, whatever setting you change you won't be able to fix the background service kill.

That's quite annoying, but in the same time they manage to give to the oneplus an incredible battery this way.

Letting whatever piss poor coded app run in the background consumn a lot of battery at the end of the day.
[OnePlus 6T  Guides, News, & Discussion] Morning000:
I saw bad ram management with Blokada adblock (VPN disconnected from time to time). I've been trying to fix it for a while, but it was still a problem.

Some time ago I found out SECOND battery optimization menu with ALL of the apps (including system ones). In there apps with normally battery optimization disabled have this ENABLED.

To get there I've used paid app Bouncer :rolleyes:. In settings there is option "bouncer not working?" (this one changed on latest update). This menu looks like this. By tapping the upper button you'll get to this menu.

After a couple days of testing everything looks great and it's working without getting killed. Battery without change.

Edit.

Don't know why and how, but some of this changes I've made, changed back!

[IMG="Bouncer settings battery optimalisation"]https://forums.oneplus.com/attachments/1548318305533-jpg.961530/[/IMG]
[OnePlus 6T  Guides, News, & Discussion] dougmcsp:
Deleted.
[OnePlus 6T  Guides, News, & Discussion] ram4ufriends:
Was it a problem for you before flashing Arter kernel?
[OnePlus 6T  Guides, News, & Discussion] dougmcsp:
deleted
[OnePlus 6T  Guides, News, & Discussion] fedef12evo:
For me disabling standby optimization fixed everything related to notification or Bluetooth problems with smartwatch, also all the problems with adblock
[OnePlus 6T  Guides, News, & Discussion] M3drvr:
I had this issue horribly on stock. I use VoIP or sip calling in the stock dialer. Frequently I would miss calls as even the stock dialer was getting killed. Other examples were workout apps like Google fit or endomondo being killed within 5 minutes of starting a workout. YouTube music would get killed while listening to music as well. Pinning the apps in events had no effect, and turning off optimizations or adaptive battery had absolutely no effect whatsoever! Apps are simply being killed while in active use.

Switching to lineage or custom Rom fixed it so it was obviously too aggressive of ram management and killing of apps I concluded. So I decided to install a custom kernel on stock oos again and then adjust the LMK setting to essentially never kill the apps. Low and behold, I have no issues anymore with apps being killed! Apps never get killed on me anymore and I never miss notifications or phone calls anymore! And I can get through workouts and music never stops. The phone finally makes use of the ram it has and my battery is just as good as always! Without adjusting the LMK I was still having apps being killed.

We have 6 to 8gb of freaking ram! Why the hell OnePlus is killing apps so aggressively is beyond me, but it's not making use of the Ram in these phones at all and is a complete waste! So give it a try. I'm not sure you can adjust this without root or custom kernel, but it's officially fixed the problem for me. Also, all optimization and adaptive battery settings are left on with the LMK adjusted to the absolute lightest settings. No extra battery drain over stock. In fact, my battery is better as I'm guessing the CPU doesn't have to work as hard every time I open apps back up.
[OnePlus 6T  Guides, News, & Discussion] amokkatxda:
If you have root, you can try disable doze with command in terminal/adb shell "dumpsys deviceidle disable". I see no significant difference in battery consumption, but notifications working correctly and in time. Remember this should be done after every reboot. I'm using Tasker to do this automatically.
[OnePlus 6T  Guides, News, & Discussion] ram4ufriends:
And there is a Magisk module in this thread as well...
[OnePlus 6T  Guides, News, & Discussion] M3drvr:
Certainly didn't work for me. Doze doesn't kill the apps.

I think maybe we are seeing two separate issues here. One where notifications simply aren't coming through. And another where the actual apps are being closed or killed.
[OnePlus 6T  Guides, News, & Discussion] amokkatxda:
Sure, doze does not kill apps. But what people posted here? Symptoms are exactly about what doze mode does. Also "Do not optimize" is about doze, not app killing or something else. "Stay awake while charging" says it too. No evidences that applications were actually killed. Only missed calls, notifications. Problems with Tasker OP mentioned. Tasker sets system alarm every 10 minutes to not being "dozed" for hours ("reliable alarms"). As for me it helped on OP6T. Too bad it not helped you. It's just my thoughts on this.
[OnePlus 6T  Guides, News, & Discussion] M3drvr:
Did you not read the lengthy post i made? It also includes apps being killed even with adaptive battery, optimization settings, and deep and sleep optimization all completely disabled. Missed calls and notifications can also definitely be from the apps being closed. I found a solution and a cause about why it was happening.

Maybe also see the writeup here to see if it fixes:

https://www.xda-developers.com/how-...-management-almost-double-the-apps-in-memory/
[OnePlus 6T  Guides, News, & Discussion] kimdarrel:
There is an option in the Developers Option that can make your screen always on. just enable it on developers option.
[OnePlus 6T  Guides, News, & Discussion] M3drvr:
But the screen dims after a while with that option as per the other 15x this was stated ???
[OnePlus 6T  Guides, News, & Discussion] rirozizo:
True! So very true!

Some people mentioned that this is more of an Android Pie issue than it is an OxygenOS one. Probably because the Pixel 3/XL devices were horrible in terms of keeping the apps running in the background.

There's a video by MKBHD (AFAIR) where he plays music with Google Play Music and opens up the Camera app, and in like 2 seconds, the music app just closes. It's either the lack of Pixel 3's RAM capacity, the lack of Pie's RAM management, or just simply... both.
[OnePlus 6T  Guides, News, & Discussion] M3drvr:
Well I've fixed it on mine now and things never close and I notice my ram is actually being used now extensively. Before I'd always have close to 4gb free on my 8gb device. Now I'm frequently sitting in the 5-6gb used. I've adjusted in the build prop file the service limit up to 64 instead of the default 5 by OnePlus and nothing is ever closed in the background anymore unless I've gone to sleep. Pixel default is 20 which is low, and other flagships like HTC have this up to 60 as well, and Samsung also at 40 something.

But I also have sleep optimization on. I don't care if they close or get killed while sleeping. But I left all other options on except deep sleep optimization, and nothing gets killed on me during the day anymore. Notifications always on time and all. Another benefit, my battery life has gotten better! Not worse. AOSP custom roms also have this setting up in the 60's as well I've noticed and don't suffer from this.
[OnePlus 6T  Guides, News, & Discussion] IDisposable:
Did you update the bservice_age too? I doubled mine to 10000 on a hunch
[OnePlus 6T  Guides, News, & Discussion] wilpang:
Does that work on the 6T?
[OnePlus 6T  Guides, News, & Discussion] M3drvr:
I didn't. Thought about it, but I was only doing one thing at a time.

---------- Post added at 01:54 PM ---------- Previous post was at 01:52 PM ----------

Sure does! The 6T is set at only 5! Absolutely ridiculous! Custom ROMs up in the 60's, and other manufacturers like HTC are as well. Samsung in the 40's and then the pixel at an also low 20.
[OnePlus 6T  Guides, News, & Discussion] dhoang:
I read your write-up. Thank you for that. So what value did you set 42? Missing notifications and app killings in the background were the reason why I turn to custom roms. If you method fixes the problem I will to back to stock.
[OnePlus 6T  Guides, News, & Discussion] M3drvr:
I set mine to 64.
[OnePlus 6T  Guides, News, & Discussion] dhoang:
Thank you. My current rom, which is Sky Dragon is set to 60. I will go back to stock and set it to 60 and report back. Thanks again.
[OnePlus 6T  Guides, News, & Discussion] M3drvr:
No problem. Definitely helped for me!
[OnePlus 6T  Guides, News, & Discussion] kramer987:
just curious guys, what permissions are on the build.prop by default? is it just -rw----------?
[OnePlus 6T  Guides, News, & Discussion] salahiu:
I used to be bothered with this problem. Now I found how to fix it. Slide up homebutton, find the app you want it to stay awake. Click the three white point on top right of app and choose lock. Done. Unlock it when you finish the need.
[OnePlus 6T  Guides, News, & Discussion] imucarmen:
How do I change this? I'm not finding anything by the name "service limit". I've looked through the build prop several times and don't see it. Also, searching doesn't return any result.
[OnePlus 6T  Guides, News, & Discussion] farsyadw:
Replying to the thread title, absolutely.

I owned the 6GB variant of the OnePlus 6T and the RAM management was terrible. Even with 1GB of free RAM left the phone consistently needed to restart apps. I recently traded it with the 8GB variant of the 6T and it has been A LOT better. The 6GB variant felt like 4GB ffs.

Do NOT buy the 6GB variant of the phone!
[OnePlus 6T  Guides, News, & Discussion] dhoang:
Same here. When back to OOS from an AOSP rom. I cannot find the line ro.sys.fw.bg_apps_limit. BTW I'm running 9.12.

---------- Post added at 09:18 AM ---------- Previous post was at 09:11 AM ----------

M3drvr,

I don't see the line ro.sys.fw.bg_apps_limit in the build.prop on 9.12. What line did you change? ro.vendor.qti.sys.fw.bservice_limit? This is only line in the build.prop that has a default value of 5.
[OnePlus 6T  Guides, News, & Discussion] M3drvr:
Yes this one ro.vendor.qti.sys.fw.bservice_limit. They renamed it in Pie.
[OnePlus 6T  Guides, News, & Discussion] dhoang:
Thanks! I already changed it to 60 and so far so good.
[OnePlus 6T  Guides, News, & Discussion] M3drvr:
Yeah definitely should notice less killing of apps!
[OnePlus 6T  Guides, News, & Discussion] wilpang:
What's the best way to do this without root?
[OnePlus 6T  Guides, News, & Discussion] Milly7:
Don't think it can be changed without root.
[OnePlus 6T  Guides, News, & Discussion] M3drvr:
Adb. It's how I'm doing it. Adb pull when you are in twrp. Must mount the system partition first. Pull the file to your computer make the changes in a text editor, and push the file back to the phone via Adb and put the permissions back as 644
[OnePlus 6T  Guides, News, & Discussion] wilpang:
Not as straightforward as I thought ?
[OnePlus 6T  Guides, News, & Discussion] M3drvr:
There are guides everywhere about how to pull the build.prop file while in twrp. Easy to find
[OnePlus 6T  Guides, News, & Discussion] rirozizo:
Here's a quick guide:

1- Boot your phone to TWRP

2- Mount System Partition using TWRP's interface (Mount > System)

3- Plug your phone to your ADB enabled PC (if you need help with that, I can provide a link)

4- Open up a CMD on your desktop by holding shift and right clicking on your desktop, then choosing "open command window here" or "open powershell here"

5- Type "adb pull /system/build.prop" (obviously without the double quotes)

6- Edit the build.prop file on your desktop

7- When done, type "adb push build.prop /system/" and hit enter

8- Type "adb shell" and hit enter

9- Type "cd /system/" and hit enter

10- Type "chmod 644 build.prop" and hit enter

11- Reboot

if, for any reason, your phone doesn't boot, go back to TWRP and do steps 8 to 10 again but replace 644 with 600 (my build.prop permissions on OOS are -rw------- which translates to 600)
[OnePlus 6T  Guides, News, & Discussion] biggiestuff:
Is there a way to do this w/o installing TWRP?
[OnePlus 6T  Guides, News, & Discussion] rirozizo:
Unfortunately, you need to find a way to mount system as Read/Write. TWRP or root is your only bet.
[OnePlus 6T  Guides, News, & Discussion] M3drvr:
I've noticed build.prop is in /system/system for me.
[OnePlus 6T  Guides, News, & Discussion] rirozizo:
I don't even have /system/system haha. So weird!

Also hi! Long time no see!
[OnePlus 6T  Guides, News, & Discussion] M3drvr:
Very strange. Nothing is in my /system folder. Lol! And hello again
[OnePlus 6T  Guides, News, & Discussion] DaOldMan:
Did you mount /system in twrp ?
[OnePlus 6T  Guides, News, & Discussion] M3drvr:
Yes sir
[OnePlus 6T  Guides, News, & Discussion] DaOldMan:
So then I have no idea. Should show you system with all the files. Without mounting it looks like it's empty. Maybe try again .... just be sure to mount the system partition in twrp using the mount menu please. Good luck !
[OnePlus 6T  Guides, News, & Discussion] M3drvr:
Oh I'm not having issues. I still modify the build.prop file and send back without issues. Was just a weird thing I noticed.
[OnePlus 6T  Guides, News, & Discussion] Nixer:
Can you share which kernel are you using and your LMK config?
[OnePlus 6T  Guides, News, & Discussion] M3drvr:
On that configuration, I was using Blu spark. Then franko kernel manager with lmk set to very light. In his app it had presets. But I think all custom kernels support modification of that setting
[OnePlus 6T  Guides, News, & Discussion] marvi0:
Phew this is really frustrating. I also have this issue with xxx no limits rom and only solution has been for me to use a custom kernel to prevent apps being killed. I use talon for twitter and no matter what I do, it's killed in the background. Tried changing build prop and it's only partially working as phone will still kill the app!
[OnePlus 6T  Guides, News, & Discussion] Zorbeyd:
i see build.prob at /system/system location too.
[OnePlus 6T  Guides, News, & Discussion] TheQuarterMile:
I see the following solutions posted:

1. Edit the build prop

2.Flash a custom kernel

3. Disable Smart boost and deep optimisations. (seems like this will compromise battery life)

Can anyone tell me from their experience what works best? These app redraws are really frustrating.

I'm using the 6gb variant (regret not getting the 8gb one) with stock OOS. Is the RAM management better in the betas?
[OnePlus 6T  Guides, News, & Discussion] MrPhilo:
Download LSpeed, disable multitask limitation and change the lmk to multitask and it'll be a lot better.
[OnePlus 6T  Guides, News, & Discussion] M3drvr:
Editing build.prop only, gives a ton of flexibility but you lose safety net due to unlocked bootloader.

Installing custom kernel + editing build.prop = best flexibility and battery life, and you can keep full safetynet. I use this and use all sorts of safetynet detecting apps like Google pay and 2FA apps.

Disabling smartboost and optimizations, doesn't always work. It never worked for me. I was still having **** killed all the time.

Note, none of these methods require root. At most, they only require custom recovery, and that will trip safetynet die to unlocked bootloader. But it's still not root.
[OnePlus 6T  Guides, News, & Discussion] letmedanz:
Has anyone experienced accessibility settings getting turned off very frequently for apps? I have optimization turned off, and don't see the apps themselves getting killed, do receive instant notifications, however accessibility turns off. Apps like Tasker, Roboform, Vivid gestures. Quite annoying too. On a rooted, stock 9.0.12
[OnePlus 6T  Guides, News, & Discussion] TheQuarterMile:
I'm already rooted with TWRP so that shouldn't be a problem. What custom kernel do you use? Need something closest to stock and stable.
[OnePlus 6T  Guides, News, & Discussion] M3drvr:
I'm on Blu spark. It's stable for me. If you have root you can adjust more things via a kernel manager. But with root, your wouldn't even have to go custom anything. You could just modify build.prop right on your phone in a text editor.
[OnePlus 6T  Guides, News, & Discussion] reppi:
Latest smurf kernel rc14b seems to have solved the RAM management issue. I haven't had any apps closing in background since using it.
[OnePlus 6T  Guides, News, & Discussion] culiacanazo:
****!

That literally got me fired!
[OnePlus 6T  Guides, News, & Discussion] indian84:
Loll
[OnePlus 6T  Guides, News, & Discussion] pooyab:
this is a well known issue of oneplus and when you report it, you either get ignored, or get a response like this:

"oh my god, I can't believe you are having a problem. please send us a log and we will fix it in 2 hours. meanwhile, are you sure you are using a phone and not a sandwich maker?"

hundreds of people have reported and discussed this at least since last year on op6 and 6t and they either don't care, or think killing background apps is the only way to manage battery life!

All these methods (locking apps in recent menu, disabling battery optimization and even tweaking build prop) only work partially in best scenario. you have to install a custom heavily modified kernel and preferably a custom non Oxygen os based rom to get it completely fixed.
[OnePlus 6T  Guides, News, & Discussion] culiacanazo:
It's more than well documented in dontkillmyapp.com

Of course they'll deny it forever
[OnePlus 6T  Guides, News, & Discussion] fadedout:
One of my biggest peeves was being unable to switch back and forth between apps without having the app killed in the background. For example, I pause a song on Pandora, switch between other apps for a few mins, then come back to Pandora. I expect to resume the same song only to find the app was killed and is now playing a new song.

I've tried much of what has been suggested in this thread with varying degrees of success. Pinning individual apps in recents worked well, but I can't pin every app. However I've found the most success with something that hasn't been mentioned yet.

Disable the "OnePlus Launcher" app.

There are many way to do this, I found it most convenient to freeze it with Titanium Backup. Obviously you'll want to be sure you have a third-party launcher installed beforehand.

Note that the "recents" app carousel will now be vertical instead of horizontal, however it was quick to get used to and was well worth it.
[OnePlus 6T  Guides, News, & Discussion] DaOldMan:
Pitty this disables the possibility to use gestures in navbar as the recents gesture doesn't work with the vertical one.
[OnePlus 6T  Guides, News, & Discussion] culiacanazo:
That's the only reason i haven't rid my phone of it.

Gestures. It sucks they're making them like this.

One can understand DEVICE DEPENDANT!

But, LAUNCHER DEPENDANT?
[OnePlus 6T  Guides, News, & Discussion] Beefheart:
The agressive battery settings Oneplus insist on using in OOS is precisely why I've moved to Omnirom on my 6T. Fantastic hardware, but when you have to open Whatsapp to see a message three hours after you receive it because notifications don't work despite all battery optimisation features being disabled, you know something is seriously wrong. I'm just glad third party roms are so easily available on this fabulous device, otherwise I'd have had to return it.
[OnePlus 6T  Guides, News, & Discussion] culiacanazo:
Is that a known bug or an isolated incident? And then, is it all roms? (Not sure if this is even a question, now, with treble around)
[OnePlus 6T  Guides, News, & Discussion] Beefheart:
On Oneplus devices it's a known bug. Numerous threads and attempted fixes for it. Just one example below.

https://xdaforums.com/oneplus-6t/how-to/guide-notification-fix-100-t3865551

It's an issue with OOS, so doesn't effect AOSP based ROMs like Omnirom. No problems at all since I flashed it.

Interestingly, my work colleague has just bought a Oneplus 7 and has already noticed the same issue without me mentioning it.
[OnePlus 6T  Guides, News, & Discussion] culiacanazo:
Ok ok i misunderstood you to mean those notifications were late in Omni, but i got it, now, thank you.
[OnePlus 6T  Guides, News, & Discussion] xls654:
This is not problem or bug, if use "OnePlus Launcher", in recents you can lock the corresponding activity, prevent kill background processes,

if don't use "OnePlus Launcher", run this adb command

settings put system com_oneplus_systemui_recent_task_lockd_list {com.topjohnwu.magisk/a.c#0}{com.mycompany.MyAndroidApp/com.mycompany.MyAndroidApp.MainActivity#0}

prevent killing com.topjohnwu.magisk and com.mycompany.MyAndroidApp

PS: com.mycompany.MyAndroidApp : apps package name, com.mycompany.MyAndroidApp.MainActivity: apps home activity, #0 : 0 user id
[OnePlus 6T  Guides, News, & Discussion] :
Anyone got any idea how to WhiteList apps from Battery Optimization. I want to WhiteList Google Play Store and bunch of Other Apps but they don't appear in the Battery Optimization menu, neither in Battery Setting nor in Advanced App Permission. I can get the Menu to show app with all the apps but all the Apps I WhiteList are automatically removed on Reboot. This is getting real annoying and is the whole reason I flashed a Custom ROM in the first place. I can't even download anything from the Play Store as it's killed as soon as I turn the screen off and the Download then Stops.
[OnePlus 6T  Guides, News, & Discussion] culiacanazo:
Use a shortcut; you may need a module from magisk to be able to touch GMS, otherwise known as play services
[OnePlus 6T  Guides, News, & Discussion] :
I have the first one installed. Can you link me the second one?
[OnePlus 6T  Guides, News, & Discussion] culiacanazo:
NOTE: I DID NOT MAKE ANY OF THESE
[OnePlus 6T  Guides, News, & Discussion] archraziel:
I know this is an OP6T but I have an OP5 with all this on build prop.

Which should I change the value, and to what?

ro.vendor.qti.sys.fw.bservice_enable=true

ro.vendor.qti.sys.fw.bservice_limit=5

ro.vendor.qti.sys.fw.bservice_age=5000
[OnePlus 6T  Guides, News, & Discussion] Sepero:
I have a lot of Messengers on my phone to keep in contact with everyone: Facebook, Skype, Wire, Riot (encrypted), and more. If they aren't running, then I don't get incoming message notifications.

My "Work Around" for keeping background processes running:

1) Do all the usual battery settings stuff (don't optimize app).

2) Put a Lock on all desired apps. This is done in the recents menu. (see screenshot)

3) Use Tasker to check every half hour if the apps are running. If not, then start them.

Tasker check if app is running, New Task:

New Action -> Code -> Run Shell

Command:

pidof com.facebook.orca

Store Output:

%out

New Action -> App -> Launch App

App:

Facebook Messenger

If:

%out !Set

Repeat these 2 Actions for every app you want to make sure stays running in the background.

Caveat:

When Tasker starts an app, you will see it appear in the foreground, and it will come over any app you're currently using.

Feel Free to copy and repost this information anywhere. No credit to me required. (public domain)
[Huawei Mate 20 Pro Questions & Answers] Derpling:
I was wondering, what resolution are you using?

I've started with WQHD+ and moved to smart, since i didn't noticed much difference(didn't really test battery life, just DPI and fonts).

What resolution do you use, and why?
[Huawei Mate 20 Pro Questions & Answers] Grondah:
I've always left it on smart resolution. Never found a reason to change to a specific option.
[Huawei Mate 20 Pro Questions & Answers] joeyzbg:
Im running it on FHD.

Couldn't notice the difference.
[Xiaomi Redmi Note 5 Pro Questions & Answers] Drunkcj:
I need a stable home with the best battery life .

I don't play heavy games. I just play games such as clash of clans.

Please suggest me the best rom for battery
[Xiaomi Redmi Note 5 Pro Questions & Answers] HASSAN_@hmed:
Bettery depends on kernel

Almost Every rom have same battery backup ( about 7-8 hours )

But after change your kernel battery you improve your battery

I am using hovoc os rom and not use any other sperate kernel

View attachment 4694160View attachment 4694161
[Xiaomi Redmi Note 5 Pro Questions & Answers] prospektus:
MIUI is miroom as a base. in my opinion. miroom stock is good at kernel. you can try Stormguard.
[Xiaomi Redmi Note 5 Pro Questions & Answers] circlehuy:
RevolutionOS 8.8.17 with Kirks kernel