[KERNEL]Lightning kernel for stock roms

langeveld024

Senior Member
Jun 7, 2012
1,720
805
113
Does anyone have the same problem with me? I can't use any app to control the cpu settings and the phone still has turned on screen although i selected to turn off my phone. I flashed .292 boot.img, intelliplug.zip and overclock file. Did i do something wrong?:rolleyes:
Yes.
1. Disable mpdecision if u wanna control CPU clocks (by any way u prefer, google it or go to system/bin/ and rename "mpdecision" to "mpdecision.old" and reboot)
2. Turn off double tap to wake and sweep to wake :D
 
  • Like
Reactions: Danny-Leung

Dimox3

Senior Member
Nov 24, 2012
69
7
8
I came from XZ-v26 Kernel after flashing Version 2 of Lightning Kernel my Wifi is not able to connect to a network. It find all networks, but if I try to connect nothing happen. Can someone help me ?
 

Diatomix98

Senior Member
Jun 24, 2012
681
382
93
Johor Bahru
Hi, @nikhil18. After flashing the version 2 I found that the frequency doesn't stick anymore even if I flashed the overclock.zip. I usually underclocked it to 1350 mhz with minimum frequency of 270mhz but it keeps jumping back to the default 384mhz and 1512mhz. I wonder if anyone has this issue too. :)

Edit1: For some reason, it is fine now.....

Edit2: After leaving the phone there for half an hour, found the issue to be back again....

Edit3: To make sure whether it is my problem, I flashed version 1 back and left it for half an hour, until now it is still fine.
 
Last edited:
  • Like
Reactions: kael2404

nikhil18

Senior Member
May 9, 2012
2,276
4,794
0
bangalore
Hi, @nikhil18. After flashing the version 2 I found that the frequency doesn't stick anymore even if I flashed the overclock.zip. I usually underclocked it to 1350 mhz with minimum frequency of 270mhz but it keeps jumping back to the default 384mhz and 1512mhz. I wonder if anyone has this issue too. :)

Edit: For some reason, it is fine now.....

Edit2: After leaving the phone there for half an hour, found the issue to be back again....

Edit3: To make sure whether it is my problem, I flashed version 1 back and left it for half an hour, until now it is still fine.
Sorry bro I added a new feature called MSM Limiter by which you change governors,frequency for each core I will updload a modified 99lightning script by which you can control this feature
 
  • Like
Reactions: langeveld024

nikhil18

Senior Member
May 9, 2012
2,276
4,794
0
bangalore
ok guys reuploaded version 2 with modified 99lightning script to control msmlimiter
you have to modify these lines according to your needs


# MSM Limiter disabled by default, 384000/1512000 already coded in driver as default
echo 1 > /sys/kernel/msm_limiter/limiter_enabled
echo 384000 > /sys/kernel/msm_limiter/suspend_min_freq_0
echo 384000 > /sys/kernel/msm_limiter/suspend_min_freq_1
echo 384000 > /sys/kernel/msm_limiter/suspend_min_freq_2
echo 384000 > /sys/kernel/msm_limiter/suspend_min_freq_3
echo 810000 > /sys/kernel/msm_limiter/suspend_max_freq
echo HYPER > /sys/kernel/msm_limiter/scaling_governor_0
echo HYPER > /sys/kernel/msm_limiter/scaling_governor_1
echo HYPER > /sys/kernel/msm_limiter/scaling_governor_2
echo HYPER > /sys/kernel/msm_limiter/scaling_governor_3
echo 1512000 > /sys/kernel/msm_limiter/resume_max_freq_0
echo 1512000 > /sys/kernel/msm_limiter/resume_max_freq_1
echo 1512000 > /sys/kernel/msm_limiter/resume_max_freq_2
echo 1512000 > /sys/kernel/msm_limiter/resume_max_freq_3
# Amount of time in seconds to suspend after screen off
echo 10 > /sys/kernel/msm_limiter/suspend_defer_time
# Set to 1 for debug prints
echo 1 > /sys/module/msm_limiter/parameters/debug_mask


note-1 is to enable and 0 is to disable any feature in the kernel like hotplug,msmlimiter etc
 

phini

Senior Member
Apr 2, 2009
99
16
8
I came from XZ-v26 Kernel after flashing Version 2 of Lightning Kernel my Wifi is not able to connect to a network. It find all networks, but if I try to connect nothing happen. Can someone help me ?
Can you check if your WiFi MAC address has changed? It seems to be an issue for some people around here(including me), but I dont think there's a solution for that other than using another kernel(hodorkernel has problems with mac for me as well).
 

Diatomix98

Senior Member
Jun 24, 2012
681
382
93
Johor Bahru
Hi everyone, i have brief question. Why i cant underclock it?

Sent from my C6603 using XDA Free mobile app
Did you even look at the posts above you? Goshhh

