yashsingh1/xdaforums huggingface dataset:
[Galaxy S II General] randomseasons:
Your settings are quite good. You nay consider reducing the step down rate to lower, if you want your droid to spend less on high fregs. About the step up rate, as I tested hundreds of time, from 25000 to below is the level that ur phone can perform smoothly, so of course 25000 will use less high fregs. Cpu load should be more than 75%, i even use 90% :)
[Galaxy S II General] naveediftikhar:
@droidp

Yeah m sure..m using 3.2.5.2 siyah..m using the correct line as iam able to echo 14(200) and it works just fine apart from the obvious lag..and using the same line iam able to echo it back to 11 but if i use 12 or 13 my phone crashes..so any ideas?
[Galaxy S II General] droidphile:
That's strange. Using the same script, it's able to find the symbol name that sets screen touch frequency for me. I suggest you do the following

1) Using any terminal emulator or adb. (adb would be better) echo only the first line of script

LVL=`cat /proc/kallsyms|grep " level\."|awk '{print $3}'`

Then echo value of LVL

echo $LVL

It should say something like "level.23173"

Now try

kmemhelper -n $LVL -t int 11

This sets frequency to 500 itself.

If no crash, try

kmemhelper -n $LVL -t int 14

2) Re-flash the kernel and check for issue.

3) If you still get crash, long press power button to reboot the device and pull /proc/last_kmsg and attach here. I'll take a look.
[Galaxy S II General] naveediftikhar:
@droidp

ok i tried it your way but i used an int value of 13...as 11 and 14 work perfectly for me..no crashes with them but as soon as i set 13 it crashes..attached it the last_kmsg....you can have a look...
[Galaxy S II General] droidphile:
Your last_kmesg has only the log info post-reboot. Does not contain info on what happened while crashing. Anyhow, if 14 works for you that should be good enough.
[Galaxy S II General] naveediftikhar:
Yep 14 works but it lags..so thut if i can increase it to 300 or 400!can u try to echo 13 or 12..?
[Galaxy S II General] Many40:
Dual booting

Hello, I have general question about dual booting. Is it really necessary as you wrote in your guide (in 2nd post) to format 2nd rom partitions for first installation of a new rom. What I did using that time Siyah 3.2.3 - only wiped data/cache and dalvik for 2nd rom and flashed the rom from dual booting section in recovery. Up to now everything works well including option to choose a rom at boot. Regards.
[Galaxy S II General] droidphile:
300/400 mhz works for me. If it lags on 200 it may be your governor settings. Are you on pegasusq. Take care of hotplug up and down freq.

It's not really necessary. Formatting /data and /cache of second rom creates empty data.img and cache.img ext4 files in /sdcard/.secondrom so that flashing a zip to second rom need not create them first.

I have given multiple methods to set-up dual boot for this reason. One method will work fine if another should fail.
[Galaxy S II General] Chef_Tony:
i am a major noob when it comes to dual booting, so please bare with me.

my big question is: how would i fully get rid of it. i mean, if the 2nd system partition is installed to this hidden mountblock09, what was in there before? did it go completely unused?

if i ever wanted to fully restore stock, say, for selling the device or repairs, how would i go about doing that?

from what i am to understand, the other partitions like data and cache are allocated to the internal sd card and therefor easy to get rid of. once i know how to treat the system partition / mountblock09, i will certainly give it a try.

this is a great thread by the way, thanks for sharing your extensive knowledge.

EDIT: ok, in the faq part it states that formatting /system2 and deleting the sdcard parts gets rid of the 2nd rom, but my initial question still stands:

what was that mountblock meant for and is it meant to be empty by default?
[Galaxy S II General] bclark:
For the life of me I can't get my script to run.

I've used:

#!/sbin/busybox sh

#!/system/bin/sh

Both return the same thing.

Ps: line 35 is removed
[Galaxy S II General] naveediftikhar:
my hotplug up n down.freq are 60000 n 40000 still it lags..dun knw y...n still 300 n 400 crash for me...!
[Galaxy S II General] droidphile:
There was NOTHING in the hidden partition - mmcblk09, before - if you have the international non-carrier branded version. For some reason, sammy kept an unused and hidden partition. But that partition was used to store some operator specific apps that consumed some 100mb odd space. And the partition was not used after first boot.

To fully get rid of dual booting, just format /system2. And delete /sdcard/.secondrom directory. A kernel that does not support dual boot will not be able to detect the hidden and now empty mmcblk09 anyway. Then to get back to perfect stock, you flash a stock rom, get rid of the triangle using a jig or triangleaway app, remove superuser.apk using a file manager and reboot. :)

