yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] whittikins:
I get the same errors, and I'm running as root.

System Tuner (terminal)

=======================

> sh /sdcard/n4color (su)

=======================

Verify that the values are written correctly..

RGB values:

Red gamma values:

Green gamma values:

Blue gamma values:

/sdcard/n4color[2]:

: not found

/sdcard/n4color[7]: can't create /sys/devices/platform/kcal_ctrl.0/kcal

: No such file or directory

/sdcard/n4color[8]: can't create /sys/devices/platform/kcal_ctrl.0/kcal_ctrl

: No such file or directory

/sdcard/n4color[9]:

: not found

/sdcard/n4color[19]:

: not found

/sdcard/n4color[20]:

: not found

expr: non-numeric argument

expr: non-numeric argument

expr: non-numeric argument

expr: syntax error

expr: non-numeric argument

/sdcard/n4color[32]:

: not found

expr: non-numeric argument

expr: non-numeric argument

expr: non-numeric argument

expr: syntax error

expr: non-numeric argument

/sdcard/n4color[44]:

: not found

expr: non-numeric argument

expr: non-numeric argument

expr: non-numeric argument

expr: syntax error

expr: non-numeric argument

/sdcard/n4color[56]:

: not found

/sdcard/n4color[57]: can't create /sys/devices/platform/mipi_lgit.1537/kgamma_red

: No such file or directory

/sdcard/n4color[58]: can't create /sys/devices/platform/mipi_lgit.1537/kgamma_green

: No such file or directory

/sdcard/n4color[59]: can't create /sys/devices/platform/mipi_lgit.1537/kgamma_blue

: No such file or directory

/sdcard/n4color[60]:

: not found

/sdcard/n4color[61]:

: not found

/sdcard/n4color[65]: cat: /sys/devices/platform/kcal_ctrl.0/kcal

: No such file or directory

/sdcard/n4color[67]: cat: /sys/devices/platform/mipi_lgit.1537/kgamma_red

: No such file or directory

/sdcard/n4color[69]: cat: /sys/devices/platform/mipi_lgit.1537/kgamma_green

: No such file or directory

/sdcard/n4color[71]: cat: /sys/devices/platform/mipi_lgit.1537/kgamma_blue

: No such file or directory

/sdcard/n4color[73]:
[Nexus 4 Original Android Development] joeshmoe08:
Re: [KERNEL][Feb 3][Linaro]Exp:b32/Main:b57 _motley kernel for the N4

Oh lol I thought it was version one. Nvm then.
[Nexus 4 Original Android Development] jazzboyrules:
hmm, let's debug step by step.

Here I have pasted part of that script that won't write to the rgb/gamma control files. It simply prints out the values from variables and the calc math. What do you get when you run this:

#!/system/bin/sh
# This code will NOT modify anything; neither the rgb nor the gamma. It will just echo out the script variable values. Use this script if you are curious to know what it does or if you want to debug it.

#Setting RGB
color_red=245
color_green=244
color_blue=240
echo "$color_red $color_green $color_blue"

#Setting gamma
g_white=64 #Whitepoint, LG=0x72, GOOG=0x40,40,20 Low values=extreme whites, risk of blown out highlights
g_mid=68
g_black=118 #Blackpoint, LG=0x76, GOOG=0x76,76,74 Low values=cut out, banding in the shadows
g_unknown1=0
g_contrast=26 #Contrast (AMP0), LG=0x00, GOOG=0x00,00,1F
g_brightness=0 #Brightness (AMP1), LG=0x00, GOOG=0x00,00,10
g_saturation=72 #Saturation, LG=0x50, GOOG=0x30,30,50
g_unknown2=48
g_unknown3=2

