yashsingh1/xdaforums huggingface dataset:
[HTC Sensation] theraver:
Faux,

is it safe to enable zram on 0.2.1 ? ,because Mike had problems with his ARHD 4.1.1 rom with zram enabled
[HTC Sensation] zimphishmonger:
enabing zram seems to cause the kernel panic and FC, but if you do, please pull your /proc/last_kmsg for Faux so he can diagnose whats goin on besides the mpdecision conflict
[HTC Sensation] johnpatcher:
I've tried to replace the kernel within the stock ROM (1.45.401.2), which seems to work so far. However I the Wi-Fi won't work. It says "Error" in the Quick settings.

My radio version is "10.14.9035.01_M" and I haven't messed anything with the RIL nor done any other changes.

Any clue what went wrong?
[HTC Sensation] jlevy73:
Try fixing permissions in CWM
[HTC Sensation] faux123:
Open Beta 021 Build -04:

First I fixed Dual Core CPU Bug for Sensation,

Then I gave you guys Global Under Volt Table,

Now I bring you the next level real INNOVATIONS to Sensation:

http://www.multiupload.com/5SFKGYJW1W

Introducing ZRAM (Compressed RAM SWAP). Even though Sensations 4G has 768 Megs of RAM, but due to Sense UI's successive bloat and GPU RAM carveout, we have usually have barely 100+ Megs of RAM free. ZRAM will add more RAM by compress the RAM content in real time (albeit at a negligible cost of performance). ZRAM is a feature for 2.6.38 kernel (newer more advanced kernel than our 2.6.35 kernel), but I have successfully backported to our 2.6.35.xx kernel.

To enable ZRAM swap:

using terminal or gscript or init.d scripts:

stop mpdecision
mkswap /dev/block/zram0
swapon /dev/block/zram0

Change log below:

Version 0.2.1 (Coming Soon, Official GB2.3.4)

<0>

Added XZ Compression support to 2.6.35 kernel

Added XZ Compression support for kernel image

Added XZ Compression RAMDisk support (boot time)

Added SquashFS support based on new XZ Compression (very high compression ratio File System)

Updated Camera Driver FPS to 120 (mdeejay ;) )

<1>

Used the git implementation of SHA-1 to reduce boot time by 11%

<2>

Updated qdsp6v2 to block write until buffer is full

Updated trivial bug fix for SMP macro

<3>

Introducing ZRAM (compressed RAM == MOAR RAM ;) )

I have successfully back ported ZRAM from 2.6.38 kernel to our older 2.6.35.xx kernel :D This should alleviate the memory pressure introduced by Sense UI.

<4>

ZRAM bug fixes and latest patches (up to latest greatest beyond Linux Kernel 3.1-rc8) :p
[HTC Sensation] xyqtt:
Patch 4 seems to get quite hot after a few minutes of usage. While on patch 3 it didn't get this hot after longer usage
[HTC Sensation] faux123:
Open Beta 021 Build -05: (2.3.5 ONLY) Zero Shutter Lag driver backport from CAF :D

First I fixed Dual Core CPU Bug for Sensation,

Then I gave you guys Global Under Volt Table,

Now I bring you the next level real INNOVATIONS to Sensation:

Beta build 05 is over.

Introducing ZRAM (Compressed RAM SWAP). Even though Sensations 4G has 768 Megs of RAM, but due to Sense UI's successive bloat and GPU RAM carveout, we have usually have barely 100+ Megs of RAM free. ZRAM will add more RAM by compress the RAM content in real time (albeit at a negligible cost of performance). ZRAM is a feature for 2.6.38 kernel (newer more advanced kernel than our 2.6.35 kernel), but I have successfully backported to our 2.6.35.xx kernel.

To enable ZRAM swap:

using terminal or gscript or init.d scripts:

stop mpdecision
mkswap /dev/block/zram0
swapon /dev/block/zram0

Change log below:

Version 0.2.1 (Coming Soon, Official GB2.3.5)

Added XZ Compression support to 2.6.35 kernel

Added XZ Compression support for kernel image

Added XZ Compression RAMDisk support (boot time)

Added SquashFS support based on new XZ Compression (very high compression ratio File System)