One or more of these might be the reason:

- There's a syntax error (an unwanted space probably - most common mistake everyone makes)

-You're passing an invalid argument using kmemhelper (symbol name itself/offset/value) or passing an invalid argument to one of the device file.

-The device file you're specifying does not exist. Using a file manager, make sure all the misc/device files you're passing values to in the script exist.

Hmm your case is really strange. I'm out of clues now as to what's causing the problem. But if your scaling min is 200, and you're able to set touch freq to 200 it's good enough for now right!
[Galaxy S II General] Many40:
One question to that. I am on dual booting but sorry I can't find /system2 folder in my phone.
[Galaxy S II General] kmelkon:
this is my first try on dual booting so there's a big chance that ill sound dumb .. but i just wanna ask ... does the 2nd rom have to be in the internal storage ?? cant i put it in the sd card ? and if not how much space do i need for it ??

:confused:

thanks
[Galaxy S II General] droidphile:
By /system2 i meant /system partition of second rom. It's the /system you see using a root explorer while on second rom. To wipe it, we use format /2ndRom_system under dualboot options in recovery.

You mean the external plastic card. Dev has not brought in that support at the moment. I'm sure soon we'll have it soon. We need 2.1 GB (2 GB /data partition plus 103 MB /cache partition) for storage.
[Galaxy S II General] kmelkon:
Yes i meant that .. so i have to empty my memory :( i only have 1.6 free ...
[Galaxy S II General] bclark:
In my modified frequency table, 100-1200 using multiples of 100, I still had to use L14 to get 200 to work.

It does though and is awesome.
[Galaxy S II General] inspiron2:
how are AOSP and Samsung ROM kernels different, supposed that they are both built from the same source? also, how are Korean and international i9100 kernel sources different, since i flashed a Korean kernel for M250K on top of XXLPQ and it hung at the S logo?
[Galaxy S II General] droidphile:
A pure samsung and pure aosp kernel has different initramfs, even if they're built from same sources. For kernels that supports both aosp and samsung, devs use the trick of auto-detecting initramfs and boot kernel from respective initramfs. As to korean sources and kernel, consider it as a kernel for an entirely different device. It won't boot international or other variants of your device.
[Galaxy S II General] inspiron2:
about the Korean kernel, because Siyah used to build a version of his GB kernel for M250S/K/L from M250 source (i9100 and M250x can be crossflashed) that ran on international ROM, also, another example was hardcore building his speedmod kernel version k2-1 from i777 source for international i9100 so i'm curious to know how can this be achieved on ICS ROM
[Galaxy S II General] inspiron2:
btw droidphile, does the vibrator.ko module control the vibration intensity of every vibrating features (haptic, ring+vibrate, notification...) of the system, since i'm thinking of injecting the vibrator.ko module from Korean kernel source into i9100 kernel to fix the weak vibration problem?
[Galaxy S II General] droidphile:
Hmm i think it is the driver for all the vibrations. But with same vibrator.ko installed by same kernel on sammy and aosp rom, the difference in vibration intensity is clearly noticeable. It may be because samsung uses the vibration device directly. Even setting /sys/devices/platform/tspdrv/vibrator_level to a max 6 does not make sammy rom vibration as strong as aosp. Another vibrator related device file is /sys/class/timed_output/vibrator/enable.
[Galaxy S II General] robertobsc:
Hi droidphile,

I'm studying the behavior of pegasus with only 5 steps 200-1200, since with all steps I was getting some freezes, with undervolt also.

I tried to adapt your settings to the 5 steps. What do you think of it?

Sampling rate 40000

Up threshold 85

Sampling down 2

Down diff 5

Freq step 40

CPU up rate 10

Down rate 20

Hotplug freq 1_1 800000

Hotplug freq 2_0 500000

Hotplug rq 1_1 350

Hotplug rq 2_0 200

Up threshold min freq 95

Freq for responsiveness 200
[Galaxy S II General] droidphile:
Looks fine for default 5 steps frequency. If you're looking for some power savings, also try to set screen touch frequency to 200mhz using kmemhelper. (Ex in OP and also in many posts).
[Galaxy S II General] robertobsc:
Oh, that's interesting. But it would affect performance?

And I apply the kmem in init.d?

Thx!
[Galaxy S II General] willybarca:
it doesnt effect performance, even if theres some lags, still wont be that visible if u tweak the governor properly,
[Galaxy S II General] robertobsc:
Thx. I adjusted it.
[Galaxy S II General] EdgaBimbam:
thank you vm :) nice guide ;D using aggresive pegasuq tweaks for franco ics note kernel :)
[Galaxy S II General] CamoGeko:
You have very quick fingers mate, your threads are always so explanatory. Please never stop doing this wonderful thing which helps all of us understand kernel functions and android in general.