#Tweak red gamma values here if needed
gr_white=`expr $g_white + 0`
gr_mid=`expr $g_mid + 0`
gr_black=`expr $g_black + 0`
gr_unknown1=`expr $g_unknown1 + 0`
gr_contrast=`expr $g_contrast + 0`
gr_brightness=`expr $g_brightness + 0`
gr_saturation=`expr $g_saturation + 0`
gr_unknown2=`expr $g_unknown2 + 0`
gr_unknown3=`expr $g_unknown3 + 0`
gr_cksummotley=`expr $gr_white + $gr_mid + $gr_black + $gr_unknown1 + $gr_contrast + $gr_brightness + $gr_saturation + $gr_unknown2 + $gr_unknown3`

echo "$gr_cksummotley $gr_white $gr_mid $gr_black $gr_unknown1 $gr_contrast $gr_brightness $gr_saturation $gr_unknown2 $gr_unknown3"

The shell script doesn't deal with white spaces very well. Make sure you copy the script as it is and don't insert extra spaces anywhere. What editor are you using for editing? The editor could be inserting Windows format newline characters. I use emacs/Notepad++ and both work fine. Make sure you set the newline format to unix in Notepad++.

The app you use to run this script should not matter but I am using the Terminal in System Tuner to run my scripts with su mode checkbox checked.

UPDATE;

This post was written to help debug for those who were unable to run the script posted in this post earlier.
[Nexus 4 Original Android Development] DroidBlaze:
Did you guys do any modifications to the script? I'm using it in init.d and it's working fine and only changed the rgb values.

Btw if you guys make changes to the gamma values make sure you use decimal values rather than the hex values given by moles

Np make sure you thank jazzboyrules for that script
[Nexus 4 Original Android Development] joeshmoe08:
Just to make sure the one Motley posted called motley colors moles01 as a flash able zip is the one we are talking about right?

Also I looked at the calibration pa thread and wanted to try out the second variant bright version, but the look of the script moles posted doesn't seem the same as the one in motley's?
[Nexus 4 Original Android Development] jazzboyrules:
Ah that zip will set the rgb/gamma settings that Moles posted yesterday. The script that I posted today ( http://xdaforums.com/showpost.php?p=37673702&postcount=1546 ) will set the rgb/gamma to the revision 2 variant 2 settings that Moles posted today ( http://xdaforums.com/showpost.php?p=37669134&postcount=1 ).
[Nexus 4 Original Android Development] DroidBlaze:
No I'm talking about this script by jazzboyrules link

The values you'll need to change for the bright version are these:

g_white=64

g_mid=68

g_black=118

g_contrast=26

g_brightness=0

g_saturation=72

Moles gives these values in hex so just convert them to decimal values to be able to use them

Edit: these are the values for the second variant bright version

g_white=57

g_mid=21

g_black=118

g_contrast=31

g_brightness=9

g_saturation=72
[Nexus 4 Original Android Development] ceejay83:
Re: [KERNEL][Feb 3][Linaro]Exp:b32/Main:b57 _motley kernel for the N4

Thanks, to use this we just make a file with the code in it, then drop into the init.d folder?
[Nexus 4 Original Android Development] jazzboyrules:
Re: [KERNEL][Feb 3][Linaro]Exp:b32/Main:b57 _motley kernel for the N4

I would suggest that you first run it in a terminal in su mode before putting it in init.d.
[Nexus 4 Original Android Development] ceejay83:
Re: [KERNEL][Feb 3][Linaro]Exp:b32/Main:b57 _motley kernel for the N4

Thanks, I was getting those errors that other person had because I tried to make the file with es file explorer. Used your zip and it's fine

---------- Post added at 03:53 PM ---------- Previous post was at 03:35 PM ----------

Wow these new settings are nice. Screen is darker but the colors are so much nicer
[Nexus 4 Original Android Development] azrash:
Re: [KERNEL][Feb 3][Linaro]Exp:b32/Main:b57 _motley kernel for the N4

Thanks for the attaching the script! Might wanna attach it at your original post to for easier referencing.

If I am reading the script correctly, right now it only changes the first two paragraphs of the script, and the RGB gamma is still left untouched, am I correct? Will give it a go!

another question is, if I want to play around with the RGB gamma setting, i am guessing that "gg_contrast=`expr $g_contrast + 0`" is Amp0 and "gg_brightness=`expr $g_brightness + 0`" is Amp1

Sent from my Nexus 4
[Nexus 4 Original Android Development] Shawtux:
Re: [KERNEL][Feb 3][Linaro]Exp:b32/Main:b57 _motley kernel for the N4

I flashed 31 and then 32 and now my WiFi icon doesn't change to blue.

How do I find out what the issue is?

I'm coming from Franco so I first flashed the return to stock and then the others.

Any ideas?

Im running stock Android.

Edit:

Fixed. Ran the return to stock again. Start phone. Got the blue bars. Recovery flashed 31 then 32 and OK. Gonna try it out.
[Nexus 4 Original Android Development] joeshmoe08:
fixed
[Nexus 4 Original Android Development] z3r0_x:
Thanks a lot!! I'll stick with the more contrasty bright version one though :cyclops:
[Nexus 4 Original Android Development] Kocai:
When I run the script via System Turner Terminal Emulator, I got:

Verify that the values are written correctly..
RGB Values:
245 244 240

Red gamma values:
398 64 68 118 0 26 0 72 48 2
Green gamma values:
398 64 68 118 0 26 0 72 48 2
Blue gamma values:
398 64 68 118 0 26 0 72 48 2

I tried 2 methods, using the script that you attached in a zip and copying the one you posted earlier.
[Nexus 4 Original Android Development] jazzboyrules:
Re: [KERNEL][Feb 3][Linaro]Exp:b32/Main:b57 _motley kernel for the N4

Well that's correct and what's expected :)