Updated Camera Driver FPS to 120 (mdeejay ;) )

Used the git implementation of SHA-1 to reduce boot time by 11%

Updated qdsp6v2 to block write until buffer is full

Updated trivial bug fix for SMP macro

Introducing ZRAM (compressed RAM == MOAR RAM ;) )

I have successfully back ported ZRAM from 2.6.38 kernel to our older 2.6.35.xx kernel :D This should alleviate the memory pressure introduced by Sense UI.

ZRAM bug fixes and latest patches (up to latest greatest beyond Linux Kernel 3.1-rc8) :p

Zero Shutter Lag (ZSL) Driver used by Sense 3.5 Camera App backported from CAF by me :D (Sense 3.5 ONLY!)
[HTC Sensation] epsix:
Damn... faux123, you're a maniac. Once i get home ill buy you a case of Hieneken for myTouch 4G and now Sensation i promise but I'm still at work.

Thank you bro, you've giving us alot.
[HTC Sensation] epsix:
I get bootloop on test 05 build for 2.3.5
[HTC Sensation] jerrylzy:
same here:confused:
[HTC Sensation] Step-han:
I'm on mike's ARHD 3.6.1 android 2.3.4 with test build 05 and works fine for me.
[HTC Sensation] -juanito-:
i just flashed bulid 5

htc logo then should go to htc quality brilliant but it's going to black screen !! :mad:
[HTC Sensation] hendr1k:
have you try clear your dalvik cache and other from recovery ? usually it does work for me
[HTC Sensation] -juanito-:
i tried everything !!
[HTC Sensation] Sibbi:
Running v0.2.0. since this morning without a problem. It's really smooth and battery friendly.

Good work faux.
[HTC Sensation] xyqtt:
[2.1-4]

got my first bootloop since 2.0

Restarted phone and got a fc of htc.proces and a black screen.

Restarted again and everything seems normal

I'm on pyramid 9.1 underclocked to 1ghz

couldn't find this fast how to make an error report

Edit: seems to be a market problem most likely caused by the rom
[HTC Sensation] zimphishmonger:
same here, I can't get the beta5 (for 235 only) to boot on bulletproof 21,which is sense 35 and android 235. Just starts to boot on htc quietly brilliant screen, then black screen, and reboot. Tried on two fresh installs
[HTC Sensation] faux123:
Yeah, there are still issues with build-05. I am planning to release build-04 as official 021 today sometimes. I will reserve build-05 changes for the next release with further testing and hacking :p
[HTC Sensation] theraver:
Does build-04 still have issues with zram? or can we enable zram without probs?

BTW: i used fauxclock with your battery setting (@1026ghz) and now have a battery usage of 1d 2u 37m 24s with 18% remaning WOW!!!
[HTC Sensation] zimphishmonger:
Confirming, the official 21 WILL NOT support Sense 3.5 and Android 2.3.5, correct?
[HTC Sensation] faux123:
Build 04 fixed all zram issues, so it's safe to enable it. The new zram is much more efficient than the introduction version. It's nearly 100% used which means the apps are staying in RAM more often than before which leads to better performance and may improve battery life due to less mmc / sdcard accesses.
[HTC Sensation] faux123:
021 will work natively on all 2.3.4 Roms.

It will also work on 2.3.5 Roms WITH ADDITIONAL LIBRARY HACKS. so for 2.3.5 support, you will need to talk to Rom chefs. I also have heard users reporting my kernel working on 2.3.5 Roms after applying Unity camera pack first, then flash my raw kernel afterwards.

Geek talk:

HTC has once again included major changes into their upcoming 2.3.5 Rom. Two significant changes are:

1st, Zero shutter lag (zsl) driver for the camera app. I have successfully backported the zsl driver in my build 05.

2nd, another kgsl update. This one is more difficult to guess what they've done. It appeared from their /proc/config.gz that they either went back to an older version of kgsl driver or they switched to the absolute latest greatest. ( our current version is in between) I spent most of my day yesterday backporting the latest kgsl driver from CAF but it failed to boot properly. More work will be required to get this working natively without actual kernel source for 2.3.5
[HTC Sensation] arn82:
does this kernel support call recording? also, I can't seem to be able to make wi-fi calls anymore...regular phone calls work.
[HTC Sensation] faux123:
WiFi calling should work, I use it everyday.

