FORUMS
Remove All Ads from XDA

Magisk Lagging issue [Fix]

195 posts
Thanks Meter: 127
 
By fawazahmed0, Senior Member on 1st December 2019, 04:45 PM
Post Reply Email Thread
All Praise and All Thanks to God

Explanation:
The lmkd (low memory killer ) was somehow killing the forked init process and that was triggering lagging issue, making the forked init as unkillable solves the problem

Permanent Fix:
1. Download and paste the magisklagfix.sh , in your internal sd card (not external sdcard).
2. Execute these commands:
Code:
su
mkdir -p /data/adb/service.d && cp /sdcard/magisklagfix.sh /data/adb/service.d/ && chmod +x /data/adb/service.d/magisklagfix.sh
3. Reboot your phone for fix to start working

Old Method Temporary Fix: (Need to do after every reboot)
Code:
su
for i in $(pgrep -x init); do echo -1000 > /proc/$i/oom_score_adj && echo -17 > /proc/$i/oom_adj; done
Download Link:
https://github.com/fawazahmed0/hostf...agisklagfix.sh

Refer here for more details:
https://github.com/topjohnwu/Magisk/issues/2099

Also thanks to @XPr1d3 for reporting this lagging issue to me and @kapmino269 for trying to help me out
The Following 4 Users Say Thank You to fawazahmed0 For This Useful Post: [ View ] Gift fawazahmed0 Ad-Free
2nd December 2019, 12:07 PM |#2  
Junior Member
Thanks Meter: 4
 
More
Quote:
Originally Posted by fawazahmed0

All Praise and All Thanks to God

If someone is having lagging issue after flashing magisk, this might help (after every reboot, you have to do this):

Explanation:
The lmkd (low memory killer ) was somehow killing the forked init process and that was triggering this lagging issue, you can make the forked init as unkillable by using below commands in terminal emulator or adb shell:

Code:
su
for i in $(pgrep -x init); do echo -1000 > /proc/$i/oom_score_adj && echo -17 > /proc/$i/oom_adj; done

Refer here for more details:
https://github.com/topjohnwu/Magisk/issues/2099

Also thanks to @XPr1d3 for reporting this lagging issue to me and @kapmino269 for trying to help me out

Thank you for updating sir keep it up
can i do this in termux?
The Following User Says Thank You to Krizalid69 For This Useful Post: [ View ] Gift Krizalid69 Ad-Free
2nd December 2019, 03:04 PM |#3  
OP Senior Member
Thanks Meter: 127
 
Donate to Me
More
Quote:
Originally Posted by Krizalid69

Thank you for updating sir keep it up
can i do this in termux?

yes, you can use that
The Following 2 Users Say Thank You to fawazahmed0 For This Useful Post: [ View ] Gift fawazahmed0 Ad-Free
3rd December 2019, 07:11 AM |#4  
Junior Member
Thanks Meter: 4
 
More
Quote:
Originally Posted by fawazahmed0

yes, you can use that

It works sir thank you so much but yeah after reboot i need to do this again but its ok now i can use my phone with root access
Im still waiting for official fix
Can you make it magisk module?
3rd December 2019, 07:18 AM |#5  
OP Senior Member
Thanks Meter: 127
 
Donate to Me
More
Quote:
Originally Posted by Krizalid69

It works sir thank you so much but yeah after reboot i need to do this again but its ok now i can use my phone with root access
Im still waiting for official fix
Can you make it magisk module?

When I get some time, I will release script which will automatically execute these commands on reboot.
So, you won't have to do it again.
And yeah one more thing, there won't be any official fix release, the github issue is already closed by @topjohnwu
The Following User Says Thank You to fawazahmed0 For This Useful Post: [ View ] Gift fawazahmed0 Ad-Free
3rd December 2019, 10:54 AM |#6  
Junior Member
Thanks Meter: 4
 
More
Quote:
Originally Posted by fawazahmed0

When I get some time, I will release script which will automatically execute these commands on reboot.
So, you won't have to do it again.
And yeah one more thing, there won't be any official fix release, the github issue is already closed by @topjohnwu

Thank you so much for your awesome work
Your so great God bless you master
The Following User Says Thank You to Krizalid69 For This Useful Post: [ View ] Gift Krizalid69 Ad-Free
3rd December 2019, 09:03 PM |#7  
OP Senior Member
Thanks Meter: 127
 
Donate to Me
More
Quote:
Originally Posted by Krizalid69

Thank you so much for your awesome work
Your so great God bless you master

@Krizalid69 I have added permanent fix steps in the guide, just see the guide again
The Following User Says Thank You to fawazahmed0 For This Useful Post: [ View ] Gift fawazahmed0 Ad-Free
4th December 2019, 03:48 PM |#8  
Junior Member
Thanks Meter: 4
 
More
Quote:
Originally Posted by fawazahmed0

@Krizalid69 I have added permanent fix steps in the guide, just see the guide again

Finally thank you for fast and all of your effort to make this solution im so glad to this
Good new for realme user, thank you so much

I have only one problem

Sometimes the volume not functioning
I need to reboot the my phone to make it works do you experience that too?
4th December 2019, 03:50 PM |#9  
OP Senior Member
Thanks Meter: 127
 
Donate to Me
More
Quote:
Originally Posted by Krizalid69

Finally thank you for fast and all of your effort to make this solution im so glad to this
Good new for realme user, thank you so much

I have only one problem

Sometimes the volume not functioning
I need to reboot the my phone to make it works do you experience that too?

No, everything works fine in my phone, maybe try wiping data etc, it might solve the problem
The Following User Says Thank You to fawazahmed0 For This Useful Post: [ View ] Gift fawazahmed0 Ad-Free
4th December 2019, 04:39 PM |#10  
Junior Member
Thanks Meter: 4
 
More
Quote:
Originally Posted by fawazahmed0

No, everything works fine in my phone, maybe try wiping data etc, it might solve the problem

Where i can wipe the data etc?
Sorry im noob

Back to fix lag
I tried it and after reboot so far so good no lag
Until now, only i can do is to say thank you so much
I can sleep well now with a smile on my face
Can i call you mang kanor because your a legend like him hahaha just kidding
Thank you.
4th December 2019, 06:07 PM |#11  
OP Senior Member
Thanks Meter: 127
 
Donate to Me
More
Quote:
Originally Posted by Krizalid69

Where i can wipe the data etc?
Sorry im noob

Back to fix lag
I tried it and after reboot so far so good no lag
Until now, only i can do is to say thank you so much
I can sleep well now with a smile on my face
Can i call you mang kanor because your a legend like him hahaha just kidding
Thank you.

From twrp, but remember you will lose all your apps, data, images etc, it will be like new phone.
You can also factory reset the phone from settings (use Clear All data option)
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes