MULTITASKING ISSUE SOLVED!
for me anyway
Yes this is about the terrible HTC multitasking problem.
1st off here are some points
* I love my Evo3D, I've repaired it several times, from several faults, there just isn't another phone I like, so I'm not interested in upgrading to something new.
* Secondly, yes I have searched, I've been searching since the ICS update, nothing I've found works, only thing that comes close is the v6 supercharger.
* Until a COMPLETELY functional, stable ROM appears, and I mean EVERYTHING working, 3D, 3D Camera, EVERYTHING, I'm not moving up from the stock ICS ROM, there's simply no point in going to CM or anything else, when the 3D functionality doesn't work.
* My ROM is as follows:
Android Version: 4.0.3
HTC Sense (ugh) version: 3.6
Software Version: 3.28.401.1
Kernel: CoolZ v5.7
The problem is the terrible multitasking, which I'm pretty sure I've nailed down to OOM grouping, but not in the way most people might think. So here goes.
What has helped is the V6 Supercharger, but it just barely helps with OOM values. Which lead me to try other options and other applications, one of which is ROM Toolbox. The task manager in this suite allows the adjustment of OOM values and can display OOM grouping. Combine this with the bulletproofing performed by v6 supercharger and I can see something happening. My bulletproof script is set to run every 30 seconds, so I would expect to see the OOM grouping of the apps staying as "excluded". But it's just not sticking. They initially show as excluded, but minutes later, they're back to being either foreground, hidden or content provider. I can also force them to loose their "bulletproof" or "excluded" status, merely by turning my screen off and on again. Something, somewhere in the system is changing this.
So then I started stuffing around (rather drastically) with the OOM killer values, I set them rediculously low:
Foreground: 1
Visible: 2
Secondary: 3
Hidden: 4
Content: 5
Empty: 6
See? drastically low, BUT I got a result. The three apps I have open nearly all day, were now staying open, but the problem became lag, which makes this method of "multitasking" useless. I also noticed that other apps were being killed before empty apps etc. So something is seriously screwy.
Back to the drawing board, I wanted to find out why excluded apps priorities were being changed without my knowledge. I know pretty much nothing about android, so I did some googling. Found out that deeper in the system the oom grouping was being assigned by the kernel etc. Beyond my knowledge or ability. For a laugh I started poking around in the system folder, more specificially at the init.rc and init.shooteru.rc files. As it turns out, inside init.shooteru.rc are some lines that are designed to override the OOM adj and OOM. So I thought I'd remark the lines with #'s so they would be ignored during boot. The code below is the result.
Unfortunately, after pushing the code back to the device and rebooting, my hard work had been undone, so I pushed again, sync'd again, but this time, I've used ROM toolbox to do a "fast reboot" then "reboot systemui" It would appear that the modified file is still indeed modified, however I have no way of knowing if the fast reboot or reboot systemui has forced my device to reload the init.shooteru.rc script. So this may be a fluke.
So I did the above and launched two of my three apps. Remembering bulletproofing runs every 30 seconds, so the apps should be showing as "excluded" by the task manager in ROM Toolbox. Sadly this is not the case. Dolphin browser for example, has been running for just over 7 mins in the background, it is no longer "excluded" now it has become a "content provider" BUT, I have just switched back to it, and all three tabs are still loaded and have not had to redraw, success? Maybe. Even more surprisingly, I have just been able to turn the screen off, turn it back on after a few seconds (which probably means nothing as it won't have gone to "deep sleep" yet) but Dolphin and it's three tabs, and two other apps have remained open and I was able to swap back to them without reload or redraw. This has really intrigued me as normally my apps that I want to use are being closed killed before other empty apps.
So have I stumbled across something here? or is my phone just fluking and the apps staying open for some other reason? Personally I think it's just a fluke. As far as I can derive from months and months of searching, I believe either the kernel is reassigning OOM grouping on the fly (which makes the v6 bulletproofing useless) or the HTC framework is a mess and destroying the OOM grouping, adjustments etc.
for me anyway
Yes this is about the terrible HTC multitasking problem.
1st off here are some points
* I love my Evo3D, I've repaired it several times, from several faults, there just isn't another phone I like, so I'm not interested in upgrading to something new.
* Secondly, yes I have searched, I've been searching since the ICS update, nothing I've found works, only thing that comes close is the v6 supercharger.
* Until a COMPLETELY functional, stable ROM appears, and I mean EVERYTHING working, 3D, 3D Camera, EVERYTHING, I'm not moving up from the stock ICS ROM, there's simply no point in going to CM or anything else, when the 3D functionality doesn't work.
* My ROM is as follows:
Android Version: 4.0.3
HTC Sense (ugh) version: 3.6
Software Version: 3.28.401.1
Kernel: CoolZ v5.7
The problem is the terrible multitasking, which I'm pretty sure I've nailed down to OOM grouping, but not in the way most people might think. So here goes.
What has helped is the V6 Supercharger, but it just barely helps with OOM values. Which lead me to try other options and other applications, one of which is ROM Toolbox. The task manager in this suite allows the adjustment of OOM values and can display OOM grouping. Combine this with the bulletproofing performed by v6 supercharger and I can see something happening. My bulletproof script is set to run every 30 seconds, so I would expect to see the OOM grouping of the apps staying as "excluded". But it's just not sticking. They initially show as excluded, but minutes later, they're back to being either foreground, hidden or content provider. I can also force them to loose their "bulletproof" or "excluded" status, merely by turning my screen off and on again. Something, somewhere in the system is changing this.
So then I started stuffing around (rather drastically) with the OOM killer values, I set them rediculously low:
Foreground: 1
Visible: 2
Secondary: 3
Hidden: 4
Content: 5
Empty: 6
See? drastically low, BUT I got a result. The three apps I have open nearly all day, were now staying open, but the problem became lag, which makes this method of "multitasking" useless. I also noticed that other apps were being killed before empty apps etc. So something is seriously screwy.
Back to the drawing board, I wanted to find out why excluded apps priorities were being changed without my knowledge. I know pretty much nothing about android, so I did some googling. Found out that deeper in the system the oom grouping was being assigned by the kernel etc. Beyond my knowledge or ability. For a laugh I started poking around in the system folder, more specificially at the init.rc and init.shooteru.rc files. As it turns out, inside init.shooteru.rc are some lines that are designed to override the OOM adj and OOM. So I thought I'd remark the lines with #'s so they would be ignored during boot. The code below is the result.
Code:
on property:init.svc.bootanim=stopped
start qcom-post-boot
# Overwrite ActivityManager's low memory killer settings
#write /sys/module/lowmemorykiller/parameters/adj 0,2,4,7,9,12
#write /sys/module/lowmemorykiller/parameters/minfree 6379,8125,9871,11919,20497,25282
#write /sys/module/lowmemorykiller/parameters/minfile 6379,8125,9871,11919,20497,25282
#write /sys/module/lowmemorykiller/parameters/check_filepages 1
start mpdecision
So I did the above and launched two of my three apps. Remembering bulletproofing runs every 30 seconds, so the apps should be showing as "excluded" by the task manager in ROM Toolbox. Sadly this is not the case. Dolphin browser for example, has been running for just over 7 mins in the background, it is no longer "excluded" now it has become a "content provider" BUT, I have just switched back to it, and all three tabs are still loaded and have not had to redraw, success? Maybe. Even more surprisingly, I have just been able to turn the screen off, turn it back on after a few seconds (which probably means nothing as it won't have gone to "deep sleep" yet) but Dolphin and it's three tabs, and two other apps have remained open and I was able to swap back to them without reload or redraw. This has really intrigued me as normally my apps that I want to use are being closed killed before other empty apps.
So have I stumbled across something here? or is my phone just fluking and the apps staying open for some other reason? Personally I think it's just a fluke. As far as I can derive from months and months of searching, I believe either the kernel is reassigning OOM grouping on the fly (which makes the v6 bulletproofing useless) or the HTC framework is a mess and destroying the OOM grouping, adjustments etc.
Last edited: