yashsingh1/xdaforums huggingface dataset:
[Galaxy Ace II Android Development] S.AMU:
So I installed the latest kernel (2.7.6) this morning and now my CPU freq settings got an really weird behavior, because they are changing themselves.

After each reboot and sometimes while using the phone the settings are changed. So sometimes I only get three governors to choose(ondemand,performance, and another one) and sometimes the full list(with interactive and so on).

Also the frequencies are barking themselves so for example I already got

1200min 1200max performance

800min 800max performace

30min 1200max ondemand /performance

30mim 800max ondemand,performance,interactive.

Even when I unchek the option "retain values for next boot" it is the same thing.
[Galaxy Ace II Android Development] S.AMU:
So here is an example:

I rebooted the phone, went to settings and saw this (first screenshot). Then I went back to the settings main menu and opened again the CPU settings and saw this (second SC). I changed the value to the ones in the third screenshotand rebooted again to find me again with the values of the first screenshot.

For this thest Mali and pllddr scripts had been disabled.
[Galaxy Ace II Android Development] Kiras_PL:
+1
[Galaxy Ace II Android Development] S.AMU:
deleted
[Galaxy Ace II Android Development] ace2nutzer:
No sorry.. not really needed feature ;) dt2w and s2w is enough ;)
[Galaxy Ace II Android Development] tofueatsbread:
smth like knock code? the xposed one really defeats the purpose of knock code coz of screen on xD
[Galaxy Ace II Android Development] ace2nutzer:
This is the same like the CPU Governor... the up_threshold ...

U can adpt. the up_threshold for ex. min gpu 400Mhz.. but after changing the min. gpu freq @ for example @ 300Mhz.. the old up_threshold is invalid.

If the up_threshold ist setted too low, then also by scrolling the GPU go up to the next freq. / max. gpu..

but setting this Value too high, can cause lags or slow down the Phone.. because the freq will only rise when a big load is there on the GPU ...

Of course a high Value will save battery.. but decreases the smooth etc ... ;)

---------- Post added at 10:46 AM ---------- Previous post was at 10:43 AM ----------

look at the link / thread.. there is an Video .. i think it's really bad thing ... it takes too long time till the screen is on ... a double tap is much faster ;)
[Galaxy Ace II Android Development] borkins:
On r2.7.4, if I set frequency over 600 MHz for GPU the phone reboots. :\

600 MHz is the highest stable clock for some reason. Before i don't have reboots even at 730 MHz - only screen "noises" over 700 MHz.

I tested it on dynamic, and without CPU OC.
[Galaxy Ace II Android Development] ChronoMonochrome:
2.7.4 used old mali_dvfs_table with unstable voltage as for dynamic scaling. Try 2.7.6 - I don't have reboots or screen glithes even on 716 MHz.
[Galaxy Ace II Android Development] riyosakura:
Im using codina bootscript 4.4 + cwm + 2.6 full f2fs. But offline charging is not working. Any suggestion?
[Galaxy Ace II Android Development] nikolas1274:
From l last boot i change only the pllddr at 975MHz and i let mali the default from kernel, and it looks smoother without lags and freezes, i am using for about 6 hours, i will continue testing
[Galaxy Ace II Android Development] S.AMU:
So with the las build I got three problems:

1) the frequency changing of my phone after every reboot. (I already wrote about it)

2) the phone seems to be a little bit slower

3) and the big problem is, that I got a problem with logcat:

At the moment i'm trying to learn android app developement, and last week I made an application wchi outputs some log files.

Then I updated the kernel and the rom to the last version, and now, there are any logs anymore.

I didnt changed the application so it can not be the fault of the code. I think there is some problem with the kernel and/or rom.

Can someone help me please?
[Galaxy Ace II Android Development] fluffi444:
Not a problem - its a feature... :)

Put logger.ko from lib/modules to autoload-folder and reboot....
[Galaxy Ace II Android Development] matthias1976:
what happens then !?

need easy way to get ksmg.txt

cant type in terminal, cant paste in terminal, always have to go over adb on computer
[Galaxy Ace II Android Development] fluffi444:
Don't mix up things... He asked for logcat.... Logact is not loaded by default... To load it on start logger.ko is needed to be in autoload folder..

last_ksmg is another topic. - You can make a simple script and run it with SManager for instance..

This is for logcat, last_kmsg and dmesg in one run.

#!/system/bin/sh

# save logcat, last_kmsg and dmesg to /sdcard0/download
logcat -d > /storage/sdcard0/logcat/logcat.txt
dmesg > /storage/sdcard0/logcat/dmesg.txt
cat /proc/last_kmsg > /storage/sdcard0/logcat/last_kmsg.txt
#
[Galaxy Ace II Android Development] matthias1976:
ah ok !! mixed up that !!

thx
[Galaxy Ace II Android Development] ChronoMonochrome:
Have no idea. It boots up with 200/800 MHz and then applies user-space limits. Maybe cpufreq limits messes it.

It seems that current GPU/APE/DDR settings doesn't allow to run it smoothly. I'm working on completely new GPU interactive-like scaling algorithm, although don't know if it'll be stable.
[Galaxy Ace II Android Development] S.AMU:
But I've done this already. That's the problem...

And before someone asks. The permissions are also the right ones....
[Galaxy Ace II Android Development] ChronoMonochrome:
New build is up!

Changelog:

Mali OC module v2.0:

added interfaces boost_hispeed1, boost_hispeed2.

Now its scaling behaviour is following: when mali utilization exceeds mali_threshold_freq_up, it scales to boost_hispeed1, if utilization still higher than mali_threshold_freq_up it goes to boost_hispeed2. When utilization lower than mali_threshold_freq_down it scales -> boost_hispeed1 -> boost_low. If load higher than threshold that set in boost_hispeed1/boost_hispeed2 it immediately scales to its idx's, respectively.

When boost_hispeed2 is reached cpufreq forces to max. When GPU scales to boost_hispeed1/boost_low, we unlock cpufreq scaling.

In short words, thus allows to see following things: when load not so much, it runs at 320 MHz and APE50/DDR25, but it very likely scales to 400 MHz APE100/DDR100 to avoid lags during scrolling. In games/apps, that heavily uses GPU it almost always immediately scales to boost_hispeed2 (600 MHz).

added interfaces mali_threshold_freq_down and mali_threshold_freq_up

(new interfaces manual)

1) mali_threshold_freq_down/up:

echo new value to tweak it:

echo 150 > /sys/kernel/mali/mali_threshold_freq_up

2) mali_boost_hispeed(2)

Use command

echo idx=X > /sys/kernel/mali/mali_boost_hispeed2

to tweak its freq.

following command is to tweak its threshold:

echo threshold=220 > /sys/kernel/mali/mali_boost_hispeed2

partially re-enabled touchboost (it actually was enabled even on 2.7.4, but I forgot to mention)

reverted suspend/hibernate/freezer etc. commits to hopefully fix reboots issue in deepsleep

fixed APE_25_OPP (in suspend it actually used APE50 previously)

minor fixes in cpufreq_limits driver
[Galaxy Ace II Android Development] avithohol:
How to set PLLDDR to 975 or more at the moment ?

The echo command from the first page isn't working.

PS : also how to change boost_hispeed2 (600 MHz) to 680 or 710 Mhz.
[Galaxy Ace II Android Development] ChronoMonochrome:
post updated.

For OC DDR to 975 MHz you can use script that is in few pages above. I don't know what's wrong with pll 980 MHz (0x50180), so there's still no fully working method of PLLDDR OC above 975 MHz.

By the way, have anyone been using Dynamic governor? Can you share your CPU usage here?
[Galaxy Ace II Android Development] borkins:
On r2.8 kernel:

Strange, but I can't set min freq - 200 MHz for CPU. The min freq 200 MHz become max freq.

The lowest min freq I can set is 250 MHz.
[Galaxy Ace II Android Development] ChronoMonochrome:
It seems cpufreq_limits driver prevents to use same limits as is in suspend, just to prevent cases when cpufreq limits are not restored on screen on. Now I found this as really redundant and unneeded, will remove it in next build.

Disable cpufreq limits, set screen on limits, and re-enable if it's needed. I don't use this driver - I also found that changing min freq on suspend also not really needed since 200 MHz is enough to use it as min freq with screen on, and there's almost no any noticeable difference in power consumption between e.g. 100 and 200 MHz. Therefore, I use only limit to max freq, that provide governor Dynamic.
[Galaxy Ace II Android Development] Devel0per95:
[MENTION=5695278]ChronoMonochrome[/MENTION] can you please make kernels for codina again

