yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
I agree with #illidan, that is weird...

if you remove the init.d script and reboot, can you then see the files and edit them?

I would use:

#!/sbin/busybox sh

in my scripts (just had a look, there seem to 2 different versions on the system)

After reboot try executing the script manually then, as root

I do all my settings after boot. Sometimes the problem with init.d is ,that it's much to early in the starting phase, and things might get overwritten by processes running after init.d
[Galaxy S II Q&A, Help & Troubleshooting] #illidan:
Well busybox location is fine as cb value is getting written & there are 2 locations where busybox is stored as you know so that shouldn't be an issue but maybe he could try the one in /sbin. Again the script looks fine seeing that the cb value is getting changed so it could be a freak bug. The funny part is that only cb is changing whether he does it by script or manually not the others.
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
This confirms at at least one thing : it's a more commonly used setting, but no one ever mentions it (can't find nothing on google or elsewhere).

I came upon it strolling through all available interface parameters and tried it out.

The effect is measurably there and it does what it's name says:

it does reduce the powerconsumption of the screen, probably by activating some powersave mode.

This also explains to me why some users were having trouble reaching 4 hr. screen on time (including me, before I started using it), while others (probably using some tweak app/config like JKay or rom having this setting default) were getting much better screen on times.

Yet one more mystery solved....

---------- Post added at 09:26 AM ---------- Previous post was at 09:21 AM ----------

That could be misleading, because I know user_cb is being set by post-init.sh script in siyah, and it sets it to 132, which is coincidentally the same value egps is setting it to...

which is why I prefer setting everything after boot (using script manager or like I do, using Tasker)

edit: just saw he's setting it to 135, so scratch that last remark ; remains only the fact that it's genuinly strange....
[Galaxy S II Q&A, Help & Troubleshooting] egps2:
Ok thank you to everyone above who is helping me with my issue. I also thought this was strange and tried using root explorer instead of 'solid explorer' and I can now edit the sys/class/ files and the screen now goes red as expected if I increase the _cr value to 240 manually BUT if I have sys/class mounted as rw I cannot run my init.d script using script manager! So I cannot test if having the sys/class as rw will fix the issue. But then again the _cb always worked! So strange!

Also, if I toggle power_reduce by directly editing the sys/class file the screen yellowness does not change as expected but I did confirm that it has been set to "1" whether by default (as some have found) or if the script magically worked as expected.

Ps, I had already tried reflashing Siyah and I am now using the "battery" profile with all the settings changed back to how I had them in "default" so maybe it was the battery profile which has turned "power_reduce" on in secret but as I did not conduct this scientifically I cannot be sure. Unless of course GM happens to see this and knows anything about it!

I had about 2h45m screen on time with about 45-50% battery which is WAY better than what I usually get! I usually get about 3 to 3.5h at best using 90% battery! And screen looks almost identical that I can't be sure if the tweak has applied or not but the value does read as "1" despite the scripting issues! I also can't be sure how much of an impact the new DXLPB ROM has in helping battery but I am very happy regardless!

Also, the script works (I mean only _cb) with all of the above #!busy box locations and if not it will say "applet not found" (eg with now location) so I know the first line isn't the culprit.

Oops that was meant to read 132! I had uploaded the old value! I will test it now by changing all 3 values and see if they apply on boot. So I will use the followng code and see what happens now that I can check it!

Clearly-Visible Test code:

#!/system/xbin/busybox sh

echo 0 > /sys/class/lcd/panel/power_reduce

echo 1 > /sys/class/mdnie/mdnie/user_mode

echo 235 > /sys/class/mdnie/mdnie/user_cr

echo 100 > /sys/class/mdnie/mdnie/user_cb

Let's see what happens! This is my first android scripting experience, how lucky haha!

Thanks again to everyone :)
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
I've looked at extweaks before and know all the settings it does, (I can even add functionallity to it by configuring it's xml file, just can't get it stick and survive a reboot yet) and power_reduce is not one of them, so that isn't it...
[Galaxy S II Q&A, Help & Troubleshooting] Daelyn:
I posted a question/issue in the discussion thread for Siyah@SGS3, but I think the same applies to SGS2.

Anybody care to have a look and comment? Thank you

http://xdaforums.com/showpost.php?p=28062172&postcount=104
[Galaxy S II Q&A, Help & Troubleshooting] egps2:
Thank you anyway! Here's what my results show:

My Test code:

#!/system/xbin/busybox sh

echo 0 > /sys/class/lcd/panel/power_reduce - Value is set as 1, script has no effect

echo 1 > /sys/class/mdnie/mdnie/user_mode - Value is set as 1, script has no effect

echo 235 > /sys/class/mdnie/mdnie/user_cr - Value is set as 122, script has no effect

echo 100 > /sys/class/mdnie/mdnie/user_cb - Value is set as 100, script works on startup!

But if I run the script manually, user_cb will set as what ever I want. I can change user_cr manually by editing the file manually but it does not persist across reboots! Power_reduce seems to be on by DEFAULT on Siyah 3.3.2 and XDLPB ROM and the battery life is WAY better than LPG :)

Thanks guys!

Edit: Here are updated results!
[Galaxy S II Q&A, Help & Troubleshooting] Many40:
Could be that it is default setting of my stock XXLPW ROM as well and I thanked JKay for this power saving option in his framework to early:) Tnanks mate for your reply.
[Galaxy S II Q&A, Help & Troubleshooting] #illidan:
Well the /class folder being either rw or ro shouldnt affect your script because when you change that you are only changing it for the file manager. Script manager will obviously run it as rw in order to change the value.

If the value has changed to 1 it mean the tweak is active.

The reason that the scripts does not run is because there is a file called post init.sh which runs after init.d that over writes your settings in the init.d script. You can run the script via script manager at boot as that runs the script after the init.d phase of boot. Also a reason why is power_reduce has no effect is maybe because it is set to 1 by default in the rom or maybe a mod that you may have applied itself.

Edit : typo
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
judging by the values in user_cr and user_cb, if the init.d script did run ok, it's overwritten by the values in post-init.sh runned by siyah (this sets user_mode 1, user_cr 122 and user_cb 132)

and if you're sure power_reduce is set to 1 default in LPB rom or maybe siyah 3.3.2 (don't know ' cause i'm on 3.2.7.1) then you're good to go!

if you're curious how to make it work after boot:

I don't personally use script manager, but if I got it correctly, there should be an option in it to run a script (as root) automatically after boot (way later than init.d) ; maybe you can experiment with option.

if you ever start liking programming just a little bit (not difficult) you can have a look at Tasker app. It's the ultimate toolbox for all kinds of stuff, including this.

You can get a 2 week trial of the market..

edit: LOL, :) #illidan beat me to the punch
[Galaxy S II Q&A, Help & Troubleshooting] #illidan:
That I did johnbeetee:D

I love programming. Managed to learn a bit of scripting in terminal & CWM update scripts & I would be very interested in learning Tasker as it is one app that can do almost anything on an android but I'm getting put off by the fact that it's got a steep learning curve & I just don't have that kinda time now. Maybe somewhere on the near horizon, who knows.

Edit : typo
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
I would surely recommend it...and it's not that difficult at all, lots of examples, and if you're already comfortable with the concept of programming (and you are if you're doing all that) it's a breeze.....and addictive, so be warned!
[Galaxy S II Q&A, Help & Troubleshooting] egps2:
Thank you again to all! Where is the post-init.sh file located though? I cannot seem to find it. Are we able to edit this file? And as long as power_reduce is on I'm happy although this all seems very strange!
[Galaxy S II Q&A, Help & Troubleshooting] #illidan:
Its located under /sbin/ext. You can edit the file but I don't think it will stick as the file will be over written at boot with the values that were there before. I guess it's hard coded by gm to be that way.
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
that's correct ; it's part of the initramfs (ram file sys in memory, only present during powerup) and it's created and unpacked (the original version in kernel) every time you boot
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
Great bunch of posts last little bit guys ;-) Plenty of excellent stuff to learn for everyone (even people who think they know scripting, etc).
[Galaxy S II Q&A, Help & Troubleshooting] bgx:
OK Thx! Let me check this out! :good:
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
..just trying to keep the SGS2 spirit alive ;)

everyone's so chaotic and depressed over at the DEV thread :crying:
[Galaxy S II Q&A, Help & Troubleshooting] MistahBungle:
They've been great to read ;-) Yeah, dev thread is kinda dead. Funny thing is tho, there's more 'dev related' posts in this thread, most of the stuff in the dev thread is not even close to dev related.
[Galaxy S II Q&A, Help & Troubleshooting] egps2:
Yeah sometimes it seems that the dev thread is 2% neat posts with attached logs, 40% helpful posts, 20% irrelevant posts and 38% "wrong thread!!!!1111one!" posts. I exaggerate of course but thanks again to all of you who helped me with the power_reduce and general scripting help!