Two way recording is very buggy cause more harm than good. This is main reason I haven't included in any of my kernels
[HTC Sensation] Sibbi:
Where can I activate zram?
[HTC Sensation] faux123:
Check my op, I have instructions on there showing you how to enable zram swap :)
[HTC Sensation] anthrax132:
I keep seeing people who flashed the 05...but can't seem to find it anywhere.

I wanted to test it on IC 3.2.0, especially for the zsl driver.

Should i assume it has been pulled or something?
[HTC Sensation] faux123:
Right now I am away from my pc. Once I get back I will start a new open beta with zsl drivers
[HTC Sensation] anthrax132:
Thanks a lot,no hurry btw ;)

You can count me in the future testers for it so :p
[HTC Sensation] epsix:
Faux123, sorry for the delay buddy, i did 2 shift :) :-) 8AT25945D19400242

Thank you for the past and present :D
[HTC Sensation] Astug:
Where can I find the "fauxclock" app you mentioned? I've tryed searching for it on XDA and the market but nothing. Thanks in advance.
[HTC Sensation] faux123:
It's NOT on XDA, it's an exclusive for another site ;)

Check it here: http://twitter.com/#!/faux123/status/113982949631856640 ;)
[HTC Sensation] zimphishmonger:
Its been mentioned NUMEROUS times, FauxClock is NOT available on XDA (and probably will never be, per the dev). Its available on the other android forum thats used by devs for releases They also happen to give out phones (hint).
[HTC Sensation] faux123:
Kernel 021 is official :D

(same as beta build-04 if you have already installed). ZRAM enabling instructions @ OP. Happy Friday!
[HTC Sensation] hev88:
Nice... sense gets all the cool stuff... can cm7 haz too lol.

Thanks for all the hard work you made this phone worth having along with mike1986 and kmobs
[HTC Sensation] johnpatcher:
Thank for another release, will try to get it into my ROM later on, therefor I'm not sure how to include it with the zRAM option. How would I include it with zRAM enabled into a stock ROM? How can I check whether it is enabled? Is there any flag or something to check?

And another one: Currently I'm using the default ramdisk (included in the stock ROM). Is it recommend to replace it? If so, what would you recommend? Is it possible to compress the ramdisk in order to speed up boot times?
[HTC Sensation] faux123:
CM7/AOSP is very light weight compared to Sense (esp 3.0+). I will migrate some of the cool features over to my CM7/AOSP kernel later on.
[HTC Sensation] hev88:
Thanks faux. Much appreciated, very.
[HTC Sensation] faux123:
See OP for enabling ZRAM. You have 3 options to enabling ZRAM.

Using

1: terminal,

2: Gscript (i use this myself)

3: edit /etc/init.post_boot.sh (for automatic enabling every reboot).

Once you enabled zram swap, you can use terminal and type "free" and you should see swap space going from 0 to 18,000 something. This will indicate that zram has been enabled and is used by swap.

I am running the default ramdisk and it is fine the way it is, I don't see why you need to update it. Kernel 021 has XZ compression enabled and the kernel itself is compressed using XZ compression, it went from 3.46 Megabytes to 2.6 Megabytes. I also added new tweaks to speed up boot by 11%. See my 2nd post for complete change log. So basically everything you've asked for are all included in the latest release :D
[HTC Sensation] johnpatcher:
Ok, thanks for your reply. Fast as always. Just wondering whether there is some kind of flag telling me the zRAM feature is enabled. Or is it enough to look at the free RAM ;)?
[HTC Sensation] Jur1nator:
i am surprised that You created something to make more the ram more free

wasn`t it you that said ( and i completly agree) that we don`t need free ram, because somepeople see it like a benchmark... because free ram is wasted space.. its better to fill up that ram so it has an use and can speed up stuff?

or am i mistaken? :D
[HTC Sensation] faux123:
I don't believe I said that... I believe we need to keep more Apps in memory rather than more "free RAM"

On G2x, I also enabled ramzswap (much older version of zram) because G2x only has 512 Megs - 128 Megs GPU carveout ~ 384 Megs for Android OS + App :eek: ramzswap was not that great because it relied on a user space daemon called rzscontrol (which is not very flexible and have to have it running at all times which causes more battery drain).