Top man! :D
[Galaxy S II General] c_shekhar:
great info bank...

thanks..
[Galaxy S II General] Many40:
Hi droidphile, please help me to understand a problem related to dualbooting. Some guys including me faced the problem that after flashing a new 1st rom and reflashing Siyah kernel during boot, afterwords an option to choose between two roms disappeared, even the 2nd rom still existed in the phone. One of the Forum members - Tungstwenty, stated here:

http://xdaforums.com/showthread.php?t=1658647&page=172

(post no. 1705 and 1722) that a reason for this might be that 1st rom (during flashing) stores system files to hidden partition /dev/block/mmcblk0p12 as well as some parts/files to another (different) hidden partition /dev/block/mmcblk0p9 which is asigned only for the 2nd rom's system (as you wrote in your dual-booting guide here). So, I am a little bit sceptical if this is the truth because would it be an idea of Gokhanmoral to assign a hidden partition for 2nd rom's system which may be already (at least partly) used by the 1st one? Regards.
[Galaxy S II General] droidphile:
Tungstwenty is right. The hidden partition GM uses as /system for second rom are actually used by carrier branded firmwares to store some specific apks, Csc stuffs, etc. About 100 MB is used i think. And after first reboot, it's never used again. So if you odin flashed the primary rom, or even cwm flashed a rom with mutli CSCs (which might have written to system2), your /system of second rom was probably overwritten.

You say you can still find second rom on SD. But what you see is data.img and cache.img of second rom. You won't know if system still exist.

I recommend you to copy data.img and cache.img of secondrom from /sdcard/.secondrom to a safe place - say PC. Then modify your zip installer of your second rom to install only /system of second rom. (Edit updater-script in the zip to comment out lines that write to /data).

Now full wipe second rom /data and /cache. Format second rom /system. Flash the modified zip to second rom. Copy back and replace data.img and cache.img from your PC. Second rom should be in place now without loosing any apps/data.
[Galaxy S II General] Many40:
Thank you very much for your, as usal objective and substantive explanation. I personnaly overcame the problem by flashing 2nd rom from my nandroid backup (thanks to Gokhanmoral last versions of his kernel allow this). Thanks again - you are great man !
[Galaxy S II General] robertobsc:
Hi droidphile!

I would like to try to save even more battery. I would like to replicate the phenomenal internal undervolts into Siyah. Seems that I can do this with kmemhelper, isn't it? Do you know how?

Thanks!!
[Galaxy S II General] droidphile:
I don't have my GS2 now... Playing with the new toy - GS3.

Bus voltages aka internal voltages are stored in the table exynos4_busfreq_table defined in arch/arm/mach-exynos/busfreq.c in the source. It's like

exynos4_busfreq_table[0].volt stores voltage for 400 mhz

exynos4_busfreq_table[1.].volt stores voltage for 267 Mhz

exynos4_busfreq_table[2].volt stores voltage for 133 Mhz

You can try calling this variable from kmemhelper as type=integer and set voltages as Micro Volts (ex: 1150000 is 1150 mV) I'm not sure if Gokhan has exported it has global static so that it's available for kmemhelper. Since i don't have GS2, i can't test too. (Bus voltage code in GS3 sources are in a diff file, diff variables).

If i get a chance to test, will post. And btw, playing with internal voltage is not at all recommended. It can easily kill stability.
[Galaxy S II General] robertobsc:
Ok, I'll take a look.

I know that it could affect stability, but since I saw that phenomenal extreme saves so much battery i really want to take a try.
[Galaxy S II General] CamoGeko:
Phenomenal kernel only saves battery because of its tweaked UV settings. This can be done with Siyah as well.
[Galaxy S II General] Blondiepowa:
THANKS so much Droidphile for this best usefull tweaks topic ever !

:D
[Galaxy S II General] robertobsc:
No, we can't, because phenomenal tweaks internal voltages. SiyahKernel doesn't. Unless it could be done by kmemhelper, that what I was talking about.
[Galaxy S II General] Many40:
Just would like to refer again to your answer above. Don't you think that it would be good idea to include this issue in the "Dual booting" section of you thread - to help other guys who are not aware about this "limitation" of dual-booting?
[Galaxy S II General] robertobsc:
Hi droidphile!!!

I just implemented the internal voltages of phenomenal in Siyah, with kmemhelper!

