[KERNEL][CWM] TerraSilent 1.3.5 for Galaxy 4.0 (YP-G1) INTL & USA (22/06/2012)

Search This thread

Dark_Balor

Senior Member
Oct 22, 2008
94
62
Version 1.2

[MAJOR BUG FIX]Corrected a bug with the recovery that wasn't able to mount correctly the /data partition, it was leading to a complete wipe of data when applying ZIP that needed that partition to be mounted

[OPTIMIZATION]Using LZO Compression for ZRam also, after some test, I discover that Snappy compression is not really optimized on our device.
 

klin1344

Senior Member
Nov 11, 2011
3,486
5,611
Very nice update. Now zram works without an issue on my device.

Sent using Tapatalk
 

Wheatly

Senior Member
Oct 30, 2011
50
1
If zcache.ko and zram.ko is found in /lib/modules does it mean that zcache and zram is enabled? I cant seem to know how to enable it. When you say in etc, is it /system/etc?
 

Dark_Balor

Senior Member
Oct 22, 2008
94
62
If zcache.ko and zram.ko is found in /lib/modules does it mean that zcache and zram is enabled? I cant seem to know how to enable it. When you say in etc, is it /system/etc?

Everything is explained in the first post.

No they aren't activated. You have the command to type/script to create, to enable them in the first post.
 

theraf

Senior Member
Feb 2, 2012
261
97
could you perhaps make a version of your kernel compatible with cyanogenmod??
 

Dark_Balor

Senior Member
Oct 22, 2008
94
62
No, simply because the problem is not the kernel but Cyanogen.

CM7 as not been made to work with our player.
CM9 is for SmartPhone that have a kernel done for ICS, it's not the case of our device.
 

iJimaniac

Senior Member
Oct 19, 2011
1,365
418
Hey, great work on your kernal. One question, I think I have enabled zram with a script in init.d, but is there a way I can tell it is working? Thank you.

Sent using Tapatalk
 

Dark_Balor

Senior Member
Oct 22, 2008
94
62
Where can i get cm7 i hate touch wiz

And can i flash this kernel over the old one??

Sent from my YP-G1 using XDA

You don't need cm7 to change the launcher, you can by example download GoLauncher (the best for me :) )
And yes it will override the old kernel by this one.

Hey, great work on your kernal. One question, I think I have enabled zram with a script in init.d, but is there a way I can tell it is working? Thank you.

Sent using Tapatalk

zRam is taking 25Mo (as I configured) from your ram for the swap. Since the busybox doesn't include the parameter to see if the swap is on, that the only way to check.
 
  • Like
Reactions: iJimaniac

theraf

Senior Member
Feb 2, 2012
261
97
No, simply because the problem is not the kernel but Cyanogen.

CM7 as not been made to work with our player.
CM9 is for SmartPhone that have a kernel done for ICS, it's not the case of our device.
but i thought that all the current cm7 issues were kernel related and i thought that with your expertise you could probably fix them
 

Dark_Balor

Senior Member
Oct 22, 2008
94
62
but i thought that all the current cm7 issues were kernel related and i thought that with your expertise you could probably fix them

I most think it's issues with CM7 that need to take some of the module from the samsung rom to work correctly.

But that could also be some part of the samsung code in the kernel that is doing that, and I don't have the knowledge to track it.
 

Dark_Balor

Senior Member
Oct 22, 2008
94
62
Version 1.3
  • [BUG FIX] Should have corrected the bug with the /data corruption in recovery when in ext4 (but be careful)
  • [CHANGE] Zram built-in not a module anymore
  • [BUSYBOX] Updated busybox to last version 1.20.1 meaning any init.d script will be launched with that version.
 

Choucas06

Senior Member
Hi Dark_Balor,

First of all, thanks for your Kernel.

I've made some tests (YP-G1 INTL version).

I've made a backup using CWM, everything was in EXT4 exept my data which was in RFS. I've renamed the file data.rfs.tar to data.ext4.tar (and changed the md5 as well) and restored everything using CWM.
It worked at first boot but it has been corrupted whn I launched CWM again.
Then I renamed back my backuped data partition and I tried to restore it.
Impossible : problem during restore, restore is aborded.

Then I flashed back the v1.2 of the kernel and restored : it worked !
So I guess there is still a problem with CWM.


I also have a question, when you say "Zram built-in not a module anymore", does it mean Zram functionnality is automatically launched on startup ?
 
Last edited:

klin1344

Senior Member
Nov 11, 2011
3,486
5,611
Thanks for the update. I will test it out now.

Also, I've noticed that the US kernel config is missing the line "CONFIG_SND_VOODOO_FM=y", so voodoo sound doesn't have FM radio improvements. Could you add it please? I noticed it a while ago so I have been compiling my own kernel to use. I just copied the INTL defconfig and added "CONFIG_ARIES_USA=y".

Thanks

---------- Post added at 12:50 PM ---------- Previous post was at 12:36 PM ----------

Hi Dark_Balor,

First of all, thanks for your Kernel.

I've made some tests (YP-G1 INTL version).

I've made a backup using CWM, everything was in EXT4 exept my data which was in RFS. I've renamed the file data.rfs.tar to data.ext4.tar (and changed the md5 as well) and restored everything using CWM.
It worked at first boot but it has been corrupted whn I launched CWM again.
Then I renamed back my backuped data partition and I tried to restore it.
Impossible : problem during restore, restore is aborded.

Then I flashed back the v1.2 of the kernel and restored : it worked !
So I guess there is still a problem with CWM.


I also have a question, when you say "Zram built-in not a module anymore", does it mean Zram functionnality is automatically launched on startup ?

yes now zram is enabled in the init.rc I believe.
 

hanthesolo

Senior Member
Jan 23, 2012
1,042
567
Thanks for addressing my issues! I was able to gain some success by fully wiping and reinstalling the USER busybox, but it would fail to run sometimes, and selective scripts would intermittently fail. Also nice to know that my data will not be wiped whenever I boot into CWM accidentally anymore :).
 

klin1344

Senior Member
Nov 11, 2011
3,486
5,611
Thanks for addressing my issues! I was able to gain some success by fully wiping and reinstalling the USER busybox, but it would fail to run sometimes, and selective scripts would intermittently fail. Also nice to know that my data will not be wiped whenever I boot into CWM accidentally anymore :).

Actually I booted into cwm to test my rom and data was wiped again..
I have to see if this issue is present with the original cwm 3.0.0.5. Maybe it would just be easier to use that instead of the newer version.

Sent using Tapatalk
 

Dark_Balor

Senior Member
Oct 22, 2008
94
62
Thanks for the update. I will test it out now.

Also, I've noticed that the US kernel config is missing the line "CONFIG_SND_VOODOO_FM=y", so voodoo sound doesn't have FM radio improvements. Could you add it please? I noticed it a while ago so I have been compiling my own kernel to use. I just copied the INTL defconfig and added "CONFIG_ARIES_USA=y".

Thanks

---------- Post added at 12:50 PM ---------- Previous post was at 12:36 PM ----------



yes now zram is enabled in the init.rc I believe.

I'll add the config, strange, I thought it was there.

mmmh I'll further investigate on the /data, quite annoying ... I had my partition wiped ... 6 times already ... I have quite enough of that ****ing bug.

And for zRam it's just loaded, not activated (no mkswap and swapon done in the init.rc).
 