---------- Post added at 09:52 PM ---------- Previous post was at 09:48 PM ----------

The first post where I posted the script does change both RGB and gamma values.

The second post had part of that script with just echo statements without being piped to files (to help debug the issue at hand). But that second post had the functional script from the first post in zipped format.

Sorry for the confusion, I'll move the zip to the first post when I get to a computer.

Update: The zip is now moved to the original script post.
[Nexus 4 Original Android Development] ceejay83:
Re: [KERNEL][Feb 3][Linaro]Exp:b32/Main:b57 _motley kernel for the N4

jazz did you make a script for the revised lighter version?
[Nexus 4 Original Android Development] brolic925t:
Can anyone make a flash able zip of the version 2 variant 2 if you have time?
[Nexus 4 Original Android Development] jazzboyrules:
Re: [KERNEL][Feb 3][Linaro]Exp:b32/Main:b57 _motley kernel for the N4

I made the script for the rev 2 variant 2, the higher contrast version.

Refer to the post by DroidBlaze above ( http://xdaforums.com/showthread.php?p=37677786 ) for the changes required for the brighter version.

You simply change few variables to get the brighter result. The variable names match with the variables used in Mole's post (except where I have g_mid vs g_mids in Mole's post). The checksum is auto calculated. So you don't need to worry about that.

Just play with the variables, have fun :)
[Nexus 4 Original Android Development] Kocai:
Ah so the colors are supposed to change then? Weird because I can't see the difference between this and the one from Feb 05 you posted here.

Would you mind telling me the echo values for kgamma_red, green and blue?

Any my apology if my posts clutter the thread.

Edit: just realized the values are shown on after running the script. Stupid me. Sorry!
[Nexus 4 Original Android Development] ReD_AvEnGeR:
script is not working correctly for me..

put it in init.d, reboot --> OK

after screen off and on --> colors are f*cked up
[Nexus 4 Original Android Development] popophobia:
I have the same problem. The script doesn't stick after one screen off. Any idea?

Edit: faux app is the culprit. It revert back to the normal value after each screen off. Disable it and the values sticks.
[Nexus 4 Original Android Development] ReD_AvEnGeR:
done full wipe.. think now it is ok
[Nexus 4 Original Android Development] jazzboyrules:
Re: [KERNEL][Feb 3][Linaro]Exp:b32/Main:b57 _motley kernel for the N4

You probably did not need a full wipe.

As long as the below conditions meet, the script will work :

- Uninstall/freeze any app that can change the gamma (faux)

