[KERNEL][GPL][18 OCT][STOCK] franco.Kernel r20 - Sound Control V2 | ExFat - Galaxy S III Original Android Development

Features:
* Tree RCU + RCU_BOOST
* IO patches all across the board
* Config stripped of debug for a lean kernel
* NTFS + NTFS write support - useful for USB OTG
* Module to change Wi-Fi power management policy on the fly (check second post)
* Module to enable/disable fsync() calls on the fly (second post)
* Module to enable/disable Thermal Throttle
* Interface to change the frequency which the device will boost when the screen is touched
* Sound Control V2 based on Supercurio Voodoo Sound - Volume Boost feature
* Much more to be seen on my repository
* This kernel is for Samsung roms only.
Instructions:
* Flash via ODIN or Mobile Odin.
Download JellyBean compatible kernels (Only for Samsung stock roms): http://minooch.com/franciscofranco/SGS3/JB/
JellyBean compatible kernels CWM zips (Only for Samsung stock roms): http://minooch.com/franciscofranco/SGS3/JB/CWM_zips/
ICS Kernel source: https://github.com/franciscofranco/GT-I9300-ICS-3.0.y
JB Kernel source: http://minooch.com/franciscofranco/SGS3/JB/
franco.Kernel updater app:
* Kernel downloader
* Kernel auto-flash
* Frequency and governor interface
* GovernorControl - full control over PegasusQ
* Tons of custom settings to maximize user experience
* Built on top of a full fledged ICS theme with inheritance from all the work done since the Galaxy Nexus is supported
* More to come (Power Modes, custom power modes, core control etc)
My apps list: https://play.google.com/store/apps/...nVsbCxudWxsLDEwMiwic2ltcGxlLnJlYm9vdC5jb20iXQ

Wi-Fi Power Management toggle:
echo Y > /sys/module/dhd/parameters/wifi_pm (pass Y to enable and N to disable; its N by default). This option only appears after the wifi is activated
Sound Control:
Volume boost from 0 to 62 (replace X with the number of your choice). It's 62 by default:
echo X > /sys/devices/virtual/misc/sound_control/volume_boost
Fsync toggle:
It's enabled by default. Enabled = stock IO speed while having data integrity; disabled = more IO throughput but less data integrity
echo N > /sys/module/sync/parameters/fsync_enabled (N to disable and Y to enable)
Thermal Throttle toggle:
It's enabled by default. Careful playing with this, if this is working when the device heats up it won't be throttled down to safe values so if you don't know what you're doing just don't play with this, it's not my fault if you **** up.
echo N > /sys/module/tmu/parameters/throttle_enabled (N to disable and Y to enable)
How to activate the special sdwatcher binary:
This binary is special *buzzwords incoming* and will get rid of the fuse mounting and get rid of the /data/media symlink which causes excessive Media Scanning load - basically just mounts the internal sdcard as ext4. Battery life gets a nice boost using this binary. Instructions on how to use it at the second post. All credits go to Greg White, I did nothing but testing it for him.
To activate use ADB or Terminal Emulator:
mount -o rw,remount /system
cp /system/bin/sdcard /system/bin/sdcard.bak
rm /system/bin/sdcard
cp /sbin/sdcard /system/bin/sdcard
chmod 0777 /system/bin/sdcard
reboot
Don't mess with this if you don't know what you're doing.
INPUT_BOOST_FREQUENCY:
Change whatever frequency you want the device to boost to when the screen is touched:
echo N > /sys/class/misc/touchboost/input_boost_freq (N = frequency you want, e.g: 200000 (200Mhz), 1200000 (1,2Ghz)
TCP Congestion Algorithm interface
To check all the available options:
sysctl net.ipv4.tcp_available_congestion_control
To change to other option:
sysctl -w net.ipv4.tcp_congestion_control=NAME_OF_THE_ALGORITHM
Detailed test of all the algorithms:
Latency - Download - Upload
cubic:
1st run: 15ms - 10,75Mbps - 7,82Mbps
2nd run: 14ms - 10,84Mbps - 8,06Mbps
reno:
1st run: 13ms - 15,51Mbps - 6,73Mbps
2nd run: 13ms - 14,73Mbps - 8,51Mbps
bic:
1st run: 12ms - 10,38Mbps - 8,61Mbps
2nd run: 13ms - 10,78Mbps - 8,62Mbps
westwood:
1st run: 11ms - 17,65Mbps - 8,30Mbps
2nd run: 13ms - 13,28Mbps - 8,29Mbps
highspeed:
1st run: 13ms - 10,76Mbps - 7,94Mbps
2nd run: 16ms - 14,42Mbps - 8,52Mbps
hybla:
1st run: 14ms - 11,19Mbps - 7,44Mbps
2nd run: 14ms - 13,47Mbps - 7,56Mbps
htcp:
1st run: 14ms - 13,24Mbps - 7,03Mbps
2nd run: 15ms - 10,85Mbps - 8,00Mbps
vegas:
1st run: 14ms - 8,49Mbps - 6,62Mbps
2nd run: 14ms - 12,00Mbps - 7,07Mbps
veno:
1st run: 13ms - 9,58Mbps - 8,13Mbps
2nd run: 13ms - 8,50Mbps - 7,64Mbps
scalable:
1st run: 18ms - 12,01Mbps - 8,73Mbps
2nd run: 14ms - 13,96Mbps - 8,23Mbps
lp:
1st run: 14ms - 14,90Mbps - 8,68Mbps
2nd run: 14ms - 13,44Mbps - 8,72Mbps
yeah:
1st run: 14ms - 13,37Mbps - 8,28Mbps
2nd run: 17ms - 13,89Mbps - 8,14Mbps
illinois:
1st run: 13ms - 12,93Mbps - 8,24Mbps
2nd run: 16ms - 13,97Mbps - 6,46Mbps
Click to expand...
Click to collapse

Excellent will try this love ur kernels buddy
Sent from my GT-I9300 using xda premium

cool,looking forward to try your kernel

franciscofranco said:
Just in case I need this.
Click to expand...
Click to collapse
thanks man! the best!

Great work

welcome franco used your kernals on my nexus aswell as your update app.. anychance you will be makeing a galaxy s3 updater app

OMG ITS FRANCO!
Always used your kernel on my nexus, always been a perfect fit!
Thanks!

Now the names are appearing
GNex kernel was great so the temptation of S3 rooting, custom roms and kernels is getting stronger every day
Sent from my GT-I9300 using Xparent ICS Tapatalk 2

Any feedback on this guys ?
Sent via TCP/IP

nice to see u here,been using ur kernel since lg optimus one

Ther's only a boot.img in download - is this the kernel ?

Go Franco!.

just flashed......will report back with info.

haynesteve said:
Ther's only a boot.img in download - is this the kernel ?
Click to expand...
Click to collapse
If you dont know what this is, dont bother playing with your phone.
Sent from my GT-I9300 using xda premium

Sweet!!! Nice to see you here Francisco!!
This phone is gonna be animal with a Franco.kernel!

Amazing! Will try now.
Sent from my GT-I9300 using Tapatalk 2

Just installed, so far all good.
Sent from my GT-I9300 using XDA

have to say, the kernel already got rid of some of the issues i was having.
seems stable enough, have not decided to OC it yet.....the phone is just so smooth already...lol
again, thanks for sharing bruh.

Nice to see the next great Dev here. Thank you for charing
Gesendet von meinem GT-I9300

Related

[Kernel][3.0.31][JB] RoXSel Kernel v2 (Touch) [08/09/2013]

RoXSel Kernel for GT-I8160 aka Codina aka Ace 2
Team: Roxsel (Rox and jereksel)
I'M IN NO WAY RESPONSIBLE OF ANY DAMAGE CAUSED BY USING THIS CUSTOM KERNEL.
PLEASE NOTE THAT SOME FEATURES CAN DAMAGE YOUR PHONE AND YOUR EAR.​
What is needed:
Samsung GT-I8160 (Jellybean)
Custom, non stock based ROM (CM, P.A.C, Slim, RootBox, LiquidSmooth...)
Some Android experience
Features:
zram: zRAM supports for android
swap: swap supports
fs: CIFS module
fs: Fsync control [Cocafe]
fs: exfat-nofuse [Dorimanx]
fs/aio: Asynchronous io performance improved
arm: ThumbEE
arm/vfp: Build with neon
arm/crypto: ARM AES and SHA-1 crypto implementation
abb-Regulator: VOTG power supply
abb-Chargalg: Real charged notification
abb-Charger: Charger control
lib: Optimzed CRC32 algorithm [ezekeel]
lib: GNU C version memcpy & string
mmc: spi CRC configurable [Cocafe]
mali: Utilization control
mali: MALI TWEAK[Cocafe]
mali: PM sampling rate tweakable [Cocafe]
kernel: LZO compression
snvet: Reduce the waketime 6s -> 1s
sched: Disable sched debug stuff
debug: Remove Samsung debug code [Adi_Pat]
debug: Android logger as module (free 4mb RAM)
st-mmio: Highlight mode for rear LED flash [Cocafe]
bcmdhd: PM_FAST by default
bcmdhd: Reenable ipv6 and disable multicast in suspend [Andrew Dodd]
random: Entropy tweaks [dorimanx]
random: Frandom module support
staging: Add Snappy and lz4 compression
staging: Lowmemorykiller tweaked
cpufreq: 14 available CPU governors
[*]block: 8 IO schedulers
ramdisk: Init.d scripts
ramdisk: LZO compression
ramdisk: ClockworkMod Recovery 6.0.3.4 [CyanogenMod]
ramdisk: ClockworkMod Touch Recovery 6.0.3.2 [SlimBean]
toolchain: Linaro GCC 4.7
More details in changelog and Github repo
Installation:
Download RoXSel_Kernel_vX.zip
Boot into recovery
Wipe Cache ( Highly Recommended )
Flash RoXSel_Kernel_vX
Reboot
Enjoy !
Downloads:
RoXSel Kernel v2
RoXSel Kernel v2 - CWM Touch
RoXSel Kernel v2 (4.1.2 Roms)
RoXSel Kernel v2 (4.1.2 Roms) - CWM Touch
Sources:
Credits:
dh.harald for kernel source
hafidzduddin, cocafe and Adi_Pat for tweaking source
If i forgot someone contact me
How to play with kernel
Here are some intructions/tips about how to play with the kernel.
Terminal is needed.
If you want to change the values,it needs su permission.
If you get 'Permisson denied',you need su permisson.
If the devices lost responses,hold power button 8s to reboot.
Simply,You can cd to the folder first,then do echos.
Then `???` stands for the number to input
Boot time
RoXSel boots faster than stock normally.
4.2.2
Code:
Stock: 8600ms - 8800ms
RoXSel: 8400ms - 8600ms
Report other versions !!
How to check boottime?
Code:
cat /d/boottime/summary
CPU Governors
OndemandQ ( Default )
Ondemand
Performance
Hotplug
SmartAss2
Lionhearth
Lulzativeq
Powersave
Intellidemand
Lagfree
Lazy
Interactive
Conservetive
Userspace
* Personaly,I use OnDemand(Q)
* OndemandQ is a new governor. It will hotplug cpu when screen turns off only.
* If you mind the battery life time,choose HotPlug. It hotplugs cpu frequently.
* LulzactiveQ, it will hotplug cpus
CPU Freqs
On JB,we cannot tweak min/max scale freqs via apps like SetCPU.
Here is the method.
Code:
cd /sys/power
For example: set 400Mhz as max limited
Code:
echo 400000 > cpufreq_max_limit
* When you switch on/off power saving mode, this tweak will be overrided.
IO schedulers
Noop ( Default )
Deadline
Cfq
Bfq
Row
Zen
Sio
Vr
* Personally, i use Zen
Frandom Module
Use CrossBeeder to enable frandom.
Deepest sleep state
Stock: 3 Default: 3
Deepest supported is 5.
To change:
Code:
echo 5 > /d/cpuidle/deepest_state
* PegasusQ ( hotplug governors ) works badly with 5
* OnDemand works well with 5
* Please note that it wont increase the using time but standby time.
To check the cpuidle state:
Code:
cat /d/cpuidle/stats
USB VBus
( v2+ )
This can enable the internal vbus power supply for usb devices.
But the phone still cannot recognize our usb devices now.
You can use it for fun,like charging for other devices, using usb fan...
To enable :
Code:
cd /sys/kernel/abb-regu
echo 1 > VOTG
* Say 0 to VOTG to disable
* Plug yoru cable first,then enable it
zRAM
zRAM is optimized for Android.
It is not lazy anymore.
Using zRAM will take a little CPU,because it needs to compress/decompress memory.
Recommended compressing about 18% of RAM,about 100mb
Setup disksize first: (example: 96mb= 96×1024×1024)
Code:
echo 100663296 > /sys/block/zram0/disksize
* Larger size more RAM will be compressed.
* Too large size might make phone lag
Enable:
Code:
mkswap /dev/block/zram0
swapon /dev/block/zram0
To check how many does it use:
Code:
cat /sys/block/zram0/num_reads
cat /sys/block/zram0/num_writes
* You can get other info in its sysfs
Swap
Format/resize your SdCard via computer first.
Enable:
Code:
mkswap /dev/block/mmcblk1p1
swapon /dev/block/mmcblk1p1
Init.d script
Put some scripts (any name you like) in init.d folder with permisson 0777 (rwxrwxrwx) (at least has read and exec permission)
Scripts with right permisson will be runned when system boots.
Charger control
Please note that this control can damage your battery/phone.
If your battery/phone damaged,read the top of #1 post.
Lower current makes the charging longer,but protects battery.
Too high current can burn your battery!
I recommend you that dont set the max limited current over 900mA.
AC Maximum current: (stock: 600 , min: 0 , max: 900) mA
Code:
echo ??? > /sys/kernel/abb-charger/max_ac_c
USB Maximum current: (stock: 600 , min: 0 , max: 900) mA
Code:
echo ??? > /sys/kernel/abb-charger/max_usb_c
* The control only accepts values like 0, 100, 200 ...
* Set usb current to 0,the phone wont charge in usb port,but transmits data.
Track driver memory [advanced] :
Code:
cat /sys/kernel/abb-charger/stats
To get the charging current:
When you plug charger:
Code:
dmesg | grep -i ab8500-charger
Real charged notification
To be honest,it needs to check manually.
Code:
cat /sys/module/abb_chargalg/parameters/eoc_status
* You can use Rootexplorer to view this file.
* When it says "First full charging reached",then the UI should show you charged 100%
But it is not the real full charged.
* When it says it is the real full charged,you can unplug the charger.
* When you are charging and do a reboot will reset the counter.
* According to my experiments,it needs 1-2 hours to charge to real full.
MMC SIP CRC
( v2+ )
Disabling SPI CRC can improve mmc performance (10% ~ 30%)
But phone may freeze randomly
Code:
echo 0 > /sys/module/mmc_core/parameters/use_spi_crc
Camera LED Flash
( v2+ )
HIghlight mode for assistive light, enabling this for a long time will heat up your device, be careful!
Enable:
Code:
echo 1 > /sys/class/camera/flash/highlight
Disable:
Code:
echo 0 > /sys/class/camera/flash/highlight
Fsync Control
Get current status:
Code:
cat /sys/kernel/fsync/mode
FSYNC modes:
Code:
0: fsync on
1: fsync off
2: fsync dyn
Disable FSYNC:
Code:
echo 1 > /sys/kernel/fsync/mode
* Disabling fsync can improve io performace,
but it can make the data which hasnt been written lose when a sudden poweroff comes.
* Disabling fsync or enabling dyn_fsync will make param driver fail to store data
That means your "reboot recovery" will fail.
Enable Dynamic FSYNC:
Code:
echo 2 > /sys/kernel/fsync/mode
* Dynamic fsync will sync all buffers when screen turns off,
* If there is a heavy io load,the screen might get stuck for seconds.
* This is an experimental feature.
Mali GPU
Mali debug level
Disabling can speed up a bit
Code:
echo 0 > /sys/module/mali/parameters/mali_debug_level
* Higher level,more messages will be printed in dmesg, system will slow down
Mali L2 max reads control: (Stock:28kb,Default:48kb(max))
Code:
echo xx > /sys/module/mali/parameters/mali_l2_max_reads
* Some values will slow down graphics
* If not sure,keep default
Mali PM sampling rate: (Default: 1000ms)
Code:
echo xx > /sys/module/mali/parameters/mali_pm_sampling_rate
Mali PP scheduler tweaks: (Default: disable)
Code:
echo 1 > /sys/module/mali/parameters/mali_pp_scheduler_balance_jobs
* Enabling this,Some places will over ahead,choose by your self
Mali Utilization sampling rate: (Stock:500ms,Default:1000ms)
How often report a mali utilization.
Code:
echo xxx > /sys/module/mali/parameters/mali_utilization_sampling_rate
* Keep this default if unsure.
Mali Utilization control
(Default: low_to_high 192 high_to_low 64)
Our driver will report a mali utilization frequently.
This utilization(range: 0~255) means the load of mali.
If utilization is bigger than low_to_high ,driver will request higher hardware performance(highest APE/DDR OPP).
If utilization is smaller than high_to_low ,the driver will store the requested OPP(uses low OPP).
OPP can be understood as freq simply.
To check mali utilization values:
Code:
echo 5 > /sys/module/mali/parameters/mali_debug_level
cat /proc/kmsg | grep -i utilization
When it says SIGNAL_HIGH,it will request highest OPP.
When it says SIGNAL_LOW,it will request lowest OPP.
Press Ctrl+C to stop printing.
You can reduce low_to_high to trigger higher OPP requirement.
For smoothness and less powersaving:
Set low_to_high between 100-192.
Code:
echo 120 > mali_utilization_low_to_high
Mali max preemptive allocated max memory size:
Default is 16mb(16*1024*1024), bigger max size more throughput.
But when this value is too big, no more throughput.
For example: 48mb = 48*1024*1024
Code:
echo 50331648 > /sys/module/mali/parameters/pre_allocated_memory_size_max
EGL Driver
To use Mali hardware egl driver only:
Edit /system/lib/egl.cfg
Code:
0 0 android
0 1 mali
To
Code:
0 0 mali
Then remove libGLES_android.so
* Recommend to backup these files
* According to my feelings: after disabling sw egl driver,UI is faster
Logcat
Well,we have made android logger(logcat) as module to free more RAM.
Some guys request logcat.
Now we provide you a workaround:
Create a new init.d script:
Code:
#!/system/bin/sh
insmod /system/lib/modules/logger.ko
or
Flash this ZIP
Then you can use logcat command.
Almost tweaks will be restored to default after reboots.
So you can make your tweaks as init.d scripts to apply them when boots.
Bugs and Changelogs
Bugs :
LPM charging (Not on stock)
-------------------------------------------------------------------------------------------------------------------------------
Changelog Version 3 (XX/XX/XXXX) :
| Stock version ( Touch ) | | 4.2.2 Version ( Touch ) | | CM 10 version ( Touch ) | | MIUI version ( Touch ) |
Kernel version updated 3.0.31 - > 3.0.96
vmscan: vm_swappiness = 60 -> 20
snd_usb: fix sysfs conflicts [Cocafe]
bcmdhd: wifi signal values patch
power: stop printing noise [Cocafe]
sched: Enable arch power
mm: VM Tweaks [Adi_Pat]
fs: Reduce vfs_cache_pressure to 20 [Adi_Pat]
debug: Disable Frame pointer [Adi_Pat]
defconfig: Enable CLEANCACHE
Added support for MIUI
Added support for STOCK ~ HOT
-------------------------------------------------------------------------------------------------------------------------------
Changelog Version 2 (08/09/2013) :
| 4.2.2 version ( Touch ) | | CM 10 version ( Touch ) |
ramdisk: LZO compression
kernel: LZO compression
mali: pre-allocated os memory size 24mb -> 16mb
st-mmio: Highlight mode for rear LED flash [Cocafe]
bcmdhd: Reenable ipv6 and disable multicast in suspend [Andrew Dodd]
sched: Disable arch power
arm/crypto: ARM AES and SHA-1 crypto implementation
fs: exfat-nofuse [Dorimanx]
drivers/mmc: spi CRC configurable [Cocafe]
abb-Regulator: VOTG power supply
toolchain: Linaro GCC 4.7
partialy fix LPM charging
-------------------------------------------------------------------------------------------------------------------------------
Changelog Version 1 (29/08/2013) :
| 4.2.2 version ( Touch ) | | CM 10 version Touch |
Initial Release
Added CWM Touch version (04/09/2013)
Added CM 10 CWM Touch version (04/09/2013)
-------------------------------------------------------------------------------------------------------------------------------
Note:
I/O schedulers cant be changed in stock performance app that comes with most ROMS.
Use 3rd party app instead ( SetCPU, No-Frills... )
What are these an do I need it I'm running rootbox
Sent from my GT-I8160 using xda app-developers app
Faster with CM10 than CM10 with his stock kernel?
EDIT:
OP: @Rox = Roberthinio??
Ok IDK nothing about kernel. I use CM10 from @dh.harald. If i use this kernel, the performance will increase? And i use mod vold.fstab from MIUI beta rom, will it causing complication when i flash this kernel? Or i should flash this kernel with fresh CM10?
Thanks in advance, congratulations for the elaboration
good job :fingers-crossed:
Thank you guys. I'll give a try on slim bean.
On stock JB phone does not boot, its blocked at samsung blinking logo. Advices?
I can go to cwm recovery.
Sent from my Nivo using Tapatalk 4
myhayserano said:
On stock JB phone does not boot, its blocked at samsung blinking logo. Advices?
Sent from my Nivo using Tapatalk 4
Click to expand...
Click to collapse
What is needed:
Samsung GT-I8160 (Jellybean)
AOSP ROM (CM, P.A.C, Slim, RootBox, LiquidSmooth...)
Some Android experience
This is confusing, does it run on stock JB roms? Or is intended olnly fir custom roms?
Sent from my Nivo using Tapatalk 4
myhayserano said:
On stock JB phone does not boot, its blocked at samsung blinking logo. Advices?
I can go to cwm recovery.
Sent from my Nivo using Tapatalk 4
Click to expand...
Click to collapse
Read the requirements, lucky you don't hardbrick your SGA2 :')
myhayserano said:
On stock JB phone does not boot, its blocked at samsung blinking logo. Advices?
I can go to cwm recovery.
Sent from my Nivo using Tapatalk 4
Click to expand...
Click to collapse
read what is needed before you flash. to boot phone flash kernel.bin.md5 from one of firmwares using odin
Not needed I had cwm backup of my rom and just restored stock kernel phone booted ok. Please modify first post and specify that this kernel is compatibile ONLY with custom roms.
This phrase at the begining can make people mistake:
``Samsung GT-I8160 (Jellybean)``
Sent from my GT-I8160 using Tapatalk 4
Any bugs?
Sent from my GT-I8160 using xda premium
myhayserano said:
Not needed I had cwm backup of my rom and just restored stock kernel phone booted ok. Please modify first post and specify that this kernel is compatibile ONLY with custom roms.
This phrase at the begining can make people mistake:
``Samsung GT-I8160 (Jellybean)``
Sent from my GT-I8160 using Tapatalk 4
Click to expand...
Click to collapse
Read all phases and everything will be cleared out...
@up no bugs except that you have to use 3rd party app to change i/o scheduler ( you cant change inside settings-performance, dont kniw why. Some app bug)
I will ad more info later on 2 nd post i am not at home
Sent from my GT-I8160
Don't mean to sound like a noob but is it safe to use on top of tweaks such as Project Injection?
Yes. Also if you use crosbreeder you can enable frandom
Sent from my GT-I8160
Rox said:
Yes. Also if you use crosbreeder you can enable frandom
Sent from my GT-I8160
Click to expand...
Click to collapse
Thanks for the quick reply. I'll be pairing up this kernel with LiquidSmooth as soon as call volume is fixed. :good:
I'm trying now. This is ****** handsome! You put hotplug governor, my battery say tahnks to you
Maybe one little bug: on powersave frequency doesnt remain at 200mhz. And if i set frequency min 200 MHz - max 400mhz the 800mhz step continue to work, eventi if i choose userspace.
I'll try with no CPU frills.
Good work mate!

