yashsingh1/xdaforums huggingface dataset:
[Nexus S Android Development] ehiggins:
if I'm using NS4g stock OTA, do I use the other kernel? I know CM is not the right one, but the version matrix for non 4g crespo has a stock column.
[Nexus S Android Development] :
I do not provide a kernel for NS4G Stock OTA. To use my kernel you need to install a custom ROM.
[Nexus S Android Development] doc_v15:
I did fix permission and it solved the problems :D

Has not rebooted yet since :)
[Nexus S Android Development] stayclean:
Just flashed the NS4G CM10 version of 4.7.3, and it runs great, but is the screen supposed to have a pink tint to everything? Also it seems like the brightness or gamma is turned way, way down. Even with the screen at its brightest, it's still kinda dark..
[Nexus S Android Development] towelboy:
Kind of off topic but I just noticed most of my thanks are from this thread :eek: :D
[Nexus S Android Development] sdhanjal15:
Weak on screen time. But awesomeness!!!
[Nexus S Android Development] vis80k:
kinda off topic, but after googling "marmite"... the texts when flashing the kernel is more understandable. ;)
[Nexus S Android Development] mikegleave13:
Don't try that crap man it's nasty! But this kernel is sweet!:D
[Nexus S Android Development] towelboy:
Is it available in the states, I want to try some real bad, nice advertising bedalus :thumbup:
[Nexus S Android Development] vis80k:
yeah.... i heard it's like it or hate it kinda thing. but so far, this kernel has all the likes and not much hates. :)
[Nexus S Android Development] Articudos:
Wow, Android OS drains over 14% today..:eek:

Uploading betterbatterystats dump file will help you, bedalus?
[Nexus S Android Development] :
Sure I'll take a look
[Nexus S Android Development] sidnoit22:
4.7.3 is up! YAYY :good: :p
[Nexus S Android Development] :
If you've been using another kernel, it might take some time for your eyes to adjust. I set the colours to how i like them, warm. I also prefer my screen dark, so when I'm using it at night it doesn't burn my retinas. If you want to adjust it, get voodoo sound from the market. However, gamma adjustment is disabled.
[Nexus S Android Development] nightsky87:
Were the colors changed since 4.7? After flashing 4.7 on my i9020t, colors were too cool. I took the liberty of measuring the whitepoint and color temperature using a colorimeter and I got a reading of more than 12000K. :eek:

On that note, is the color configuration fixed upon building of the kernel or are there configurable parameters aside from the color multipliers?
[Nexus S Android Development] :
You can still set rgb values using voodoo sound from the market.

Edit: ugh, i just uninstalled voodoo and rebooted. That is not what i expected to see. It's really blue tinted. I'll see if i can sort it out
[Nexus S Android Development] nightsky87:
Aren't those the color multipliers? I was thinking of doing a thorough measurement of gamma and the white point and adjusting the values so I was hoping there was a more detailed control. Well I can live with voodoo somehow I guess. :P

EDIT: Now it makes sense why you were saying you had warm colors. :D
[Nexus S Android Development] JokerAce:
I've tried to add the voodoo codes into the same script which loads the gov & I/O and rebooted a few times. It's sticky. So I am gonna update the init.d guide with the following:

You can try the values with voodoo colors first, and then try to make it stick through inputting the desired values into the init.d script :D
[Nexus S Android Development] :
I've just rebuilt the kernel with new colours and I'm very happy with it. I thought everybody was using voodoo! So, after uninstalling voodoo I can see what the problem was.

Anyway, I'll upload the build with fixed colours. Thanks to everyone who brought this to my attention. It seems that I was completely clueless about this issue for users who didn't have voodoo. (However, if you do have voodoo, it probably means you'll need to tweak your RGB values again if you update to this next version)
[Nexus S Android Development] :
Excellent work. Can you download the next version (will be v4.7.4) in a few minutes, and just check the colours still look right before you edit your post?

It's because I've changed the kernel values, your RGB multipliers may now be little off
[Nexus S Android Development] JokerAce:
Alright, post it and I will try it
[Nexus S Android Development] :
v4.7.4 is here: http://goo.gl/HvUrp

-Fixed colours for users without voodoo

-More debug stuff removed. All of it I think!

-Built with some new ARM erratas: http://cateee.net/lkddb/web-lkddb/ARM_ERRATA_754322.html

http://cateee.net/lkddb/web-lkddb/ARM_ERRATA_743622.html - - - I don't know if this ARM erratas do anything for us because we're on a different arm core. But what-the-hey, chuck them in there anyway just in case.

JokerAce is going to check the colours make sense, then update his useful guide. Thanks!
[Nexus S Android Development] micha3lvd:
I just had a reboot out of nowhere.. I think it's after I received a message.

Running 4.7.3

100/1000 ondemand deadline

CNA 3.6.0
[Nexus S Android Development] JokerAce:
The colors look natural to me. But I still prefer mine which is more vibrant. So no worries, the current settings you have is fine :)
[Nexus S Android Development] :
Thanks for checking.
[Nexus S Android Development] nightsky87:
Sounds good! I'll try it in a bit too. Did you try it with voodoo sound installed?