Top Liked Posts

  • There are no posts matching your filters.
  • 34
    TerraSilent 1.3.5
    logontj.jpg

    After a lot of testing I can release it

    Well sorry for the /data partition, I don't know why, but it's stuck at RFS. I format it, I tried everything, everytime you relaunch the recovery and try to mount the partition, it mount it as RFS and wipe it out.

    I advice you to let it as RFS or, change it to ext4 when you are sure you won't need to do further change in it from the recovery.

    THIS IS ONLY FOR THE INTL AND USA VERSION OF THE GALAXY PLAYER 4.0 (YP-G1).

    The kernel is based on the R3 version of Klin1344.

    Current features :
    • All features of R3 of Klin Kernel (see below)
    • Battery life improvement using the patch of Entropy512
    • Jhash3
    • Optimized CFS (process scheduler)
    • A lot of memory tweak
    • TinyRCU
    • New Governor created for the kernel (based on smartassV2) : TerraSilent (I recommend you to use it)
    • CleanCache (using zCache) (see below for explanation)
    • zRam (see below for explanation)
    • Updated crc32 algorithm (that is quite used everywhere in the kernel)
    • Using optimized Sha1 algorithm
    • Lzma compressed initramfs
    • Swap enabled
    • New Boot logo (same image (but bigger) as the one in the begin of the Thread)
    Feature Coming from based kernel :
    • V(R), BFQ, SIO Scheduler
    • OC to 1.2GHz
    • ClockWorkMod (recovery)
    • interactiveX, smartassV2, ondemandX, and the default governors.
    • Netarchy/coolbho3ks SoD patch from Entropy512's source (allows you to use screen off profiles of under 800Mhz)
    • Ext4 support
    • Voodoo Sound
    • etc ... see http://xdaforums.com/showthread.php?t=1601773

    Changelog
    Version 1.3.5
    • [RECOVERY] Optimization of the recovery with better use of the busybox
    • [RECOVERY] Can save the /dbdata partition in nandroid
    • [USA] Added VOODOO FM
    Version 1.3
    • [CHANGE] Zram built-in not a module anymore
    • [BUSYBOX] Updated busybox to last version 1.20.1 meaning any init.d script will be launched with that version.
    Version 1.2

    • [MAJOR BUG FIX]Corrected a bug with the recovery that wasn't able to mount correctly the /data partition, it was leading to a complete wipe of data when applying ZIP that needed that partition to be mounted
    • [OPTIMIZATION]Using LZO Compression for ZRam also, after some test, I discover that Snappy compression is not really optimized on our device.
    Feature Explanation :

    faux123 said:
    CleanCache (via ZCache backend)

    ZCACHE is a new technology I introduced to Sensation Kernel. ZCACHE is a compressed cache similar to ZRAM but the similarity ends there. ZCache is meant to provide as many "cleancache" pages (non-dirty or untouched "virgin" memory) to apps that request for new memory. CleanCache is very easy to allocate and no additional penalty are required to hand them out, so having more CleanCache pages will improve performance. Under heavy memory pressure, often times the kernel will NOT have enough CleanCache pages, so the kernel has to do EXTRA work to reclaim dirty cache pages and clean them for the new apps that's requesting for them. The described process creates a performance hit for the kernel and the app, so the idea is to use compression to create more CleanCache pages available for use. Of course there's a penalty to pay for using compression, but the trade-off between compression penalty and the penalty for reclaiming dirty cache pages and allocating them after cleaning is smaller for compression, so in the end, CleanCache should add more performance.

    Source : http://xdaforums.com/showthread.php?t=1359951

    faux123 said:
    ZRAM (aka CompCache aka RAMZSwap)

    ZRAM is an updated version formally known as CompCache and RAMZSwap. It was originally designed for 2.6.38.xx kernels, I have backported to our 2.6.35.xx kernel. ZRAM allows real-time compression of memory objects in RAM thus reducing memory pressure for the Linux kernel and can keep more apps in memory longer (more apps in RAM == better performance, less fetching from slower MMC or SDCard). Compression, however, is not Free. Some CPU cycles are required to do the compress/decompression, so there's a slight penalty for it. The original CompCache / RAMZSwap required a user space binary to control its behavior which adds additional penalty to performance, but the new version ZRAM eliminated the need for a separate dedicated daemon, thus reducing the overhead and increased performance from the old CompCache by 20%. Therefore, with the newer implementation of ZRAM interface, the performance penalty is almost negligible.

    Source : http://xdaforums.com/showthread.php?t=1359951

    Dark_Balor said:
    TerraSilent Governor

    TerraSilent is completely based on the SmartAssV2 kernel with some improvement for the battery. When you are putting your device on sleeping/suspend, it's changing the frequency to 100Mz (if you set a minimum higher then that, it will be used instead) to avoid using too much battery when not needed, you can still listen to music without any lag. (if you experience some lag just change the minimum to 200Mhz).
    It also less aggressive on ramp up the frequency, instead of always trying to reach the ideal frequency (400Mhz by default, I'll explain for tweaker all they can change if they want) it will try under frequency first (200Mhz if you were at 100Mhz before). Meaning using less battery.
    By default when the load >= 85%, it will ramp up the frequency and if its lower than 35, ramp down it to an new frequency calculated using the current load.

    How to tweak/activate special features
    By default zCache and zRam are disabled because they can be unstable depending on the device.
    By example, I don't have problem with zCache but with zRam yes, and Klin the exact opposite. The better is to try for your device and then choose which one you want, the 2 or none.

    zCache :
    To activate zCache, you only need to put a script in your init.d directory (in etc) or using ScriptManager to launch that line on boot :
    Code:
    insmod /lib/modules/zcache.ko

    zRam:
    To activate zRam, you only need to put a script in your init.d directory (in etc) or using ScriptManager to launch theses lines on boot :
    Code:
    mkswap /dev/block/zram0
    swapon /dev/block/zram0

    Changing by script the governator to TerraSilent
    if you don't want to use (but I recommend noFrill Cpu to do that) an application to change the governator, you just need to do :
    Code:
     echo terrasilent > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

    Tweaking TerraSilent
    in /sys/devices/system/cpu/cpufreq/terrasilent you'll find these files :
    Code:
    debug_mask            --> for debug (possible value 0(disabled),1,2,4)
    up_rate_us             --> µs to wait before ramp up
    down_rate_us         --> µs to wait before ramp down
    sleep_ideal_freq      --> Freq used when sleeping/suspend
    sleep_wakeup_freq  --> Freq use when waking up
    awake_ideal_freq    --> Freq ideal for daily usage
    sample_rate_jiffies  --> DON'T TOUCH UNLESS YOU KNOW WHAT YOU ARE DOING
    ramp_up_step        --> step used when ramp up in Hz (to calcule the new frequency) (0 = maximum freq will be used when ramp up)
    ramp_down_step    --> step used when ramp down in Hz (to calcule the new frequency) (0 = using heuristic to found the best new lowered freq)
    max_cpu_load        --> max load that trigger the freq change for ramp up
    min_cpu_load         --> min load that trigger the freq change for ramp down
    Where you can put your own values. (You have to do that after every boot, the best is to create a script that change the governor to TerraSilent, and set the wanted values)

    FAQ

    How to create a script
    With ScriptManager it's easy, just push the menu button -> New -> Script
    Put the script lines you want
    Menu -> save
    That's done

    Manually : create a file name my-script.sh
    put as first line :
    Code:
    #! /system/bin/sh
    and then what you want your script to do.
    Don't forget to do a
    Code:
    chmod +x my-script.sh
    to make it executable.
    Download (ODIN PACKAGES) :
    http://www.mediafire.com/?cf9aw48dnmiqi

    Source Code
    Kernel : https://github.com/Belphemur/Galaxy-Player-4.0-Kernel
    Initramfs : https://github.com/Belphemur/initramfs_yp-g1

    If you love my work, don't hesitate to click the thanks button :)

    Thanks to
    Steve for the first modded kernel of our device
    Klin1344 for continuing, improving the work of Steves and testing my kernel for the USA version.
    Entropy512 for the battery patch, and a lot of other tweak
    Faux123 for all the patch he have backported to the 2.6.35 kernel (zCache, zRam, etc ...)
    5
    Version 1.3
    • [BUG FIX] Should have corrected the bug with the /data corruption in recovery when in ext4 (but be careful)
    • [CHANGE] Zram built-in not a module anymore
    • [BUSYBOX] Updated busybox to last version 1.20.1 meaning any init.d script will be launched with that version.
    5
    Version 1.2

    [MAJOR BUG FIX]Corrected a bug with the recovery that wasn't able to mount correctly the /data partition, it was leading to a complete wipe of data when applying ZIP that needed that partition to be mounted

    [OPTIMIZATION]Using LZO Compression for ZRam also, after some test, I discover that Snappy compression is not really optimized on our device.
    2
    Someone else recommended Terrasilent over Steven's, but I'm just worried about performance issues from using Terrasilent after reading some posts about it. Why would you recommend Klin's R3 kernel over Terrasilent specifically? I notice in your sig you have the SGP 4.0 and are using CM11. Are there any side effects or issues that come with flashing that on the YP-G1 you've noticed? for instance, in the first post on the CM11 thread, there is a warning that the alarm may not work...I definitely need the alarm to work. have you noticed stuff like this? Any common problems I should watch out for if I flash it? Also, being a noob, I'm unsure if I need to flash a kernel with CM11 or if CM11 includes a kernel with it. Thanks for any advice and help again.

    I recommend the two I mentioned over Terasilent because they both don't have that weird wiping bug. In regards to performance all performed about the same in my opinion.

    CM 11 at first had some slight problems but Zaclimon completely ironed all of them out. I just checked and the alarm works just fine. With flashing all you need is to have is the clockworkmod recovery installed. Before installing backup your current ROM using CWM and follow the instructions Zaclimon wrote. I don't think there's any problems to look out for anymore as he pretty much streamlined the process. Before you flash do you have the Galaxy Player 4.0 or Galaxy S Player 4.0 (it has the physical home button)
    1
    THanks for your hard work in this kernel. You certainly know more about linux kernels than me. :D

    But for some reason now enabling zram causes crashing and reboots but zcache does not. Oh well, at least one of them works!