I disabled the msm limiter and now the frequency sticks since Im too lazy to adjust the value one by one in msm limiter.
 
Last edited:

langeveld024

Senior Member
Jun 7, 2012
1,720
805
113
Hi everyone, i have brief question. Why i cant underclock it?

Sent from my C6603 using XDA Free mobile app
Are u using latest version? I do not have any underclock issue.. Underclocked to min 270 Max 1350 and it sticks as it should.
Although I have renamed mpdecision to mpdecision.old in system/bin/ so u could try that and see if it work's

---------- Post added at 11:51 AM ---------- Previous post was at 11:49 AM ----------

Can you check if your WiFi MAC address has changed? It seems to be an issue for some people around here(including me), but I dont think there's a solution for that other than using another kernel(hodorkernel has problems with mac for me as well).
Yes I have this also, but for me it's not a problem. Love this kernel
 

nikhil18

Senior Member
May 9, 2012
2,276
4,794
0
bangalore
Oh, ok. For me, it's a big problem, because I cant connect to wifi at work - security. Would love to use this kernel, but cant. Bad luck, I guess.
try this to get your original mac

su
mac-update
mv /system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin /system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin.old

cp /data/misc/wifi/prima/WCNSS_qcom_wlan_nv.bin /system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin

You should try this if you have already connected to wifi on stock kernel
 
  • Like
Reactions: phini

langeveld024

Senior Member
Jun 7, 2012
1,720
805
113
Oh, ok. For me, it's a big problem, because I cant connect to wifi at work - security. Would love to use this kernel, but cant. Bad luck, I guess.
Hmm okay, maybe u can try replacing the WiFi module's from a kernel with know correct Mac address?

(Modules flashed with this kernel are: system/lib/modules/wlan.ko and system/etc/firmware/wlan/prima/wcnss_cfg.dat + wcnss_qcom_wlan_nv.bin)

I don't know but at least u can backup and give it a try :D
 
  • Like
Reactions: phini

phini

Senior Member
Apr 2, 2009
99
16
8
try this to get your original mac

su
mac-update
mv /system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin /system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin.old

cp /data/misc/wifi/prima/WCNSS_qcom_wlan_nv.bin /system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin

You should try this if you have already connected to wifi on stock kernel
Thank you for your suggestion, but I've already tried that - I don-t have "/data/misc/wifi/prima" directory.

--
langeveld024, thanks, I'll try it when I get back home.
 

nikhil18

Senior Member
May 9, 2012
2,276
4,794
0
bangalore
try this to get your original mac

su
mac-update
mv /system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin /system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin.old

cp /data/misc/wifi/prima/WCNSS_qcom_wlan_nv.bin /system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin

You should try this if you have already connected to wifi on stock kernel
Hmm okay, maybe u can try replacing the WiFi module's from a kernel with know correct Mac address?

(Modules flashed with this kernel are: system/lib/modules/wlan.ko and system/etc/firmware/wlan/prima/wcnss_cfg.dat + wcnss_qcom_wlan_nv.bin)

I don't know but at least u can backup and give it a try :D
Don't try to replace modules or this file wcnss_cfg.dat but you can try the above method manually which involves this file wcnss_qcom_wlan_nv.bin because some users in zl forum said that it works

Thank you for your suggestion, but I've already tried that - I don-t have "/data/misc/wifi/prima" directory.
See if you find this directory on stock when you have connected to wifi network or final method is not to flash this file wcnss_qcom_wlan_nv.bin just delete it from kernel zip before flashing
 
Last edited:
  • Like
Reactions: phini

langeveld024

Senior Member
Jun 7, 2012
1,720
805
113
Don't try to replace modules or this file wcnss_cfg.dat but you can try the above method manually which involves this file wcnss_qcom_wlan_nv.bin because some users in zl forum said that it works



See if you find this directory on stock when you have connected to wifi network or final method is not to flash this file wcnss_qcom_wlan_nv.bin just delete it from kernel zip before flashing
I did before, but I don't have the /prima/ folder in /data/misc/wifi/.
I only have /sockets/ and /wpa_supplicant/ folder's there and a few file's.

---------- Post added at 12:39 PM ---------- Previous post was at 12:30 PM ----------

Thank you for your suggestion, but I've already tried that - I don-t have "/data/misc/wifi/prima" directory.

--
langeveld024, thanks, I'll try it when I get back home.
Do not replace them, as nikhil18 said. Better reflash stock ,connect to WiFi and do as nikhil18 said.
Backup the file or delete the file from zip :thumbup:

---------- Post added at 12:42 PM ---------- Previous post was at 12:39 PM ----------

@nikhil18
BTW could u perhaps add simple GPU governor? Sometimes having unresponsive touchscreen when trying to unlock but I never experienced that when using simple GPU gov.
 
  • Like
Reactions: phini