or please make a video tutorial about how to install it

cuz i read the info about how to install and everytime i lose my rom :(

thank you!
[Galaxy Ace II Android Development] ChronoMonochrome:
Is it not for codina? ;) I don't have one more device to record installation process, but moreover I don't have time for this. Making video-tutorials requires some more time and experience in this regard, than just recording video.
[Galaxy Ace II Android Development] fluffi444:
Running R2.8 - so faar so good! Big thanks for this promissing update...

Played a bit with DDR OC script from post:

http://xdaforums.com/showpost.php?p=57379703&postcount=1842

and found out that for my phone an additional "sleep 2" is needed - otherwise the max CPU freq was not restored and phone stuck at min freq.

Maybe some of you running into same issue.

...
echo 1 > /sys/kernel/abb-ponkey/emulator
[B]sleep 2[/B]
echo $MAXFREQVAL > $MAXFREQ
....

Furthermore I added "sleep 100" at the beginning and made an 99ddrclock (to run it as the last in the row) init.d from it. It will run (because of the 100 sec) right after PIN screen appears. Works for every reboot (untill now) - aprrox 5-6 times.
[Galaxy Ace II Android Development] Devel0per95:
then you shutdown chronokernel for codina 0.0 ?
[Galaxy Ace II Android Development] ChronoMonochrome:
Lol, I never said it :cyclops:
[Galaxy Ace II Android Development] fluffi444:
??? We have the Universal-Kernel (which is really easy to install) for both codina and codinap...
[Galaxy Ace II Android Development] Devel0per95:
then how to install it -_-

when i flash it it always remove my rom -_-
[Galaxy Ace II Android Development] miryn:
You have a clear instruction on the first page...

​
[Galaxy Ace II Android Development] Devel0per95:
can u send me the files cuz i didn't understand what should i do !

please do me a favor and make it then upload me the files , and i will flash them :)
[Galaxy Ace II Android Development] borkins:
Think twice to be sure you know what you are doing, before you flash something!!!

I'm not responsible, if you brick your device somehow!!!

The attached files are for Codina and 4.4.x ROM!

If your device is on EXT4 FS ( stock File System ) flash ext4 recovery and bootscript zips, else for F2FS FS flash f2fs zips.

If you use partial F2FS ( only cache and data on F2FS), then

flash partial recovery zip and partial bootscripts zip,

else ( if cache, data, system on F2FS)

flash full f2fs recovery zip and full bootscripts zip.

________________________________________

Installation:

1. Flash make-ramdisk-partition.zip. ( "This procedure need to do only once. i.e. if you don't plan to flash stock, then this archive will be no longer needed")

2. Flash Recovery ( that is needed for your FS )

3. Flash Bootscripts ( that is needed for your FS )

4. Flash Universal Kernel ( latest is r2.8 )
[Galaxy Ace II Android Development] Devel0per95:
Thanks man it worked

Btw if i want to update it i should flash only the latest release.

Ishould reflash the bootscript and then the unibersal kernel ?? :)
[Galaxy Ace II Android Development] borkins:
If you don't change the ROM ( for example to 4.3.1 ), or the file system, you should flash only the universal kernel.

Else you must change the recovery and the bootscripts.
[Galaxy Ace II Android Development] nikolas1274:
[MENTION=235339]chrono[/MENTION]

Why do we need max frequency when we set pllddr frequency, I try from terminal and it works

And what you recommend for Mali oc, I can not see your signature from tapatalk

Thanks
[Galaxy Ace II Android Development] ChronoMonochrome:
It's strongly needed only for OC above 975 MHz, but probably can increase DDR OC stability at all.

About mali - I'm currently using 256/400/716 MHz settings and still tuning threshold parameters.
[Galaxy Ace II Android Development] nikolas1274:
Thanks for your answer

Can you give a script at second message for mali oc as you have for all the others

I have seen to your signature from other day that you use art, dont you have lags? cause i have swich acouple of times but it was terriible for me and i roll back

thanks again
[Galaxy Ace II Android Development] ChronoMonochrome:
Somehow during my tests I noticed that current mali tunables are still unbalanced, and sometimes the phone stuck at ape_100_opp. I uploaded will upload in few minutes new build with some fixes to mali scaling algorithm.

Changelog(2.8.1):

- changed mali defaults to more conservative values (now it's otimized for min GPU freq 256 MHz).

- added interface 'mali_debug'

- get rid of setting APE_100_OPP via LiveOPP. Now it's no longer needed since mali and touchbooster can require it when it's needed.

UPD. my voltage settings.

default kernel values are more conservative and probably even too high - set those voltages from init scripts and test them for stability.

echo 2 vape=0x18 > /sys/kernel/mali/mali_dvfs_config
echo 5 vape=0x1c > /sys/kernel/mali/mali_dvfs_config

@up, I don't see any problems with using ART (except annoying fact that xposed doesn't work).
[Galaxy Ace II Android Development] Devel0per95:
my device stuck and then reboots in couple of seconds
[Galaxy Ace II Android Development] Kiras_PL:
Yep, for me the same. Lots of reboots and freezes even with init.d script with Your voltages.
[Galaxy Ace II Android Development] ChronoMonochrome:
Well, I'm willing to accept that this voltage may not work on all phones. It sounds like you may have to look stable values (or just use the default values). If interested, take a look at this article. https://github.com/mkaluza/i9070_kernel_CoCore-E/wiki/Undervolting-janice
[Galaxy Ace II Android Development] nikolas1274:
I did not had reboots or freezes with the given voltages but when I try to oc pllddr I took reboot. I three times I had the same, so I remove the init with voltages
[Galaxy Ace II Android Development] ChronoMonochrome:
It seems that overclocked PLLDDR requires some higher vape voltage. I tested given ones without OC DDR. Will post here new voltages for DDR 975 MHz after some tests.

UPD. so far I haven't had any problems with following voltages (PLLDDR 975 MHz)

echo 2 vape=0x1d > /sys/kernel/mali/mali_dvfs_config
echo 5 vape=0x22 > /sys/kernel/mali/mali_dvfs_config

I also tried to UV mali_gpu_vape_50opp, but then phone getting really unstable even with 0x13(my avs apeopp_50 voltage is 0x14).

UPD. got freeze with 0x1b (256 MHz) and 0x20 (403 MHz), will edit these settings.
[Galaxy Ace II Android Development] Kiras_PL:
I've got a bit other question. I know that You use ART as runtime [MENTION=5695278]ChronoMonochrome[/MENTION]. Can You tell me if 10MB on Cache partition is enough ? Or do i need to make repartition ? ;)
[Galaxy Ace II Android Development] nikolas1274:
No it it's not enough, you need repartition, about 120M
[Galaxy Ace II Android Development] ChronoMonochrome:
[MENTION=535343]all[/MENTION], who overclock PLLDDR: I don't know why I didn't take this fact into account, but as it turns out, overclocking DDR also touches some other clocks, including SDMMC. That maybe potentially risky as may cause FS corruption when it work at too high frequency. By default SDMMC work at 100 MHz (1/8 PLLDDR) - and by default is overclocked(50 MHz is safe frequency), but when we OC DDR [MENTION=791263]975[/MENTION] MHz, then SDMMC work at 121 MHz. Somehow it worked and did not cause any effects, but I want to warn everyone just in case.
[Galaxy Ace II Android Development] avithohol:
Lol i used 1100 ddr :D ... seems stable but ...
[Galaxy Ace II Android Development] manthes:
What files do i need for f2fs with twrp?

I made format and after that i installed rom, gapps, bootscripts 4.4.4 full f2fs, twrp 2.8 full f2fs and kernel 2.7.3 but after rebooting it converts again system folder to ext4 and cache+data stay f2fs.

The rom that i am installing is liquidsmooth 4.4 (an older build)
[Galaxy Ace II Android Development] fluffi444:
You must adjust the installer Script of the ROM according to F2FS.

Read posts of OP.

Gesendet von meinem GT-I8160P mit Tapatalk 2
[Galaxy Ace II Android Development] S.AMU:
I know that this:

0x00050168

is a hex number. But how can I convert this number in an binary number? (In this case 798 MHz)
[Galaxy Ace II Android Development] ChronoMonochrome:
From LiveOPP:

static int pllarm_freq(u32 raw)
{
int multiple = raw & 0x000000FF;
int divider = (raw & 0x00FF0000) >> 16;
int half = (raw & 0x01000000) >> 24;
int pll;

pll = (multiple * PLLARM_FREQ_STEPS);
pll /= divider;

if (half) {
pll /= 2;
}

return pll;
}

This function is used for calculation pllarm freq, but it's common for all PLLs, including PLLDDR.

I will examine 0x00050168 as an example.

The last byte is multiple (0x68), second - is divider (0x05), third 0x01 - is additional divider, first byte is one more divider 2 if value is 0x01 (and 1 if value 0x00, as in this case).

PLLARM_FREQ_STEPS is a root clock and equals 38400 kHz.

The frequency can be calculated following way PLLARM_FREQ_STEPS * multiple/divider = 38400 kHz * 0x68/0x5 = 798720 kHz.
[Galaxy Ace II Android Development] ace2nutzer:
@up

good explanation :good:

I only add a little info for more clarity:

0x00050168 is in Hex

u need first to convert 68 in Dez ... ---> 104

Now it's very simply: 38400 * 104 / 5 = 798720 ( 798,72Mhz)
[Galaxy Ace II Android Development] ChronoMonochrome:
New build is up :)

- mali: added interface hi1_to_low_utilization_limit. It's now used to switch boost_hispeed -> boost_low state. Also tuned defaults for more responsive UI

- minor bugfix in ABBamp - it restores vape 0x16 after using LPA in suspend, when 0x14 is ape50 voltage on most phones. Now it restores original avs voltage.

- added separate LPA voltage settings for headset and speaker:

echo vape_headset=0x17 > /sys/kernel/abb-codec/lpa_mode
echo vape_speaker=0x16 > /sys/kernel/abb-codec/lpa_mode

echo on > /sys/kernel/abb-codec/lpa_mode

- in-kernel level POnKey emulator on Vol Up/Down [cocafe]

- ws2401, s6d: added LCDCLK management [derived from CoCore]

I found something, that can solve blackscreen issues on s6d. By default, s6d now uses original LCD clock (60 fps).

use

echo ? > /sys/devices/pri_lcd_*type*/lcdclk

type - ws2401.0 or s6d27a1

? = 0,1, .. 5

use cat /sys/devices/pri_lcd_*type*/lcdclk for more detailes

- set SD/SDIO/MMC freq 100 -> 50 MHz

- added FSA880 software reset interface. Use if you've any issues with USB/ADB connection

echo 1 > /sys/devices/virtual/usb_switch/FSA_SWITCH/swreset
[Galaxy Ace II Android Development] manthes:
Can you explain in a simpler way what to do for s6d? I didn't understand
[Galaxy Ace II Android Development] xo.en:
..so we just need new novathorsettings to get rid of scriptmanager, sigh?
[Galaxy Ace II Android Development] BastiZ:
is there a voltage table? I dont know about the 0x16 or 0x2d and so on. What does it mean?

Is novatorapp open source? and somebody can adjust the new parameters?

Better... somebody try to programm an alternative app just for Chronokernel. I need a GUI :D
[Galaxy Ace II Android Development] ChronoMonochrome:
You can play around various LCD clock settings, but original setting 60 Hz is used on s6d now as default, so that mean you can just leave it as it is.
[Galaxy Ace II Android Development] S.AMU:
Thank you really much :)
[Galaxy Ace II Android Development] Devel0per95:
So in the build 2.9 you fixed the stuck and booting ? :)
[Galaxy Ace II Android Development] fluffi444:
[MENTION=5695278]ChronoMonochrome[/MENTION]