zram is the state-of-the-art updated version of ramzswap. It is automatic and the controlling interface is now greatly simplified and uses the sysfs interface. zram is already INCLUDED in the latest greatest Linux 3.1-rc8 and Linux Next. My version is EVEN newer than both and has been properly backported to our older kernel 2.6.35.

For Heavy weight ROM such as Sense, I believe this would help to relieve the memory pressure and improve both battery and performance (by keeping more Apps in memory, reducing the amount of read/writes to mmc/sdcard). For AOSP/CM7 light weight ROMs, zram is probably not necessary.
[HTC Sensation] d3vilskid:
So after every reboot I have to set seam again via terminal or gscript?
[HTC Sensation] geoffcorey:
Faux, does the enable zram have to be in init_postboot.sh or can I put it in am init.d script?
[HTC Sensation] faux123:
You can put it in init.d or in init.post_boot.sh, either place is fine :D

I have created a flashable update :D This will modify the /etc/init.post_boot.sh to automatically enable zram :D

http://www.multiupload.com/4SDWPQ9PLP

^ This will also be available in the OP :p
[HTC Sensation] mudhi:
faux, there is a type on post#1 enabling cpu1

echo 1 > /sys/devices/system/cpu/cpu1/cpufreq/online

should be echo 1 > /sys/devices/system/cpu/cpu1/online
[HTC Sensation] faux123:
I didn't change what's already there, I only added 3 lines for the zram :p
[HTC Sensation] reaperofwaywardsouls:
Possible dumb question:

Do I have to manually enable zram AND flash the zip? Or just flash (enabled automatically)?
[HTC Sensation] faux123:
Just flash, upon reboot, it will start automatically :D
[HTC Sensation] tibere86:
Thanks for the great explanation once again Faux123.

Christ Faux123. This kernel is smoother clocked @ 1.18ghz than v2.0 was @ 1.512ghz!
[HTC Sensation] mudhi:
With my limit knowledge, I can't figure out how and why.

I was playing with the sdcard cache tweak for class 10 32GB card, the best is 1024, tweak them manually or run the script manually is fine, but not automatic like init.d script.

echo "1024" > /sys/block/mmcblk0/bdi/read_ahead_kb

echo "1024" > /sys/block/mmcblk1/bdi/read_ahead_kb

echo "1024" > /sys/devices/virtual/bdi/179:0/read_ahead_kb

With 24 hours of trying, I found one solution.

on boot image's bootcomplete.rc insert 2 line

write /sys/block/mmcblk0/bdi/read_ahead_kb 1024

write /sys/block/mmcblk1/bdi/read_ahead_kb 1024

on init.d script, insert the following

if just simple echo 3 lines without the until-do-done and sleep 5, the mmcblk1 always 128. Why???!!!
[HTC Sensation] piimp:
Can't wait for 0.2.2 so we can get some love for gb2.3.5 :)

Sent by my feau gee
[HTC Sensation] Shroomster:
I've got 2 stupid questions (because I'm not keen on using terminals and adb but I'm trying)

1. Optional: Stock Clock Frequencies for Dual CPUs <<<from the Op post:

--If I want to run your kernel at the stock cpu frequencies (Faux 0.2.1) I would just use adb or terminal emulator and enter those values? and they would stick after reboots?

--I won't have to change the values for screen off/idle time?

2. Under light to heavy use I am averaging between 8-12 hours on a charge until I hit 10 to 40%, will using your kernel at the stock values from above keep me at those rates roughly or possibly improve them slightly?

Sorry if I'm being stupid about this, I'm kind of gaining a willingness to tweak the phone instead of just reading and flashing.....
[HTC Sensation] ttav:
Slight problem....enabled zram manually in terminal and the swap file showed up as expected.Flashed the zip to automatically enable zram and on reboot the swap file showed as 0. Checked init.post_boot.sh and the lines to enable zram are present.

I`m not an expert at all this so maybe i`ve misunderstood something:)
[HTC Sensation] neoissuperman:
Does this work with 1730mah evo3D battery? I am have horrible trouble with draining since i switched to this battery?
[HTC Sensation] d3vilskid:
My findings thus far, kernel is smooth and fast but overheard when playing hanging with friends.
[HTC Sensation] slimfeed:
its working very well with the stock htc sensation XE rom :)