- Make sure you flashed b31 after flashing any ROM. And then flash b32 if you wish. It is the b31 that has init.d support.

Also don't put any script in init.d directly. The script should work when you run it under any terminal emulator in su mode. If it doesn't, then don't put it in init.d.

---------- Post added at 07:33 AM ---------- Previous post was at 07:28 AM ----------

Yes, those values are printed out after the script writes them to the system. You have to verify manually if those printed values are what you expected to be changed to by the script. Those printouts help verify if all the math in the script happened correctly.

---------- Post added at 07:36 AM ---------- Previous post was at 07:33 AM ----------

Yes, that's correct. You will also find which variables are amp0 and amp1 in the comments following the assignments to g_* variables.
[Nexus 4 Original Android Development] keda:
I leave my phone on overnight, battery dropped 10% in about 8hrs. Does it sound normal to you guys?
[Nexus 4 Original Android Development] Logi_Ca1:
Interesting. I am suspecting something similar myself as my UV results have been amazing (1.02Ghz @ 700mv). Is there anything we can do to help see if there's some sort of fail-safe? I'm thinking that perhaps you could lower the minimum mv limit down from 700mv. If the phone doesn't crash at some ridiculous mv setting then perhaps we can conclude that there is indeed a failsafe.
[Nexus 4 Original Android Development] rootuser11:
Logi_Ca1, but don't the phones already fail after reaching certain minimum mV threshold, that is actually different from phone to phone?

Some reported of instability after lowering only to 950mV at 1.4Ghz while some others reached to even lower (indicating that different mVs are working against the phones).

Perhaps I am not making any sense, I just woke up! But yea, I would have no problem trying out some "ridiculous" mVs too to verify if there is this failsafe mechanism.
[Nexus 4 Original Android Development] Logi_Ca1:
This is just conjecture, but perhaps there is an absolute mV limit? It might explain why some of us get ridiculous undervolts (like my above mentioned 1Ghz@700mv). I hope we can set the voltage even lower to see if that results in instability.
[Nexus 4 Original Android Development] darkamikaze:
I recall a thread here on xda that said under volting below 800mv doesn't actually improve any performance...

Sent from my Nexus 4
[Nexus 4 Original Android Development] stormtroopercs:
It's not supposed to increase performance unless you mean by not getting as hot so no throttling. Undervolting is supposed to increase battery life by lowering the voltage that each frequency takes so less voltage is consumed in turn saving battery.
[Nexus 4 Original Android Development] noneabove:
Ugh.. fsync disabled.. I guess its about time I learnt what that really means huh :/ I understand it can cause potential problems with losing memory, but how common is that and what does it affect/how fixable is it?
[Nexus 4 Original Android Development] darkamikaze:
Performance overall... I seriously remember a dev conducting tests and finding out that any UV below 800mV is actually not helping the battery life but instead making it worse :/ I can't seem to find the thread though..

Perhaps its different per chipset but I recall the thread in the android general hacking part of XDA.
[Nexus 4 Original Android Development] Logi_Ca1:
Please find the thread if you can it looks interesting. :good:

Still, if UV does decrease battery life, I think it would happen if the undervolt is unstable, and causes the phone to restart and go through the battery intensive bootup sequence. Especially if the phone has a lot of media files and mediascanner goes crazy.

Perhaps it depends on chipset as you say, but having measured power draw of my PC with a Wattmeter, I can say with confidence that undervolting (at least in the case of my i7-2600K), does reduce power draw while keeping the same performance.
[Nexus 4 Original Android Development] richteralan:
That, right there, is a violation of physics law.
[Nexus 4 Original Android Development] Rafase282:
I just got my N4, I'm glad you have one too. =]
[Nexus 4 Original Android Development] Rafase282:
Just unlocked, and flashed cm10.1 and this kernel. I will report if I find any bugs.
[Nexus 4 Original Android Development] ptesmoke:
Hey motley are you testing on cm?

