[Xiaomi Redmi Note 4 Guides, News, & Discussion] asusm930:
DISCLAIMER: DO ALL OF THIS AT YOUR OWN RISK. IT WORKED FOR ME AND I CAN'T GUARANTEE THAT IT'LL WORK FOR YOU ETC, SO DO NECESSARY THINGS LIKE TWRP BACKUPS OR SOMETHING LOL GOOD LUCK

USAGE SCREENSHOTS/STATS:

https://xdaforums.com/showpost.php?p=70915389&postcount=37

https://xdaforums.com/showpost.php?p=70915456&postcount=39

https://xdaforums.com/showpost.php?p=70915425&postcount=38

UPDATE 3.0 (A) RAM FIX MULTITASKING

SIMPLER METHOD (ROOT)

ZRAM increase and fixes

1. Using a file manager, go to system/etc/ and rename mcd_default.conf to mcd_default.conf.bak

2. Download this file and place it in system/etc

3. Reboot

4. Go to developer options and go to memory optimizations and set to HIGH

5. Reboot.

6. Install kernel audiotor and go to LMK and change the values to medium. Remember to set on boot.

7. Reboot.

UPDATE 3.0 (B) BATTERY LIFE IMPROVEMENT

SIMPLER METHOD (ROOT)

Changed the values to less aggressive ones. Minimal battery life improvement but it it better than nothing in my opinion.

1. Go to system/etc and rename perfservscntbl.txt to perfservscntbl.txt.bak

2. Download this and place in system/etc

3. Reboot

UPDATE 3.0 (C) PERFORMANCE IMPROVEMENT

SIMPLER METHOD (ROOT)

These are some cherrypicks from android 7.1.1

1. Make sure you are rooted

2. Go to su/su.d and place this file in that folder

3. Give the file 0755 permission as shown below

X X X

X -- X

X -- X

4. Reboot.

As per usual all of these require root and please do backups in case anything goes wrong. I suggest using FX file manager to do these tweaks.

USAGE SCREENSHOTS/STATS:

https://xdaforums.com/showpost.php?p=70915389&postcount=37

https://xdaforums.com/showpost.php?p=70915456&postcount=39

https://xdaforums.com/showpost.php?p=70915425&postcount=38

OLD METHOD BELOW

FOR MULTITASKING, THERE ARE 2 PARTS; PART (A) TO ACTUALLY FIX ZRAM AND PART (B) TO ACTUALLY ENABLE ZRAM. XIAOMI FOR SOME REASON THOUGHT THAT OUR DEVICE DOESNT NEED ZRAM (IT NEEDS IT LOL)

PART 1 (A)- MULTITASKING

The Redmi Note 4, in my opinion, suffers a lot of RAM management issues. The symptoms are as follow;

- Constant reloading of app like instagram, chrome, facebook, and others when switching apps

- Constant reloading of apps whenever you switch to a system app like phone, camera, messaging (background apps get killed when you launch system apps)

Things I have I tried to remedy the issue/problem

- Lock app

- Change memory optimization settings in developer options

NONE OF THEM WORKED. I got so frustrated because this device has like 3GB of RAM which should eliminate problems concerning apps getting killed.

So I went out and did my own research and found out that MIUI controls ram management via a service called 'mcd' and this service depends on a file called 'mcd_default.conf' in system/etc. Naturally what I did was tinker around with the contents of the file and edited it using trial and error. Each time I tested, I would launch 10-12 apps that included Chrome, Spotify, Instagram, Twitter, Color-Note, Phone, Messaging, Gallery, Google Photos and others. (YES 10 TO 12 APPS)

Yes, ladies and gentleman. 3GB of ram should be able to handle all those apps without reloading every single one of them.

Finally, after tinkering around with some values I think I cracked the code/solution to the problem by editing some lines. The lines I edited affect how zram works on our device and I think I fixed it. The file I edited is attached below.

HOW TO USE THE FILE

I TESTED THIS ON THE LATEST XIAOMI.EU ROM which can be found here. TEST IT OUT ON OTHER ROMS AT YOUR OWN RISK. FU** STOCK MIUI ROM.

XIAOMI.EU ROM LINK

1. Make sure you are rooted and you have the latest busybox installed (its on the playstore)

2. Download the file attached HERE IS THE FILE

3. Browse to system/etc using your root file manager of choice (I prefer fx file manager)

4. Backup the existing mcd_default.conf bye renaming it to mcd_default.conf.bak

5. Place the file I attached in system/etc

6. Reboot

7. Go to developer settings and set memory optimization to LOW and reboot

8. Test out multitasking for yourself

PART 1 (B)- MULTITASKING

1. Install Kernel audiotor

2. Open, give it root permission

3. Swipe from left and go to init.d

4. Press the + button and enter name ZRAM

5. Enter these values

echo 1073741824 > /sys/block/zram0/disksize

/system/xbin/mkswap /dev/block/zram0

/system/xbin/swapon /dev/block/zram0

echo 100 (you can choose between 100 to 0. higher number better zram usage) > /proc/sys/vm/swappiness

6. Save and enable set on boot

7. Reboot and test out multitasking

8. Open Kernel Audiotor and change LMK values to medium. Set on boot and reboot.

Important things to know

- It's normal for background apps to close when you use camera because the camera app uses a lot of RAM and resources to process images ESPECIALLY if you use burst mode (hold shutter button)

SO FAR MY EXPERIENCE

- Improved multitasking

- No other problem like fingerprint sensor not working bla bla bla

PART 2 - BATTERY LIFE IMPROVEMENTS

I noticed that the helio x20 is quite the power hungry chip so I dug around XDA MIUI devices forums for other devices and found out that Xiaomi MIUI roms use a service called 'perfservice' to control the CPU and can sometime be a hit and miss, so I did something;

DISABLE PERFSERVICE and MY BATTERY LIFE HAS IMPROVED DRAMATICALLY. IM TALKING REDMI NOTE 3 SNAPDRAGON LEVELS. 7 HOURS SCREEN ON TIME, 20 HOURS STANDBY.

What happens when perfservice is disabled is the cpu is controlled by MTK's cpu manager (not sure what it is called) and uses the stock interactive governer (which is good).

HOW TO DISABLE/IMPROVE BATTERY

1. Make sure you are rooted

2. use your root file explorer of choice (I prefer fx file manager)

3. go to /system and backup build.prop by copying and pasting it somewhere else

4. edit build.prop and find the line ro.mtk_perfservice_support=1 and change it to ro.mtk_perfservice_support=0 and save file

5. go to /system/etC and find a file named perfservapplist.txt and rename it to perfservapplist.txt.bak

6. go to /system/etc and find a file named perfservscntbl.txt and rename it to perfservscntbl.txt.bak

7. Reboot and test out the result yourself

I hope this helps any of you in any way.

I now LOVE my phone but it's a pity that Xiaomi doesn't want to fix problems like these. Maybe they don't consider these problems as actual problems. We'll never know tbh.

SPECIAL THANKS TO THIS THREAD AND ITS OWNER

http://xdaforums.com/redmi-note-2/development/b-skinny-pro-t3347906

BECAUSE IT TAUGHT ME A LOT ABOUT HOW XIAOMI ROM WORKS TO MANAGE OUR RAM AND CPU