thx u!!
[HTC Sensation] jacksparr0w:
Hi faux, I was wondering what temp is the thermal configuration patch set at? Because when I was running cf-bench at 1.78ghz using the latest kernel the CPU temp was around 75c - 80c before the CPU speed would drop down to lower the temps during the benchmark. Is this normal?
[HTC Sensation] orymd:
i've installed faux 0.2.1 kernel in ARHD 4.1.2 for Sensation... it works good!!!

Thank you faux for you work... Waiting for 0.2.2 ^^ (ARHD 4.1.2 has 2.3.5 / 3.5)
[HTC Sensation] orangestrawberry:
Faux, does this update enable zram on arhd 4.1?

Many thanks
[HTC Sensation] kboeckx:
see if ZRAM is active

Is there a way to see if ZRAM is active ?

I've installed kernel v0.21 and added the three line to /etc/init.post_boot.sh, did a reboot.

Now I want to check if I did everything OK
[HTC Sensation] krat0s123:
Actually ARHD 4.1.2 has 2.3.4 not 2.3.5
[HTC Sensation] Sibbi:
0.2.1 working great. One problem though... as soon as I apply your update for zram, the phone won´t boot anymore.

Any suggestions?

Thanks in advance.
[HTC Sensation] kboeckx:
Restore original file "/etc/init.post_boot.sh" and edit manualy with esexplorer (root permisions enabled)
[HTC Sensation] Sibbi:
Just checked, and it seems that the patch did work (lines are added to init.post_boot.sh)... i just wiped cache and dalvik, re-installed the kernel and now it boots again.

Don´t know what happened there before.

Now one more question, before I stop posting nooby questions.

How to check if zram is doing as it´s supposed to?
[HTC Sensation] faux123:
Use terminal and just type free you should see swap space having a value other than zero
[HTC Sensation] theraver:
start terminal and type "free".

at swap buffers you will see something like "18000". then it's active

EDIT: faux already gave an answer :)
[HTC Sensation] datafoo:
LOL "actually" you sir are mistaken. The new batch of 3.5 roms are based upon the leaked RUU and not a 3.5 port.

http://xdaforums.com/showpost.php?p=14192842&postcount=3

ARHD 4.1.2 is based upon the actual HTC RUU 2.08.401.1 which is absolutely without question 2.3.5 and sense 3.5.

Please make a note of it.
[HTC Sensation] Pikaraph:
Faux, with your 0.2.1 kernel MMS work again and i didn't noticed reboots like I had before.
[HTC Sensation] johnpatcher:
Isn't it necessary to start mpdecision after killing it (in the zram enabling process). Or will it spawn automatically? Can it be mixed with the above optimization using just a single core while the panel is off?
[HTC Sensation] theraver:
Faux,

If i use the 1.78ghz version of 0.2.1, is that a lot laster than the 1.58ghz?

Because the 1.78ghz version does not use L2.

Do they both have Zram?
[HTC Sensation] DaNnY549:
Is The KERNEL ==> Sensation Kernel 0.2.1 (1.56 GHz Sync L2) <== works to T-Mous STOCK ROM 2.3.3 Software number 1.29.531.2 and with ZRAM_Enable ??????????????????????????????????????????
[HTC Sensation] malybru:
Hi,

It says 2.3.5 in my Settings/ About Phone/Software information.

:)
[HTC Sensation] teh_master:
no luck mate. flashed zram enabler twice, wipe dalvik cache and reboot. still showing 0 from terminal. :confused:
[HTC Sensation] faux123:
Both have zram option. If you run @ full speed, then 1.78 is faster than 1.56.

No, it only works with 2.3.4 ROMs or 2.3.5 ROMs with hacked libraries

Yes, my kernel will work with 2.3.5 ROMs with hacked libraries such as the one from Mike's :D

You can delete the file using rootexplorer or esexplorer, then flash my zip file. This will guarantee you have the file from me.
[HTC Sensation] ttav:
Same here as i posted earlier this morning.Have to enable zram manually.