Also what's the easiest way to reset the voltage table to default? Reflashing the kernel doesn't seem to do it...
[Nexus 4 Original Android Development] yumcax:
I use System Tuner, it lets me save voltage tables and reset them.
[Nexus 4 Original Android Development] aventu:
maybe a malfunction through unstable voltages, but very unlikely
[Nexus 4 Original Android Development] Rafase282:
I dont know if it is a cm thing but running cm 10.1 with this kernel I noticed that system tunner woudlnt keep a frequency, it would go back to 1.02 for max and min when changing governors or the min back to 1.02 when changing frequencies for the max.
[Nexus 4 Original Android Development] MatAuc12:
You definitely didn't see that, or didn't read the fine prints. The only thing making that claim remotely possible is..... Well nothing.

You probably just saw 800mv as a UV limit and rationalized yourself saying "there must be a reason" and imagined a pie chart.
[Nexus 4 Original Android Development] bfgudrich:
me too with aokp, i don't know the reason
[Nexus 4 Original Android Development] raptir:
I am seeing this as well. Actually, when the phone goes into "idle" the min frequency drops to 304, but when the processor "spins up" again it increases to 1.02GHz for the min. As a result, none of the speeds between 304 and 1.02 are ever hit (according to the tab in system tuner that shows the time in each speed). I am seeing the same behavior with SetCPU as well.
[Nexus 4 Original Android Development] IAmAN00bie:
That's the default behavior for the kernel. According to Faux it has to do with MPdecision and how it handles CPU scaling. The only way to get around that is to not use MPdecision, which is something the kernel dev has to do.
[Nexus 4 Original Android Development] zellleonhart:
Does the gamma values differ with kernels? Using harsh kernel here, I get

Red gamma values:

208 64 68 118 0 26 0 72 48 2

Green gamma values:

210 64 68 118 0 26 0 72 48 2

Blue gamma values:

212 64 68 118 0 26 0 72 48 2

while you guys can get

Red gamma values:

398 64 68 118 0 26 0 72 48 2

Green gamma values:

398 64 68 118 0 26 0 72 48 2

Blue gamma values:

398 64 68 118 0 26 0 72 48 2

I manually set to 398 it will revert to 2xx values.
[Nexus 4 Original Android Development] jazzboyrules:
That first column of number is simply checksum. It varies because it is done differently in motley and Harsh's kernels. All other numbers other than the first column would match.
[Nexus 4 Original Android Development] yurilebbie:
Re: [KERNEL][Feb 3][Linaro]Exp:b32/Main:b57 _motley kernel for the N4

Random reboot while I was switching camera to video mode: http://db.tt/qgadjdwI

I am on the latest CM 10.1 nightly
[Nexus 4 Original Android Development] thracemerin:
I can't reproduce this, do you have store location on and GPS enabled?
[Nexus 4 Original Android Development] _motley:
Hey, I also tried to reproduce and can't on b32 on Rasbean. Tried with GPS enabled/disable and with Store Location on/off.. I'll look at the log later to see what I can gather, but I don't think it is a widespread issue. Perhaps check the ROM thread and see if others are having this issue with any of the more recent nightlies.
[Nexus 4 Original Android Development] thracemerin:
There are issues with the GPS in the 2/6 and 2/7 CM nightly, Cyanogen merged a bunch of CAF GPS related stuff and broke something, they are looking into it, I'm fairly certain this is the issue.
[Nexus 4 Original Android Development] _motley:
Thanks, good to know.
[Nexus 4 Original Android Development] yurilebbie:
Re: [KERNEL][Feb 3][Linaro]Exp:b32/Main:b57 _motley kernel for the N4

It looks like I just needed to wipe /system and reflash everything, as I did that and everything works now. Sorry I could not reply sooner, got busy after I fixed it.
[Nexus 4 Original Android Development] _motley:
Awesome, great to hear it. Thanks for reporting back.
[Nexus 4 Original Android Development] brainbeatuk:
Re: [KERNEL][Feb 3][Linaro]Exp:b32/Main:b57 _motley kernel for the N4