Btw, would anyone here happen to know what the offset and multiplier controls do exactly? I've tried looking around but I can't seem to dig up any info.
[Nexus S Android Development] :
You can find out about gamma and rgb via good ol' google
[Nexus S Android Development] JokerAce:
No. I uninstalled it and rebooted. The colors look good. Oh don't forget to remove that init.d script if you had voodoo colors in them :)

EDIT: I noticed an additional RAM in the latest version
[Nexus S Android Development] nightsky87:
Just installed and tested it. Certainly an improvement over the previous version.

Also did some colorimeter measurements and the gamma response of marmite seems to be great! Quite flat except near black. The color temperature of the latest kernel is still at 9300K though so color-wise its a bit cool. But visually, it looks great. I'll try to see if lowering it to 6500K and 5800K would still look visually pleasing (and if they are I'll post my voodoo settings).

EDIT: Oh, nevermind. So color multiplier and offset actually mean the linear adjustments to RGB. Thanks! I get lost a lot with terminology with so many uses for gain and offsets. :silly:
[Nexus S Android Development] joeyddr:
so you disabled gamma because you don't what to people whine about the half second green flash and refuse to adjust it to fix it themselves? i miss being able to adjust that...
[Nexus S Android Development] :
Not exactly; I originally wanted to have morfic's colours, but with voodoo also, for fine tuning. Morfic's tweak breaks gamma. The RBG multipliers are what causes the green flash. You can still get the green flash if you set the RGB values in voodoo low enough.
[Nexus S Android Development] :
Thanks very much. You and JokerAce should compare notes.
[Nexus S Android Development] polobunny:
I tried before and you'll see the samoled screen is very capable, no matter what people seem to think. Once tuned you can have decent color accuracy or very good contrast/saturation (at the expense of some accuracy, which isn't that important on a smartphone).
[Nexus S Android Development] :
DEBUG version: http://goo.gl/HvUrp

This is for anyone who wants to help me debug the kernel. If you are not interested in that, stick with v4.7 or v4.7.4 for now. If you've ever experienced reboots with any version since v4.5, and want to help, I'll be needing the file in /proc called last_kmsg to be uploaded as an attachment in the thread, or anywhere else I can get to it.

-Open it before uploading, to check it says bedalus near at the top. If it says kalimochoAz or anything else, it's not a message from my kernel.

-Make sure you upload it asap after rebooting. Or at least make a local copy. You can run

cat /proc/last_kmsg > /sdcard/last_kmsg.txt

@Caliban2, hopefully now we can get to the bottom of your reboots!
[Nexus S Android Development] joeyddr:
glad you didn't keep those colors that blue kills me.
[Nexus S Android Development] sperelli:
on 4.7...
[Nexus S Android Development] nightsky87:
Yep, the samoled screen does wonders. The measured color gamut is far wider than the sRGB gamut. As for color accuracy, well I find it fun to try to calibrate all devices. :laugh:
[Nexus S Android Development] polobunny:
I used to have mine near perfectly calibrated using a colorimeter back in the GB days. It was fun for a moment, but the colors were boring nonetheless. Not really need perfect color accuracy on a smartphone when all you do is facebook, emails and surfing the web. :p
[Nexus S Android Development] joeyddr:
you have 9 hrs with 77% left that seems pretty damn good
[Nexus S Android Development] nightsky87:
Yeah, I can see what you mean. The calibrated screen looks a bit too warm for my taste at 6500K. It didn't really take long to calculate for the right multipliers using MATLAB, Minitab, and the colorimeter though so not much lost. :p

For anyone who might be interested though, these are warm colors calibrated at 6500K:

echo 2093090324 > /sys/class/misc/voodoo_color/red_multiplier
echo 1719530566 > /sys/class/misc/voodoo_color/green_multiplier
echo 1734135435 > /sys/class/misc/voodoo_color/blue_multiplier
echo -50 > /sys/class/misc/voodoo_color/red_v1_offset
echo -53 > /sys/class/misc/voodoo_color/green_v1_offset
echo -44 > /sys/class/misc/voodoo_color/blue_v1_offset

7500K is much better for me! Just warm enough to be pleasing but none of the yellowish tinting.

echo 2505314897 > /sys/class/misc/voodoo_color/red_multiplier
echo 2177006241 > /sys/class/misc/voodoo_color/green_multiplier
echo 2455248462 > /sys/class/misc/voodoo_color/blue_multiplier
echo -50 > /sys/class/misc/voodoo_color/red_v1_offset
echo -53 > /sys/class/misc/voodoo_color/green_v1_offset
echo -44 > /sys/class/misc/voodoo_color/blue_v1_offset

Lastly, I'll try calibrating the stock color closer to 9300K. Here it is:

echo 2080782260 > /sys/class/misc/voodoo_color/red_multiplier
echo 1945980502 > /sys/class/misc/voodoo_color/green_multiplier
echo 2491171887 > /sys/class/misc/voodoo_color/blue_multiplier
echo -50 > /sys/class/misc/voodoo_color/red_v1_offset
echo -53 > /sys/class/misc/voodoo_color/green_v1_offset
echo -44 > /sys/class/misc/voodoo_color/blue_v1_offset

Overall, if you like warm colors, go for 7500K (or 6500K for that matter if you're extreme).

For cooler colors, go for 9300K though its kinda close to marmite default colors anyway.

Since these have been calibrated using a Super AMOLED screens, SLCD variants of the Nexus S probably won't match the colors.
[Nexus S Android Development] polobunny:
That was my feeling too. Plus it's not like your location is fixed with a phone, so depending on the ambient lighting it could affect your perception and thus pretty "void" the idea of accuracy. It's better to just shoot for good looking colors without losing too much information to get satisfaction.
[Nexus S Android Development] nightsky87:
Sure thing. For the meantime I'll borrow his offset values as I'm not quite sure how those will affect the colors.

Totally agree with you there. Ambient lighting does come in a lot in perception so its good to just go with comfortable colors. So I'm just actually trying to find those comfortable colors near following standard illuminants so at least there's some form of accuracy. :D

By the way, I've updated my earlier post for voodoo settings using three color temps (6500K, 7500K, and 9300K). I personally like the lightly warm 7500K best. :good:
[Nexus S Android Development] polobunny:
Nice to see someone take on colors. What colorimeter are you using? I had a Spyder 2 and Spyder 3 which gave decent results (prefered the 3 for obvious reasons).

Are these tests all ran with Marmite v4.7.4?
[Nexus S Android Development] nightsky87:
Using the Spyder4 Elite for this one along with the HCFR colorimeter software. Just thought that this great kernel would be better with color options. I was in the middle of using the colorimeter for research anyway. :p

Oh and yeah, these all use Marmite 4.7.4 with init.d configuration for voodoo. That was actually the longest part of the testing process... waiting for the phone to reboot! :laugh:
[Nexus S Android Development] polobunny:
Wouldn't it have been possible for you to use the voodoo software instead of init.d? The values are in direct correlation, so you wouldn't have to wait for the phone to reboot. :p
[Nexus S Android Development] nightsky87:
I did at first but I got annoyed at trying to set the values close to what I wanted. That darn slider just won't cooperate. :p
[Nexus S Android Development] polobunny:
Ah fair enough. The slider is quite finicky since the increments are super small and we have fat fingers haha
[Nexus S Android Development] nightsky87:
After staring at the color gamut for quite some time, I think its still too wide to properly display sRGB (which would be what Android and most images use) and as a result would still tend to oversaturate colors.

Is there any way to manipulate RGB values at the kernel level? Something along the lines of mixing them together in fixed proportions (like R_new = 1.4780R - 0.5601G + 0.2869B).

If this is possible, maybe we can remap the screen colors to appear identical to what sRGB colors should look like.

(I'm not exactly a system programmer so I can't do this by myself unfortunately.)
[Nexus S Android Development] polobunny:
I believe you can get to such a level... without a locked gamma setting. ;)

