**** OUTDATED !!!! SEE BELOW ****
Version 1.0
It bugged me that there was no way to switch off the touchkey backlights on the Nexus S, so I looked into it. Starting with the Netarchy kernel I made some modifications exposing two switches in /sys/.../backlightnotification/ to manually turn on/off the button backlights. However on my i9020 the button backlights get activated automatically once you use the touchkeys - I could not check the i9023 since I do not have one. This behaviour seems to be controlled by the touchkey firmware which only is available as a binary, so without some hex editing the binary there seems to be no way to change this. The next best thing would be to disable the touchkey backlights everytime they get activated, however since I am lazy instead I chose a quick and dirty approach of using a cron daemon to simply trigger the off-switch once every minute. This is good enough so the backlight does not bother me while watching movies, etc. and the extra battery drain is practically zero.
Downloads:
www.multiupload.com/CHFDDBV6BP Kernel for 2.3.3 Custom ROMs
www.multiupload.com/0RPO16QCN0 Kernel for 2.3.4 Custom ROMs
www.multiupload.com/823MR3UZVD Kernel for 2.3.4 Stock ROM (unlock and root required)
www.multiupload.com/WYBGK5N3H9 Cron Backlight Dimmer for all ROMs (root and busybox with crond* required)
www.multiupload.com/EXC6465ZRC Cron Backlight Dimmer for all ROMs including busybox 1.18.4 (root required)
* How to check if your busybox supports crond:
Either in terminal app or adb shell write 'busybox --list | grep crond'. If you get 'crond' as a response your version of busybox supports crond.
Changes to the source code:
www.pastie.org/2122063
**** ALSO OUTDATED !!!! SEE BELOW ****
Version 2.0
Based on the latest BLN version 9, I made some modifications to implement a backlight dimmer which does not need an external program (like cron) to trigger an off-switch.
To activate the dimmer, just echo the dim interval in ms (this is milliseconds; 1000ms = 1s) into /sys/class/misc/backlightnotification/in_kernel_dimmer. If you pass a value of 0, the dimmer will be deactivated.
Here are the modifications to the source code: http://www.pastie.org/2378721
**** UPDATE ****
Version 3.0
Another day, another backlight dimmer version.
The previous implementations had the drawback that the time when the touchkey backlights were switched off was entirely independent of the time the touchkeys were pressed (and thus reactivated) for the last time. Consequently, the time until the backlights were deactivated was essentially random and could vary from practically zero up to the defined interval value.
Some people commented on that and I agree that it would simply look much more elegant if the dimmer would behave more consistently. So I sifted through the source code and found a way to detect the a press of the touchkeys which both works for the i9020 and i9023. This made it possible to link the dimming of the touchkey backlights to a touchkey press and have the backlights switched off with a consistent delay.
Also, this time instead of being lazy and simply hacking the dimmer functionality into BLN, this implementation does not depend on BLN anymore and can be included in the kernel independently of BLN (with CONFIG_BLD=y). This should improve the maintainability in case BLN or this tweak gets updated.
In /sys/class/misc/backlightdimmer, pass 1 or 0 to 'enabled' to enable or disable the dimmer. Pass the delay in ms (this is milliseconds; 1000ms = 1s) to 'delay'. The default state is disabled and a delay of 5000 = 5s.
Changes to the source code:
http://www.pastie.org/2388552
http://www.pastie.org/2388562
http://www.pastie.org/2388614
BUGFIX
I got reports about the delay not properly working. Found a bug that might have caused this problem.
Bug fix: http://www.pastie.org/2392734
BUGFIX #2
Turns out the implementation of the Backlight Dimmer was potentially unstable. I have made some changes to avoid possible problems.
Bug fix: http://www.pastie.org/2403815
BUGFIX #3
BLD was not working properly for the i9023 since the backlights were not re-enabled on touch which has been fixed in this patch.
Bug fix: http://www.pastie.org/2419575
BUGFIX #4
Patch to avoid race conditions.
Bug fix: http://www.pastie.org/2441553
No further patches will be published here. I have set up a git repo for all my tweaks. Each mod has its own branch to keep the tweaks cleanly separated and one can simply pull the latest patches from the corresponding branch.
https://github.com/Ezekeel/GLaDOS-nexus-s/tree/bld
Get Jonathon Grigg's 'Spark Mod Manager' GUI for controlling BLD: http://forum.xda-developers.com/showthread.php?p=17291034
Thanks to Netarchy for his help.
I do not accept donations and since I reached my 50GB limit of free space on SpiderOak, thanks to all of you kind people who got an account using my referral link, I could not ask for more.
Instead if you really want to donate your hard earned money to someone who deserves and needs it, consider donating to the Free Software Foundation at fsf.org: These guys are at the frontline when it comes to keeping Linux free and fighting these greedy bastards who think they are entitled to collect royalties and other fees from Linux users due to some silly patents - and if Linux falls, Android will be next.
nice work man
now if only we could make em brighter too >.>
also here for everyone
www.multiupload.com/CHFDDBV6BP Kernel for 2.3.3 Custom ROMs
www.multiupload.com/0RPO16QCN0 Kernel for 2.3.4 Custom ROMs
www.multiupload.com/823MR3UZVD Kernel for 2.3.4 Stock ROM (unlock and root required)
www.multiupload.com/WYBGK5N3H9 Cron Backlight Dimmer for all ROMs (root and busybox 1.17 or higher required)
source changes
www.pastie.org/2122063
op if you want these removed just say the word, just figured id help others out with your work til you earn your wings round here
Haha exactly, mine are very dim as well.
any chance of a ns4g edition?
I use Adjbrightness to turn off the button lights on my Aria. Works wonders.
shabbypenguin said:
any chance of a ns4g edition?
Click to expand...
Click to collapse
The 2.3.4 kernels should work for ns4g. If you run into problems I will look into it again.
I also send Netarchy the changes to the kernel I made and asked him if he could integrate it into his kernel, so I do not have to compile my own version each update. If you feel that this tweak is useful, sending him a PM and telling him that you like this tweak might help (but please do not get on his nerves; he has more important stuff to do).
ah alright, cool thanks
Thanks!
And yes, these restrictions are retarded
Optic2 said:
I use Adjbrightness to turn off the button lights on my Aria. Works wonders.
Click to expand...
Click to collapse
Sadly that doesn't work since the Nexus S button lights are being *****es...
does this affect bln?
theallian said:
does this affect bln?
Click to expand...
Click to collapse
No. I am using both BLN and this tweak simultaneously.
Ezekeel , thank you for this tweak and taking the time to share it with us. This is one thing that has annoyed me about this phone!
I'm nto sure if you know but Netarchy's latest version is now 1.3.7!
Will you be keeping this thread updated?
bringonblink said:
I'm nto sure if you know but Netarchy's latest version is now 1.3.7!
Will you be keeping this thread updated?
Click to expand...
Click to collapse
I asked Netarchy if he could include the changes in his kernel but have not received an answer yet.
I am using the latest stable CM, so everytime a new stable CM version using a new kernel will be released I will compile a modified version of corresponding Netarchy kernel (with bfs) including these backlight tweaks for my personal use. So, I can upload these and put the links in here.
However, I am not planning on providing modified kernels for all versions of the Netarchy kernel and for all possible variations (cfs - bfs, custom - stock) anymore. I have published the changes I made to the source code and every kernel dev can easily intregrate these into his custom kernel. So if you want this feature available in your favourite kernel, contact the corresponding kernel dev and ask him nicely to integrate these backlight tweaks.
I too would like this option. I love how sleek the Nexus looks as a black slate. Is making just the changed files into a flashable zip possible? That way anyone on any kernel can use this?
Ezekeel said:
I asked Netarchy if he could include the changes in his kernel but have not received an answer yet.
I am using the latest stable CM, so everytime a new stable CM version using a new kernel will be released I will compile a modified version of corresponding Netarchy kernel (with bfs) including these backlight tweaks for my personal use. So, I can upload these and put the links in here.
However, I am not planning on providing modified kernels for all versions of the Netarchy kernel and for all possible variations (cfs - bfs, custom - stock) anymore. I have published the changes I made to the source code and every kernel dev can easily intregrate these into his custom kernel. So if you want this feature available in your favourite kernel, contact the corresponding kernel dev and ask him nicely to integrate these backlight tweaks.
Click to expand...
Click to collapse
Thanks for the reply, will do
Sent from my Nexus S
anaglich said:
I too would like this option. I love how sleek the Nexus looks as a black slate. Is making just the changed files into a flashable zip possible? That way anyone on any kernel can use this?
Click to expand...
Click to collapse
I do not see any way one can achieve the same without a custom kernel.
Alright, I wish I knew how to compile a kernel. I would love to see this option implemented in Netarchy's or Mathkids kernel. I have attempted to contact both in regards to this.
anaglich, I will definitely look into it. Sorry for the late response!
ezekeel: since i only looked at the cron .zip last night after nightshift, i didn't see crond and there is none on my phone. Do you have an arm version to slap on there?
Unless it's part of busybox 1.17, then i'm a victim of old ass cm7 busybox it;s 1.16 and does not have crond either.
Alright, there is also such a thing as "too new", exactly 1.17.1 and there is a crond.
now let's see about installing this. patch is long in.
EDIT: Thanks, seems to work just fine. Can't say it ever bothered me, but i don't watch movies on it either.
EDIT2: Thanks again, users like it. Really appreciate you offering this.
You are welcome. I am glad some of you kernel devs have already integrated this tweak into your kernels.
It was fun figuring out how to compile a kernel and how to package it properly, but once I knew it, it was quite repetitive and got old fast. So for me personally, I am glad that now I have a broader choice of kernels available without modifying it myself. Yeah I am lazy.
Now if I can get Netarchy to include it too, I would be settled for future updates.
When i was having Galaxy S it used to have Gamma correction control for CM9 or vodoo colour control and the kernels used to support it, but for SGN the kernels do not support gamma correction which will be highly useful to correct black clippings and other issues. Would like to know wether the future kernel builds will implement this option. :fingers-crossed:
Hi guys,
in custom kernel we have the possibilities to change the RGB values but what we need is a saturation and constrast control to make the screen perfect. Is possible to add this control on any custom kernel? maybe some dev can reply to this topic to explain if it's possibile or not
I've been reading here and there, and I've come upon that thread where you can enable DCI_P3 calibration for your display on your OP3T, only on OOS thou.
Why isn't it supported on any ROM where the Display Model doesn't even turn up, and why haven't any ROM Devs implemented it?
Cheers!
because not all 3/3T support dci-p3 color scheme ..
Only S6E3FA5 panel ID that supporting dci-p3
twentyfourinc said:
because not all 3/3T support dci-p3 color scheme ..
Only S6E3FA5 panel ID that supporting dci-p3
Click to expand...
Click to collapse
It's a simple thing to have the ROM detect the ID of the Panel, and then have ROM to choose whether to show the option in Calibration Settings under Settings.
thes3usa said:
It's a simple thing to have the ROM detect the ID of the Panel, and then have ROM to choose whether to show the option in Calibration Settings under Settings.
Click to expand...
Click to collapse
If you think simple enough, so make yourself...
It's added through the kernel not the ROM, Ex and Blu spark both have it in OOS and custom kernels. Lineage also have it in their kernels too.
It works really well in LineageOS, I like the not so over saturated coloring in this mode, it's really nice to the eyes.
A Magisk module is available for it. https://forum.xda-developers.com/showpost.php?p=72842349&postcount=11
@thes3usa DCI_P3 color profile is available in official Resurrrection Remix rom for OP3T
You can with this one:
https://forum.xda-developers.com/on...ment/rom-zenity-resurrection-remix-n-t3551384
It's in Live Display settings. Don't change the kernel though, or you won't have the option anymore.
Installed the Aug.31 build of Lineage on my 3T yesterday, and it's an option there in Live Display settings too. There also seems a bug where the selected colour profile reverts to default every time you turn the screen off and on though :/
Apparantly the dci-p3 should be available using Vertex OS. But since i dont have the supported panel(wierd, since i bougth it in June 2017, so probably didnt get the newer display).. But it should be possible to change even on the old display ?
EDIT:
I found out that i have the correct display which ends on a5, so it should be able. But cannot find the necessary files in the sys/devices/virtual/graphics/fb0 folder....
is there anything like kcal in miui also... I've tried several display overlay apps but none worked as good as kcal. my phone is going through display burn-in or you can say ghost screen. so if there is any information about any app that actually works; please let me know!