Hello motley is there any chance you can do a version of your kernel with the cifs patch. Means I can bind mount network hard drive so I can continue game saves from one device to another. I've used a stock based ROM on my nexus with it patched and I have not figured out what the compatibility problem was. I have tested multiuser seemed normal to me.

Thanks again
[Nexus 4 Original Android Development] j3di:
I haven't tried changing camera mode but while out I've had a couple of reboots trying to open Ingress. Currently on today's latest nightly. Must be GPS related? I'll check the CM thread...
[Nexus 4 Original Android Development] qwerty9876:
mole's RGB+gamma colours are quite good, any chance we will have it hard coded as the default values on motley's kernel?

Seems to be much better than the default values
[Nexus 4 Original Android Development] ceejay83:
Re: [KERNEL][Feb 3][Linaro]Exp:b32/Main:b57 _motley kernel for the N4

some people might not like the colors
[Nexus 4 Original Android Development] ptesmoke:
Re: [KERNEL][Feb 3][Linaro]Exp:b32/Main:b57 _motley kernel for the N4

is it in the spreadsheet?
[Nexus 4 Original Android Development] azrash:
Re: [KERNEL][Feb 3][Linaro]Exp:b32/Main:b57 _motley kernel for the N4

look a few posts / pages before, jazzboyrules have posted the script and the settings used by moles.

You can check for moles progress here and tweak the script provided by jazzboyrules

http://xdaforums.com/showthread.php?t=2136295

Let's calibrate Mako | 08Feb: new preset HOLOBLUE

Sent from my Nexus 4
[Nexus 4 Original Android Development] Ulver:
Re: [KERNEL][Feb 3][Linaro]Exp:b32/Main:b57 _motley kernel for the N4

I would like this too!
[Nexus 4 Original Android Development] tlongren:
I'd like to give this kernel a try, but would like some clarification before I do so.

I'm on the ASOP codefireX ROM, with it's default kernel. I'd like to try the _motley experimental b32 kernel.

Could someone help me determine which b31 zip I should flash?

Not sure if I should use the Stock/AOSP with init.d support zip or the anykernel zip. I assume the Stock/AOSP with init.d support zip is what I want, as I'm not on this kernel yet, so the b31 anykernel zip doesn't apply to me.

Can anyone confirm this? Any help is much appreciated.
[Nexus 4 Original Android Development] thracemerin:
b31 Stock/AOSP zip, then the b32 anykernel.
[Nexus 4 Original Android Development] jazzboyrules:
Re: [KERNEL][Feb 3][Linaro]Exp:b32/Main:b57 _motley kernel for the N4

Oh I had a data drop today on b32 (running it at stock settings with just rgb/gamma tweaks). The only way to get back the data was by restarting the phone. I had tried toggling air plane and APN but that didn't help.

This was the first data drop I saw since I switched from Franco about 2-3 weeks back.

Will keep an eye for its reoccurrence.
[Nexus 4 Original Android Development] lazer155:
I had a service drop today on b32. I was trying to send a text and it got stuck sending saying there was no service even though there was a fairly strong signal. I had data turned off at the time since it wasn't needed. I tried toggling it on and off, quitting and restarting the stock messaging app and going to an area with better signal strength just to see if it would send the text and fix itself but it didn't. The only way I could get texting to work again was to restart.

I haven't been able to reproduce the error and this is the first time I have had this issue. It was very strange. I was running CM10.1 nightly 2/05. I suppose it could have been rom related since I have never had this issue with any previous motley builds and at that point I had been running b32 for 3 days without any issues.
[Nexus 4 Original Android Development] thracemerin:
Hmm...service drops are such a complicated thing, it could be the kernel, the OS, or any number of possible carrier issues, if it's a random and isolated incident I'm inclined to think it's carrier issues, but keep an eye on it and if you can grab a logcat of it I'm sure motley would be interested in taking a look.
[Nexus 4 Original Android Development] CoCoGirl886:
Can anyone using xylon's rom please share their uv settings from system tuner? I'm getting only 1.5 hours of screen time... :crying:. Are there any other settings I should tweak to improve battery life while keeping stability?