Still on R2.8.1 (can't test so fast as you release during normal use :o) - But will go to R2.9 today....

No issues anymore on R2.8.1! :good:

All problems from R2.7.x as reboots, slowlyness after 20+ of usage or low battery, deep sleep reboots as well as (annoying) freezes are completly gone!

Furthermore I made a tiny uV on GPU as I thought that voltages on GPU are quite high by default

If someone is interested in my Mali uV settings - Here you are:

#!/system/bin/sh

# Mali uV
chmod 644 /sys/kernel/mali/*
echo 0 vape=0x22 > /sys/kernel/mali/mali_dvfs_config
echo 1 vape=0x22 > /sys/kernel/mali/mali_dvfs_config
echo 2 vape=0x22 > /sys/kernel/mali/mali_dvfs_config
echo 3 vape=0x22 > /sys/kernel/mali/mali_dvfs_config
echo 4 vape=0x24 > /sys/kernel/mali/mali_dvfs_config
echo 5 vape=0x24 > /sys/kernel/mali/mali_dvfs_config
echo 6 vape=0x24 > /sys/kernel/mali/mali_dvfs_config
echo 7 vape=0x30 > /sys/kernel/mali/mali_dvfs_config
echo 8 vape=0x30 > /sys/kernel/mali/mali_dvfs_config
echo 9 vape=0x30 > /sys/kernel/mali/mali_dvfs_config
echo 10 vape=0x3b > /sys/kernel/mali/mali_dvfs_config
echo 11 vape=0x3b > /sys/kernel/mali/mali_dvfs_config
echo 12 vape=0x3b > /sys/kernel/mali/mali_dvfs_config
echo 13 vape=0x3b > /sys/kernel/mali/mali_dvfs_config
chmod 444 /sys/kernel/mali/*
#

Outstanding work, Chrono...:highfive:

EDIT

Right after I wrote this I had another freeze while phone was on USB to copy new Kernel to SD - Will try to find out if my GPU uV was the reason...
[Galaxy Ace II Android Development] monstro78:
I think 2.9 has lags... I flashed directly from 2.7.6 and 2.9 its slower.... Kind of annoying... I went back to 2.7.6....
[Galaxy Ace II Android Development] manthes:
I had some freezes with latest kernel. I don't know if it is kernels problem or because of repartition i have made with fluffi444 zip file.

I gone back to 2.7.3 and i will see what is happening
[Galaxy Ace II Android Development] ChronoMonochrome:
Daily build.

Changelog - various changes in mali OC algorithm:

simplified boost logic: removed interfaces mali_threshold_freq_up/down, and added mali_threshold_hi1_to_low and mali_threshold_hi2_to_hi1. Now it work like original OC algorithm, but still has two boost freq steps. Also disallowed switching boost_low -> boost_hispeed2. Now mali_threshold_hi1_to_low determines with which load mali should scale down from hispeed1 -> boost_low, and mali_threshold_hi2_to_hi1 - hispeed2 -> hispeed1.

re-added boost delay and changed default thresholds. Seems that it can't work stable without delay before boost/unboost, and too small difference between closest boost threshold(e.g. boost_hispeed and mali_threshold_hi1_to_low threshold) only aggravates all, since mali scales between these steps too often.

added additional tiny delays during setting new PLL

delay after mali boost initialization (by default 35 sec), just to avoid boost work during the phone boots.

fixed APE_OPP messing at boot. Seems that MCDE cause it. I haven't tried to understand what exactly it does with APE_OPP, just removed its APE requirements. I checked several times if there mali errors at boot, and so far didn't noticed it.

changed default settings -> 400/500/600 MHz

Hope that algorithm now will work stable, or at least I will wonder if it won't, as it now use as conservative settings as it possible.
[Galaxy Ace II Android Development] fluffi444:
0x00	700000
0x01	712500
0x02	725000
0x03	737500
0x04	750000
0x05	762500
0x06	775000
0x07	787500
0x08	800000
0x09	812500
0x0a	825000
0x0b	837500
0x0c	850000
0x0d	862500
0x0e	875000
0x0f	887500
0x10	900000
0x11	912500
0x12	925000
0x13	937500
0x14	950000
0x15	962500
0x16	975000
0x17	987500
0x18	1000000
0x19	1012500
0x1a	1025000
0x1b	1037500
0x1c	1050000
0x1d	1062500
0x1e	1075000
0x1f	1087500
0x20	1100000
0x21	1112500
0x22	1125000
0x23	1137500
0x24	1150000
0x25	1162500
0x26	1175000
0x27	1187500
0x28	1200000
0x29	1212500
0x2a	1225000
0x2b	1237500
0x2c	1250000
0x2d	1262500
0x2e	1275000
0x2f	1287500
0x30	1300000
0x31	1312500
0x32	1325000
0x33	1337500
0x34	1350000
0x35	1362500
0x36	1375000
0x37	1387500
0x38	1400000
0x39	1412500
0x3a	1425000
0x3b	1437500
0x3c	1450000
0x3d	1462500
0x3e	1475000
0x3f	1487500