Speaking of which, has anyone else had any more positive experience with "echo 1 > /sys/class/lcd/panel/power_reduce"? I seem to be getting a 60-70% increase in battery life from about 3 to 5 hours with moderate heavy usage so far! I am very happy and I only wish it was enabled in earlier roms!

The attached screen shot shows that 18% battery was used for an hour screen on time with heavy usage! Usually 28-33% is drained per hour! So I should achieve 5.5 hours like this and as I posted earlier, on lighter usage and no calls (eg youtube), I was draining even less! I almost considered buying the 2000mah battery before this!
[Galaxy S II Q&A, Help & Troubleshooting] ArmorD:
It's it so, that the secondary rom is always slower than the primary?

Sent from my wallet
[Galaxy S II Q&A, Help & Troubleshooting] sam142000:
Guys!! Had a weird problem today. When I tried to listen songs today on my phone, they started playing in really slow motion(the phone was working normally). Then I restared the phone and the music player started working normally.

Can anybody tell what could be the reason for this??

I'm on LPG ROM with Siyah 3.2.2.
[Galaxy S II Q&A, Help & Troubleshooting] pezlomd:
Facebook app loading problems

Hello all.. idk if this is siyah related but.ever since I flashed the kernel..(several versions of it) I have noticed the fb app is not playing nice when it comes to loading....anyone know what might be causing this? I didn't think it would be kernel related but I was running speed mod prior and I never experienced this behavior.. its the only app giving me problems.. if anyone can help me out I would greatly appreciate it :)

I am running LPG Sammy rom...
[Galaxy S II Q&A, Help & Troubleshooting] BrandoHD:
Your music app was giving the problem, not a kernel issue

---------- Post added at 07:09 PM ---------- Previous post was at 07:09 PM ----------

It's not Siyah related
[Galaxy S II Q&A, Help & Troubleshooting] desean:
Just to point out that the value for /sys/class/lcd/panel/power_reduce can set in any stock (or derivatives) sammy ROMs. It is under Settings > Display > Auto adjust screen power
[Galaxy S II Q&A, Help & Troubleshooting] #illidan:
Well no wonder people on stock ROMs or its derivatives say that they get better battery life when they were on stock after switching to asop. That was a great find by johnbeetee. Been doing some runs with it & there is definitely a noticeable different in screen on time.
[Galaxy S II Q&A, Help & Troubleshooting] egps2:
Hey guys I can confirm that this is true! I toggled "auto adjust screen power" and it did change the sys/class value between 0 and 1. I remember always having this enabled and I can't seem to see a substantial difference between the two! Even across a reboot both enabled and disabled my screen looks the same! Also, this must mean that my increased battery life is due entirely to me installing a new rom and perhaps due to enabling "gentle_fair_sleepers" which I did not usually have enabled.

Unfortunately I can't thank this setting for the extra battery life but I would be very interested to see if anyone can post any results with the feature on and off and see an approximate comparison!

Also, I have read around about the feature and it seems like it can reduce max brightness by about 90% and affects colours a bit but like I said I couldn't really see any difference! That tiny "yellowing" I saw must have been a placebo!
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
Yes ... you are right! Just been testing and observing on my second rom (stock LPQ)

Just like egps2, I have enabled this option in stock at times, but never realized the impact hereof. Now it's clear! And it is significant, in the sense of conserving power.

So for everyone using stock-rom, a recommended tip!

People using AOSP/AOKP roms, check and enable! Whether it is somewhere exposed in settings, or by using script.
[Galaxy S II Q&A, Help & Troubleshooting] bervin:
i tried changing the value to 1 through the directory from above but whenever i reboot the value changes to 0.. is there anyway else to do it??
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
yes, using a script and putting this in /etc/init.d directory

script content:

#!/sbin/busybox sh

echo 1 > /sys/class/lcd/panel/power_reduce

try this, and see if it remains 1 after reboot ; if not, you'll have to use script manager app and have it execute this script after boot.
[Galaxy S II Q&A, Help & Troubleshooting] ArmorD:
I tried the option "Swap 2nd and 1st rom partitions" at CWM, but it only says "0.00mb available 0.00mb needed". What? Any "fix" for this? My internal and external both have enough space to store two images.

