This kernel is based on TeamCanjica/3.0.101 branch and much credit goes to them for doing this
However not everything from TC kernel is there. I'm not happy with the new liveopp algorithm. Also there's no ddr oc as one can get hurt with this now (/data fs corruption). When @ChronoMonochrome improves the implementation, maybe I'll merge it.
Compatibility:
I suspect it should work fine for any CM-11.0 based rom. If someone tests it, I'll add info here
- Stock
- Vanir
- Carbon
- CM11
- CM10.1
- CM10.2
- CM12.1 until I get a proper ramdisk, I don't support this config, besides reboot/poweroff doesnt work on it.
For version r6 you don't need to flash extra ramdisk - it contains all previously gathered ramdisks and uses the right one based on /system/build.prop file - checks ro.build.version.sdk (https://github.com/mkaluza/Samsung_STE_Kernel/blob/master/usr/u8500_initramfs_files/init#L22)
Changes:
Kernel (https://github.com/mkaluza/Samsung_STE_Kernel/commits/3.0.101)
[r5] Full changelog
WARNING - if you have some custom uv/oc, disable it first, as now you'll be using different Vbbx by default (original one). Test your oc/uv again for stability and correct if necessary, or restore Vbbx from your uv script first:
Code:
for f in /sys/kernel/liveopp/arm_step0*; do echo vbbx=0xcc > $f; done
btw novathor settings interfere with mali UV, so I removed them completely from my phone (can't be disabled - unfortunately for them )
Download:
MediaFire all releases
A bonus - a modified torch with high power option - I was always pissed with having to use novathor settings for this...
Install:
Flash update.zip with CWM
Loading modules
There are a few ways to load modules depending on how important those modules are:
1. add module name to /system/etc/modules file (create it if it doesn't exist). Add a name without extension (like cpufreq_lionheart or logger)
(TODO: handle /data/etc/modules as well)
Those modules will be loaded just after /system is mounted
2. use KoControl app (or similar) - those modules will be loaded when system starts up, so use it only for unimportant modules
3. copy it to one of initramfs overlay/modules directory: /efs/common/overlay/modules, /efs/boot/overlay/modules, /efs/recovery/overlay/modules - these modules will be loaded before init even starts - it's useful for filesystem modules like f2fs
Dynamic governor documentation
Since it has many params that depend on each other, some doc is needed:
Dynamic governor documentation
It's a work in progress, so it'll be gradually improved. You can improve the improvement process by letting me know that you use it and whether you like it or not If "not" - then tell me why, maybe something can be done about it. Although it's unlikely that I'll accept feature requests unless I find it useful for myself, feel free to fork the kernel and modify it
LVM
Before anything else, read those and all the stuff those posts tell you to read:
https://www.howtoforge.com/linux_lvm
http://forum.xda-developers.com/nexus-s/general/howto-combined-emulated-storage-nexus-s-t2848752
http://forum.xda-developers.com/nexus-s/general/howto-partitioning-nexus-s-using-lvm-t1656794
http://www.xda-developers.com/android/bypass-nexus-s-storage-restrictions/
If you don't understand something, keep reading. If you still don't understand, leave it for now - It's for your safety.
Later I'll add SGA specific stuff how to make use of our empty /preload partition and get more free space on /data
NFC
The kernel has nfc modules available, so in theory it should work - you just need to load them as described in section on modules.
Load pn544 and/or pn547. You also need nfc-enabled rom (If it doesn't work, then I don't know what else... don't have nfc to test it)
Upgradeable ramdisk
See this file, it tells all the story
https://github.com/mkaluza/Samsung_STE_Kernel/blob/master/usr/u8500_initramfs_files/init
I'll add some comment later
Troubleshooting:
- my wifi isn't working
- TODO: how to report errors to make the difference
XDA:DevDB Information
MK Kernel [3.0.101], Kernel for the Samsung Galaxy S Advance I9070
Contributors
mkaluza
Source Code: https://github.com/mkaluza/Samsung_STE_Kernel
Kernel Special Features: LVM, new dynamic governor, automatic voltage calculation, 630 MB ram
Version Information
Status: Stable
Current Stable Version: r6.0.0.
Stable Release Date: 2015-06-05
Created 2014-12-19
Last Updated 2015-06-05
Thanks to @Reinkaos for beta testing
His report:
Reinkaos said:
OK so here's a report, I use min 200mhz max 1000mhz, continuous usage with wifi on all the time from 100%-4%.
liveopp:
200 = 0x0c
300 = 0x0d
400 = 0x0e
500 = 0x1d
600 = 0x1f
700 = 0x20
800 = 0x21
900 = 0x28
1000 = 0x2c
mali (I use idx 1 and 5)
250mhz = 0x17
400mhz = 0x1b
From BBS dump:
Deep Sleep (): 2 h 15 m 16 s 43.3%
Awake (): 2 h 57 m 4 s 56.7%
Screen On (): 2 h 56 m 28 s 56.5%
Phone On (): 27 s 0.1%
Wifi On (): 2 h 54 m 2 s 55.7%
Wifi Running (): 2 h 54 m 55.7%
No Data Connection (): 5 h 12 m 21 s 100.0%
No or Unknown Signal (): 5 h 12 m 21 s 100.0%
Screen dimmed (): 2 h 56 m 28 s 56.5%
1 GHz (): 36 m 44 s 11.8%
900 MHz (): 8 m 18 s 2.7%
800 MHz (): 9 m 51 s 3.2%
700 MHz (): 11 m 17 s 3.6%
600 MHz (): 12 m 47 s 4.1%
500 MHz (): 14 m 30 s 4.6%
400 MHz (): 16 m 24 s 5.3%
300 MHz (): 5 m 37 s 1.8%
200 MHz (): 1 h 1 m 33 s 19.7%
Deep Sleep (): 2 h 15 m 16 s 43.3%
Just to compare, here are the last 2 test that I did on previous kernel, with the same usage pattern, on interactive:
1
Deep Sleep (): 3 h 52 m 51 s 57.9%
Awake (): 2 h 49 m 36 s 42.1%
Screen On (): 2 h 47 m 57 s 41.7%
Wifi On (): 2 h 43 m 41 s 40.7%
Wifi Running (): 2 h 43 m 39 s 40.7%
No Data Connection (): 6 h 42 m 28 s 100.0%
No or Unknown Signal (): 6 h 42 m 28 s 100.0%
Screen dark (): 2 h 47 m 57 s 41.7%
1 GHz (): 45 m 25 s 11.3%
800 MHz (): 8 m 23 s 2.1%
600 MHz (): 46 m 31 s 11.6%
400 MHz (): 9 m 22 s 2.3%
200 MHz (): 59 m 54 s 14.9%
Deep Sleep (): 3 h 52 m 51 s 57.9%
2
Deep Sleep (): 3 h 58 m 48 s 60.6%
Awake (): 2 h 35 m 12 s 39.4%
Screen On (): 2 h 34 m 32 s 39.2%
Wifi On (): 2 h 32 m 1 s 38.6%
Wifi Running (): 2 h 32 m 38.6%
No Data Connection (): 6 h 34 m 1 s 100.0%
No or Unknown Signal (): 6 h 34 m 1 s 100.0%
Screen dark (): 2 h 34 m 32 s 39.2%
1 GHz (): 33 m 4 s 8.4%
800 MHz (): 9 m 27 s 2.4%
600 MHz (): 49 m 48 s 12.6%
400 MHz (): 9 m 42 s 2.5%
200 MHz (): 53 m 9 s 13.5%
Deep Sleep (): 3 h 58 m 48 s 60.6%
No random reboots. I'm not sure about how fast screen turned on when receiving a call though, since I never pay attention to it in the previous kernel, so can't really compare.
And mtp doesn't work, not sure if that's on my side.
Anyway those dynamic tunables, is there any doc or explanation of each? Will definitely play around with it. Gonna test it again today to see if I ran into problems. Haven't had any problems yet, so far so good :good:
Click to expand...
Click to collapse
mkaluza said:
Thanks to @Reinkaos for beta testing
Click to expand...
Click to collapse
No problem, glad I could help
mkaluza said:
This kernel is based on TeamCanjica/3.0.101 branch and much credit goes to them for doing this
Compatibility:
I use it with Vanir ROM and I don't know how/if it'll work on other roms, but I suspect it's fine for any CM-11.0 based rom. If someone tests it, I'll add info here
Changes:
Ramdisk (https://github.com/mkaluza/ste-ramdisk-vanir/commits/master):
- don't turn zram swap by default (can be turned on via init.d) - it just eats cpu and rarely gives
- removed cm performance profiles - they interfere with init.d/setcpu
- run adb as root by default - it annoyed me to constantly type su, esp. that this su version is a bit lame and su -c "command" doesnt work
Kernel (https://github.com/mkaluza/Samsung_STE_Kernel/commits/3.0.101)
- more liveopp freqs 100-1000 with 100 MHz step
- improved liveopp and mali_boost algorithms (compared to original Vanir Kernel, which is by Team-Exhibit)
- Dynamic cpufreq governor (my design) - brings good performance and battery life together. It's a part of Project Zen (GitHub)
- LiveOPP automatic voltage calculation based on AVS data - It should reduce probability of random reboots, but beware - if you have some custom uv/oc, disable it first, as now you'll be using different vbbs by default (original one). Test your oc/uv again for stability and correct if necessary
- killed u8500 hotplug - it caused problems with audio and didn't bring any more battery time
- disabled highmem - it's not needed with only 768 MB RAM
- added Joel RCU
As a bonus - a modified torch with high power option - I was always pissed with having to use novathor settings for this...
btw novathor settings interfere with mali UV, so I removed them completely from my phone (can't be disabled - unfortunately for them )
However not everything from TC kernel is there - I didn't like the new liveopp algorithm. Also there's no ddr oc as one can get hurt with this when used badly...
Download:
MediaFire
Install:
No update zip for now (if somebody want's to create it then by all means do)
Flash zImage with either Universal Kernel Flasher or just dd:
Code:
dd if=zImage of=/dev/block/mmcblk0p15
unpack modules.zip to /system/lib/modules/
Source:
GitHub
XDA:DevDB Information
MK Kernel [3.0.101], Kernel for the Samsung Galaxy S Advance I9070
Contributors
mkaluza
Kernel Special Features:
Version Information
Status: Stable
Current Stable Version: r1
Stable Release Date: 2014-12-19
Created 2014-12-19
Last Updated 2014-12-19
Click to expand...
Click to collapse
Wi-fi isn`t working properly. After 1 or two reboots, I can`t switch wi-fi to on . ( commonly problem seen before on other builds )
pictorul20 said:
Wi-fi isn`t working properly. After 1 or two reboots, I can`t switch wi-fi to on . ( commonly problem seen before on other builds )
Click to expand...
Click to collapse
It happens when there's kernel-module mismatch - have you extracted modules.zip into right place? check this again... It works fine for me and @Reinkaos. What does dmesg say just after you try to enable wifi?
There might be some subtle problem with this kernel that is causing random reboots from time to time. For now set your deepest sleep state to 4 (it defaults to 5 now), as I suspect this might be the cause (I removed all oc/uv and mali stuff and it still happens, now testing deepsleep=4).
If a reboot happens, save /proc/last_kmsg somewhere and look for "Unhandled fault: imprecise external abort (0x1c06)". Actually every time a crash happens, save last_kmsg You can use this init.d script to collect it at every system startup (saves them to /data/local/log/last_kmsg
mkaluza said:
There might be some subtle problem with this kernel that is causing random reboots from time to time. For now set your deepest sleep state to 4 (it defaults to 5 now), as I suspect this might be the cause (I removed all oc/uv and mali stuff and it still happens, now testing deepsleep=4).
If a reboot happens, save /proc/last_kmsg somewhere and look for "Unhandled fault: imprecise external abort (0x1c06)". Actually every time a crash happens, save last_kmsg You can use this init.d script to collect it at every system startup (saves them to /data/local/log/last_kmsg
Click to expand...
Click to collapse
sorry, I might said that wrong. I wanted to say that I don-t have wi-fi network at all. I can-t switch it on at all from settings menu. any help would be more than welcome. Ohh, and one last thing. U seem to always do a great job when it comes to " under the hood" customisation and enhanced features . Good work .
pictorul20 said:
sorry, I might said that wrong. I wanted to say that I don-t have wi-fi network at all. I can-t switch it on at all from settings menu. any help would be more than welcome.
Click to expand...
Click to collapse
You said it right and my response is probably correct - you try to tap the wifi button or turn it on in settings and either it turns on for a very brief moment or not at all. That's a sign of module-kernel mismatch. Check again if you extracted those modules (or even better, just do it) - your old modules from vanir won't work with this kernel, there are too many changes.
I'll try to make update.zip later to make install easier.
pictorul20 said:
Ohh, and one last thing. U seem to always do a great job when it comes to " under the hood" customisation and enhanced features . Good work .
Click to expand...
Click to collapse
Thank you
mkaluza said:
You said it right and my response is probably correct - you try to tap the wifi button or turn it on in settings and either it turns on for a very brief moment or not at all. That's a sign of module-kernel mismatch. Check again if you extracted those modules (or even better, just do it) - your old modules from vanir won't work with this kernel, there are too many changes.
I'll try to make update.zip later to make install easier.
Thank you
Click to expand...
Click to collapse
U`re welcome., and yess that-s exactly the problem I`m facing. It`s not quite a hazardous problem but it-`s just a bug somewhere in the kernel probably. It happens. And one last question, first time I had overwrited the modules to the sistem folder ( that-s when i saw 4 the 1st time that my wi-fi isn-t responding at all ) , then ........ I thought I might delete all the modules from lib/modules to prevent any incompatibility with the copyed ones. Now my question is : Everytime i-m installing cm 11 roms or vanir rom , Do I have to copy/paste modules and overwrite them to lib/modules folder, or do I have to wipe all content inside of that folder and only after that paste the modified modules that you posted in this thread?
L.E :. I can-t switch from internal to external also usb connection doesn-t work in windows ( can-t access my internal / external storage from usb cable )even with proper usb drivers installed )
pictorul20 said:
U`re welcome., and yess that-s exactly the problem I`m facing. It`s not quite a hazardous problem but it-`s just a bug somewhere in the kernel probably. It happens. And one last question, first time I had overwrited the modules to the sistem folder ( that-s when i saw 4 the 1st time that my wi-fi isn-t responding at all ) , then ........ I thought I might delete all the modules from lib/modules to prevent any incompatibility with the copyed ones.
Click to expand...
Click to collapse
That shouldn't matter. What "lsmod" says? what happens when you do "modprobe dhd". If it shows some error, do "modprobe dhd; dmesg | tail -n 50" and pm me the output.
pictorul20 said:
Now my question is : Everytime i-m installing cm 11 roms or vanir rom , Do I have to copy/paste modules and overwrite them to lib/modules folder, or do I have to wipe all content inside of that folder and only after that paste the modified modules that you posted in this thread?
Click to expand...
Click to collapse
Overwrite should be enough and yes, you have to do it every time you reinstall rom
pictorul20 said:
L.E :. I can-t switch from internal to external
Click to expand...
Click to collapse
I don't understand...
pictorul20 said:
also usb connection doesn-t work in windows ( can-t access my internal / external storage from usb cable )even with proper usb drivers installed )
Click to expand...
Click to collapse
Ok, than MTP is screwed. I never use it so I didn't see it, and @Reinkaos wasn't sure if it's the kernel or his phone, but now we know it's the kernel.
@mkaluza it would be great if you make a stock kernel too, since cocafe has almost stopped to support our device
Most of us are on stock JB but it would be really nice if you implement a stock kernel that can enhance the performance of our phone
Hoping you'll do it
@pictorul20 I just remembered something - apart from modules mismatch there was some problem with I think firmware paths, but I haven't got slightest idea what was it... @Reinkaos any thoughts?
The funny thing is - I flashed boot.img from original vanir nightly (and copied modules) and wifi ISN'T WORKING After flashing my kernel (not my particular source - just any one build on my machine) it works
I can remember having once the reverse problem (it wasn't working on my kernel) - I know I fixed it somehow and never had it again. I haven't noticed that wifi stopped working on dist kernel because I never again used one...
DAMN... I know it was something simple to do, but hard to find... Anyone? @cocafe maybe you can remember?
Guys, what does command find /system -iname "*bcm*" show?
For me it's this:
Code:
/system/bin/bcm4330.hcd
/system/etc/wifi/bcmdhd_apsta.bin
/system/etc/wifi/bcmdhd_mfg.bin
/system/etc/wifi/bcmdhd_p2p.bin
/system/etc/wifi/bcmdhd_sta.bin
/system/vendor/firmware/fw_bcmdhd.bin
/system/vendor/firmware/fw_bcmdhd_apsta.bin
jadega said:
@mkaluza it would be great if you make a stock kernel too, since cocafe has almost stopped to support our device
Most of us are on stock JB but it would be really nice if you implement a stock kernel that can enhance the performance of our phone
Hoping you'll do it
Click to expand...
Click to collapse
But there's actually not much more to be done Cocafe's kernel is very good. It's actually very similar to 3.0.101 kernel in terms of features. As for power/performance, when dynamic gov is field tested a bit more, I'll merge it and send a pull request to Cocafe. There's no point in keepeng two kernels...
Another thing is, for all of you still on JB - install Vanir. It's ****in awesome. Stable, fast and doesn't drain batt. And when issues with wifi are solved, it'll be even better I'm happy with the speed even on JIT, and on ART it's even faster (I don't use it not because it's unstable, but because while developing performance features I want to be able to see any improvements, and it's hard below some threshold )
mkaluza said:
@pictorul20 I just remembered something - apart from modules mismatch there was some problem with I think firmware paths, but I haven't got slightest idea what was it... @Reinkaos any thoughts?
The funny thing is - I flashed boot.img from original vanir nightly (and copied modules) and wifi ISN'T WORKING After flashing my kernel (not my particular source - just any one build on my machine) it works
I can remember having once the reverse problem (it wasn't working on my kernel) - I know I fixed it somehow and never had it again. I haven't noticed that wifi stopped working on dist kernel because I never again used one...
DAMN... I know it was something simple to do, but hard to find... Anyone? @cocafe maybe you can remember?
Guys, what does command find /system -iname "*bcm*" show?
For me it's this:
Code:
/system/bin/bcm4330.hcd
/system/etc/wifi/bcmdhd_apsta.bin
/system/etc/wifi/bcmdhd_mfg.bin
/system/etc/wifi/bcmdhd_p2p.bin
/system/etc/wifi/bcmdhd_sta.bin
/system/vendor/firmware/fw_bcmdhd.bin
/system/vendor/firmware/fw_bcmdhd_apsta.bin
Click to expand...
Click to collapse
I have no idea, does different firmware had anything to do with it?
Anyway, here's mine
Code:
/system/bin/bcm4330.hcd
/system/etc/wifi/bcmdhd_apsta.bin
/system/etc/wifi/bcmdhd_mfg.bin
/system/etc/wifi/bcmdhd_p2p.bin
/system/etc/wifi/bcmdhd_sta.bin
/system/vendor/firmware/fw_bcmdhd.bin
/system/vendor/firmware/fw_bcmdhd_apsta.bin
@pictorul20 one more thing - can you make sure permissions on modules are 644? because that's what caused wifi not to work (I extracted modules from zip file with total commander to sd card, where default perms are 770), and when I copied them to /system/lib/modules, they remained that way and that was the problem.
mkaluza said:
@pictorul20 one more thing - can you make sure permissions on modules are 644? because that's what caused wifi not to work (I extracted modules from zip file with total commander to sd card, where default perms are 770), and when I copied them to /system/lib/modules, they remained that way and that was the problem.
Click to expand...
Click to collapse
So, I need each module file to set with 644 permission, right? I`ll try and report back if that solved the problem. Thanks
pictorul20 said:
So, I need each module file to set with 644 permission, right? I`ll try and report back if that solved the problem. Thanks
Click to expand...
Click to collapse
Maybe just flash the update.zip from post #1 - it should fix everything and if not, I'll give you instructions how to debug that stuff.
mkaluza said:
Maybe just flash the update.zip from post #1 - it should fix everything and if not, I'll give you instructions how to debug that stuff.
Click to expand...
Click to collapse
I flashed this kernel on my slimsaber and wifi doesn't work.
If can help log just says WifiStateMachine E: Failed to load driver
Wifi problem debugging
hastalafiesta said:
I flashed this kernel on my slimsaber and wifi doesn't work.
If can help log just says WifiStateMachine E: Failed to load driver
Click to expand...
Click to collapse
Yes it does. Logcat is important - it's good you checked there. We'll try to make it compatible with other roms, but you must help me debug it, ok?
@pictorul20 - can you do those steps too?
(all the stuff below has to be done via adb as root). copy/paste all commands, because all the quotes there are important and it's easy to make a mistake
Code:
cd /system/lib/modules
ls -l
check that all modules have 644 permissions (rw-r--r--)
Code:
lsmod
It should say something (for me it's). If nothing is shown, continue anyway (but tell me about it).
bthid 4267 0 - Live 0x00000000
param 10593 0 - Live 0x00000000 (P)
j4fs 66945 1 - Live 0x00000000 (P)
Click to expand...
Click to collapse
Code:
insmod /system/lib/modules/dhd.ko
lsmod
It should not return an error and lsmod should then contain a line similar to this
dhd 430856 0 - Live 0x00000000
Click to expand...
Click to collapse
if however it return some error, do this and send me the output and the error
Code:
insmod /system/lib/modules/dhd.ko; dmesg | tail -n 20
If so far everything is fine, it's time for hacky stuff now
Code:
rmmod dhd
mkdir /tmp/strace
cd /proc/`pidof system_server`/task
for p in `grep -i wifi */comm | cut -f 1 -d '/'`; do n=`cat $p/comm`; strace -tt -p $p -o/tmp/strace/${n}.strace& done
then tap wifi button in quick settings at least twice (not too fast - wait at least 1 sec) and then
Code:
killall strace
zip -r /mnt/sdcard/wifi.strace1.zip /tmp/strace
if you want to look for an error, do
Code:
cd /tmp/strace
grep "= -" *.strace
this will show all failed syscals with (hopefully) some useful info. If it helps you solve the problem, than ok (share it here), if not, continue
Code:
mkdir /tmp/strace2
strace -ff -tt -p `pidof system_server` -o /tmp/strace2/system_server
tap the wifi button as before and press Ctrl-C to kill the command above
Code:
zip -r /mnt/sdcard/wifi.strace2.zip /tmp/strace2
Mail me (mk at flex.pm) both wifi.strace*.zip files from the root of your internal memory.
@mkaluza
EDIT: I messed up with modules for various tests, i restored the original modules, followed your guide and all went fine.
WIFI works with this! Thanks for your work, till now kernel works pretty well.
Just tried the r3 (630mb) and all is good and very smooth.
Related
Rom cookers: if you include this module in your ROM, please make a link to this post in your release post, so your users can know how to work with it and update the module themselves
Intro: (dev post)
Since the X10 kernel is working, we might have a hope that someday we will have our custom kernels. If we can have custom kernels, we can do the overclocking easily.
Until that day, we will still have to overclock with modules. To make overclocking works with our current kernel, as far as I can see, we need to do the following things:
1. Patch cpufreq data to change maximum reported freq (these value will be read by Android for further controls). cpufreq will then call the low-level acpuclock functions to change real cpu freq.
2. Patch acpuclock data + code to change real cpu freq.
Right now I'm working a proof-of-concept module, with finished 1 and half of 2. I will need to patch acpuclock code in the running kernel to make the frequency applicable.
That means, right now, Android reported that I have a 800MHz MSM7227, although it's running at 600MHz, and cpufreq's governor accepts to change to the maximum 800MHz (it's 600MHz for real). We will need to patch acpuclock code to change PLL and apply the correct divisor.
Source on github : https://github.com/doixanh/X8Features
Release history
April 11. v004. Default to 691MHz. Multiple frequencies are available for SetCPU: from 614MHz to 826MHz. You can now change frequencies with SetCPU - much like with custom kernels! You can even SetCPU freq at boot.
April 07. v003. Compatible with SetCPU. Easier for code maintenance.
April 06. v002 for mini pro. x8oc module for x10 mini pro released! Be warned: I didn't have your x10mini pro hardware so I didn't test it throughoutly.
April 06. v002 for mini. x8oc module for x10 mini released! Be warned: I didn't have your x10mini hardware so I didn't test it throughoutly. 710MHz was reported not too stable. A lower freq is more stable.
April 06. v002. Experimental! It maybe very unstable! Undervoltage for all frequencies except the max freq (Reduced voltages for 128MHz, 245MHz, 320MHz, 480MHz). This can potentially save battery. I need test results for saving battery from you guys
April 05. v001. Default to 710MHz.
Requirements:
- Rooted
- Baseband x15
- xRecovery (for automatic installtation)
- Dare!
Installation:
a. Manual installation : it will be better if you can do this way.
- Download appropriate x8oc-vXXX.zip (for X8), or x8oc-vXXX-x10m.zip (for X10 mini), or x8oc-vXXX-x10mp.zip (for x10 mini pro) below, unzip
- Remount /system as rw
- Push x8oc.ko in to /system/lib/modules
- Edit /system/etc/hw_config.sh, add one line at the beginning
Code:
insmod /system/lib/modules/x8oc.ko # x8 overclock
For people who want to set specific freq at boot, write the following instead of the code above:
Code:
# x8 overclock
insmod /system/lib/modules/x8oc.ko
sleep 2
echo xAB > /proc/x8oc
Where AB is your desired code for that frequency. Test the frequency carefully before applying it at boot!
(you can edit hw_config.sh by pulling it to your PC, edit, and push it back)
- Reboot your phone
b. Automatic installation : much like x8gesture, I will have to prepare update.zip for each ROM. I'm pretty busy now, so be patient.
General instruction
- When you install x8oc, SetCPU will not recognized the new max frequency. Don't touch the slide and/or change the governor. If you do that, the new frequency will be lost. You will have to reboot your phone to get the new freq.
- For geeks only: it is possible to change maximum frequency after you install x8oc. With following command, you can replace AB to other values to change max freq:
Code:
echo xAB > /proc/x8oc
20 to change to 614MHz
21 to change to 634MHz
22 to change to 653MHz
23 to change to 672MHz
24 to change to 691MHz
25 to change to 710MHz
26 to change to 730MHz
27 to change to 749MHz
For example, set to 749MHz:
Code:
echo x27 > /proc/x8oc
This feature still works with v004
Somebody asked about the meaning of AB above. If you look at the source you will understand
In short :
- AB is stored in hexadecimal
- Max frequency = AB (in decimal) * 19.2MHz
Example:
AB = 27 means AB = 0x27 = 39 (in decimal)
Real frequency = 39*19.2 = 748.8 MHz
You can put 28, 29, for even higher frequency... but I don't recommend to do that. It was unstable for me.
x10 mini / x10 mini pro users:
Support for x10 mini / x10 mini pro has been added since 06-04-11. However, I don't have your hardware so you must test this module before install it:
- Push x8oc.ko to /system/lib/modules
- Run the following command
Code:
insmod /system/lib/modules/x8oc.ko
If the phone is still working, no crash, no black screen, then it works.
Until you're sure that it works with your hardware, don't install it to hw_config.sh or you will get boot loops and may severely damage your hardware
Disclaimer
This module is dangerous! It may cause severe damage to your hardware. I'm not responsible if this module kills your lovely phone. Use it at your own risk!
Donations are welcome
PLEASE DON'T SPAM IN THIS THREAD WITH UNCONTRIBUTED POSTS.
Can you share the source code of your module?
I was too lazy to build a separated module for OCing Everything is a mess inside my current x8gesture module
I'll try to do something more and then separate OC into a new module.
info about MSM7227 CPU:
http://pdadb.net/index.php?m=cpu&id=a7227&c=qualcomm_msm7227
Holy sh*t. They included bunches of controllers inside this MSM 7227
Max. 800MHz Qualcomm MSM7227 Turbo, Embedded 320MHz DSP (GSM, GPRS/EGPRS Multislot Class 12, EDGE, UMTS Release 6, 7.2 Mbps HSDPA, HSUPA 5.76 Mbps, MBMS baseband), 400MHz modem processor, Adreno 200, OpenGL ES 2.0, OpenGL ES 1.1, OpenVG 1.1, EGL 1.3, Direct3D Mobile, SVGT 1.2, DirectDraw,
Click to expand...
Click to collapse
Is there anyway to enable that turbo mode by moding? It must be locked somewhere, the safe clock is 600mhz, but it might run 800mhz or more stable too, might be battery draining issue, or overvoltage necessity but with scaling that should not be a real issue, if only used to extreme situations, and, for a bit of time.
f.e. Samsung Galaxy Ace has same CPU and it run at 800Mhz
This is a great project and it looks very promissing.
ZTE Blade has same cpu and they had problems overclocking just the main core, but in the end they solved it, I guess you could take a look at their solution as well.
And thanks again for the dualtouch module.
I read many overclocked kernel sources for MSM7227 in difference devices. What they did was to modify acpuclock.c :
1. add new freqs to freq_table
2. add new freqs to clkctl_acpu_speed arrays
3. modify acpuclk_set_div to set PLL for overclocked freqs
Because acpuclock is initialized very early during boot process, cpufreq (initialized much later) will read those available freqs from acpuclock to apply to its governors.
In our case, because we cannot modify acpuclock in the kernel before it's initialized, our module will be loaded much later than both acpuclock and cpufreq. Therefore, my approach is to modify (inline patch) both acpuclock and cpufreq in memory, while the kernel is running.
So far, as mentioned in OP, I modified cpufreq and acpuclock data (as in 1. and 2.), so that Android thinks that max freq is set at 800MHz. We will have to do some inline memory patches to acpuclock function to change PLL for freqs more than 600MHz during runtime. More precisely, we need to patch acpuclk_set_div function.
I did a quick study about ARM instruction set, looked for branch (and branch with links) instructions. I managed to redirect calls to acpuclk_set_div to my own function in module, so that acpuclock_set_rate calls to my function, instead of the original one. However, it seems that the param received by my function is always NULL.
Looking for reasons and solutions. Any suggestions?
@racht: no, we thank you for your hard work in your Hackdroid ROMs.
It seems that I made a mistake. acpuclk_set_div was not separated as a function. Instead, the compiler included it in the caller function (acpuclk_set_rate). This will be a big big big problem for us to hijack the call.....
Hope everything works out! 200mhz is a big jump
Can u share your sources?
Maby i can help you
Sent from my U20i using XDA Premium App
I will need to rewrite the module, because everything is placed in my x8gesture I will do it soon.
The initial commit is pushed to github at : https://github.com/doixanh/X8Overclock
All contributions are welcome.
as an example of omap3
http://code.google.com/p/milestone-overclock/
This project consists of a kernel module for OMAP3 phones with Android to unlock any processor frequency/voltage combination and a companion graphical app to ease the configuration. The phone must be rooted so that the kernel module can be loaded.
The module has an interface in /proc/overclock/* that allows enabling and disabling of overclock in runtime without rebooting. No flashing of custom roms or kernels is needed, since that is not even possible with the Milestone, Droid X and others.
andrej456 said:
as an example of omap3
http://code.google.com/p/milestone-overclock/
This project consists of a kernel module for OMAP3 phones with Android to unlock any processor frequency/voltage combination and a companion graphical app to ease the configuration. The phone must be rooted so that the kernel module can be loaded.
The module has an interface in /proc/overclock/* that allows enabling and disabling of overclock in runtime without rebooting. No flashing of custom roms or kernels is needed, since that is not even possible with the Milestone, Droid X and others.
Click to expand...
Click to collapse
Thats good idea but edit is needed because X8 does not have 1,2 processor
EDIT: With 800 processor thats so close x10 1000 processor,cant imagine how fast x8 will be
as-mario said:
Thats good idea but edit is needed because X8 does not have 1,2 processor
EDIT: With 800 processor thats so close x10 1000 processor,cant imagine how fast x8 will be
Click to expand...
Click to collapse
to not fit in the x8, but the wiki to be useful
if we take this as an example you can write a module
sorry for my english
It seems that my approach is like milestone-overclock. Their CPU is different, but we can know that we're having a good direction.
Good news: I managed to hijack calls to acpuclk_set_rate (the function contains acpuclk_set_div). This way, we can write our own set_rate and set_div function.
Destination is not too far away
YES, YES and YES! It's running at 684MHz! Will upload a screenshot soon!
This below screenshot is taken at 710MHz with only CPU test
It seems that our CPU is not stable above 748MHz.
Hi,
Here a release of kboot.
Kboot permit to boot multiple os with different kernel.
It's based on a buildroot environment.
The source to make your own kboot filesystem are available here
The kernel source are available here
You can download the install archive :
ARCHIVE VERSIONS
0.0. Unstable release. Freeze bug. Install release ARCHIVE (Obsolete)
0.1. Fix freeze. Python bytecode generation (pyc files) is naturally not friend with squashfs. Install release ARCHIVE (Obsolete)
0.2. STABLE Release. Display timeout, migration from squashfs to initramfs. Install release ARCHIVE
The archive looks like :
zImage and initramfs.cpio.gz to flash in SDE menu
a directory kboot which contain:
conf directory : configuration file
os directory : os to boot
images directory : background menu image
Installation
Kboot directory
Copy the kboot directory on your archos in /mnt/storage/, you should have this path /mnt/storage/kboot. The path should be exactly the same otherwise kboot will not be launched
Flash zImage and initramfs.cpio.gz
Follow this link to setup SDE on your archos http://forum.xda-developers.com/showthread.php?t=930197
After Reboot
You should have the following screen. Note: after installing Kboot the device permanently reboot in Kboot.
The main menu will display the os put in os directory (see in Configuration OS boot menu to see how to include your os), advanced menu and halt.
Boot menu
OS boot menu
I have tried to make things simple. To add an OS, all you need is to create a directory in /mnt/storage/kboot/os/ and put in this newly created directory the files zImage and initramfs.cpio.gz.
Important, the name should be exactly zImage and initramfs.cpio.gz, if one file is missing or misnamed the menu item don't appear
For example, the menu above have the following content in /mnt/storage/kboot/os :
Code:
/mnt/storage/kboot/os/Android Froyo:
drwxrwxrwx 2 2000 2000 4096 Feb 27 23:42 .
drwxrwxrwx 5 2000 2000 4096 Feb 28 15:02 ..
-rw-rw-rw- 1 2000 2000 726520 Feb 27 23:39 initramfs.cpio.gz
-rw-rw-rw- 1 2000 2000 2564460 Feb 27 23:39 zImage
/mnt/storage/kboot/os/Android Honeycomb:
drwxrwxrwx 2 2000 2000 4096 Feb 27 16:46 .
drwxrwxrwx 5 2000 2000 4096 Feb 28 15:02 ..
-rw-rw-rw- 1 2000 2000 0 Feb 27 13:42 initramfs.cpio.gz
-rw-rw-rw- 1 2000 2000 0 Feb 27 13:42 zImage
/mnt/storage/kboot/os/UrukDroid 1.6:
drwxrwxrwx 2 2000 2000 4096 Feb 28 15:03 .
drwxrwxrwx 5 2000 2000 4096 Feb 28 15:02 ..
-rw-rw-rw- 1 2000 2000 2874800 Jan 3 19:41 initramfs.cpio.gz
-rw-rw-rw- 1 2000 2000 2302252 Jan 3 19:26 zImage
Note : for specific kernel you can add a file named cmdline containing kernel parameters
Advanced boot menu
Boot init : boot into android, if android kernel was uninstalled, this item didn't appear
Boot recovery : boot into recovery
Soft boot : For details about omap soft reboot see the discussion here
Configuration
There is a configuration file in kboot/conf directory named config.ini. This file is divided into 3 section
init
telnet : 1 to enable telnet, 0 to disable
usbip : set the ip address of usb ethernet interface
Code:
[init]
telnet = 1
usbip = 192.168.10.1
kboot
last_selection : enable (1) or disable (0) the boot by default of the last selectioned entry after a configured timeout
last_selection_timeout : timeout in second
softboot : enable or disable softboot menu
title_font_size : set the title font size
menu_font_size : set the menu font size
title_color : title color in r,g,b format
menu_item_color : menu unselected color in r,g,b format
menu_item_selected_color : menu selected color in r,g,b format
Code:
[kboot]
# boot last selection if no key pressed after 30 seconds
last_selection = 1
last_selection_timeout = 30
# enable soft boot menu (bootloader dev only)
softboot = 1
# some tuning
title_font_size = 36
menu_font_size = 32
# change the color, R,G,B format
title_color = 255,255,255
menu_item_color = 92,97,98
menu_item_selected_color = 0,0,255
softboot
item<n> : the boot sequence wanted
Code:
[softboot]
# put a list of items to display in Soft boot menu
# item<n> = sequence
item1 = uart,usb,mmc1,mmc2
item2 = uart,usb
item3 = mmc1,mmc2
background image
To customize the background image, just replace the file kboot/images/bkg.png with your own and adapt if necessary the size and the font color.
BUGS
Feedbacks are welcome
Cool stuff bro!
Unfortunately it's not working on the A70S, as we only have 800x480 and therefor need a diff picture.
It seems to be good.I have tested it on my A101 and it can boot both openaos and urukdroid.
Thanks.
EDIT:Sorry, Urukdroid cannot boot.It stay at the boot animationan and always show that.
fzelle said:
Unfortunately it's not working on the A70S, as we only have 800x480 and therefor need a diff picture.
Click to expand...
Click to collapse
As an early release I didn't take the time to put the different resolution. The background image have a 1500x1200 resolution, so on 101 it didn't display right too. However kboot adapt resolution for corresponding board. kboot didn't boot on 70s or display wrong the background image ?
MarsCarmen said:
EDIT:Sorry, Urukdroid cannot boot.It stay at the boot animationan and always show that.
Click to expand...
Click to collapse
I have to test urukdroid on mine.
The menu is not readable because the resolution adaption is not doing what it should do.
fzelle said:
The menu is not readable because the resolution adaption is not doing what it should do.
Click to expand...
Click to collapse
I have uploaded a new archive here.
Replace rootfs.squashfs with the new one. Fixed : resolution was wrong for 70S and 70H*.
The zImage in new archive should be flashed, it seems to fix the random freeze.
MarsCarmen said:
EDIT:Sorry, Urukdroid cannot boot.It stay at the boot animationan and always show that.
Click to expand...
Click to collapse
I have to say sorry again that Kboot can boot Urukdroid properly.It was because I copied my backup file to my archos by using MY PC.That is why I cannot boot urukdroid.Maybe I didn't find the real cause. I'm now using Kboot to boot Urukdroid and Openaos.
Really very well!!
Sorry For My Bad English
@alephzain:
Copied the whole kboot dir and flashed the new initrams and zimage.
Looks still as before.
fzelle said:
@alephzain:
Copied the whole kboot dir and flashed the new initrams and zimage.
Looks still as before.
Click to expand...
Click to collapse
. Kernel natively support usb gadget ethernet, when kboot is launched a telnetd is started, an interface usb0 is configured with ip address 192.168.10.1.
if you are on linux it should automatically detect this and on your pc an ifconfig let appear usb0 interface. On your pc type :
Code:
ifconfig usb0 192.168.10.2 netmask 255.255.255.0 up
telnet -l root 192.168.10.1
.
If you can paste a ps output, to see if it detect you board correctly.
Found a Live Linux to use in a vm.
ps output starts with :
{init} /bin/sh /init A70S 07 /dev/mmcblk1p1 /dev/mmcblk0p1
fzelle said:
Found a Live Linux to use in a vm.
ps output starts with :
{init} /bin/sh /init A70S 07 /dev/mmcblk1p1 /dev/mmcblk0p1
Click to expand...
Click to collapse
Its fixed now . Replace rootfs by this one
alephzain said:
Its fixed now . Replace rootfs by this one
Click to expand...
Click to collapse
Please adapt the first post also so that future users have the correct files.
Maybe add a version number....
---------- Post added at 04:27 PM ---------- Previous post was at 04:12 PM ----------
This may be a stupid question but why do you need a squashed fs that contains (when unsquashed) about 30Mb on files including python?
it should be possible to trim that down and put all the scripts and support libs in the initramfs so that you only need to flash the kernel and initramfs and nothing else.
Working now.
If now someone could come with the possibility for booting older stock FW,
would be great.
fzelle said:
Working now.
If now someone could come with the possibility for booting older stock FW,
would be great.
Click to expand...
Click to collapse
Not really possible because the stock firmware (initramfs) always uses the same location for the root file system.
You could do it but it needs some changes to the initramfs that is placed in the dirs.
wdl1908 said:
This may be a stupid question but why do you need a squashed fs that contains (when unsquashed) about 30Mb on files including python?
it should be possible to trim that down and put all the scripts and support libs in the initramfs so that you only need to flash the kernel and initramfs and nothing else.
Click to expand...
Click to collapse
Files on first post have been updated, but you're right a better presentation to avoid confusion is necessary.
Simply because I use python (pygame which use sdl) to code Kboot. Python lib dir is about 13M ... . A minimal filesystem (compressed initramfs) for kboot work is about 8M + ~2M for the kernel give 10M, and it's too big to flash in SDE max 8M. But if i can optimize the size ... I will do
alephzain thanks for the sources on gitorious, I hope I have some time in the weekend to try it out
divx118
@divx118:
And could you then make a initramfs.cpio.gz that direktly boots into CM7?
Hi,
im just about testing...
But sadly I can't get it to work.
Each time the menu starts up i can navigate nicely though the menues.
But whenever I select an entry - noting happens
After that I can still navigate ONCE (up or down) to the next entry and then the device freezes.
It doesn't matter wich entry i select as it seems. I tested Boot init, and my custom entries (UrukDroid and BullRC) yet. But all behave the same.
Any ideas ?
Btw: I tested it with the acutal squashfs and the one packed in the zip (even they seemed to be the same in size)
EDIT:
SOLUTION: I had usb cable attached (since flash) and that made it freeze - juts removed the cable and all is fine
Thanks and gr8 work - was looking for this since ages
fzelle said:
@divx118:
And could you then make a initramfs.cpio.gz that direktly boots into CM7?
Click to expand...
Click to collapse
Yes, no problem.
Hi Galaxy SII gurus
I run "intratech" 'official stock firmware' with corresponding
"cf-root", I have done so for various gingerbread and I am doing now
for various ICS.
currently
GT-I9100_XEN_I9100XWLPD_I9100XXLPW_I9100XENLP5.tar.md5
CF-Root-SGS2_XX_NEE_LPD-v5.5-CWM5.zip
Once system is stable it runs stable for days/weeks, -but-, my
problem (as also mentioned in xda thread 1635302) is that, when I boot
(this problem has been there with gingerbread and is still there with
ICS):
- system_server uses CPU (load and temperature rise)
- watchdog kills android processes (linux kernel stays up)
and, this goes on in a loop, often for hours. I need to power off and
try again (say, next day when battery again charged and temperature
dropped).
Only with -much- luck it happens that the system boots to a cam
state. and then I can use the phone normally. In fact, it works
perfectly then.
Recently this problem seems to become more prevalent and I have not
been able to use the phone for several days (each time I boot it goes
into, and, not out of, the watchdog loop). In practice, what happens
is that
- all applications (including launcher die)
- system goes back to the animated samsung logo
this loop goes on.
I searched a bit and it seems other people have reported this too but
I don't find a solution. Any help is appreciated.
'top', right after boot
Mem: 824396K used, 26136K free, 0K shrd, 36632K buff, 250616K cached
CPU: 53.1% usr 0.9% sys 0.0% nic 45.7% idle 0.0% io 0.0% irq 0.0% sirq
Load average: 2.84 1.85 0.74 2/1595 6055
PID PPID USER STAT VSZ %MEM CPU %CPU COMMAND
2082 1830 system S 401m 48.2 0 52.4 system_server
5628 1830 app_208 R 297m 35.8 0 0.5 berserker.android.apps.sshdroidpro
...
I use ssh and rsync to backup to a linux server, so I have a some
files that may be of interest (note that ssh and rsync are not killed
so I can incrementally backup).
/data/log/ contains a file
-rw------- 1 1000 1000 677553 Jun 5 06:07 dumpstate_sys_watchdog.txt.gz
/data/system/dropbox/ -many- files (presumably one per loop)
-rw------- 1 1000 1000 14416 Jun 5 06:07 [email protected]
-rw------- 1 1000 1000 0 Jun 5 06:08 [email protected]
-rw------- 1 1000 1000 261 Jun 5 06:08 [email protected]
for example, I have these files 58 times on 'Jun 5 ' only.
I have captured dmesg and logcat in a file screenlog.txt as follows
- freshly booted phone
- do a first 'dmesg'
- start 'logcat'
- start google play market app and update 2 apps
**** watchdog ****
- wait a bit
- do another 'dmesg'
The information is somewhat overwhelming but one can 'grep' for
watchdog, temperature and system_server processes 2082 and 7102, and
what else..., like, it seems cpu1 turns off/on all the time after
watchdog. Also, sorting the logs gives nice view per category.
Again any help is appreciated!
Thanks
Hi everybody
I feel a bit ashamed to reply my own post, but, here is what I can say
about progress:
I have (in approximately one week) once been able to get a 100% stable
system, but then, after some hours/day of playing around, time came to
reboot, and, since then, I am in the same system_server watchdog loop
for days now: I can do a little bit of work (I am configuring apex
GIU) and then: 'the watchdog barks'.
Searching Google does not tell me enough about this system_server
watchdog boot loop situation, so I hope for rescue here.
Note that I use stock rom with just cf-root.
have a good weekend
ok then, hate to reply again ...
seems a cwm wipe of dalvik cache and regular cache can do wonders:
I booted into stable system again
spoke too soon :-( android boot loop again
here is my guess: I think SD card might have errors ...
final verdict: only complete wipe and reinstall works, (and it works)
however, having literally wiped and formatted nearly everything, ...
only heimdall could flash (others did no longer recognise GSII).
all runs well now (albeit with less apps and less data)
Hi,
My phone can't go to sleep today because of
Partial wavelocks
backup* (Système Android): 1 h 45 m 23 s (6323 s) Count:132 98,4%
and Kernel Wavelocks
"PowerManagerService" (): 1 h 37 m 57 s (5877 s) Cntc/wc/ec)0/0/0 91,3%
Those two keep going and won't stop (1h30 since I unplugged). Can someone help me to get rid of that ? It's not the first time it happens.
BBS dump file attached.
thx
Boat Traveller said:
Hi,
My phone can't go to sleep today because of
Partial wavelocks
backup* (Système Android): 1 h 45 m 23 s (6323 s) Count:132 98,4%
and Kernel Wavelocks
"PowerManagerService" (): 1 h 37 m 57 s (5877 s) Cntc/wc/ec)0/0/0 91,3%
Those two keep going and won't stop (1h30 since I unplugged). Can someone help me to get rid of that ? It's not the first time it happens.
BBS dump file attached.
thx
Click to expand...
Click to collapse
Have a look here => http://forum.xda-developers.com/showthread.php?p=16973603
Maybe you should check some settings:
1. Settings > Back up and reset > Everything [UNTICKED]
2. Settings > PowerSaving > disable custom powersaving
Just to be sure that it is not caused by a caching issue, wipe cache partition (and Dalvik cache) in recovery mode (press Volume UP + Home + Power buttons as long as recovery menu appears, then select wipe cache and reboot the phone).
Good luck !
I'm having the same problem on my Nexus 4 (running 4.3).
Has anyone found a solution for this?
Welcome to the most customizable N7 kernel on xda
Bricked-Kernel Nexus 7 (grouper)
Replaced NVIDIA's strange hotplug manager with my own: tegra_mpdecision
Features:
Based upon Googles tegra3 source
Fixed section mismatches
Various other fixes (look @ github)
Compiled with gcc4.7.2 toolchain (linaro 09.12)
Replaced NVIDIAs hotplug manager with tegra_mpdecision (better battery life + performance)
Extensive sysfs interface for mpdecision with all the tuneables you want
Highly modified ondemand governor for tegra3 & mpdecision (this is the only recommended governor atm)
Fixed usage of 51Mhz clock
GPU OC (416/484/520Mhz)
Truly variant free CPU OC for all devices (51 - 1600Mhz)
Fixed max cpufreq resets throughout the kernel
All cores now use the max frequency (before: only in singlecore, otherwise -100Mhz)
Undervolting (faux123)
Default clocks: 102min & 1300max (+100Mhz overclocked) & 475 Maxscroff
earlysuspend/lateresume for ondemand including special screen off settings to save power
Aroma Installer by amarullz
cmdline interface for cpu min/max/maxscroff/gpuoc/scheduler/governor
---Just flash the kernel with your desired settings, no more need for oc apps. Reflash if you want to change sth. It's that easy!
FSync Control by Ezekeel
export t3 variant to debugfs by faux123 (adb shell cat /sys/kernel/debug/t3_variant)
lowered panel min brightness to 8
ZRAM
enabled NFSv3&4
Check the compare links for the rest
Where is tha Changelog???
There will be no more changelogs.
Instead the download pages were outfitted with compare links to github for each download.
How to install?
Flash through recovery. #done.
Where to complain about errors/bugs?
Please use the Issuetracker for bugs/errors/feature wishes!
Issuetracker @ https://code.google.com/p/bricked/issues/entry
[email protected]
IRC Chat: Freenode IRC #bricked
Download:
No Guarantees! If it kills your grandmother or your device, I am NOT responsible! If you understand this:
(If you download, please hit Thanks below my post! Thank you!)
>>> DOWNLOAD <<<
Donor List:
> Hall of fame <
With special thanks to all N7 piggy bank donors!
Thank you very much!
Source:
Benchmark:
Knowledge base:
What is tegra_mpdecision?
100% kernel based multi core decision! (should cpu1/2/3 be online or not, do we need the low-power/ninja core now?)
This replaces the stock nvidia hotplug solution.
Check /sys/kernel/tegra_mpdecision/conf/ for the configuration.
startdelay = time until mpdecision starts doing it's magic (20000)
delay = time between checks (130)
pause = if something else plugs in the cpu, fall asleep for 10000ms (10 secs)
scroff_single_core = Force low-power mode if screen is off (1)
enabled = enable(1) or disable(0) mpdecision. This does not affect scroff_single_core!
min_cpus = min cpus to be online, cannot be < 1. Default: 1
max_cpus = max cpus to be online, cannot be > 4. (if you set it to 2 and min_cpus to 1 you will basically have a dualcore) Default: 4
idle_freq = a value against that will be checked if a core +/- is requested. (475000)
lpcpu_up_hsyteresis = minimum number of requests that have to be send in order to switch to low-power mode (4)
lpcpu_down_hsyteresis = minimum number of requests that have to be send in order to switch to g-mode (quadcore-mode). Overridden by a requested freq that is higher than the max supported lp-mode frequency. (2)
If cpu0 is below that value and a core up of another cpu is requested, nothing will happen.
If any other cpu is above that value and a core down of that cpu is requested, nothing will happen. (otherwise it would now put down that cpu even though it is still working, which isn't what we want)
Hot plug thresholds (aka now it gets 'complicated')
This small formula calculates which value will be used: (number_of_cpus_online - 1) * 2
The result of this formula will be the nwns_threshold where a new cpu is hotplugged.
The result of this formula + 1 will be the nwns_threshold where a cpu is unplugged.
nwns_threshold_x = runqueue threshold, if this is reached cpuX will be hot/unplugged
twts_threshold_x = time threshold, this amount of time must have passed for the related action to be taken (hot/unplug)
Example:
One cpu is online.
(1 - 1) * 2 = 0 ergo:
nwns_threshold_0 = cpu1 will be hotplugged at this value
((1 - 1) * 2) + 1 = 1
nwns_threshold_1 = cpu0 will be unplugged at this value
This will regulate when we switch to lp-mode, effectively replacing the quadcore g-mode core with the ninja lp-mode core.
Two cpus are online.
(2 - 1) * 2 = 2 ergo:
nwns_threshold_2 = cpu2 will be hotplugged at this value
((2 - 1) * 2) + 1 = 3
nwns_threshold_3 = cpu1 will be unplugged at this value
etc...
(all times are in ms)
If you want to see the mpdecision magic happening:
Code:
adb shell
cat /proc/kmsg | grep 'MPDEC'
mpdecision's input event boost, aka project butter
This will boost your min cpu speed if you touch the screen or press a button and gives you full control.
In those events the min cpu freq will be risen to a predefined value (look below) on every online cpu. This boosts overall reaction times and smoothness a lot. (works similar to the qcom mpdecision binary)
Configuration files:
[email protected]:/sys/kernel/tegra_mpdecision/conf # ls
boost_enabled
boost_freqs
boost_time
All of them work like the usual sysfs files, except one special case:
boost_freqs will list all frequencies from cpu 0 to cpu x. Cpu 3 and any following cpu will share one frequency.
To change those frequencies echo the cpu number + the frequency in khz. To change the boost freq of cpu3 (and 4,5,6,7,8, etc) the echo would look as follows:
Code:
echo "3 1026000" > /sys/kernel/tegra_mpdecision/conf/boost_freqs
for cpu0:
Code:
echo "0 1026000" > /sys/kernel/tegra_mpdecision/conf/boost_freqs
Defaults:
Code:
cat /sys/kernel/tegra_mpdecision/conf/boost_freqs
910000
910000
760000
620000
Recommended governor?
Ondemand.Why do I have no WLAN?
This kernel is too big for our boot.img with WLAN included into the kernel, so it is built as a module. That means it needs to be inserted into the kernel upon boot up, which needs to be automated for maximum comfort = userinit (init.d) support.
The zip adds init.d support to your ramdisk, if that fails for some reason the wlan module cannot be inserted.
if
Code:
adb shell lsmod
doesn't show this:
Code:
tun 14060 0 - Live 0x00000000
cifs 239646 0 - Live 0x00000000
bcmdhd 433083 0 - Live 0x00000000
Then init.d support is probably missing.
You can test it by going to /system/etc/init.d/ and executing 00wlan.
Code:
adb shell
su
. /system/etc/init.d/00wlan
Wait a few seconds and try to enable wifi and repeat the above lsmod command (should now show bcmdhd as live, you can execute 01cifs and 02tun too).
If WLAN now works, init.d support is missing.
You need to have busybox installed in order to be able to get init.d support going, this shouldn't be a problem for most people, since it is usually installed when rooting your phone anyway (and who does unlock but not root their phone? :/)
It does not matter if busybox is installed in /system/bin or /system/xbin, my script will detect the location upon flashing and patch the ramdisk accordingly.
If no busybox is found, the script will add init.d support to your ramdisk with the default location: /system/xbin/busybox. All you need to do is install busybox there and reboot your phone.
show-p1984 said:
Knowledge base:
(under construction)
tegra_mpdecision manual:
coming soon(tm)
Click to expand...
Click to collapse
looks great is this kernal compatible with cm10 based roms such as paranoid android
Flypants101010 said:
looks great is this kernal compatible with cm10 based roms such as paranoid android
Click to expand...
Click to collapse
Yes, ofc
Running cm10 nightlies myself.
show-p1984 said:
Yes, ofc
Running cm10 nightlies myself.
Click to expand...
Click to collapse
All AOSP roms work with Bricked
* Hello World *
What tweaks did you make to on-demand, if you don't mind me asking? The only thing I've noticed is that frequency switching seems to happen faster & more often.
Feel like flashing something tonight!
Sent from my Nexus 7 using xda premium
I tried flashing this a few times and it fails with each try.
Dabaum said:
What tweaks did you make to on-demand, if you don't mind me asking? The only thing I've noticed is that frequency switching seems to happen faster & more often.
Click to expand...
Click to collapse
I mostly adapted it to work with the lpcore while the screen is on and also with special power saving setting while the screen is off.
The 2 phase frequency was changed to accomplish that.
It also applies a powersave bias while screen is off.
Additionally I changed the settings to allow faster scaling with less load. (70% > freq incr)
Source is currently being uploaded, but since I kept the history intact it is taking ages. You can look it up there in more detail once the source is up
airmaxx23 said:
I tried flashing this a few times and it fails with each try.
Click to expand...
Click to collapse
With what message?
I guess because your recovery does not identify your device as 'grouper'.
show-p1984 said:
With what message?
I guess because your recovery does not identify your device as 'grouper'.
Click to expand...
Click to collapse
It just says failed, I've had no problems flashing anything else and I'm flashing mutilple times a day usually.
airmaxx23 said:
It just says failed, I've had no problems flashing anything else and I'm flashing mutilple times a day usually.
Click to expand...
Click to collapse
It most certainly does not say "failed" and nothing else. Look harder.
Using twrp recovery me and my beta testee had no problems at all.
show-p1984 said:
It most certainly does not say "failed" and nothing else. Look harder.
Using twrp recovery me and my beta testee had no problems at all.
Click to expand...
Click to collapse
It says "unable to open zip file. Error flashing zip."
show-p1984 said:
Yes, ofc
Running cm10 nightlies myself.
Click to expand...
Click to collapse
And just to be clear, with non-CM based ones as well? I'm running the 'Glazed' ROM....
airmaxx23 said:
It just says failed, I've had no problems flashing anything else and I'm flashing mutilple times a day usually.
Click to expand...
Click to collapse
Nothing wrong with the zipfile, maybe corrupted download? did you do md5 hash check before flash?
It's either your custom recovery or a corrupted download, period.
ps. Happy Flashing.
airmaxx23 said:
It says "unable to open zip file. Error flashing zip."
Click to expand...
Click to collapse
corrupt download? checked md5/sha1?
corrupt phone upload? checked md5/sha1?
friedsonjm said:
And just to be clear, with non-CM based ones as well? I'm running the 'Glazed' ROM....
Click to expand...
Click to collapse
As long as it is AOSP you should be fine.
But just try it and report back, then we are all a bit more enlightened
(Sorry, I can't possibly test all the ROMs out there ^^)
T-junk said:
Nothing wrong with the zipfile, maybe corrupted download? did you do md5 hash check before flash?
It's either your custom recovery or a corrupted download, period.
ps. Happy Flashing.
Click to expand...
Click to collapse
If I try downloading it directly to my tablet the resulting file is only 17.51K in size, downloading it with a computer takes care of the problem.
airmaxx23 said:
It says "unable to open zip file. Error flashing zip."
Click to expand...
Click to collapse
I get the same.
Sent from my Nexus 7 using xda premium
airmaxx23 said:
If I try downloading it directly to my tablet the resulting file is only 17.51K in size, downloading it with a computer takes care of the problem.
Click to expand...
Click to collapse
StrangerWeather said:
I get the same.
Click to expand...
Click to collapse
I guess same problem for you StangerWeather.
Try downloading on your pc, I will look into that webserver issue tomorrow. (or maybe it's a chrome issue? who knows ^^)