BEDALUS, WE'RE COMING FOR YOU

/color nazis
[Nexus S Android Development] nightsky87:
LOL

On a serious note though, I just tried it by performing color mixing on a single image and it seems to work! Colors from the image are no longer oversaturated and closer to that of the sRGB image (I used the wrong whitepoint though).
[Nexus S Android Development] polobunny:
Yes although I'm using humor you can manage it without a locked gamma settings. Some other kernels include a fully fledged voodoo color where you can change the gamma values and thus get accurate colors. You can try one and see how that goes if you feel like it. :)
[Nexus S Android Development] nightsky87:
I suppose that would be true. But doesn't gamma adjustment also cause distortions near black and white? What I'm talking about is mixing together color values (based on a scientific approach) to recreate what you would have seen had your screen been a sRGB standard display.

To illustrate this, I've attached two images (pardon the choice of image... its a signal processing habit) - one original and one color mixed one. The mixed one is calibrated to my Nexus using marmite 4.7.4's stock voodoo settings and if you view it on the phone, it actually looks better (less saturated). And this was achieved by just linearly mixing together colors. I dunno if there's a practical way to implement this on any kernel though.

EDIT: Oh and I forgot to mention that if you compare the corrected image on the Nexus S with the original on a computer monitor, its quite close (assuming the monitor is calibrated).
[Nexus S Android Development] polobunny:
I get you. I don't believe that's possible though, as you have very little adjustements to be made on the Nexus S (or most smartphones actually). Gamma adjustements + multipliers is pretty much the only thing you can change, although back in the days there used to be a different color profile that might have been less yellowish. That coupled with voodoo adjustements could have made the Nexus S screen more "reliable".
[Nexus S Android Development] nightsky87:
Even on a driver level? I was hoping that some dev might know or at least point me to the right source files where I might be able to tweak something to that effect.
[Nexus S Android Development] polobunny:
Doesn't mean there's an interface made to control these settings, even on a driver level. Having to write new driver code isn't a thing easily done.

Supercurio made Voodoo colors, so he could be aware of something, but don't expect too much.
[Nexus S Android Development] alen1901:
just wanted to say, tomorrow my nexy goes to samsung service(my upper screen unglued or something, its not holding right, theres a little gap), so i locked bootloader, erased, official jelly bean there(wow, i have something official, last official was gingerbread, first week when i bouht phone, sure im not the only one. :P), so i im out from this great comunity for a while (10-15days), as i dont use pc much. bedalus i hope when i get my phone back, you will have some nasty kernel drug for me and the rest of us. ;) :P keep it up :good: :highfive:
[Nexus S Android Development] :
At a rate of three releases per day, I think we'll be up to v5.6 by then :p

For the colour enthusiasts, if you want to look at the source:

https://github.com/bedalus/marmite/...0686696d/drivers/video/samsung/s3cfb_tl2796.c

The above file has the gamma controls in it (disabled after morfic's tweak, but you can check out supercurio's source code to compare to what it should be...)

Look for this line:

// terrible shameful hack allowing to get back standard
// colors without fixing the real thing properly (gamma table)
// it consist on a simple (negative) offset applied on v0

https://github.com/bedalus/marmite/...686696d/arch/arm/mach-s5pv210/herring-panel.c

This one is the RGB multipliers. Look for this line:

Convert from 8500K to D65
[Nexus S Android Development] :
I added this interesting discussion of colour to the OP, for future reference. :D

Good stuff!

I tried 7500K but it didn't suit me. I tried the cooler colours, 9300K, and I was very happy. Not too different from how I tried to set it, but definitely edging towards more natural. Nice work!

Do these settings account for the fact that gamma cannot be set?
[Nexus S Android Development] polobunny:
Had some time to test out 7500K. Good stuff. Do you have the exact reading you got with that setting? Was it really close to 7500K?

Easy on the eyes for night reading using ScreenFilter. Wish I had a way to hardware dim rather than software, that would be neat.
[Nexus S Android Development] FirePoncho86:
2 hrs screen time, 3g browsing, maps, GPS, 1+ hour music, brightness anywhere from 0-30%...and 50% battery left after 11 hours of you.

Why thank you, Mr Bedalus.
[Nexus S Android Development] infernalMan:
what rom??
[Nexus S Android Development] polobunny:
Got a weird issue. Made a file in init.d called 99blink for my blink settings.

Here's what's in it