Sent from my wallet
[Galaxy S II Q&A, Help & Troubleshooting] Many40:
Had the same issue freed memory space and it started properly. BTW what do you mean enough? I haven't found anywhere space requirements for swapping but as far as I remember 2.5 GB was not enough, kernel creates kind of temp space for this operation.
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
I don't have a possible fix..just a suggestion (don't know if it will work though)

There has been an earlier mention of this problem in the dev thread, but I never saw a solution and this was in the period of version 3.2.6, ....but they did mention that it was working ok before...

So maybe you can try flashing an earlier version of the kernel for this purpose (earlier than 3.2.6, I suppose) and see if it will work. After that you can reflash your current version kernel back.

(unless someone else has a better solution.... :))

EDIT: just read Many40's post, and maybe you can look into that first....sounds logical..!

( I recall GM ever mentioning the 2nd rom needing 2.6Gb, so to swap you'll need at least this much + some more space for overhead, depending on how he's implemented it ; so esimating it extremely rough: if you have double that much free space, it should work, if it's not a bug)

EDIT2: tried swap roms, and it's working perfectly (had about 9G's free space)
[Galaxy S II Q&A, Help & Troubleshooting] derreck101:
will siyah kernel works on i9100DXLPB?
[Galaxy S II Q&A, Help & Troubleshooting] #illidan:
Yes
[Galaxy S II Q&A, Help & Troubleshooting] raveenrox:
would it be possible to use this with jellybeans

and

is it possible to dual boot ICS and JB
[Galaxy S II Q&A, Help & Troubleshooting] CamoGeko:
As it is right now, then I would say no.

Even though JB is just ICS with extra couple of software tweaks, so you never know. ;)
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
following up my earlier post:

http://xdaforums.com/showpost.php?p=28015149&postcount=1979

here a small addition:

Thanks to tufoz, who pointed out a thread of eugene373 :

Thanks to eugene373, for sharing this script:
[Galaxy S II Q&A, Help & Troubleshooting] TheStigx:
Hello :)

I am gonna flash this kernel , but I cannot download Samsung Ultimate Kernel Cleaning Script, when I press the download button, it doesn't respond. The thread is closed, so I thought this would be the best idea to post.
[Galaxy S II Q&A, Help & Troubleshooting] Many40:
In normal circumstances it is not required. You can if you want (what I usually do) wipe cache and dalvik before flashing a kernel.
[Galaxy S II Q&A, Help & Troubleshooting] Deadboy2201:
Hey guys :)

Does anyone know when a new version of the kernel Siyah is published for the S2 ?

Greets
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
not sure when that will happen...

there are some minor changes in preparation (as we speak...)

(making '4x home button for negative color' configurable in extweaks:

https://github.com/gokhanmoral/siyahkernel3/commit/9fef2988f9b4946a33f42acf7b7e78e796c2d04b
[Galaxy S II Q&A, Help & Troubleshooting] Deadboy2201:
Hm okay thanks.

This is a nice new feature :)
[Galaxy S II Q&A, Help & Troubleshooting] Many40:
+1 Congratulations for this post as well as for 100th thank, my is 101st, you deserve it for yor professionalism and willingness to help others :)
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
Thank you for the compliment! Well, I'm just trying to find the right balance for me personally, but really don't mind sharing my findings along the way and explaining it others...I believe sharing knowledge, contributes to developing and creating new knowledge, and that's what it's all about I think here in the XDA community....

(and of course I've been greatly inspired by the great creator of this kernel, GM, and his dedication and tenacity, giving us all this opputunity to enjoy his work!)
[Galaxy S II Q&A, Help & Troubleshooting] bervin:
why don't you make a cwm flash able zip for all of your tweaks?
[Galaxy S II Q&A, Help & Troubleshooting] pikachu01:
Disabling 1 core while asleep might not have the desired effect of longer battery life though. This is because some tasks might take longer to complete, resulting in longer wake time.
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
Certainly true, depending on the tasks (load & number of), but I'm still assesing this, and for now 'trusting' the feedback of the users on eugene373's thread

I guess everyone should determine this for themselves, in combination with their personal config's (for me, it will become apparent in the long run)

---------- Post added at 10:40 AM ---------- Previous post was at 10:28 AM ----------

Would be great, but that's not really my thing...my goal is to purely share the knowledge, and in the process, encouraging people to try things themselves (making simple script files and putting them in the right places, try new settings)

Besides, these are just intended as pointers and suggestions, what works for me, may be totally unacceptable to someone else; I'll have to make flashable zips for each individual setting and zips to individually disable them (editing and or deleting a script is really much less work than having to flash a couple of zips and rebooting...)

Maybe an app of some kind, might be possible, but I will have to find the time to do that some day....
[Galaxy S II Q&A, Help & Troubleshooting] ssauger:
On fluxy kernel negative can activate with 2 fingers swipe from left to right on touchscreen, this is more confortable i think then penetrate the homebutton. And you never left a app with this method.
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
Personally I think there should be way to deactivate it, if you don't want it (I can think of situations where it's not desirable with certain apps (maybe games?)).