I undervolted internal cpu voltages, bus voltages and screen voltages.

SiyahKernel exported all variables.

Created a topic with the hole explanation: Please take a look for me and see if i can improve something at the topic or the script....!!!!

http://xdaforums.com/showthread.php?p=27517036#post27517036

Cheers!
[Galaxy S II General] SilencerOfLambs:
Hey mate..I have a small doubt..

I was about to dual boot and had already wiped the data/cache of second ROM,but realized that the version of Paranoid Android that i had downloaded was not for S2 but was for Nexus.

So my question is that since i had already wiped cache/data of the 2nd ROM and since about 2 gb of the sdcard got used,how can i delete that space ? I read the FAQ and it says Remove 2nd ROM but in my case no 2nd ROM was flashed..

Secondly,I am on Siyah 3.3.2 and i checked the dual boot options in recovery and just cannot find the /format options(Did Gokhan change the kernel?)..Can you help me with that?
[Galaxy S II General] LegendZenify:
You answered your own question mate, just remove second rom from the recovery.

An alternative way is to just delete data.img and cache.img in /sdcard/.secondrom. Also delete /secondrom directory.

You should have your space back.

-Refer to #31 and #32 in droidphile's dual-booting FAQ

As for the format options in the recovery, they are under 'mounts and storage'.
[Galaxy S II General] robertobsc:
Hi droidphile,

Here i'm again with a doubt. :D

I would like to understand how in deep details works io_is_busy parameter.

I understand that if it is enabled it uses adds the iowait time into the wall time, and so it will scale up faster. But seems just like a trick to get more performance.

You said that apps or games that needs performance would benefit from this. That's what I didn't understand exactly. Would they benefit from this because is a trick for better performance just like I said or because the huge apps uses io very much??

In other words, I get what is the effect of enabling this, but I don't understand the reasons that huge apps would need it.

Can you help me here?

Thanks!
[Galaxy S II General] droidphile:
Hmm. I/O busy is just an indication that CPU is performance critical, and not that the system is actually idle. iowait time will be subtracted from the cpu idle time if io_is_busy equals 1

if (dbs_tuners_ins.io_is_busy && idle_time >= iowait_time)

idle_time -= iowait_time;

I guess i was wrong in assuming games and heavy apps would benefit from this. Because io_is_busy only inform CPU that it's not actually idle while waiting for disk i/o at lowest freq or so...
[Galaxy S II General] robertobsc:
Humm... yes, I disabled it. Didn't affect the performance.

Also I don't know what would be iowait for cel phones. Wouldn't it be very low, because of the Flash disk?

I think it makes more sense with computers...
[Galaxy S II General] razor 116:
@droidphile One of the best posts I've ever read, very informative and easy to understand. thanks
[Galaxy S II General] rictec:
this is a very good need some help

thank you for a nice post

i really need some info about what is a "must have" on the kernel to make ICS work since i only have kernel 2.6.32-9-ideos source and that is i think too old

i cant find this kind of info anywhere only people saying that something is needed not specifying what is

i know that someone is porting ICS using froyo and GB kernels for one device

any help here welcome

Thanks

Rictec
[Galaxy S II General] Many40:
Hi droidphile,

Before I familiarized myself with Siyah kernel tunable - SCHED_MC from your 1st post I used geko95gek Magic Config which has this option set as SCHED_MC=2 ("load balancing"). As far as understood the idea (please correct me if I am wrong) for "battery friendly" settings SCHED_MC (when CPU Hotplug=Default) should be kept default (=0). I think it would only be worth to enable SCHED_MC "load-balancing" mode when two cores are on - in dual core mode, but then would it help for battery saving ?(I think rather for performance).

I tried to ask geko95gek to understand his interpretation for this tunable but he didn't respond. Regards.
[Galaxy S II General] droidphile:
@rictec

Sorry i did not get what you're trying to convey. You want to compile an ICS kernel for your device? I don't even know if ICS is available for your device.

@Many40

Let's say enabling sched_mc on Galaxy S2 Exynos 4210 is completely pointless. Hotplugging is well handled by stand hotplug/legacy hotplug. Two logics trying to do same thing is always bad. It's like having two antivirus software on PC or like freq_step and smooth scaling trying to do similar stuff in ondemand based governors.

Sched_mc = 1 = Assymmetrical loading of cores. This can hinder race to idle (talking about AFTR here).

sched_mc = 2 = load balancing. When hotplugging knows when and how to hotplug In and Out second core, there's no need of another logic to do the same and cause conflicts. If you're using forced dual core mode, this may have some benefits. I never tested myself.