echo 1 > /sys/class/misc/backlightnotification/enabled
echo 0 > /sys/class/misc/backlightnotification/in_kernel_blink
echo 1 > /sys/class/misc/backlightnotification/blink_mode
echo 1 > /sys/class/misc/backlightnotification/blink_speed
echo 1 > /sys/class/misc/backlightnotification/max_blink_count
echo 1 > /sys/class/misc/backlightnotification/blink_finalstate

Yet, it doesn't light up, like I imagined it would. Any idea?
[Nexus S Android Development] technogravy:
Guys, came across a really useful app GSam battery monitor.it gives the most detailed battery stats I've ever seen, it will help narrow down most of your battery drain issues.

with the amount of testing and find tuning in this thread this app is a must imo.
[Nexus S Android Development] Mario Christian Oquias:
How to Tweaking the colors in i9023? Im using paranoid android 2.0, what will i need to know?
[Nexus S Android Development] nightsky87:
Gamma for marmite seems to be quite stable between 2.1 and 2.2 except for low intensities so that's generally great for normal viewing. I just adjusted the whitepoints to get warm or cool colors so you could say that we managed to work around the lack of gamma control. :p

As for the tl2796 driver, I've given it a look and from what I can see, it loads up gamma values into a bunch of registers which hardware will then handle to perform gamma correction. To be able to pull off what I said earlier about color remapping, we need access to the base RGB values directly or possibly the framebuffers used by the phone. Any ideas where those would be?

Then again, there should be some simpler way to do this considering all those screen filtering apps can change the phone colors (unless of course they use the rgb color multipliers :p)

Well I really didn't mind accuracy that much since different brightness settings would slightly shift colors anyway. Its just in the 7500K area. To show you what I mean, I'll attach the color gamut readings I got from the three different settings. As always, our Super AMOLED screens are waaaay too wide in gamut. Really need to fix that. :p
[Nexus S Android Development] :
I might be able to write one into the kernel, but you'd still have to control it with a sysfs switch
[Nexus S Android Development] :
It didn't light up at all? It's probably a mistake in the code i just added. Does it show any notifications at all?
[Nexus S Android Development] :
Sorry, I've no idea! The best i can do is tell you all the files supercurio added or modified
[Nexus S Android Development] doublewong:
Using stock 4.7.4 in 9023 with all default settings, I found that the phone will freeze around 30 seconds whenever I move apps to external storage, which log I should send out for debug?
[Nexus S Android Development] nexususer1:
You don't need to do that. Only samoled screens need to have coulours adjusted.
[Nexus S Android Development] :
You don't mean you're trying to use sd-ext? You haven't got one on the nexus s. Unless you are trying to move system apps to the /data partition. You can use titanium backup to do this for you.

Or do you mean you're trying to copy your apps to a computer via USB?
[Nexus S Android Development] doublewong:
Sorry about my poor description, I just mean move the apps to usb storage in apps setting
[Nexus S Android Development] caliban2:
Bedalus, bad news:

nothing to report at all. :p

Running the cm-full-debug-kernel for 20 hours and it's still fine. No crash, no nothing. So it's looking good, but wouldn't call it stable yet.

I'll update to today's nightly now (3R-base) and try again with the debug-kernel.
[Nexus S Android Development] FirePoncho86:
Codename Android, v3.5.0

But, it may be because, occasionally, you should fully deplete your battery, and fully recharge it while off, which I did the night before.

Also, I just got my phone back from Samsung repair, who wiped everything (guess they didnt mind marmite), and left me with stock ota ICS. I did a clean install to the stock image of jb, then I flashed over that.
[Nexus S Android Development] deani77:
Had a reboot after hanging up call. Screen gone black and not responding... Then reboot
[Nexus S Android Development] :
Afaik, you can't run apps from the sdcard partition. You're limited to /data and /system

Why do you want to move them?
[Nexus S Android Development] :
People having reboots can help by installing the most recent debug kernel:

http://xdaforums.com/showpost.php?p=31998079&postcount=3091

Have a read, and if you're up for it, download the debug version, wait for a random reboot, and make sure you collect the last_kmsg asap after your phone restarts itself.

Are you over-clocking? Read everything in this post carefully

http://xdaforums.com/showpost.php?p=33184975&postcount=4424

Thanks!
[Nexus S Android Development] polobunny:
Nope. At all. If I have in_kernel_blink at 1 though it will flash with your new weird timings. :p