I myself am cheating a little bit, because having Tasker, I configured a profile, that when certain apps are active, I can swipe over the proximity sensor and it toggles negative color (swiping again, gets it back to normal) :cool:
[Galaxy S II Q&A, Help & Troubleshooting] bervin:
@john

echo 1 > /sys/class/mdnie/mdnie/user_mode

echo 128 > /sys/class/mdnie/mdnie/user_cr

echo 135 > /sys/class/mdnie/mdnie/user_cb

I'm currently testing out the above and I was wondering of there are any more aggressive values as I currently don't see any visible difference.. you've been doing a fantastic job here anyway. Really keeping true to the xda spirit.
[Galaxy S II Q&A, Help & Troubleshooting] johnbeetee:
I figure you want to change your screen's color balance..

you can give user_cb and user_cr values ranging from 0 to 255

user_cb will give more blue, the higher the value

user_cr will give more red, the higher the value

consider user_cr 128 and user_cb 128 as neutral and go from there ; it's a personal taste actually....
[Galaxy S II Q&A, Help & Troubleshooting] powermax91:
please, anyone have siyah 3.2 :

in GM site, it say (page not found 404):

http://www.gokhanmoral.com/public/files/siyahkernel/v3.0/Siyah-v3.2.tar

i really need specifically that version 3.2, and i need it in .tar
[Galaxy S II Q&A, Help & Troubleshooting] BlueChris:
M8 i just google it and found all siyah's here

http://down.lud3r.de/index.php?N=A&view=detail&dir=Galaxy-S2/Kernel/archiv
[Galaxy S II Q&A, Help & Troubleshooting] robertobsc:
Hi people, noob question :

Should I do some wipe when cloning from second to first rom? Or just cloning is enough?
[Galaxy S II Q&A, Help & Troubleshooting] CamoGeko:
No need to wipe. :)

Sent from my HTC One X using Xparent Red Tapatalk 2
[Galaxy S II Q&A, Help & Troubleshooting] Many40:
No wiping, only you have to have enough memory space on internal SD card, I am not sure exactly but much more than is reuired for 2nd rom (2.5 GB) - some temp space is required so thing double amount (5 GB or a little less) should be enough, otherwise you will get an error.

Edit: sorry my mistake, I've red your post to quickly (higher memory requirements concern swapping of course :))
[Galaxy S II Q&A, Help & Troubleshooting] hughfollett:
Hi guys! I'm on ParanoidAndroid 1.5a and Siyah kernel v3.3.2.. After reading the latest pages of the thread i want to change the /sys/class/lcd/panel/power_reduce to 1 using root explorer. The problem is that it doesn't save after rebooting.. What can I do?

Thanks in advance!

Inviato dal mio GT-I9100 con Tapatalk 2
[Galaxy S II Q&A, Help & Troubleshooting] Many40:
did you use init.d script for that or changed it manually?
[Galaxy S II Q&A, Help & Troubleshooting] robertobsc:
Thx, just cloned. Everything is fine.
[Galaxy S II Q&A, Help & Troubleshooting] robertobsc:
Put this command in a init.d script.
[Galaxy S II Q&A, Help & Troubleshooting] hughfollett:
Changed manually..

Inviato dal mio GT-I9100 con Tapatalk 2
[Galaxy S II Q&A, Help & Troubleshooting] TheStigx:
Hey guys:)

Firstly I want to say WHAT A GREAT KERNEL! After flashing it, I can see and feel the battery is better.

But I have no problem, before it is 100% perfect. The wake up time is slow. IS there a way improve it :)?