[KERNEL][3.0.101] BraveKernel Refresh for KitKat

BRAVEKERNEL REFRESH​
Here we go with something (re)fresh, this is the thread of a customized kernel for KitKat ROMs (CM11, AOSX, SlimKat...) with some extra features added.
As always, feedback is welcome and highly valuable
Please if a bug is already reported do not spam the thread reporting it again, and use XDA DevDB tools for posting features requests and bug reports if it's possible :good:
Main features are these:
- Based in 6.2.A.1.100 source code
- Built with Linaro Toolchain 4.9.3 optimized for Cortex A9
- TWRP 2.8.4.0
- FRandom support
- Improvement in I/O latency
- Interactive governor updated to 3.4
- VFP optimizations
- PowerOn Key emulator
- ABBamp Sound Control v2.5.0
- Mali tweaks and controllers
- Governors and I/O schedulers parameters tweaked
- Cycle Charging control
- Real end-of-charge notification
- FSync control (combined dynamic fsync control)
- Voltage OTG control
- Added extra free kbytes tunable
- Swap and zRAM support
- Disabled dynamic debug
- Tweaked readahead size
- More choices of TCP congestions
- Proportional Rate Reduction for TCP
- Fix for scaling of minimum frequency problem
- Built with optimized -O3 & Neon flags
- SLUB memory allocator
- Ramdisk and kernel compressed with LZO
Available CPU governors:
- Powersave
- Userspace
- OnDemand
- Interactive (default)
- InteractiveQ
- Conservative
- OnDemandQ
- PegasusQ
- LulzActiveQ
- AbyssPlug
- HotPlug
- PegasusQPlus
- SmartAssv2
Available I/O schedulers:
- No-op
- Deadline
- CFQ
- ROW
- BFQ
- SIO
- ZEN
- V(R)
- SIO-Plus (default)
Kernel Downloads for KitKat:
BraveKernel Refresh KK-4.4 HubDroid Folder
- v1.3 -
for CM 11.0, AOSX, SlimKat...​
How to install the kernel:
1) Download the kernel zip file to SD card
2) Reboot to recovery
3) Flash the kernel zip file
4) Wipe cache and dalvik cache if you are coming from another kernel
5) Reboot the system
Kernel Manager APP
If you prefer to use a simpler way for installing the kernel you can use this app, it allows you to make a backup of your current kernel and it also displays OTA updates of this kernel, really recommended :good:
Kernel sources (on GitHub):
Development repository of BraveKernel 3.0.101 for KK 4.4
​
Changelog:
Code:
[B]08/02/2015 - BraveKernel Refresh v1.3 for KitKat[/B]
- Fixed random reboots
- Added minfree tweak in crontab
- Enabled JRCU
- Disabled management of not killable processes
[B]01/02/2015 - BraveKernel Refresh v1.2 for KitKat[/B]
- Tweaked adj and minfree values in init.d
- Added memory tweak in crontab
- Disabled JRCU
- Tweaked read_ahead_kb values
[B]25/01/2015 - BraveKernel Refresh v1.1 for KitKat[/B]
- Added F2FS support
- Fixed network arrows and speed information
- Fixed root and storage issues
- Added recovery in FOTA partition support
- Added kexec hardboot support
- Added 3 extra MB of usable RAM
- Added dynamic management of dirty page writebacks
- Added Ultra KSM
- Added entropy tweaks
- Updated BFQ scheduler
- Updated Linaro toolchain
- Improved LZO decompression
- Tweaked LMK
- Improved network speed
- Improved CPU performance
- Improved EXT4 speed
- Improved power management
- Tweaked memory management values
- Enabled clean cache
- Enabled JRCU
[B]21/12/2014 - BraveKernel Refresh v1.0 for KitKat[/B]
- Initial release
Credits and thanks to:
munjeni and cocafe for their awesome work and their kernel sources
AGONTUK for TWRP recovery
CyanogenMod, Kernel.org, Sony, Google, Linaro GCC developers
All my testers
​
XDA:DevDB Information
BraveKernel Refresh, Kernel for the Sony Xperia U
Contributors
Garcia98
Kernel Special Features: Customized kernel 3.0.101 for KK 4.4.x ROM
Version Information
Status: Stable
Current Stable Version: v1.3
Stable Release Date: 2015-02-08
Created 2014-12-24
Last Updated 2015-02-08
Reserved
HOW TOs
HOW TO PLAY WITH THIS KERNEL
Terminal emulator or ADB shell is needed.
If any command outputs 'Permission denied', you need su permission.
`???` stands for the number to input.
Change recovery:
To change your recovery:
1.- Open ADB shell or terminal emulator
2.- Download recovery.img
3.- Run:
Code:
su
dd if=recovery.img of=/dev/block/mmcblk0p13
4.- Reboot to recovery
F2FS:
To enable F2FS:
1) Reboot into recovery
2) Touch Wipe option > Advanced Wipe
3) Select the partition you want to convert to F2FS (Data or Cache)
4) Select Repair or Change File System option
5) Touch Change File System and then select F2FS
Boot time:
To check boot time:
Code:
cat /sys/boottime/kernel
CPU governors:
Performance, Interactive (default), Powersave, Userspace, Conservative, InteractiveQ, PegasusQ, HotPlug, OnDemandQ, OnDemand, AbyssPlug, LulzactiveQ, SmartAssv2
- OnDemand has been patched with cpu idle detection.
- Most of custom governors are based on ondemand/interactive.
- OndemandQ/InteractiveQ will hotplug cpu when screen turns off only.
- If you care about the battery life time, choose HotPlug. It hotplugs cpu frequently.
- Interactive updated to linux-android-3.4 (recommended).
- LulzactiveQ, will hotplug CPU1.
I/O schedulers:
SIO, SIO-Plus, VR, BFQ, CFQ, NO-OP, ZEN, ROW, Deadline
- Default IO scheduler: SIO-Plus
- SIO/ROW/SIO-Plus recommended!
FRandom module:
Code:
insmod /lib/modules/frandom.ko
chmod 0666 /dev/frandom
chmod 0666 /dev/erandom
mv /dev/random /dev/random.orig
mv /dev/urandom /dev/urandom.orig
ln -s /dev/frandom /dev/random
ln -s /dev/frandom /dev/urandom
Deepest sleep state:
Stock: 3 Default: 3
Deepest supported is 5.
To change deepest sleep state:
Code:
echo 5 > /d/cpuidle/deepest_state
- HotPlug governors works badly with 5.
- OnDemand works well with 5.
- Please note that it won’t increase the using time but standby time.
- You can add an init.d script to tweak it if you want.
To check the cpuidle state:
Code:
cat /d/cpuidle/stats
zRAM:
zRAM is optimized for Android. It is not lazy anymore. Recommended zRAM instead of SWAP.
Using zRAM will take a little CPU, because it needs to compress/decompress memory.
Recommended compressing about 18% of RAM, about 100MB.
Setup disk size first: (example: 200MB)
Code:
echo $((200 * 1024 * 1024)) > /sys/block/zram0/disksize
- Larger size more RAM will be compressed.
- Too large size might make phone lag
To enable:
Code:
mkswap /dev/block/zram0
swapon /dev/block/zram0
To check how many does it use:
Code:
cat /sys/block/zram0/num_reads
cat /sys/block/zram0/num_writes
cat /proc/meminfo | grep swap
- We can get other info in its sysfs
Swap:
Using a file as swap RAM: (Create a continuity file first)
Code:
su
cd /cache
dd if=/dev/zero of=swapfile bs=1024 count=81920
mkswap swapfile
swapon swapfile
Then we will have 80MB of swap RAM.
Cycle Charging Control:
Similar to BLX by Ezekeel. It can be used to limit the battery charging level.
Example: Limit the battery level at 70% ~ 75%
Enable:
Code:
echo on > /sys/kernel/abb-fg/fg_cyc
Disable:
Code:
echo off > /sys/kernel/abb-fg/fg_cyc
Discharging threshold (battery level %):
Code:
echo dischar=75 > /sys/kernel/abb-fg/fg_cyc
Recharging threshold:
Code:
echo dischar=70 > /sys/kernel/abb-fg/fg_cyc
Real charged notification:
Well, please let me call it notification.
To be honest, it needs to check manually:
Code:
cat /sys/kernel/abb-chargalg/eoc_status
- You can use Root Browser to view these files in /sys/kernel/abb-chargalg
- When it says "First eoc reached", then the UI should show you charged 100%, but it is not the real full charged.
- When it says the real EOC reached, unplug the charger.
POnKey Emulator:
This is the software emulator of power key.
To turn off screen: ( 20 < value(ms) < 520 )
Code:
echo 100 > /sys/kernel/abb-ponkey/emulator
To active the power menu: ( 520 < value(ms) < ∞)
Code:
echo 800 > /sys/kernel/abb-ponkey/emulator
ABBamp Audio:
Please note that listening to too high volume music over 1 hour or more can damage your ears.
Too high volume can make your external speakers/headset overload or damage them.
First, why is it called `AMP`?
Because most of our tweaks are about gain(volume)
Our codec is simple, It doesn't have any hardware EQ (although i want...)
ABBamp sysfs entries are in:
/sys/kernel/abb-codec
- Use Root Browser to view this folder,there are lots files
Tweaks will take effects immediately!
Most tweaks will accept inputs like "on", "off" (no quotes)...
So, say "on" to enable this tweak, then this tweak will apply the value stored/inputed
View (cat) these files, most of them will give you useful information about this tweak.
They will show you the volume in dB of gain
`cd` to /sys/kernel/abb-codec first then do echos, will be more convenient.
AnaGain3 (Headset analog gain path):
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/anagain3
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/anagain3
Gain control: (min:0 ,max: 15) Lower value,higher volume (default: 0[+4dB])
Code:
echo left=?? > /sys/kernel/abb-codec/anagain3
echo right=?? > /sys/kernel/abb-codec/anagain3
Write both left and right channels:
Code:
echo gain=?? > /sys/kernel/abb-codec/anagain3
HsLDigGain (Headset left digital path gain):
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hsldiggain
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hsldiggain
Gain control: (min:0 ,max: 15) Lower value,higher volume (default: 4[+4dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/hsldiggain
HsRDigGain (Headset right digital path gain):
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hsrdiggain
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hsrdiggain
Gain control: (min:0 ,max: 15) Lower value,higher volume (default: 4[+4dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/hsrdiggain
Headset Volume Table:
value | volume
0.......+8dB (maximum)
1.......+7dB
2.......+6dB
3.......+5dB
4.......+4dB (tweaks default)
5.......+3dB
6.......+2dB
7.......+1dB
8.......+0dB (device default)
>=9....mute
- If set up digital path +4dB, analog gain +4dB, the result will get over +8dB
HsLowPow (Headset driver low power mode):
This lowpow mode is enabled by device normally.
If you want high performance audio instead of LPA(low power audio) you can disable it.
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hslowpow
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hslowpow
To tweak the mode (0: disable LP mode, 1: enable LP mode)
Code:
echo mode=? > /sys/kernel/abb-codec/hslowpow
HsDacLowPow (Headset DAC low power mode):
DAC is Digital-to-Analong Converter.
This lowpow mode is enabled by device normally.
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hsdaclowpow
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hsdaclowpow
To tweak the mode (0: disable LP mode, 1: enable LP mode)
Code:
echo mode=? > /sys/kernel/abb-codec/hsdaclowpow
HsHpEn (Headset high pass filter):
This high pass filter is disabled by device normally.
Enable this can reduce some sub-noise of audio.
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hshpen
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hshpen
To tweak the mode (0: disable highpass filter, 1: enable highpass filter)
Code:
echo mode=? > /sys/kernel/abb-codec/hshepen
Besides, the file anaconf1 will shows you the status of LPA
ClassDHPG (ClassD high-pass gain):
ClassD is a kind of amplifier.
According to the documents, our ClassD only relate to Handsfree(speaker).
This can increase the high frequencies sound of speaker
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/classdhpg
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/classdhgp
Gain control: (min:0 ,max: 10) higher value,higher gain (default: 10[Max gain])
Code:
echo gain=?? > /sys/kernel/abb-codec/classdhpg
ClassDDithWGain:
Gain control for the white component of dithering filter
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/classdwg
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/classdwp
Gain control: (min:0 ,max: 10) higher value,higher gain (default: 10[Max gain])
Code:
echo gain=?? > /sys/kernel/abb-codec/classdwg
ADDigGain2:
This is the audio path of mic2(phone mic, not headset mic)
This tweak will enable automatically when mic2 is enabled by device
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/addiggain2
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/addiggain2
Gain control: (min:0 ,max: 63) lower value, higher gain (default: [+6dB], max: 00[+31dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/addiggain2
EarDigGain:
This is the digital gain of earpiece
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/eardiggain
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/eardiggain
Gain control: (min:0 ,max: 15) lower value,higher gain (default: 4[+4dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/classdwg
- It uses the same path of HsLDigGain,please check the volume table of HsLDigGain
- +8 dB might crash the sound of earpiece
ShortCirConf:
Code:
This is a misc tweak
View shortcir this file first
[7] EnShortPWD
0: Automatic switch off on short circuit detection is disabled
1: Automatic switch off on short circuit detection is enabled
[6] EarShortDis
0: Short circuit detection on Ear driver enabled
1: Short circuit detection on Ear driver disabled
[5] HsShortDis
0: Short circuit detection on HsL and HsR drivers enabled
1: Short circuit detection on HsL and HsR drivers disabled
[4] HsPullDEn
0: HsL and HsR outputs are in high impedance
1: HsL and HsR outputs are pulled down to ground
[2] HsOscEn (ABBamp enables it by default)
0: The HS drivers use the system clock
1: The HS drivers use a local oscillator (system clock absent: analog path only)
[1] HsFadDis
0: All intermediate steps are applied between two programmed gains (fading)
1: Gain on HS is applied immediately
[0] HsZcdDis
0: HS gain changes on signal zero cross (unless time-out occurs)
1: HS gain is changed without zero cross control
[CODE]echo ?? ?? > /sys/kernel/abb-codec/shortcir
- The first ?? the slot of each option,the second ?? stands for the value to write to this slot
- View shortcir this file,you will get it[/CODE]
AnaConf4:
This interface controls the enables of analog path
We can use it to disable Speaker in kernel level.
So that you don't have to use the "mute all sound" in system settings,
Because, "mute all sound" will also mute Earpiece, which is inconvenient for us in calls.
Command format: Check anaconf4 first, This interface is a bit different from others:
Code:
echo [Index] [Disable?] > anaconf4
To Disable Speaker:
Code:
echo 5 1 > anaconf4
To Enable Speaker:
Code:
echo 5 0 > anaconf4
Headset Charge Pump:
Code:
echo 0 > chargepump to use fixed 1.8V supply.
echo 1 > chargepump to use dynamic voltage supply, lower power cost.
Lower-power Audio Mode:
Code:
echo on > lpa_mode to enable LPA mode
echo vape=0x?? > lpa_mode to adjust Vape voltage used in LPA mode
Experts!:
This method can work on any ab850x codec platform!
cd /d/asoc/U8500-card/ab8500-codec.0
Play music, reduce the volume.
Now we are going to edit the codec registers.
Code:
echo REG VAL > codec_reg
E.G:
AnaGain3:
Code:
echo 0x16 0x00 > codec_reg
HsDigGain: (left/right channel)
Code:
echo 0x4F 0x00 > codec_reg
echo 0x50 0x00 > codec_reg
Disable all lowpow mode:
Code:
echo 0x04 0x00 > codec_reg
- These hacks will restore when codec power off.
Camera LED Flash:
Turn on torch with more brightness, turning this on for a long time will heat up your device, be careful!
Enable/Disable:
Code:
echo 1/0 > /sys/devices/platform/nmk-i2c.2/i2c-2/2-0053/torch_enable
echo 149600 > /sys/devices/platform/nmk-i2c.2/i2c-2/2-0053/torch_current
FSync control:
Get current status:
Code:
cat /sys/kernel/fsync/mode
FSYNC modes:
0: fsync on
1: fsync off
2: fsync dyn
Disable FSYNC:
Code:
echo 1 > /sys/kernel/fsync/mode
Disabling fsync can improve I/O performance, but it can make the data which hasn't been written lose when a sudden power cut occurs.
Enable Dynamic FSYNC:
Code:
echo 2 > /sys/kernel/fsync/mode
- Dynamic fsync will sync all buffers when screen turns off.
- If there is a heavy I/O load, the screen might get stuck for seconds.
Mali GPU:
Mali debug level:
Disabling can speed up a bit
Code:
echo 0 > /sys/module/mali/parameters/mali_debug_level
- Higher level, more messages will be printed in dmesg, system will slow down
Mali L2 max reads control: (Stock:28kb,Default:48kb(max))
Code:
echo xx > /sys/module/mali/parameters/mali_l2_max_read
- Some values will slow down graphics
- If not sure, keep default
Mali PM sampling rate: (Default: 1000ms)
Code:
echo xx > /sys/module/mali/parameters/mali_pm_sampling_rate
Mali PP scheduler tweaks: (Default: disable)
Code:
echo 1 > /sys/module/mali/parameters/mali_pp_scheduler_balance_jobs
- Enabling this, some places will over ahead, choose by yourself
Mali Utilization sampling rate: (Stock:500ms, Default:1000ms)
How often report a mali utilization.
Code:
echo xxx > /sys/module/mali/parameters/mali_utilization_sampling_rate
- Keep this default if unsure.
Mali utilization control:
(Default: low_to_high 192 high_to_low 64)
Our driver will report a mali utilization frequently.
This utilization(range: 0~255) means the load of mali.
If utilization is bigger than low_to_high, driver will request higher hardware performance(highest APE/DDR OPP).
If utilization is smaller than high_to_low, the driver will store the requested OPP(uses low OPP).
OPP can be understood as freq simply.
To check mali utilization values:
Code:
echo 5 > /sys/module/mali/parameters/mali_debug_level
cat /proc/kmsg | grep -i utilization
When it says SIGNAL_HIGH, it will request highest OPP.
When it says SIGNAL_LOW, it will request lowest OPP.
Press Ctrl+C to stop printing.
You can reduce low_to_high to trigger higher OPP requirement.
For smoothness and less powersaving:
Set low_to_high between 100-192.
Code:
echo 120 > mali_utilization_low_to_high
Mali max preemptive allocated max memory size:
Default is 16mb(16*1024*1024), bigger max size more throughput.
But when this value is too big, no more throughput.
For example: 48mb = 48*1024*1024
Code:
echo 50331648 > /sys/module/mali/parameters/pre_allocated_memory_size_max
Mali OS Kernel memory allocation order:
The lower value, the higher preference of allocating OS memory.
The default value is 6, I decreased it to 9 to fix OS memory allocation failure.
If you feel laggy, try 6 (default by driver)
Code:
echo 6 > /sys/module/mali/parameters/mali_oskmem_allocorder
TCP congestions:
Supported:
cubic(default), westwood, highspeed, vegas, veno, yeah
To check all the available options:
Code:
busybox sysctl net.ipv4.tcp_available_congestion_control
To change to other option:
Code:
busybox sysctl -w net.ipv4.tcp_congestion_control=YOU_WANT_TO
Latency - Download - Upload
cubic:
1st run: 15ms - 10,75Mbps - 7,82Mbps
2nd run: 14ms - 10,84Mbps - 8,06Mbps
westwood:
1st run: 11ms - 17,65Mbps - 8,30Mbps
2nd run: 13ms - 13,28Mbps - 8,29Mbps
highspeed:
1st run: 13ms - 10,76Mbps - 7,94Mbps
2nd run: 16ms - 14,42Mbps - 8,52Mbps
vegas:
1st run: 14ms - 8,49Mbps - 6,62Mbps
2nd run: 14ms - 12,00Mbps - 7,07Mbps
veno:
1st run: 13ms - 9,58Mbps - 8,13Mbps
2nd run: 13ms - 8,50Mbps - 7,64Mbps
yeah:
1st run: 14ms - 13,37Mbps - 8,28Mbps
2nd run: 17ms - 13,89Mbps - 8,14Mbps
- In fact, every congestion is designed for different environments.
- Google to learn more!
EGL Driver:
To use Mali hardware egl driver only:
Edit /system/lib/egl.cfg
0 0 android
0 1 mali
To
0 0 mali
Then remove libGLES_android.so
- Recommend to backup these files
- In case it cannot boot,use TWRP file manager to recover changes
Logcat:
Add a init.d script with the following content:
Code:
#!/system/bin/sh
insmod /system/lib/modules/logger.ko
And reboot your phone
Miscellaneous:
To refresh battery stats:
Code:
echo 1 > /sys/kernel/abb-fg/fg_refresh
Almost all tweaks will be restored to default after reboots.
So you can make your tweaks as init.d scripts or make scripts with SManager app to apply them at boot.
Been using it for a couple of hour, its stable enough on slimkat, no random reboots until now, great!!!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Sent from my Xperia U
no init.d support?!!??
i cannot copy any file in init.d folder .....
*****EDIT****
init.d script works (i've put files inside init.d folder using older bravekernel1.5) but seem to be some problems with built-in superuser app in this new kernel
problem solved flashing supersu instead ....
I can't get the lowmemkiller whitelist to work with CM11 W37. Instead I'm getting even more launcher redraws. Is there something wrong with my approach? I followed everything given in the OP's Thread.
really strange things ... with this kernel pinballarcade app completely desappears and sqlite editor app crashing at start... revert back to old bravekernel 1.5 everything back to works and pinballarcade reapears itself...
..::Matr!x::.. said:
really strange things ... with this kernel pinballarcade app completely desappears and sqlite editor app crashing at start... revert back to old bravekernel 1.5 everything back to works and pinballarcade reapears itself...
Click to expand...
Click to collapse
I'll revert my chages in fstab and check su permissions.
DivyaMamgai said:
I can't get the lowmemkiller whitelist to work with CM11 W37. Instead I'm getting even more launcher redraws. Is there something wrong with my approach? I followed everything given in the OP's Thread.
Click to expand...
Click to collapse
Try Performance Control app for doing it easily: http://forum.xda-developers.com/showthread.php?t=2401988
Sent from my D5503 using XDA Free mobile app
Random apps like settings, google play services etc started crashing in the background. Then finally I got a random reboot. Happened after 6 hours of use.
It's a great kernel but it really freaking slows my phone.
I'm using CM11 with ART.
Do this kernel not work well on ART?
I have not try this kernel, but the premises should be good and better than the stock kernel of CyanogenMod 11, I can not wait to try it! Thanks for your great hard work @Garcia98 , this is really the best Christmas gift I could do us all xperia u. Happy xmas @Garcia98 !
I will use it again soon.
I'll suggest to wait next release .... atm there's something not properly working with root & permissions....
small2cats482 said:
Random apps like settings, google play services etc started crashing in the background. Then finally I got a random reboot. Happened after 6 hours of use.
Click to expand...
Click to collapse
Which ROM are you using and which settings?
jose97ct said:
It's a great kernel but it really freaking slows my phone.
I'm using CM11 with ART.
Do this kernel not work well on ART?
Click to expand...
Click to collapse
I don't recommend ART in KitKat ROMs
________________
Merry Christmas and happy holidays to all of you!
Garcia98 said:
Which ROM are you using and which settings?
I don't recommend ART in KitKat ROMs
________________
Merry Christmas and happy holidays to all of you!
Click to expand...
Click to collapse
ART worked really fine for me, but I'm back on Dalvik, I miss Xposed and WhatsApp.
On a clean install I'm not having problems, and I'll report battery lasting, general performance and stuff in a few days.
Thank you so much for your work Garcia98 and Merry Christmas to you all!
After 12h of use the wifi cant wake up, the wifi try to connect to my network but always stop at "Obtaining IP".
I get back to stock kernel, but I've good feelings with it.
Garcia98 said:
Which ROM are you using and which settings?
Click to expand...
Click to collapse
I didn't touch any settings. Using Interactive and Row on CM11 weekly 34 or 35 I think.
Garcia, for some unknown reason, i can't copy init.d scripts into init.d folder. I checked my root permissions, everything's fine. I can delete apps from system. Also when i input frandom commands, it says no such file found. Can you please solve my issue?
Sent from the Mars to the Earth just to post a reply.
---------- Post added at 11:56 PM ---------- Previous post was at 11:07 PM ----------
I managed to get 50mb of swap file but I've one doubt. It's created in root/cache. Not in sdcard. I know swap file degrades any flash memory but if this degrades the system memory, i won't be able to switch on mobile, right or wrong?
Sent from the Mars to the Earth just to post a reply.
Vtrendzzy said:
Garcia, for some unknown reason, i can't copy init.d scripts into init.d folder. I checked my root permissions, everything's fine. I can delete apps from system. Also when i input frandom commands, it says no such file found. Can you please solve my issue?
Sent from the Mars to the Earth just to post a reply.
---------- Post added at 11:56 PM ---------- Previous post was at 11:07 PM ----------
I managed to get 50mb of swap file but I've one doubt. It's created in root/cache. Not in sdcard. I know swap file degrades any flash memory but if this degrades the system memory, i won't be able to switch on mobile, right or wrong?
Sent from the Mars to the Earth just to post a reply.
Click to expand...
Click to collapse
Try to create a file in init.d using su and touch /system/etc/init.d/nameofscript commands, also you can try to edit an existing script and add your commands there (dirty solution but the effect will be the same). This issue will be fixed in next release.
About frandom issue it was a typo in instructions, change the path adding /system in the beginning (/system/lib/modules/frandom.ko).
Regarding swap question, it's true that a flash memory is limited to a X number of write cycles, but our phone has just one flash memory of ~8GB, so it doesn't care in which partition you create the swapfile, however you can decrease swappiness to prevent that from happening
Sent from my D5503 using XDA Free mobile app
Garcia98 said:
Try to create a file in init.d using su and touch /system/etc/init.d/nameofscript commands, also you can try to edit an existing script and add your commands there (dirty solution but the effect will be the same). This issue will be fixed in next release.
About frandom issue it was a typo in instructions, change the path adding /system in the beginning (/system/lib/modules/frandom.ko).
Regarding swap question, it's true that a flash memory is limited to a X number of write cycles, but our phone has just one flash memory of ~8GB, so it doesn't care in which partition you create the swapfile, however you can decrease swappiness to prevent that from happening
Sent from my D5503 using XDA Free mobile app
Click to expand...
Click to collapse
Sent from the Mars to the Earth just to post a reply.

[KERNEL][3.0.101] BraveKernel Refresh for KitKat

BRAVEKERNEL REFRESH​
Here we go with something (re)fresh, this is the thread of a customized kernel for KitKat ROMs (CM11, AOSX, SlimKat...) with some extra features added.
As always, feedback is welcome and highly valuable
Please if a bug is already reported do not spam the thread reporting it again, and use XDA DevDB tools for posting features requests and bug reports if it's possible :good:
Main features are these:
- Based in 6.2.A.1.100 source code
- Built with Linaro Toolchain 4.9.3 optimized for Cortex A9
- TWRP 2.8.1.0
- FRandom support
- Improvement in I/O latency
- Interactive governor updated to 3.4
- VFP optimizations
- PowerOn Key emulator
- ABBamp Sound Control v2.5.0
- Mali tweaks and controllers
- Governors and I/O schedulers parameters tweaked
- Cycle Charging control
- Real end-of-charge notification
- FSync control (combined dynamic fsync control)
- Voltage OTG control
- Added extra free kbytes tunable
- Swap and zRAM support
- Disabled dynamic debug
- Tweaked readahead size
- More choices of TCP congestions
- Proportional Rate Reduction for TCP
- Fix for scaling of minimum frequency problem
- Management of not killable processes
- Built with optimized -O3 & Neon flags
- SLUB memory allocator
- Ramdisk and kernel compressed with LZO
Available CPU governors:
- Powersave
- Userspace
- OnDemand
- Interactive (default)
- InteractiveQ
- Conservative
- OnDemandQ
- PegasusQ
- LulzActiveQ
- AbyssPlug
- HotPlug
- PegasusQPlus
- SmartAssv2
Available I/O schedulers:
- No-op
- Deadline
- CFQ
- ROW
- BFQ
- SIO
- ZEN
- V(R)
- SIO-Plus (default)
Kernel Downloads for KitKat:
BraveKernel Refresh KK-4.4 Mediafire Folder
- v1.0 -
for CM 11.0, AOSX, SlimKat...​
How to install the kernel:
1) Download the kernel zip file to SD card
2) Reboot to recovery
3) Flash the kernel zip file
4) Wipe cache and dalvik cache if you are coming from another kernel
5) Reboot the system
Kernel Manager APP
If you prefer to use a simpler way for installing the kernel you can use this app, it allows you to make a backup of your current kernel and it also displays OTA updates of this kernel, really recommended :good:
Kernel sources (on GitHub):
Development repository of BraveKernel 3.0.101 for KK 4.4
​
Changelog:
Code:
[B]21/12/2014 - BraveKernel Refresh v1.0 for KitKat[/B]
- Initial release
Credits and thanks to:
munjeni and cocafe for their awesome work and their kernel sources
AGONTUK for TWRP recovery
CyanogenMod, Kernel.org, Sony, Google, Linaro GCC developers
All my testers
​
XDA:DevDB Information
BraveKernel Refresh, Kernel for the Sony Xperia Sola
Contributors
Garcia98
Kernel Special Features: Customized kernel 3.0.101 for KK 4.4.x ROM
Version Information
Status: Stable
Current Stable Version: v1.0
Stable Release Date: 2014-12-24
Created 2014-12-24
Last Updated 2015-01-10
HOW TOs
HOW TO PLAY WITH THIS KERNEL
Terminal emulator or ADB shell is needed.
If any command outputs 'Permission denied', you need su permission.
`???` stands for the number to input.
Sometimes you will need to mount and unmount debugfs partition:
For mounting it:
Code:
mount -t debugfs debugfs /d
For unmounting it:
Code:
umount /d
Boot time:
To check boot time:
Code:
cat /sys/boottime/kernel
CPU governors:
Performance, Interactive (default), Powersave, Userspace, Conservative, InteractiveQ, PegasusQ, HotPlug, OnDemandQ, OnDemand, AbyssPlug, LulzactiveQ, SmartAssv2
- OnDemand has been patched with cpu idle detection.
- Most of custom governors are based on ondemand/interactive.
- OndemandQ/InteractiveQ will hotplug cpu when screen turns off only.
- If you care about the battery life time, choose HotPlug. It hotplugs cpu frequently.
- Interactive updated to linux-android-3.4 (recommended).
- LulzactiveQ, will hotplug CPU1.
I/O schedulers:
SIO, SIO-Plus, VR, BFQ, CFQ, NO-OP, ZEN, ROW, Deadline
- Default IO scheduler: SIO-Plus
- SIO/ROW/SIO-Plus recommended!
FRandom module:
Code:
insmod /system/lib/modules/frandom.ko
chmod 0666 /dev/frandom
chmod 0666 /dev/erandom
mv /dev/random /dev/random.orig
mv /dev/urandom /dev/urandom.orig
ln -s /dev/frandom /dev/random
ln -s /dev/frandom /dev/urandom
Deepest sleep state:
Stock: 3 Default: 3
Deepest supported is 5.
Mount debugfs
To change deepest sleep state:
Code:
echo 5 > /d/cpuidle/deepest_state
- HotPlug governors works badly with 5.
- OnDemand works well with 5.
- Please note that it won’t increase the using time but standby time.
- You can add an init.d script to tweak it if you want.
To check the cpuidle state:
Code:
cat /d/cpuidle/stats
Management of not killable processes:
This feature allows to define processes and system processes white-lists filled with the preferred process names and to not be killed by lowmemorykiller, unless it is absolutely necessary.
This feature exposes four new lowmemorykiller parameters:
- donotkill_proc, is the flag to enable / disable this feature for the processes chosen by the user
- donotkill_sysproc, is the flag to enable / disable this feature for the system processes chosen by the user
- donotkill_proc_names, is the list of process names (comma separated) chosen by the user to be preserved from killing
- donotkill_sysproc_names, is the list of user system process names (comma separated) chosen by the user to be preserved from killing
When the lowmemorykiller needs to free ram, it will first kill the processes not included inside the two process name lists chosen by the user.
If there are no more standard killable processes, then it will be necessary to kill one of the processes included inside one of the two white-lists, to prevent system hangs, slowdowns, etc.
How to customize the white lists of processes to preserve from killing:
- Run these commands if you want to enable the feature
Code:
# To enable this feature for the processes chosen by the user
echo 1 > /sys/module/lowmemorykiller/parameters/donotkill_proc
# To enable this feature for the system processes chosen by the user
echo 1 > /sys/module/lowmemorykiller/parameters/donotkill_sysproc
- Run these commands if you want to disable the feature
Code:
# To disable this feature for the processes chosen by the user
echo 0 > /sys/module/lowmemorykiller/parameters/donotkill_proc
# To disable this feature for the system processes chosen by the user
echo 0 > /sys/module/lowmemorykiller/parameters/donotkill_sysproc
- Run this command if you want to add, for example, Trebuchet Launcher (CM default launcher) and the default keyboard to the processes white list
Code:
echo "com.cyanogenmod.trebuchet,android.inputmethod.latin" > /sys/module/lowmemorykiller/parameters/donotkill_proc_names
- Run this command if you want to add, for example, the system process, the phone process and DSP Manager to the system processes white list
Code:
echo "android.process.acore,com.android.phone,com.bel.android.dspmanager" > /sys/module/lowmemorykiller/parameters/donotkill_sysproc_names
zRAM:
zRAM is optimized for Android. It is not lazy anymore. Recommended zRAM instead of SWAP.
Using zRAM will take a little CPU, because it needs to compress/decompress memory.
Recommended compressing about 18% of RAM, about 100MB.
Setup disk size first: (example: 200MB)
Code:
echo $((200 * 1024 * 1024)) > /sys/block/zram0/disksize
- Larger size more RAM will be compressed.
- Too large size might make phone lag
To enable:
Code:
mkswap /dev/block/zram0
swapon /dev/block/zram0
To check how many does it use:
Code:
cat /sys/block/zram0/num_reads
cat /sys/block/zram0/num_writes
cat /proc/meminfo | grep swap
- We can get other info in its sysfs
Swap:
Using a file as swap RAM: (Create a continuity file first)
Code:
su
cd /cache
dd if=/dev/zero of=swapfile bs=1024 count=81920
mkswap swapfile
swapon swapfile
Then we will have 80MB of swap RAM.
Cycle Charging Control:
Similar to BLX by Ezekeel. It can be used to limit the battery charging level.
Example: Limit the battery level at 70% ~ 75%
Enable:
Code:
echo on > /sys/kernel/abb-fg/fg_cyc
Disable:
Code:
echo off > /sys/kernel/abb-fg/fg_cyc
Discharging threshold (battery level %):
Code:
echo dischar=75 > /sys/kernel/abb-fg/fg_cyc
Recharging threshold:
Code:
echo dischar=70 > /sys/kernel/abb-fg/fg_cyc
Real charged notification:
Well, please let me call it notification.
To be honest, it needs to check manually:
Code:
cat /sys/kernel/abb-chargalg/eoc_status
- You can use Root Browser to view these files in /sys/kernel/abb-chargalg
- When it says "First eoc reached", then the UI should show you charged 100%, but it is not the real full charged.
- When it says the real EOC reached, unplug the charger.
POnKey Emulator:
This is the software emulator of power key.
To turn off screen: ( 20 < value(ms) < 520 )
Code:
echo 100 > /sys/kernel/abb-ponkey/emulator
To active the power menu: ( 520 < value(ms) < ∞)
Code:
echo 800 > /sys/kernel/abb-ponkey/emulator
ABBamp Audio:
Please note that listening to too high volume music over 1 hour or more can damage your ears.
Too high volume can make your external speakers/headset overload or damage them.
First, why is it called `AMP`?
Because most of our tweaks are about gain(volume)
Our codec is simple, It doesn't have any hardware EQ (although i want...)
ABBamp sysfs entries are in:
/sys/kernel/abb-codec
- Use Root Browser to view this folder,there are lots files
Tweaks will take effects immediately!
Most tweaks will accept inputs like "on", "off" (no quotes)...
So, say "on" to enable this tweak, then this tweak will apply the value stored/inputed
View (cat) these files, most of them will give you useful information about this tweak.
They will show you the volume in dB of gain
`cd` to /sys/kernel/abb-codec first then do echos, will be more convenient.
AnaGain3 (Headset analog gain path):
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/anagain3
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/anagain3
Gain control: (min:0 ,max: 15) Lower value,higher volume (default: 0[+4dB])
Code:
echo left=?? > /sys/kernel/abb-codec/anagain3
echo right=?? > /sys/kernel/abb-codec/anagain3
Write both left and right channels:
Code:
echo gain=?? > /sys/kernel/abb-codec/anagain3
HsLDigGain (Headset left digital path gain):
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hsldiggain
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hsldiggain
Gain control: (min:0 ,max: 15) Lower value,higher volume (default: 4[+4dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/hsldiggain
HsRDigGain (Headset right digital path gain):
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hsrdiggain
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hsrdiggain
Gain control: (min:0 ,max: 15) Lower value,higher volume (default: 4[+4dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/hsrdiggain
Headset Volume Table:
value | volume
0.......+8dB (maximum)
1.......+7dB
2.......+6dB
3.......+5dB
4.......+4dB (tweaks default)
5.......+3dB
6.......+2dB
7.......+1dB
8.......+0dB (device default)
>=9....mute
- If set up digital path +4dB, analog gain +4dB, the result will get over +8dB
HsLowPow (Headset driver low power mode):
This lowpow mode is enabled by device normally.
If you want high performance audio instead of LPA(low power audio) you can disable it.
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hslowpow
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hslowpow
To tweak the mode (0: disable LP mode, 1: enable LP mode)
Code:
echo mode=? > /sys/kernel/abb-codec/hslowpow
HsDacLowPow (Headset DAC low power mode):
DAC is Digital-to-Analong Converter.
This lowpow mode is enabled by device normally.
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hsdaclowpow
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hsdaclowpow
To tweak the mode (0: disable LP mode, 1: enable LP mode)
Code:
echo mode=? > /sys/kernel/abb-codec/hsdaclowpow
HsHpEn (Headset high pass filter):
This high pass filter is disabled by device normally.
Enable this can reduce some sub-noise of audio.
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hshpen
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hshpen
To tweak the mode (0: disable highpass filter, 1: enable highpass filter)
Code:
echo mode=? > /sys/kernel/abb-codec/hshepen
Besides, the file anaconf1 will shows you the status of LPA
ClassDHPG (ClassD high-pass gain):
ClassD is a kind of amplifier.
According to the documents, our ClassD only relate to Handsfree(speaker).
This can increase the high frequencies sound of speaker
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/classdhpg
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/classdhgp
Gain control: (min:0 ,max: 10) higher value,higher gain (default: 10[Max gain])
Code:
echo gain=?? > /sys/kernel/abb-codec/classdhpg
ClassDDithWGain:
Gain control for the white component of dithering filter
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/classdwg
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/classdwp
Gain control: (min:0 ,max: 10) higher value,higher gain (default: 10[Max gain])
Code:
echo gain=?? > /sys/kernel/abb-codec/classdwg
ADDigGain2:
This is the audio path of mic2(phone mic, not headset mic)
This tweak will enable automatically when mic2 is enabled by device
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/addiggain2
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/addiggain2
Gain control: (min:0 ,max: 63) lower value, higher gain (default: [+6dB], max: 00[+31dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/addiggain2
EarDigGain:
This is the digital gain of earpiece
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/eardiggain
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/eardiggain
Gain control: (min:0 ,max: 15) lower value,higher gain (default: 4[+4dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/classdwg
- It uses the same path of HsLDigGain,please check the volume table of HsLDigGain
- +8 dB might crash the sound of earpiece
ShortCirConf:
Code:
This is a misc tweak
View shortcir this file first
[7] EnShortPWD
0: Automatic switch off on short circuit detection is disabled
1: Automatic switch off on short circuit detection is enabled
[6] EarShortDis
0: Short circuit detection on Ear driver enabled
1: Short circuit detection on Ear driver disabled
[5] HsShortDis
0: Short circuit detection on HsL and HsR drivers enabled
1: Short circuit detection on HsL and HsR drivers disabled
[4] HsPullDEn
0: HsL and HsR outputs are in high impedance
1: HsL and HsR outputs are pulled down to ground
[2] HsOscEn (ABBamp enables it by default)
0: The HS drivers use the system clock
1: The HS drivers use a local oscillator (system clock absent: analog path only)
[1] HsFadDis
0: All intermediate steps are applied between two programmed gains (fading)
1: Gain on HS is applied immediately
[0] HsZcdDis
0: HS gain changes on signal zero cross (unless time-out occurs)
1: HS gain is changed without zero cross control
[CODE]echo ?? ?? > /sys/kernel/abb-codec/shortcir
- The first ?? the slot of each option,the second ?? stands for the value to write to this slot
- View shortcir this file,you will get it[/CODE]
AnaConf4:
This interface controls the enables of analog path
We can use it to disable Speaker in kernel level.
So that you don't have to use the "mute all sound" in system settings,
Because, "mute all sound" will also mute Earpiece, which is inconvenient for us in calls.
Command format: Check anaconf4 first, This interface is a bit different from others:
Code:
echo [Index] [Disable?] > anaconf4
To Disable Speaker:
Code:
echo 5 1 > anaconf4
To Enable Speaker:
Code:
echo 5 0 > anaconf4
Headset Charge Pump:
Code:
echo 0 > chargepump to use fixed 1.8V supply.
echo 1 > chargepump to use dynamic voltage supply, lower power cost.
Lower-power Audio Mode:
Code:
echo on > lpa_mode to enable LPA mode
echo vape=0x?? > lpa_mode to adjust Vape voltage used in LPA mode
Experts!:
This method can work on any ab850x codec platform!
Mount debugfs
cd /d/asoc/U8500-card/ab8500-codec.0
Play music, reduce the volume.
Now we are going to edit the codec registers.
Code:
echo REG VAL > codec_reg
E.G:
AnaGain3:
Code:
echo 0x16 0x00 > codec_reg
HsDigGain: (left/right channel)
Code:
echo 0x4F 0x00 > codec_reg
echo 0x50 0x00 > codec_reg
Disable all lowpow mode:
Code:
echo 0x04 0x00 > codec_reg
- These hacks will restore when codec power off.
Camera LED Flash:
Turn on torch with more brightness, turning this on for a long time will heat up your device, be careful!
Enable/Disable:
Code:
echo 1/0 > /sys/devices/platform/nmk-i2c.2/i2c-2/2-0053/torch_enable
echo 149600 > /sys/devices/platform/nmk-i2c.2/i2c-2/2-0053/torch_current
FSync control:
Get current status:
Code:
cat /sys/kernel/fsync/mode
FSYNC modes:
0: fsync on
1: fsync off
2: fsync dyn
Disable FSYNC:
Code:
echo 1 > /sys/kernel/fsync/mode
Disabling fsync can improve I/O performance, but it can make the data which hasn't been written lose when a sudden power cut occurs.
Enable Dynamic FSYNC:
Code:
echo 2 > /sys/kernel/fsync/mode
- Dynamic fsync will sync all buffers when screen turns off.
- If there is a heavy I/O load, the screen might get stuck for seconds.
Mali GPU:
Mali debug level:
Disabling can speed up a bit
Code:
echo 0 > /sys/module/mali/parameters/mali_debug_level
- Higher level, more messages will be printed in dmesg, system will slow down
Mali L2 max reads control: (Stock:28kb,Default:48kb(max))
Code:
echo xx > /sys/module/mali/parameters/mali_l2_max_read
- Some values will slow down graphics
- If not sure, keep default
Mali PM sampling rate: (Default: 1000ms)
Code:
echo xx > /sys/module/mali/parameters/mali_pm_sampling_rate
Mali PP scheduler tweaks: (Default: disable)
Code:
echo 1 > /sys/module/mali/parameters/mali_pp_scheduler_balance_jobs
- Enabling this, some places will over ahead, choose by yourself
Mali Utilization sampling rate: (Stock:500ms, Default:1000ms)
How often report a mali utilization.
Code:
echo xxx > /sys/module/mali/parameters/mali_utilization_sampling_rate
- Keep this default if unsure.
Mali utilization control:
(Default: low_to_high 192 high_to_low 64)
Our driver will report a mali utilization frequently.
This utilization(range: 0~255) means the load of mali.
If utilization is bigger than low_to_high, driver will request higher hardware performance(highest APE/DDR OPP).
If utilization is smaller than high_to_low, the driver will store the requested OPP(uses low OPP).
OPP can be understood as freq simply.
To check mali utilization values:
Code:
echo 5 > /sys/module/mali/parameters/mali_debug_level
cat /proc/kmsg | grep -i utilization
When it says SIGNAL_HIGH, it will request highest OPP.
When it says SIGNAL_LOW, it will request lowest OPP.
Press Ctrl+C to stop printing.
You can reduce low_to_high to trigger higher OPP requirement.
For smoothness and less powersaving:
Set low_to_high between 100-192.
Code:
echo 120 > mali_utilization_low_to_high
Mali max preemptive allocated max memory size:
Default is 16mb(16*1024*1024), bigger max size more throughput.
But when this value is too big, no more throughput.
For example: 48mb = 48*1024*1024
Code:
echo 50331648 > /sys/module/mali/parameters/pre_allocated_memory_size_max
Mali OS Kernel memory allocation order:
The lower value, the higher preference of allocating OS memory.
The default value is 6, I decreased it to 9 to fix OS memory allocation failure.
If you feel laggy, try 6 (default by driver)
Code:
echo 6 > /sys/module/mali/parameters/mali_oskmem_allocorder
TCP congestions:
Supported:
cubic(default), westwood, highspeed, vegas, veno, yeah
To check all the available options:
Code:
busybox sysctl net.ipv4.tcp_available_congestion_control
To change to other option:
Code:
busybox sysctl -w net.ipv4.tcp_congestion_control=YOU_WANT_TO
Latency - Download - Upload
cubic:
1st run: 15ms - 10,75Mbps - 7,82Mbps
2nd run: 14ms - 10,84Mbps - 8,06Mbps
westwood:
1st run: 11ms - 17,65Mbps - 8,30Mbps
2nd run: 13ms - 13,28Mbps - 8,29Mbps
highspeed:
1st run: 13ms - 10,76Mbps - 7,94Mbps
2nd run: 16ms - 14,42Mbps - 8,52Mbps
vegas:
1st run: 14ms - 8,49Mbps - 6,62Mbps
2nd run: 14ms - 12,00Mbps - 7,07Mbps
veno:
1st run: 13ms - 9,58Mbps - 8,13Mbps
2nd run: 13ms - 8,50Mbps - 7,64Mbps
yeah:
1st run: 14ms - 13,37Mbps - 8,28Mbps
2nd run: 17ms - 13,89Mbps - 8,14Mbps
- In fact, every congestion is designed for different environments.
- Google to learn more!
EGL Driver:
To use Mali hardware egl driver only:
Edit /system/lib/egl.cfg
0 0 android
0 1 mali
To
0 0 mali
Then remove libGLES_android.so
- Recommend to backup these files
- In case it cannot boot,use TWRP file manager to recover changes
Logcat:
Create a new file(empty file) named logger in /data
When this file exists, kernel will load logger.ko for you automatically
Miscellaneous:
To refresh battery stats:
Code:
echo 1 > /sys/kernel/abb-fg/fg_refresh
Almost all tweaks will be restored to default after reboots.
So you can make your tweaks as init.d scripts or make scripts with SManager app to apply them at boot.
OK, it's booted.
Gonna try more.
Very laggy after flashing. I followed all the installation steps correctly.
Downloading now
Works excellent on CM11!
Will report soon battery life
acGFX said:
Very laggy after flashing. I followed all the installation steps correctly.
Click to expand...
Click to collapse
+1
Lag is present and I am noticing random freezes at times
Sent from my Xperia Sola using XDA Free mobile app
Finally!
Going to try soon!
Thanks for this -
Real charged notification:
Well, please let me call it notification.
To be honest, it needs to check manually:
Code:
cat /sys/kernel/abb-chargalg/eoc_status
- You can use Root Browser to view these files in /sys/kernel/abb-chargalg
- When it says "First eoc reached", then the UI should show you charged 100%, but it is not the real full charged.
- When it says the real EOC reached, unplug the charger.
And, can you explain what's this? -
POnKey Emulator:
This is the software emulator of power key.
To turn off screen: ( 20 < value(ms) < 520 )
Code:
echo 100 > /sys/kernel/abb-ponkey/emulator
To active the power menu: ( 520 < value(ms) < ∞)
Code:
echo 800 > /sys/kernel/abb-ponkey/emulator
acGFX said:
Very laggy after flashing. I followed all the installation steps correctly.
Click to expand...
Click to collapse
abbas23 said:
+1
Lag is present and I am noticing random freezes at times
Sent from my Xperia Sola using XDA Free mobile app
Click to expand...
Click to collapse
Which ROM are you using?
DarkFalcon said:
Finally!
Going to try soon!
Thanks for this -
Real charged notification:
Well, please let me call it notification.
To be honest, it needs to check manually:
Code:
cat /sys/kernel/abb-chargalg/eoc_status
- You can use Root Browser to view these files in /sys/kernel/abb-chargalg
- When it says "First eoc reached", then the UI should show you charged 100%, but it is not the real full charged.
- When it says the real EOC reached, unplug the charger.
And, can you explain what's this? -
POnKey Emulator:
This is the software emulator of power key.
To turn off screen: ( 20 < value(ms) < 520 )
Code:
echo 100 > /sys/kernel/abb-ponkey/emulator
To active the power menu: ( 520 < value(ms) < ∞)
Code:
echo 800 > /sys/kernel/abb-ponkey/emulator
Click to expand...
Click to collapse
The P(ower)OnKey Emulator emulates the power button (a short value turns on/off the screen and a long value opens the power menu), you probably won't be using this very often, but it is useful to have it just if it's needed.
Cm11
Sent from my Xperia Sola using XDA Free mobile app
CM11 Build 35
I didn't have any lags in omniROM.
psycho-punk said:
Does this kernel work with OmniROM?
Click to expand...
Click to collapse
yes, of course.
itachilinux said:
yes, of course.
Click to expand...
Click to collapse
What about battery life ? Better, worse or about the same? P.s sorry for asking too much
Sent from my Xperia Sola using XDA Free mobile app
abbas23 said:
What about battery life ? Better, worse or about the same? P.s sorry for asking too much
Sent from my Xperia Sola using XDA Free mobile app
Click to expand...
Click to collapse
don't ask me for battery life. my battery is damaged
abbas23 said:
Cm11
Sent from my Xperia Sola using XDA Free mobile app
Click to expand...
Click to collapse
acGFX said:
CM11 Build 35
Click to expand...
Click to collapse
Weird...
________________
Merry Christmas and happy holidays to all of you!
im using carbon kitkat for xperia sola, it will work ?
Okay i flashed it again after unmounting system
It is working perfectly now thanks a lot
Sent from my Xperia Sola using XDA Free mobile app
kiayichsan said:
im using carbon kitkat for xperia sola, it will work ?
Click to expand...
Click to collapse
yes
How is the battery life?
Sent from my MT27i using Tapatalk
Will there be a fix for CM11? It is very hard to do something now and I don't want to re-flash.

[KERNEL][3.0.101] BraveKernel Refresh for KitKat

BRAVEKERNEL REFRESH​
Here we go with something (re)fresh, this is the thread of a customized kernel for KitKat ROMs (CM11, AOSX, SlimKat...) with some extra features added.
As always, feedback is welcome and highly valuable
Please if a bug is already reported do not spam the thread reporting it again, and use XDA DevDB tools for posting features requests and bug reports if it's possible :good:
Main features are these:
- Based in 6.2.A.1.100 source code
- Built with Linaro Toolchain 4.9.3 optimized for Cortex A9
- TWRP 2.8.4.0
- FRandom support
- Improvement in I/O latency
- Interactive governor updated to 3.4
- VFP optimizations
- PowerOn Key emulator
- ABBamp Sound Control v2.5.0
- Mali tweaks and controllers
- Governors and I/O schedulers parameters tweaked
- Cycle Charging control
- Real end-of-charge notification
- FSync control (combined dynamic fsync control)
- Voltage OTG control
- Added extra free kbytes tunable
- Swap and zRAM support
- Disabled dynamic debug
- Tweaked readahead size
- More choices of TCP congestions
- Proportional Rate Reduction for TCP
- Fix for scaling of minimum frequency problem
- Built with optimized -O3 & Neon flags
- SLUB memory allocator
- Ramdisk and kernel compressed with LZO
Available CPU governors:
- Powersave
- Userspace
- OnDemand
- Interactive (default)
- InteractiveQ
- Conservative
- OnDemandQ
- PegasusQ
- LulzActiveQ
- AbyssPlug
- HotPlug
- PegasusQPlus
- SmartAssv2
Available I/O schedulers:
- No-op
- Deadline
- CFQ
- ROW
- BFQ
- SIO
- ZEN
- V(R)
- SIO-Plus (default)
Kernel Downloads for KitKat:
BraveKernel Refresh KK-4.4 MediaFire Folder
- v1.3 -
for CM 11.0, AOSX, SlimKat...​
How to install the kernel:
1) Download the kernel zip file to SD card
2) Reboot to recovery
3) Flash the kernel zip file
4) Wipe cache and dalvik cache if you are coming from another kernel
5) Reboot the system
Kernel Manager APP
If you prefer to use a simpler way for installing the kernel you can use this app, it allows you to make a backup of your current kernel and it also displays OTA updates of this kernel, really recommended :good:
Kernel sources (on GitHub):
Development repository of BraveKernel 3.0.101 for KK 4.4
​
Changelog:
Code:
[B]08/02/2015 - BraveKernel Refresh v1.3 for KitKat[/B]
- Added minfree tweak in crontab
- Disabled management of not killable processes
- Tweaked adj and minfree values in init.d
- Added memory tweak in crontab
- Tweaked read_ahead_kb values
- Added F2FS support
- Fixed network arrows and speed information
- Fixed root and storage issues
- Added recovery in FOTA partition support
- Added kexec hardboot support
- Added 3 extra MB of usable RAM
- Added dynamic management of dirty page writebacks
- Added Ultra KSM
- Added entropy tweaks
- Updated BFQ scheduler
- Updated Linaro toolchain
- Improved LZO decompression
- Tweaked LMK
- Improved network speed
- Improved CPU performance
- Improved EXT4 speed
- Improved power management
- Tweaked memory management values
- Enabled clean cache
- Enabled JRCU
[B]21/12/2014 - BraveKernel Refresh v1.0 for KitKat[/B]
- Initial release
Credits and thanks to:
munjeni and cocafe for their awesome work and their kernel sources
AGONTUK for TWRP recovery
CyanogenMod, Kernel.org, Sony, Google, Linaro GCC developers
All my testers
​
XDA:DevDB Information
BraveKernel Refresh, Kernel for the Sony Xperia Go
Contributors
Garcia98
Kernel Special Features: Customized kernel 3.0.101 for KK 4.4.x ROM
Version Information
Status: Stable
Current Stable Version: v1.3
Stable Release Date: 2015-02-08
Created 2014-12-24
Last Updated 2016-06-10
HOW TOs
HOW TO PLAY WITH THIS KERNEL
Terminal emulator or ADB shell is needed.
If any command outputs 'Permission denied', you need su permission.
`???` stands for the number to input.
F2FS:
To enable F2FS:
1) Reboot into recovery
2) Touch Wipe option > Advanced Wipe
3) Select the partition you want to convert to F2FS (Data or Cache)
4) Select Repair or Change File System option
5) Touch Change File System and then select F2FS
Boot time:
To check boot time:
Code:
cat /sys/boottime/kernel
CPU governors:
Performance, Interactive (default), Powersave, Userspace, Conservative, InteractiveQ, PegasusQ, HotPlug, OnDemandQ, OnDemand, AbyssPlug, LulzactiveQ, SmartAssv2
- OnDemand has been patched with cpu idle detection.
- Most of custom governors are based on ondemand/interactive.
- OndemandQ/InteractiveQ will hotplug cpu when screen turns off only.
- If you care about the battery life time, choose HotPlug. It hotplugs cpu frequently.
- Interactive updated to linux-android-3.4 (recommended).
- LulzactiveQ, will hotplug CPU1.
I/O schedulers:
SIO, SIO-Plus, VR, BFQ, CFQ, NO-OP, ZEN, ROW, Deadline
- Default IO scheduler: SIO-Plus
- SIO/ROW/SIO-Plus recommended!
FRandom module:
Code:
insmod /system/lib/modules/frandom.ko
chmod 0666 /dev/frandom
chmod 0666 /dev/erandom
mv /dev/random /dev/random.orig
mv /dev/urandom /dev/urandom.orig
ln -s /dev/frandom /dev/random
ln -s /dev/frandom /dev/urandom
Deepest sleep state:
Stock: 3 Default: 3
Deepest supported is 5.
To change deepest sleep state:
Code:
echo 5 > /d/cpuidle/deepest_state
- HotPlug governors works badly with 5.
- OnDemand works well with 5.
- Please note that it won’t increase the using time but standby time.
- You can add an init.d script to tweak it if you want.
To check the cpuidle state:
Code:
cat /d/cpuidle/stats
zRAM:
zRAM is optimized for Android. It is not lazy anymore. Recommended zRAM instead of SWAP.
Using zRAM will take a little CPU, because it needs to compress/decompress memory.
Recommended compressing about 18% of RAM, about 100MB.
Setup disk size first: (example: 200MB)
Code:
echo $((200 * 1024 * 1024)) > /sys/block/zram0/disksize
- Larger size more RAM will be compressed.
- Too large size might make phone lag
To enable:
Code:
mkswap /dev/block/zram0
swapon /dev/block/zram0
To check how many does it use:
Code:
cat /sys/block/zram0/num_reads
cat /sys/block/zram0/num_writes
cat /proc/meminfo | grep swap
- We can get other info in its sysfs
Swap:
Using a file as swap RAM: (Create a continuity file first)
Code:
su
cd /cache
dd if=/dev/zero of=swapfile bs=1024 count=81920
mkswap swapfile
swapon swapfile
Then we will have 80MB of swap RAM.
Cycle Charging Control:
Similar to BLX by Ezekeel. It can be used to limit the battery charging level.
Example: Limit the battery level at 70% ~ 75%
Enable:
Code:
echo on > /sys/kernel/abb-fg/fg_cyc
Disable:
Code:
echo off > /sys/kernel/abb-fg/fg_cyc
Discharging threshold (battery level %):
Code:
echo dischar=75 > /sys/kernel/abb-fg/fg_cyc
Recharging threshold:
Code:
echo dischar=70 > /sys/kernel/abb-fg/fg_cyc
Real charged notification:
Well, please let me call it notification.
To be honest, it needs to check manually:
Code:
cat /sys/kernel/abb-chargalg/eoc_status
- You can use Root Browser to view these files in /sys/kernel/abb-chargalg
- When it says "First eoc reached", then the UI should show you charged 100%, but it is not the real full charged.
- When it says the real EOC reached, unplug the charger.
POnKey Emulator:
This is the software emulator of power key.
To turn off screen: ( 20 < value(ms) < 520 )
Code:
echo 100 > /sys/kernel/abb-ponkey/emulator
To active the power menu: ( 520 < value(ms) < ∞)
Code:
echo 800 > /sys/kernel/abb-ponkey/emulator
ABBamp Audio:
Please note that listening to too high volume music over 1 hour or more can damage your ears.
Too high volume can make your external speakers/headset overload or damage them.
First, why is it called `AMP`?
Because most of our tweaks are about gain(volume)
Our codec is simple, It doesn't have any hardware EQ (although i want...)
ABBamp sysfs entries are in:
/sys/kernel/abb-codec
- Use Root Browser to view this folder,there are lots files
Tweaks will take effects immediately!
Most tweaks will accept inputs like "on", "off" (no quotes)...
So, say "on" to enable this tweak, then this tweak will apply the value stored/inputed
View (cat) these files, most of them will give you useful information about this tweak.
They will show you the volume in dB of gain
`cd` to /sys/kernel/abb-codec first then do echos, will be more convenient.
AnaGain3 (Headset analog gain path):
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/anagain3
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/anagain3
Gain control: (min:0 ,max: 15) Lower value,higher volume (default: 0[+4dB])
Code:
echo left=?? > /sys/kernel/abb-codec/anagain3
echo right=?? > /sys/kernel/abb-codec/anagain3
Write both left and right channels:
Code:
echo gain=?? > /sys/kernel/abb-codec/anagain3
HsLDigGain (Headset left digital path gain):
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hsldiggain
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hsldiggain
Gain control: (min:0 ,max: 15) Lower value,higher volume (default: 4[+4dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/hsldiggain
HsRDigGain (Headset right digital path gain):
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hsrdiggain
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hsrdiggain
Gain control: (min:0 ,max: 15) Lower value,higher volume (default: 4[+4dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/hsrdiggain
Headset Volume Table:
value | volume
0.......+8dB (maximum)
1.......+7dB
2.......+6dB
3.......+5dB
4.......+4dB (tweaks default)
5.......+3dB
6.......+2dB
7.......+1dB
8.......+0dB (device default)
>=9....mute
- If set up digital path +4dB, analog gain +4dB, the result will get over +8dB
HsLowPow (Headset driver low power mode):
This lowpow mode is enabled by device normally.
If you want high performance audio instead of LPA(low power audio) you can disable it.
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hslowpow
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hslowpow
To tweak the mode (0: disable LP mode, 1: enable LP mode)
Code:
echo mode=? > /sys/kernel/abb-codec/hslowpow
HsDacLowPow (Headset DAC low power mode):
DAC is Digital-to-Analong Converter.
This lowpow mode is enabled by device normally.
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hsdaclowpow
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hsdaclowpow
To tweak the mode (0: disable LP mode, 1: enable LP mode)
Code:
echo mode=? > /sys/kernel/abb-codec/hsdaclowpow
HsHpEn (Headset high pass filter):
This high pass filter is disabled by device normally.
Enable this can reduce some sub-noise of audio.
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hshpen
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hshpen
To tweak the mode (0: disable highpass filter, 1: enable highpass filter)
Code:
echo mode=? > /sys/kernel/abb-codec/hshepen
Besides, the file anaconf1 will shows you the status of LPA
ClassDHPG (ClassD high-pass gain):
ClassD is a kind of amplifier.
According to the documents, our ClassD only relate to Handsfree(speaker).
This can increase the high frequencies sound of speaker
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/classdhpg
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/classdhgp
Gain control: (min:0 ,max: 10) higher value,higher gain (default: 10[Max gain])
Code:
echo gain=?? > /sys/kernel/abb-codec/classdhpg
ClassDDithWGain:
Gain control for the white component of dithering filter
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/classdwg
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/classdwp
Gain control: (min:0 ,max: 10) higher value,higher gain (default: 10[Max gain])
Code:
echo gain=?? > /sys/kernel/abb-codec/classdwg
ADDigGain2:
This is the audio path of mic2(phone mic, not headset mic)
This tweak will enable automatically when mic2 is enabled by device
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/addiggain2
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/addiggain2
Gain control: (min:0 ,max: 63) lower value, higher gain (default: [+6dB], max: 00[+31dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/addiggain2
EarDigGain:
This is the digital gain of earpiece
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/eardiggain
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/eardiggain
Gain control: (min:0 ,max: 15) lower value,higher gain (default: 4[+4dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/classdwg
- It uses the same path of HsLDigGain,please check the volume table of HsLDigGain
- +8 dB might crash the sound of earpiece
ShortCirConf:
Code:
This is a misc tweak
View shortcir this file first
[7] EnShortPWD
0: Automatic switch off on short circuit detection is disabled
1: Automatic switch off on short circuit detection is enabled
[6] EarShortDis
0: Short circuit detection on Ear driver enabled
1: Short circuit detection on Ear driver disabled
[5] HsShortDis
0: Short circuit detection on HsL and HsR drivers enabled
1: Short circuit detection on HsL and HsR drivers disabled
[4] HsPullDEn
0: HsL and HsR outputs are in high impedance
1: HsL and HsR outputs are pulled down to ground
[2] HsOscEn (ABBamp enables it by default)
0: The HS drivers use the system clock
1: The HS drivers use a local oscillator (system clock absent: analog path only)
[1] HsFadDis
0: All intermediate steps are applied between two programmed gains (fading)
1: Gain on HS is applied immediately
[0] HsZcdDis
0: HS gain changes on signal zero cross (unless time-out occurs)
1: HS gain is changed without zero cross control
[CODE]echo ?? ?? > /sys/kernel/abb-codec/shortcir
- The first ?? the slot of each option,the second ?? stands for the value to write to this slot
- View shortcir this file,you will get it[/CODE]
AnaConf4:
This interface controls the enables of analog path
We can use it to disable Speaker in kernel level.
So that you don't have to use the "mute all sound" in system settings,
Because, "mute all sound" will also mute Earpiece, which is inconvenient for us in calls.
Command format: Check anaconf4 first, This interface is a bit different from others:
Code:
echo [Index] [Disable?] > anaconf4
To Disable Speaker:
Code:
echo 5 1 > anaconf4
To Enable Speaker:
Code:
echo 5 0 > anaconf4
Headset Charge Pump:
Code:
echo 0 > chargepump to use fixed 1.8V supply.
echo 1 > chargepump to use dynamic voltage supply, lower power cost.
Lower-power Audio Mode:
Code:
echo on > lpa_mode to enable LPA mode
echo vape=0x?? > lpa_mode to adjust Vape voltage used in LPA mode
Experts!:
This method can work on any ab850x codec platform!
cd /d/asoc/U8500-card/ab8500-codec.0
Play music, reduce the volume.
Now we are going to edit the codec registers.
Code:
echo REG VAL > codec_reg
E.G:
AnaGain3:
Code:
echo 0x16 0x00 > codec_reg
HsDigGain: (left/right channel)
Code:
echo 0x4F 0x00 > codec_reg
echo 0x50 0x00 > codec_reg
Disable all lowpow mode:
Code:
echo 0x04 0x00 > codec_reg
- These hacks will restore when codec power off.
Camera LED Flash:
Turn on torch with more brightness, turning this on for a long time will heat up your device, be careful!
Enable/Disable:
Code:
echo 1/0 > /sys/devices/platform/nmk-i2c.2/i2c-2/2-0053/torch_enable
echo 149600 > /sys/devices/platform/nmk-i2c.2/i2c-2/2-0053/torch_current
FSync control:
Get current status:
Code:
cat /sys/kernel/fsync/mode
FSYNC modes:
0: fsync on
1: fsync off
2: fsync dyn
Disable FSYNC:
Code:
echo 1 > /sys/kernel/fsync/mode
Disabling fsync can improve I/O performance, but it can make the data which hasn't been written lose when a sudden power cut occurs.
Enable Dynamic FSYNC:
Code:
echo 2 > /sys/kernel/fsync/mode
- Dynamic fsync will sync all buffers when screen turns off.
- If there is a heavy I/O load, the screen might get stuck for seconds.
Mali GPU:
Mali debug level:
Disabling can speed up a bit
Code:
echo 0 > /sys/module/mali/parameters/mali_debug_level
- Higher level, more messages will be printed in dmesg, system will slow down
Mali L2 max reads control: (Stock:28kb,Default:48kb(max))
Code:
echo xx > /sys/module/mali/parameters/mali_l2_max_read
- Some values will slow down graphics
- If not sure, keep default
Mali PM sampling rate: (Default: 1000ms)
Code:
echo xx > /sys/module/mali/parameters/mali_pm_sampling_rate
Mali PP scheduler tweaks: (Default: disable)
Code:
echo 1 > /sys/module/mali/parameters/mali_pp_scheduler_balance_jobs
- Enabling this, some places will over ahead, choose by yourself
Mali Utilization sampling rate: (Stock:500ms, Default:1000ms)
How often report a mali utilization.
Code:
echo xxx > /sys/module/mali/parameters/mali_utilization_sampling_rate
- Keep this default if unsure.
Mali utilization control:
(Default: low_to_high 192 high_to_low 64)
Our driver will report a mali utilization frequently.
This utilization(range: 0~255) means the load of mali.
If utilization is bigger than low_to_high, driver will request higher hardware performance(highest APE/DDR OPP).
If utilization is smaller than high_to_low, the driver will store the requested OPP(uses low OPP).
OPP can be understood as freq simply.
To check mali utilization values:
Code:
echo 5 > /sys/module/mali/parameters/mali_debug_level
cat /proc/kmsg | grep -i utilization
When it says SIGNAL_HIGH, it will request highest OPP.
When it says SIGNAL_LOW, it will request lowest OPP.
Press Ctrl+C to stop printing.
You can reduce low_to_high to trigger higher OPP requirement.
For smoothness and less powersaving:
Set low_to_high between 100-192.
Code:
echo 120 > mali_utilization_low_to_high
Mali max preemptive allocated max memory size:
Default is 16mb(16*1024*1024), bigger max size more throughput.
But when this value is too big, no more throughput.
For example: 48mb = 48*1024*1024
Code:
echo 50331648 > /sys/module/mali/parameters/pre_allocated_memory_size_max
Mali OS Kernel memory allocation order:
The lower value, the higher preference of allocating OS memory.
The default value is 6, I decreased it to 9 to fix OS memory allocation failure.
If you feel laggy, try 6 (default by driver)
Code:
echo 6 > /sys/module/mali/parameters/mali_oskmem_allocorder
TCP congestions:
Supported:
cubic(default), westwood, highspeed, vegas, veno, yeah
To check all the available options:
Code:
busybox sysctl net.ipv4.tcp_available_congestion_control
To change to other option:
Code:
busybox sysctl -w net.ipv4.tcp_congestion_control=YOU_WANT_TO
Latency - Download - Upload
cubic:
1st run: 15ms - 10,75Mbps - 7,82Mbps
2nd run: 14ms - 10,84Mbps - 8,06Mbps
westwood:
1st run: 11ms - 17,65Mbps - 8,30Mbps
2nd run: 13ms - 13,28Mbps - 8,29Mbps
highspeed:
1st run: 13ms - 10,76Mbps - 7,94Mbps
2nd run: 16ms - 14,42Mbps - 8,52Mbps
vegas:
1st run: 14ms - 8,49Mbps - 6,62Mbps
2nd run: 14ms - 12,00Mbps - 7,07Mbps
veno:
1st run: 13ms - 9,58Mbps - 8,13Mbps
2nd run: 13ms - 8,50Mbps - 7,64Mbps
yeah:
1st run: 14ms - 13,37Mbps - 8,28Mbps
2nd run: 17ms - 13,89Mbps - 8,14Mbps
- In fact, every congestion is designed for different environments.
- Google to learn more!
EGL Driver:
To use Mali hardware egl driver only:
Edit /system/lib/egl.cfg
0 0 android
0 1 mali
To
0 0 mali
Then remove libGLES_android.so
- Recommend to backup these files
- In case it cannot boot,use TWRP file manager to recover changes
Logcat:
Create a new file(empty file) named logger in /data
When this file exists, kernel will load logger.ko for you automatically
Miscellaneous:
To refresh battery stats:
Code:
echo 1 > /sys/kernel/abb-fg/fg_refresh
Almost all tweaks will be restored to default after reboots.
So you can make your tweaks as init.d scripts or make scripts with SManager app to apply them at boot.
Just flash in my Xperia Go. Boot fine, and work just fine. Need some time to tune and test the battery and smoothness. :good::good::good:
Does it work on stock 6.2.A.1.100? If yes, controindications?
Rob80 said:
Does it work on stock 6.2.A.1.100? If yes, controindications?
Click to expand...
Click to collapse
No, it just works with KitKat ROMs
Sent from my D5503 using XDA Free mobile app
Merry Christmas and happy holidays to all of you!
Any status of new kernel update?
BelzIgoh said:
Any status of new kernel update?
Click to expand...
Click to collapse
I need a tester
Sent from my D5503 using XDA Free mobile app
you can still send me Kernels to try out
Garcia98 said:
I need a tester
Sent from my D5503 using XDA Free mobile app
Click to expand...
Click to collapse
I can help you to test.
Brave Kernel Xperia Go Test
The test kernel boot fine.
Using the test kernel for a day. Kernel work awesomely.
Only found out that Interactive governor tunables not optimize for xperia go.
The governor not tune according to xperia go cpu, the tuneable are the same with my nexus 5
So i change the hispeed freq from 1190400 to 1000000, etc...
Now gonna test the kernel battery life, will let the phone idle for over night and then see the battery usage.
New release is out!
Version 1.3 of BraveKernel Refresh is out!
This version fixes the few bugs of the previous version and includes many new features like F2FS, look at second post for learning how to use this feature
Download the zip below and flash it in recovery or install it using Kernel Manager app
Download:
BraveKernel-Refresh_v1.3-lotus.zip
Changelog:
Code:
[B]08/02/2015 - BraveKernel Refresh v1.3 for KitKat[/B]
- Added minfree tweak in crontab
- Disabled management of not killable processes
- Tweaked adj and minfree values in init.d
- Added memory tweak in crontab
- Tweaked read_ahead_kb values
- Added F2FS support
- Fixed network arrows and speed information
- Fixed root and storage issues
- Added recovery in FOTA partition support
- Added kexec hardboot support
- Added 3 extra MB of usable RAM
- Added dynamic management of dirty page writebacks
- Added Ultra KSM
- Added entropy tweaks
- Updated BFQ scheduler
- Updated Linaro toolchain
- Improved LZO decompression
- Tweaked LMK
- Improved network speed
- Improved CPU performance
- Improved EXT4 speed
- Improved power management
- Tweaked memory management values
- Enabled clean cache
- Enabled JRCU
So far the kernel is working great. Over next week I'll be able to tell the approximate battery drain for my Go.
Only problem is with the recovery - the touch responses are not working as they should, for example, I can't use sliders (to accept zip flash or related) and buttons when pressed act weird. Any clues how to fix this?
This kernel is fantastic
Garcia98 said:
BRAVEKERNEL REFRESH​
Here we go with something (re)fresh, this is the thread of a customized kernel for KitKat ROMs (CM11, AOSX, SlimKat...) with some extra features added.
As always, feedback is welcome and highly valuable
Please if a bug is already reported do not spam the thread reporting it again, and use XDA DevDB tools for posting features requests and bug reports if it's possible :good:
Main features are these:
- Based in 6.2.A.1.100 source code
- Built with Linaro Toolchain 4.9.3 optimized for Cortex A9
- TWRP 2.8.4.0
- FRandom support
- Improvement in I/O latency
- Interactive governor updated to 3.4
- VFP optimizations
- PowerOn Key emulator
- ABBamp Sound Control v2.5.0
- Mali tweaks and controllers
- Governors and I/O schedulers parameters tweaked
- Cycle Charging control
- Real end-of-charge notification
- FSync control (combined dynamic fsync control)
- Voltage OTG control
- Added extra free kbytes tunable
- Swap and zRAM support
- Disabled dynamic debug
- Tweaked readahead size
- More choices of TCP congestions
- Proportional Rate Reduction for TCP
- Fix for scaling of minimum frequency problem
- Built with optimized -O3 & Neon flags
- SLUB memory allocator
- Ramdisk and kernel compressed with LZO
Available CPU governors:
- Powersave
- Userspace
- OnDemand
- Interactive (default)
- InteractiveQ
- Conservative
- OnDemandQ
- PegasusQ
- LulzActiveQ
- AbyssPlug
- HotPlug
- PegasusQPlus
- SmartAssv2
Available I/O schedulers:
- No-op
- Deadline
- CFQ
- ROW
- BFQ
- SIO
- ZEN
- V(R)
- SIO-Plus (default)
Kernel Downloads for KitKat:
BraveKernel Refresh KK-4.4 Folder
- v1.3 -
for CM 11.0, AOSX, SlimKat...​
How to install the kernel:
1) Download the kernel zip file to SD card
2) Reboot to recovery
3) Flash the kernel zip file
4) Wipe cache and dalvik cache if you are coming from another kernel
5) Reboot the system
Kernel Manager APP
If you prefer to use a simpler way for installing the kernel you can use this app, it allows you to make a backup of your current kernel and it also displays OTA updates of this kernel, really recommended :good:
Kernel sources (on GitHub):
Development repository of BraveKernel 3.0.101 for KK 4.4
​
Changelog:
Code:
[B]08/02/2015 - BraveKernel Refresh v1.3 for KitKat[/B]
- Added minfree tweak in crontab
- Disabled management of not killable processes
- Tweaked adj and minfree values in init.d
- Added memory tweak in crontab
- Tweaked read_ahead_kb values
- Added F2FS support
- Fixed network arrows and speed information
- Fixed root and storage issues
- Added recovery in FOTA partition support
- Added kexec hardboot support
- Added 3 extra MB of usable RAM
- Added dynamic management of dirty page writebacks
- Added Ultra KSM
- Added entropy tweaks
- Updated BFQ scheduler
- Updated Linaro toolchain
- Improved LZO decompression
- Tweaked LMK
- Improved network speed
- Improved CPU performance
- Improved EXT4 speed
- Improved power management
- Tweaked memory management values
- Enabled clean cache
- Enabled JRCU
[B]21/12/2014 - BraveKernel Refresh v1.0 for KitKat[/B]
- Initial release
Credits and thanks to:
munjeni and cocafe for their awesome work and their kernel sources
AGONTUK for TWRP recovery
CyanogenMod, Kernel.org, Sony, Google, Linaro GCC developers
All my testers
​
XDA:DevDB Information
BraveKernel Refresh, Kernel for the Sony Xperia Go
Contributors
Garcia98
Kernel Special Features: Customized kernel 3.0.101 for KK 4.4.x ROM
Version Information
Status: Stable
Current Stable Version: v1.3
Stable Release Date: 2015-02-08
Created 2014-12-24
Last Updated 2015-02-08
Click to expand...
Click to collapse
Hello author kernel . I apologize for my English , I do not know him at all , I use a translator from google. I'm from Russia , the kernel on my phone is slow . after the installation has decreased the amount of RAM . please in the development of the next version of the kernel fix it
BigLionXda said:
Hello author kernel . I apologize for my English , I do not know him at all , I use a translator from google. I'm from Russia , the kernel on my phone is slow . after the installation has decreased the amount of RAM . please in the development of the next version of the kernel fix it
Click to expand...
Click to collapse
Your total RAM decrease or low free RAM?
For my Xperia GO, total RAM available is 390MB.
Usually 272MB used, 118MB free.
TWRP 2.8.5.0
Hi! I bring you TWRP 2.8.5.0
To change your recovery:
1.- Open ADB shell or terminal emulator
2.- Download this file: recovery.img
3.- Run:
Code:
su
dd if=recovery.img of=/dev/block/mmcblk0p13
4.- Reboot to recovery.
Garcia98 said:
Hi! I bring you TWRP 2.8.5.0
To change your recovery:
1.- Open ADB shell or terminal emulator
2.- Download this file: recovery.img
3.- Run:
Code:
su
dd if=recovery.img of=/dev/block/mmcblk0p13
4.- Reboot to recovery.
Click to expand...
Click to collapse
Awesome. :good::good::good: Thanks for the update.
Is it work if I use fastboot flash recovery recovery.img?
Any plans of making a BraveKernel for Lollipop?
BelzIgoh said:
Awesome. :good::good::good: Thanks for the update.
Is it work if I use fastboot flash recovery recovery.img?
Click to expand...
Click to collapse
No, you can't use fastboot for installing recovery
luimx said:
Any plans of making a BraveKernel for Lollipop?
Click to expand...
Click to collapse
To be honest, no
Sent from my D5503 using XDA Free mobile app

[KERNEL][3.0.101] BraveKernel Refresh for KitKat

BRAVEKERNEL REFRESH​
Here we go with something (re)fresh, this is the thread of a customized kernel for KitKat ROMs (CM11, AOSX, SlimKat...) with some extra features added.
As always, feedback is welcome and highly valuable
Please if a bug is already reported do not spam the thread reporting it again, and use XDA DevDB tools for posting features requests and bug reports if it's possible :good:
Main features are these:
- Based in 6.2.A.1.100 source code
- Built with Linaro Toolchain 4.9.3 optimized for Cortex A9
- TWRP 2.8.1.0
- FRandom support
- Improvement in I/O latency
- Interactive governor updated to 3.4
- VFP optimizations
- PowerOn Key emulator
- ABBamp Sound Control v2.5.0
- Mali tweaks and controllers
- Governors and I/O schedulers parameters tweaked
- Cycle Charging control
- Real end-of-charge notification
- FSync control (combined dynamic fsync control)
- Voltage OTG control
- Added extra free kbytes tunable
- Swap and zRAM support
- Disabled dynamic debug
- Tweaked readahead size
- More choices of TCP congestions
- Proportional Rate Reduction for TCP
- Fix for scaling of minimum frequency problem
- Management of not killable processes
- Built with optimized -O3 & Neon flags
- SLUB memory allocator
- Ramdisk and kernel compressed with LZO
Available CPU governors:
- Powersave
- Userspace
- OnDemand
- Interactive (default)
- InteractiveQ
- Conservative
- OnDemandQ
- PegasusQ
- LulzActiveQ
- AbyssPlug
- HotPlug
- PegasusQPlus
- SmartAssv2
Available I/O schedulers:
- No-op
- Deadline
- CFQ
- ROW
- BFQ
- SIO
- ZEN
- V(R)
- SIO-Plus (default)
Kernel Downloads for KitKat:
BraveKernel Refresh KK-4.4 Mediafire Folder
- v1.0 -
for CM 11.0, AOSX, SlimKat...​
How to install the kernel:
1) Download the kernel zip file to SD card
2) Reboot to recovery
3) Flash the kernel zip file
4) Wipe cache and dalvik cache if you are coming from another kernel
5) Reboot the system
Kernel Manager APP
If you prefer to use a simpler way for installing the kernel you can use this app, it allows you to make a backup of your current kernel and it also displays OTA updates of this kernel, really recommended :good:
Kernel sources (on GitHub):
Development repository of BraveKernel 3.0.101 for KK 4.4
​
Changelog:
Code:
[B]21/12/2014 - BraveKernel Refresh v1.0 for KitKat[/B]
- Initial release
Credits and thanks to:
munjeni and cocafe for their awesome work and their kernel sources
AGONTUK for TWRP recovery
CyanogenMod, Kernel.org, Sony, Google, Linaro GCC developers
All my testers
​
XDA:DevDB Information
BraveKernel Refresh, Kernel for the Sony Xperia P
Contributors
Garcia98
Kernel Special Features: Customized kernel 3.0.101 for KK 4.4.x ROM
Version Information
Status: Stable
Current Stable Version: v1.0
Stable Release Date: 2014-12-24
Created 2014-12-24
Last Updated 2015-01-10
HOW TOs
HOW TO PLAY WITH THIS KERNEL
Terminal emulator or ADB shell is needed.
If any command outputs 'Permission denied', you need su permission.
`???` stands for the number to input.
Sometimes you will need to mount and unmount debugfs partition:
For mounting it:
Code:
mount -t debugfs debugfs /d
For unmounting it:
Code:
umount /d
Boot time:
To check boot time:
Code:
cat /sys/boottime/kernel
CPU governors:
Performance, Interactive (default), Powersave, Userspace, Conservative, InteractiveQ, PegasusQ, HotPlug, OnDemandQ, OnDemand, AbyssPlug, LulzactiveQ, SmartAssv2
- OnDemand has been patched with cpu idle detection.
- Most of custom governors are based on ondemand/interactive.
- OndemandQ/InteractiveQ will hotplug cpu when screen turns off only.
- If you care about the battery life time, choose HotPlug. It hotplugs cpu frequently.
- Interactive updated to linux-android-3.4 (recommended).
- LulzactiveQ, will hotplug CPU1.
I/O schedulers:
SIO, SIO-Plus, VR, BFQ, CFQ, NO-OP, ZEN, ROW, Deadline
- Default IO scheduler: SIO-Plus
- SIO/ROW/SIO-Plus recommended!
FRandom module:
Code:
insmod /system/lib/modules/frandom.ko
chmod 0666 /dev/frandom
chmod 0666 /dev/erandom
mv /dev/random /dev/random.orig
mv /dev/urandom /dev/urandom.orig
ln -s /dev/frandom /dev/random
ln -s /dev/frandom /dev/urandom
Deepest sleep state:
Stock: 3 Default: 3
Deepest supported is 5.
Mount debugfs
To change deepest sleep state:
Code:
echo 5 > /d/cpuidle/deepest_state
- HotPlug governors works badly with 5.
- OnDemand works well with 5.
- Please note that it won’t increase the using time but standby time.
- You can add an init.d script to tweak it if you want.
To check the cpuidle state:
Code:
cat /d/cpuidle/stats
Management of not killable processes:
This feature allows to define processes and system processes white-lists filled with the preferred process names and to not be killed by lowmemorykiller, unless it is absolutely necessary.
This feature exposes four new lowmemorykiller parameters:
- donotkill_proc, is the flag to enable / disable this feature for the processes chosen by the user
- donotkill_sysproc, is the flag to enable / disable this feature for the system processes chosen by the user
- donotkill_proc_names, is the list of process names (comma separated) chosen by the user to be preserved from killing
- donotkill_sysproc_names, is the list of user system process names (comma separated) chosen by the user to be preserved from killing
When the lowmemorykiller needs to free ram, it will first kill the processes not included inside the two process name lists chosen by the user.
If there are no more standard killable processes, then it will be necessary to kill one of the processes included inside one of the two white-lists, to prevent system hangs, slowdowns, etc.
How to customize the white lists of processes to preserve from killing:
- Run these commands if you want to enable the feature
Code:
# To enable this feature for the processes chosen by the user
echo 1 > /sys/module/lowmemorykiller/parameters/donotkill_proc
# To enable this feature for the system processes chosen by the user
echo 1 > /sys/module/lowmemorykiller/parameters/donotkill_sysproc
- Run these commands if you want to disable the feature
Code:
# To disable this feature for the processes chosen by the user
echo 0 > /sys/module/lowmemorykiller/parameters/donotkill_proc
# To disable this feature for the system processes chosen by the user
echo 0 > /sys/module/lowmemorykiller/parameters/donotkill_sysproc
- Run this command if you want to add, for example, Trebuchet Launcher (CM default launcher) and the default keyboard to the processes white list
Code:
echo "com.cyanogenmod.trebuchet,android.inputmethod.latin" > /sys/module/lowmemorykiller/parameters/donotkill_proc_names
- Run this command if you want to add, for example, the system process, the phone process and DSP Manager to the system processes white list
Code:
echo "android.process.acore,com.android.phone,com.bel.android.dspmanager" > /sys/module/lowmemorykiller/parameters/donotkill_sysproc_names
zRAM:
zRAM is optimized for Android. It is not lazy anymore. Recommended zRAM instead of SWAP.
Using zRAM will take a little CPU, because it needs to compress/decompress memory.
Recommended compressing about 18% of RAM, about 100MB.
Setup disk size first: (example: 200MB)
Code:
echo $((200 * 1024 * 1024)) > /sys/block/zram0/disksize
- Larger size more RAM will be compressed.
- Too large size might make phone lag
To enable:
Code:
mkswap /dev/block/zram0
swapon /dev/block/zram0
To check how many does it use:
Code:
cat /sys/block/zram0/num_reads
cat /sys/block/zram0/num_writes
cat /proc/meminfo | grep swap
- We can get other info in its sysfs
Swap:
Using a file as swap RAM: (Create a continuity file first)
Code:
su
cd /cache
dd if=/dev/zero of=swapfile bs=1024 count=81920
mkswap swapfile
swapon swapfile
Then we will have 80MB of swap RAM.
Cycle Charging Control:
Similar to BLX by Ezekeel. It can be used to limit the battery charging level.
Example: Limit the battery level at 70% ~ 75%
Enable:
Code:
echo on > /sys/kernel/abb-fg/fg_cyc
Disable:
Code:
echo off > /sys/kernel/abb-fg/fg_cyc
Discharging threshold (battery level %):
Code:
echo dischar=75 > /sys/kernel/abb-fg/fg_cyc
Recharging threshold:
Code:
echo dischar=70 > /sys/kernel/abb-fg/fg_cyc
Real charged notification:
Well, please let me call it notification.
To be honest, it needs to check manually:
Code:
cat /sys/kernel/abb-chargalg/eoc_status
- You can use Root Browser to view these files in /sys/kernel/abb-chargalg
- When it says "First eoc reached", then the UI should show you charged 100%, but it is not the real full charged.
- When it says the real EOC reached, unplug the charger.
POnKey Emulator:
This is the software emulator of power key.
To turn off screen: ( 20 < value(ms) < 520 )
Code:
echo 100 > /sys/kernel/abb-ponkey/emulator
To active the power menu: ( 520 < value(ms) < ∞)
Code:
echo 800 > /sys/kernel/abb-ponkey/emulator
ABBamp Audio:
Please note that listening to too high volume music over 1 hour or more can damage your ears.
Too high volume can make your external speakers/headset overload or damage them.
First, why is it called `AMP`?
Because most of our tweaks are about gain(volume)
Our codec is simple, It doesn't have any hardware EQ (although i want...)
ABBamp sysfs entries are in:
/sys/kernel/abb-codec
- Use Root Browser to view this folder,there are lots files
Tweaks will take effects immediately!
Most tweaks will accept inputs like "on", "off" (no quotes)...
So, say "on" to enable this tweak, then this tweak will apply the value stored/inputed
View (cat) these files, most of them will give you useful information about this tweak.
They will show you the volume in dB of gain
`cd` to /sys/kernel/abb-codec first then do echos, will be more convenient.
AnaGain3 (Headset analog gain path):
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/anagain3
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/anagain3
Gain control: (min:0 ,max: 15) Lower value,higher volume (default: 0[+4dB])
Code:
echo left=?? > /sys/kernel/abb-codec/anagain3
echo right=?? > /sys/kernel/abb-codec/anagain3
Write both left and right channels:
Code:
echo gain=?? > /sys/kernel/abb-codec/anagain3
HsLDigGain (Headset left digital path gain):
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hsldiggain
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hsldiggain
Gain control: (min:0 ,max: 15) Lower value,higher volume (default: 4[+4dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/hsldiggain
HsRDigGain (Headset right digital path gain):
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hsrdiggain
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hsrdiggain
Gain control: (min:0 ,max: 15) Lower value,higher volume (default: 4[+4dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/hsrdiggain
Headset Volume Table:
value | volume
0.......+8dB (maximum)
1.......+7dB
2.......+6dB
3.......+5dB
4.......+4dB (tweaks default)
5.......+3dB
6.......+2dB
7.......+1dB
8.......+0dB (device default)
>=9....mute
- If set up digital path +4dB, analog gain +4dB, the result will get over +8dB
HsLowPow (Headset driver low power mode):
This lowpow mode is enabled by device normally.
If you want high performance audio instead of LPA(low power audio) you can disable it.
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hslowpow
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hslowpow
To tweak the mode (0: disable LP mode, 1: enable LP mode)
Code:
echo mode=? > /sys/kernel/abb-codec/hslowpow
HsDacLowPow (Headset DAC low power mode):
DAC is Digital-to-Analong Converter.
This lowpow mode is enabled by device normally.
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hsdaclowpow
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hsdaclowpow
To tweak the mode (0: disable LP mode, 1: enable LP mode)
Code:
echo mode=? > /sys/kernel/abb-codec/hsdaclowpow
HsHpEn (Headset high pass filter):
This high pass filter is disabled by device normally.
Enable this can reduce some sub-noise of audio.
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hshpen
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hshpen
To tweak the mode (0: disable highpass filter, 1: enable highpass filter)
Code:
echo mode=? > /sys/kernel/abb-codec/hshepen
Besides, the file anaconf1 will shows you the status of LPA
ClassDHPG (ClassD high-pass gain):
ClassD is a kind of amplifier.
According to the documents, our ClassD only relate to Handsfree(speaker).
This can increase the high frequencies sound of speaker
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/classdhpg
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/classdhgp
Gain control: (min:0 ,max: 10) higher value,higher gain (default: 10[Max gain])
Code:
echo gain=?? > /sys/kernel/abb-codec/classdhpg
ClassDDithWGain:
Gain control for the white component of dithering filter
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/classdwg
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/classdwp
Gain control: (min:0 ,max: 10) higher value,higher gain (default: 10[Max gain])
Code:
echo gain=?? > /sys/kernel/abb-codec/classdwg
ADDigGain2:
This is the audio path of mic2(phone mic, not headset mic)
This tweak will enable automatically when mic2 is enabled by device
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/addiggain2
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/addiggain2
Gain control: (min:0 ,max: 63) lower value, higher gain (default: [+6dB], max: 00[+31dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/addiggain2
EarDigGain:
This is the digital gain of earpiece
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/eardiggain
Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/eardiggain
Gain control: (min:0 ,max: 15) lower value,higher gain (default: 4[+4dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/classdwg
- It uses the same path of HsLDigGain,please check the volume table of HsLDigGain
- +8 dB might crash the sound of earpiece
ShortCirConf:
Code:
This is a misc tweak
View shortcir this file first
[7] EnShortPWD
0: Automatic switch off on short circuit detection is disabled
1: Automatic switch off on short circuit detection is enabled
[6] EarShortDis
0: Short circuit detection on Ear driver enabled
1: Short circuit detection on Ear driver disabled
[5] HsShortDis
0: Short circuit detection on HsL and HsR drivers enabled
1: Short circuit detection on HsL and HsR drivers disabled
[4] HsPullDEn
0: HsL and HsR outputs are in high impedance
1: HsL and HsR outputs are pulled down to ground
[2] HsOscEn (ABBamp enables it by default)
0: The HS drivers use the system clock
1: The HS drivers use a local oscillator (system clock absent: analog path only)
[1] HsFadDis
0: All intermediate steps are applied between two programmed gains (fading)
1: Gain on HS is applied immediately
[0] HsZcdDis
0: HS gain changes on signal zero cross (unless time-out occurs)
1: HS gain is changed without zero cross control
[CODE]echo ?? ?? > /sys/kernel/abb-codec/shortcir
- The first ?? the slot of each option,the second ?? stands for the value to write to this slot
- View shortcir this file,you will get it[/CODE]
AnaConf4:
This interface controls the enables of analog path
We can use it to disable Speaker in kernel level.
So that you don't have to use the "mute all sound" in system settings,
Because, "mute all sound" will also mute Earpiece, which is inconvenient for us in calls.
Command format: Check anaconf4 first, This interface is a bit different from others:
Code:
echo [Index] [Disable?] > anaconf4
To Disable Speaker:
Code:
echo 5 1 > anaconf4
To Enable Speaker:
Code:
echo 5 0 > anaconf4
Headset Charge Pump:
Code:
echo 0 > chargepump to use fixed 1.8V supply.
echo 1 > chargepump to use dynamic voltage supply, lower power cost.
Lower-power Audio Mode:
Code:
echo on > lpa_mode to enable LPA mode
echo vape=0x?? > lpa_mode to adjust Vape voltage used in LPA mode
Experts!:
This method can work on any ab850x codec platform!
Mount debugfs
cd /d/asoc/U8500-card/ab8500-codec.0
Play music, reduce the volume.
Now we are going to edit the codec registers.
Code:
echo REG VAL > codec_reg
E.G:
AnaGain3:
Code:
echo 0x16 0x00 > codec_reg
HsDigGain: (left/right channel)
Code:
echo 0x4F 0x00 > codec_reg
echo 0x50 0x00 > codec_reg
Disable all lowpow mode:
Code:
echo 0x04 0x00 > codec_reg
- These hacks will restore when codec power off.
Camera LED Flash:
Turn on torch with more brightness, turning this on for a long time will heat up your device, be careful!
Enable/Disable:
Code:
echo 1/0 > /sys/devices/platform/nmk-i2c.2/i2c-2/2-0053/torch_enable
echo 149600 > /sys/devices/platform/nmk-i2c.2/i2c-2/2-0053/torch_current
FSync control:
Get current status:
Code:
cat /sys/kernel/fsync/mode
FSYNC modes:
0: fsync on
1: fsync off
2: fsync dyn
Disable FSYNC:
Code:
echo 1 > /sys/kernel/fsync/mode
Disabling fsync can improve I/O performance, but it can make the data which hasn't been written lose when a sudden power cut occurs.
Enable Dynamic FSYNC:
Code:
echo 2 > /sys/kernel/fsync/mode
- Dynamic fsync will sync all buffers when screen turns off.
- If there is a heavy I/O load, the screen might get stuck for seconds.
Mali GPU:
Mali debug level:
Disabling can speed up a bit
Code:
echo 0 > /sys/module/mali/parameters/mali_debug_level
- Higher level, more messages will be printed in dmesg, system will slow down
Mali L2 max reads control: (Stock:28kb,Default:48kb(max))
Code:
echo xx > /sys/module/mali/parameters/mali_l2_max_read
- Some values will slow down graphics
- If not sure, keep default
Mali PM sampling rate: (Default: 1000ms)
Code:
echo xx > /sys/module/mali/parameters/mali_pm_sampling_rate
Mali PP scheduler tweaks: (Default: disable)
Code:
echo 1 > /sys/module/mali/parameters/mali_pp_scheduler_balance_jobs
- Enabling this, some places will over ahead, choose by yourself
Mali Utilization sampling rate: (Stock:500ms, Default:1000ms)
How often report a mali utilization.
Code:
echo xxx > /sys/module/mali/parameters/mali_utilization_sampling_rate
- Keep this default if unsure.
Mali utilization control:
(Default: low_to_high 192 high_to_low 64)
Our driver will report a mali utilization frequently.
This utilization(range: 0~255) means the load of mali.
If utilization is bigger than low_to_high, driver will request higher hardware performance(highest APE/DDR OPP).
If utilization is smaller than high_to_low, the driver will store the requested OPP(uses low OPP).
OPP can be understood as freq simply.
To check mali utilization values:
Code:
echo 5 > /sys/module/mali/parameters/mali_debug_level
cat /proc/kmsg | grep -i utilization
When it says SIGNAL_HIGH, it will request highest OPP.
When it says SIGNAL_LOW, it will request lowest OPP.
Press Ctrl+C to stop printing.
You can reduce low_to_high to trigger higher OPP requirement.
For smoothness and less powersaving:
Set low_to_high between 100-192.
Code:
echo 120 > mali_utilization_low_to_high
Mali max preemptive allocated max memory size:
Default is 16mb(16*1024*1024), bigger max size more throughput.
But when this value is too big, no more throughput.
For example: 48mb = 48*1024*1024
Code:
echo 50331648 > /sys/module/mali/parameters/pre_allocated_memory_size_max
Mali OS Kernel memory allocation order:
The lower value, the higher preference of allocating OS memory.
The default value is 6, I decreased it to 9 to fix OS memory allocation failure.
If you feel laggy, try 6 (default by driver)
Code:
echo 6 > /sys/module/mali/parameters/mali_oskmem_allocorder
TCP congestions:
Supported:
cubic(default), westwood, highspeed, vegas, veno, yeah
To check all the available options:
Code:
busybox sysctl net.ipv4.tcp_available_congestion_control
To change to other option:
Code:
busybox sysctl -w net.ipv4.tcp_congestion_control=YOU_WANT_TO
Latency - Download - Upload
cubic:
1st run: 15ms - 10,75Mbps - 7,82Mbps
2nd run: 14ms - 10,84Mbps - 8,06Mbps
westwood:
1st run: 11ms - 17,65Mbps - 8,30Mbps
2nd run: 13ms - 13,28Mbps - 8,29Mbps
highspeed:
1st run: 13ms - 10,76Mbps - 7,94Mbps
2nd run: 16ms - 14,42Mbps - 8,52Mbps
vegas:
1st run: 14ms - 8,49Mbps - 6,62Mbps
2nd run: 14ms - 12,00Mbps - 7,07Mbps
veno:
1st run: 13ms - 9,58Mbps - 8,13Mbps
2nd run: 13ms - 8,50Mbps - 7,64Mbps
yeah:
1st run: 14ms - 13,37Mbps - 8,28Mbps
2nd run: 17ms - 13,89Mbps - 8,14Mbps
- In fact, every congestion is designed for different environments.
- Google to learn more!
EGL Driver:
To use Mali hardware egl driver only:
Edit /system/lib/egl.cfg
0 0 android
0 1 mali
To
0 0 mali
Then remove libGLES_android.so
- Recommend to backup these files
- In case it cannot boot,use TWRP file manager to recover changes
Logcat:
Create a new file(empty file) named logger in /data
When this file exists, kernel will load logger.ko for you automatically
Miscellaneous:
To refresh battery stats:
Code:
echo 1 > /sys/kernel/abb-fg/fg_refresh
Almost all tweaks will be restored to default after reboots.
So you can make your tweaks as init.d scripts or make scripts with SManager app to apply them at boot.
+++++++++
not running data rate
kosmos-2011 said:
not running data rate
Click to expand...
Click to collapse
What?
Garcia98 said:
What?
Click to expand...
Click to collapse
i think he means that in miui rom he buiilds the the network transfer speeds dont work..
djkk16 said:
i think he means that in miui rom he buiilds the the network transfer speeds dont work..
Click to expand...
Click to collapse
OK, I think that it will be fixed for next release
btw this is like stable right ?
and it is much better in performance than the stock cm11 kernel ?
Is there a mirror mediafire always causes issues for me
Sent my Xperia P running CyanogenMod
AndroidNoob69 said:
Is there a mirror mediafire always causes issues for me
Sent my Xperia P running CyanogenMod
Click to expand...
Click to collapse
http://builds.hubdroid.com/BraveKernel/
Sent from my D5503 using XDA Free mobile app
tried it last night seems much better than stock cm11 kernel.
battery life seems to be better too and performance is also great.
Been using it for half a day.
It once rebooted unexpectedly while I was browsing a webpage.
Also, the notification LED does not blink.
Using CM11
Thank you
My report..
Notification LED not blinking confirmed
Launcher redraws are more often than usual even if minfree is lowered
I get lag spikes randomly especially when browsing g+
Also on CM11
Sent my Xperia P running CyanogenMod
Great work! It's always nice to see kernel improvements..
the performance increased a little and the load times (when opening an app that is not in the background) are reduced slightly
on the negative side, the LEDs went crazy.. the notification LED is working but does not blink, it stays solid until it is dismissed.
the torch is not working (tried the torch app in the ROM, 3rd party Torch app.. no luck).
Shall i take a logcat when running the torch?
> I use XP (lol) with SlimKat 8.10 which is the latest, i didn't crazily modify the rom so it's almost a fresh install
hliasant said:
Been using it for half a day.
It once rebooted unexpectedly while I was browsing a webpage.
Also, the notification LED does not blink.
Using CM11
Thank you
Click to expand...
Click to collapse
Can you send me the file in /proc/last_kmsg please? Thank you
AndroidNoob69 said:
My report..
Notification LED not blinking confirmed
Launcher redraws are more often than usual even if minfree is lowered
I get lag spikes randomly especially when browsing g+
Also on CM11
Sent my Xperia P running CyanogenMod
Click to expand...
Click to collapse
veiron144lww said:
Great work! It's always nice to see kernel improvements..
the performance increased a little and the load times (when opening an app that is not in the background) are reduced slightly
on the negative side, the LEDs went crazy.. the notification LED is working but does not blink, it stays solid until it is dismissed.
the torch is not working (tried the torch app in the ROM, 3rd party Torch app.. no luck).
Shall i take a logcat when running the torch?
> I use XP (lol) with SlimKat 8.10 which is the latest, i didn't crazily modify the rom so it's almost a fresh install
Click to expand...
Click to collapse
I think that I know why notification LED and Torch are not working, I don't need a logcat
_________________________
Merry Christmas and happy holidays to all of you!
I am unable to browse Twitter. The app opens, freezes, then fc. Did not have this on stock cm 11 kernel. Changing governors and io schedulers did not help.
Sent my Xperia P running CyanogenMod
AndroidNoob69 said:
I am unable to browse Twitter. The app opens, freezes, then fc. Did not have this on stock cm 11 kernel. Changing governors and io schedulers did not help.
Sent my Xperia P running CyanogenMod
Click to expand...
Click to collapse
I don't have such problem in my Xperia U, so I need more reports of that issue.
Sent from my D5503 using XDA Free mobile app
Notification tone in silent mode
I can hear the message notification tone even if I reduce the notification volume to zero
Has anyone tried this kernel on latest MIUI rom by kosmos since it is based on CM?
adittya said:
Has anyone tried this kernel on latest MIUI rom by kosmos since it is based on CM?
Click to expand...
Click to collapse
You must try your self and report here..
kernel++++
adittya said:
Has anyone tried this kernel on latest MIUI rom by kosmos since it is based on CM?
Click to expand...
Click to collapse
kernel works fine on miui.

Categories

Resources