---------- Post added at 05:32 PM ---------- Previous post was at 05:28 PM ----------

When i flashed the zip file to enable zram on boot the correct lines were there in the file.:confused:
[HTC Sensation] faux123:
The 3 lines should be in my /etc/init.post_boot.sh.

I am confused why it is not working?
[HTC Sensation] ttav:
The lines are there....i`m totally confused as well.

To sum up..if i enable zram manually ram shows as 18??(can`t remember exact number). Flash zip and it shows 0. I`m on v0.2.1 1.78ghz. Running @1.78ghz ondemand using System Tuner.
[HTC Sensation] malybru:
Hi,

Is the kernel(0.2.1) in mike's 4.1.2 ROM the same 0.2.1 as on the [OP]?

:)
[HTC Sensation] tjones25:
I used the zip, did not wipe cach or dalvic, and terminal is showing a total swap of 18320 with 18316 in use...using the 1.5g kernel, with Android Revolution 3.6.1
[HTC Sensation] faux123:
Not sure, Mike sometimes get advanced beta from me to help me test, and sometimes he release my kernel ahead of me :p

To be sure, make sure you see paul@ubuntu #199 when you check the kernel information.
[HTC Sensation] fmedrano1977:
Again how do you know it's working? When I check in terminal, under swap I get 18320 total, 18320 used, 0 free. Is this what it should be?

HTC Sensation
[HTC Sensation] faux123:
Correct. It is working when u see a number > 0 :D And it is working BEAUTIFULLY in your case. You want it to be as FULL as possible to maximize efficiency :D
[HTC Sensation] malybru:
Hi,

No,I've got paul@ubuntu #185

So,#199 has been modified? Because I had no end of problems with #185

:)
[HTC Sensation] silverdart:
Ok faux123!

- I upgraded ARHD 3.6.0 to ARHD 4.1.0/Camera Pack Unity14 - Outstanding

- I Upgraded to Pyramid-Kernal-021-J-Sense-1.56GHz and flashed ZRAM ENABLE.zip - All working w/No Problems - Equally Outstanding but added ZRAM

No overclocking applications installed

Dual processors on - When I set Both processors to 1566000 I get the highest benchmarks I have ever attempted.

@ 1188 (which is for everyday)

- My CD BENCH is at 10457,2970,5964 and overall 5964.

- My Quadrant is @ 2449

- My SD Tools Is @ 4.7MB/s Write Speed

@ 10.9MB/s Read Speed

- My 4g is @ 2.20 Mbs Download & 1.72 Mbps Upload TMOUS

- My WIFI is @ 7.24 Mbs Download & 5.59 Mbps Upload

Version 0.2.2 (Coming later, Official GB2.3.5?) I can only Imagine!!!
[HTC Sensation] PaulGiz:
No, it is an earlier Beta. If you want to try zram, you need to flash kernel in op, this thread.
[HTC Sensation] faux123:
You should upgrade, I don't recall which version of my beta had data corruption when zram was enabled. Upgrade to latest to be sure :D

I've hit some road blocks regarding ZSL :( Still have issues with my ZSL back ports.
[HTC Sensation] malybru:
100 thanks for you

:)
[HTC Sensation] theraver:
build 03 had the data corruption and mike used that one.

arhd 4.1.1 was released right before you posted the link for 0.2.1 build 04 :)
[HTC Sensation] awesam:
0.2.1-J-Sense-1.56ghz file pulled off ? some thing wrong with it ?

edit : nevermind .... link is back
[HTC Sensation] drms12:
I didn't understand something. I just flashed the new kernel and the zram file.

When i type free i can see that zram is work. But I have 120mb of ram free like always.

It should be higher value or what ?

Thanks
[HTC Sensation] faux123:
The free memory is due to Low mem killer from Android. It seemed that Low mem killer will keep a certain amount of memory free for apps.

Free memory will be similar compared to systems without ZRAM, except with ZRAM enabled, more apps stay resident in the memory and would prevent the low mem killer from killing them prematurely. This will reduce the amount of read/writes to MMC/SDCARD, thus increasing battery life and increase performance because reading data from Compressed RAM is still MAGNITUDES FASTER THAN read from SLOW MMC/SDCARD.