conclusion: let shed_mc=0 as long as you're using hotplugging. If you're on dual core mode (remember aftr/lpa can not be hit when second core is On), try sched_mc=2. However i don't think load balancing can save battery. It may utilize both cores effectively.
[Galaxy S II General] Many40:
This is exactly what I wanted to know, short and objective answer. Thanks a lot.

BTW did I tell you before that this thread and also this one: "[REF][TWEAKS] Kernel Governors, Modules, I/O Schedulers, CPU Tweaks, AIO App Configs" are for me the greatest threads covering huge amounts of very useful information about kernels, gathered in one place for benefit of all of us? I think not. :) Best regards.
[Galaxy S II General] robertobsc:
Hi droidphile, here i am again, pls help!

I was reading your "first teaching post" when I saw you speaking about changing bus frequency, and I saw this tweak:

Sample bus frequency modification:

echo "0 0 0 1 1 1 2 2" > /sys/devices/system/cpu/cpu0/cpufreq/busfreq_static

echo "enabled" > /sys/devices/system/cpu/cpu0/cpufreq/busfreq_static

But these files do not exists. I'm with Siyah 3.3.1.

I tried looking into source code to figure what bus frequence do a cpu frequency use, so I could use kmemhelper, but I just couldn't.

Can you please help?
[Galaxy S II General] droidphile:
You're talking about setting static bus frequencies on GB kernel. The file won't exist in ICS sources.

Instead of dynamically determining what bus frequency is to be used when CPU is at X frequency, we force a bus frequency for each of the frequency in CPU frequency table. 0 - 400 Mhz, 1 - 266, 2 - 133.
[Galaxy S II General] robertobsc:
Oh, so It doesn't exists for ics?

Oh too bad.. I spent the entire night searching!! :banghead:

Thx!
[Galaxy S II General] rictec:
thanks you

and no the isn’t ICS to my device i want to port ICS to it, very difficult task.
[Galaxy S II General] CamoGeko:
You want to port ICS to an HTC Magic??

Good luck mate! lol
[Galaxy S II General] rictec:
no no no

HTC Magic no no no :P

i want to put ICS on the tablet it has the required hardware i think.

luck has nothing to do with it lol
[Galaxy S II General] King_Rat:
:wow: bows to all posters in this thread :angel:

Q: I'm assuming this isn't possible :cyclops:

but I'm hopeful one of you android demi-gods has found a workaround for this :cool:

can an ICS nandroid be used for secondary rom?? :scuttles-away-2-corner-&-hides:
[Galaxy S II General] Many40:
Yes, I used it many times. This feature is available from Siyah kernel version 3.2.7.2 up. You have to go to CWM recovery / dual-boot option and then you will find backup or restore options. It take a little bit more time than for 1st rom (a few minutes) but it works. Regards.
[Galaxy S II General] King_Rat:
Even if the nandroid was made with a different kernel/boot image etc??
[Galaxy S II General] Many40:
Nandroid is made by piece of software (recovery.img) called custom recovery (in our case it's ClockWorkMode recovery) which boots from /recovery partition (alternative method in comparison with /boot partition, to boot our phone). To be honest I've never cared from which version of CWM recovery I came. Siyah kernel installs one of the newest version, so don't see any problems if you come from a little bit older. But what is important:

1. A ROM you want to install is compatible with Siyah kernel (GB based roms will not work)

2. Nandroid backup doesn't include modem nor previous CWM recovery.

3. When you install a ROM as the 2nd one a kernel from the ROM will not be flashed (obviously you will be using Siyah - kernel is stored in /boot partition which in dual-booting is shared beetwen 2 roms)

4. Before flasing 2nd rom you have to run "2nd rom wipe data/factory reset" and 2nd rom wipe cache" from dual-boot option in CWMR. Remember to choose restore option from CWMR / dual-boot option, not from the main menu because then your 1st rom would be overwritten - what by accident happened to me :)

5. Even if something goes wrong (but it shouldn't) it's not harmful for a phone - just your 2nd rom will not be restored :)) Regards.
[Galaxy S II General] ripalbaria:
hello sir plz can u tell me how can u calculate offset velue of symbole

like exonys4_asv_table tochange internal voltage of cpu
[Galaxy S II General] droidphile:
If you want to change internal/bus voltages, there's a thread from an user with lot of samples and examples.

Find it here
[Galaxy S II General] TotallydubbedHD:
Thanked and rated already 5 stars - many thanks mate.

Brought to my attention from the GS3 sound quality thread -> trying to understand governors, and CPU states.