yashsingh1/xdaforums huggingface dataset:
[Nexus 5 Original Android Development] trobbs:
I am using this on faux kernel. Any reason it would unload on reboot? Anyone have a fix?
[Nexus 5 Original Android Development] arararagi:
Loaded modules don't persist across reboots.

There will be a load on boot feature soon.
[Nexus 5 Original Android Development] THE_KINGDOM:
on the topic of this thread, is anybody noticing that the auto brightness doesn't seem to dim the display once the phone has be put in bright light (causing screen brightness to increase). It won't go dim again, in a dim light setting
[Nexus 5 Original Android Development] trobbs:
Thx for quick response and your hard work!
[Nexus 5 Original Android Development] :
on reboot the module appear unable, is there a way to auto-enable the kernel module with KMM?

EDIT: after enable the module, can i uninstall KMM app?
[Nexus 5 Original Android Development] m3nster:
Lux Auto Brightness

Real nice module!

But i still love this app for it's (auto) screen brightness: http://xdaforums.com/showthread.php?t=1944921

Lux auto brightness had a special plugin for the N4 that made the readability of the screen at night very good, the dev is hoping to make this also available for the N5.
[Nexus 5 Original Android Development] rockingondrums:
With this kernel module, I may not even need Lux anymore. Thank you so much for the mod. I honestly prefer AMOLED screens to LCD because of the gamma/brightness correction that is possible on them. Now, I can have an LCD as dark as I could possibly want.

If you could make this for N7 LTE, I would be really happy. I bought that to start reading more, and it's still pretty bright at the dimmest setting.
[Nexus 5 Original Android Development] trobbs:
Lux will be great on top of this feature. The module is great and so is lux. Combining the automation of lux with the low low lights would really rock. Currently, lux uses an overlay even with this module. The lux dev was in this thread and is aware, so hopefully soon we have them playing nice together.
[Nexus 5 Original Android Development] donwhall70:
Thank you for this!!
[Nexus 5 Original Android Development] AshleyNG2:
Thanks OP, KMM2 works great! Will be purchasing Lux soon in hope of these two working side by side :)
[Nexus 5 Original Android Development] srps:
Great module so far, love the dimming.

Is there a plan for a future patch release instead of module so it works with all kernels released here? That would be awesome.

At any rate, thanks for the good work ^^
[Nexus 5 Original Android Development] pidocchio:
issue report

i've an issue to report...

this morning the brightness went crazy... i use lux app w/ faux latest private beta and the light sensor was reporting absurd data, something like 3000lux in a low light environment where usually there are 5 to 15 lux... i unloaded and reloaded the module and nothing changed, after a while the problem has gone and the sensor returned to work normally.

i don't want to think this is an hardware problem :confused:

i've attached a partial dmesg containing the issue lines. ;)
[Nexus 5 Original Android Development] LaboDJ:
Hi,

i'm Linaro Kernel developer.

I found your module won't work with my kernel, don't know if is it my fault...

kernel message:

<3>[ 50.437443] n5dim: version magic '3.4.0-1234567890123456789012345678901234567890123-g552a9b5 SMP preempt mod_unload ARMv7 ' should be '3.4.0-Linaro_Kernel SMP preempt mod_unload ARMv7 '
<4>[ 50.437635] n5dim: Unknown symbol __gnu_mcount_nc (err 0)
<4>[ 50.437923] n5dim: Unknown symbol __gnu_mcount_nc (err 0)
<3>[ 50.438040] n5dim: version magic '3.4.0-Linaro_Kernel SMP preempt mod_unload modversions ARMv7 ' should be '3.4.0-Linaro_Kernel SMP preempt mod_unload ARMv7 '
<4>[ 50.438179] n5dim: Unknown symbol __gnu_mcount_nc (err 0)
[Nexus 5 Original Android Development] Nbsss:
subbed
[Nexus 5 Original Android Development] IharpI:
Would be really great if the steps between 0 and 3 were smoother. 0 and 1/2 seems almost the same after that it gets way brighter. Except that great work!
[Nexus 5 Original Android Development] arararagi:
As long as you configure it correctly (see last few pages), it won't use the overlay until it needs to.

Thanks for reporting. Couldn't find anything out of place in the dmesg though. Has it happened again?

Thanks for that. I'll get it compatible.

EDIT: Unfortunately nothing I tried didn't break compatibility with existing kernels. I suggest enabling CONFIG_FTRACE on your kernel if you want binary compatibility with these modules, otherwise you can build the modules yourself, repack them in the apk and redistribute with your kernel.

EDIT 2: Release a module for fast charge. (This is a different implementation from the one that already exists in some kernels and won't conflict).
[Nexus 5 Original Android Development] eRadicant:
Screen dimmer is incredibly useful man, patiently awaiting a version with load on boot
[Nexus 5 Original Android Development] :
[MENTION=5064727]arararagi[/MENTION] is there any way to autoload the module at boot?
[Nexus 5 Original Android Development] arararagi:
Coming soon
[Nexus 5 Original Android Development] noodles2k:
Is fast charge included in KMM v0.2? It's not showing up for me.
[Nexus 5 Original Android Development] arararagi:
I forgot to upload the new apk. lol
[Nexus 5 Original Android Development] eustilou:
+1... Concerned about the flickering. Does anyone know whether we should be worried?
[Nexus 5 Original Android Development] alsheron:
Hi! I absolutely *love* Lux and used your Nexus4 plugin to great effect - made it a pleasure to use. Would definitely appreciate if you could incorporate this tweak into a plugin for your fantastic app. I'm guessing this may even make Lux able to save more battery at a given light level (negative) because the unfiltered brightness will be slightly lower?
[Nexus 5 Original Android Development] arararagi:
I've been doing this on my old phone (Optimus 4X HD) for the greater part of a year and it's getting along fine.

In fact, I also did another modification where it switches off half of the backlight LEDs and it produces a minor striping effect. However, on the Nexus 5 it was entirely on one side and looks very ugly so I haven't done it.
[Nexus 5 Original Android Development] noodles2k:
Seems to be working.

Kernel says this -

<6>[ 1990.114780] bq24192_input_limit_worker: optimal input i limit = 1200 chg limit = 1024

But also this -

<6>[ 1989.942919] healthd: battery l=26 v=3751 t=28.8 h=2 st=2 c=-1675 chg=a

It's definitely charging faster.
[Nexus 5 Original Android Development] GSLEON3:
Any chance of a similar module for Nexus 7? I can pull whatever files, logs & test anything you may need.
[Nexus 5 Original Android Development] arararagi:
I may have already asked someone else a lot earlier in the thread and then haven't had time to revisit yet, but go to a root terminal (su) and run

find /sys

then zip and upload the output here.
[Nexus 5 Original Android Development] GSLEON3:
Nexus 7 SYS....

Thanks for taking a look! Here you go.

BTW, I think I remember someone saying that it was too many characters. They probably didn't know how to > *.txt.
[Nexus 5 Original Android Development] arararagi:
Thanks. Unfortunately I can't easily tell from there what the backlight controller is. (Usually I would see something like lm3533 or lm3630).

I'll look through the kernel source and let you know if I need more stuff run on the device.
[Nexus 5 Original Android Development] GSLEON3:
[MENTION=5064727]arararagi[/MENTION] - Search that text file for fb.591617 & let me know what you think ? Could this be what you are looking for my friend?
[Nexus 5 Original Android Development] anthonyly:
does this work with franco?

man i'd use this in a instant only if i was familiar in the way of installing it :S
[Nexus 5 Original Android Development] AshleyNG2:
Running Faux so can't say if it works with Franco but to try this just install the attachment from the OP and click Load.

Sent from my Nexus 5
[Nexus 5 Original Android Development] nirvana2506:
It's the same with my Nexus. It's only visible on the lowest level though. Any idea what's going on here? I am using Franco kernel r13 and stock ROM.
[Nexus 5 Original Android Development] notbrodie:
definitely works fine. just download the kernel module manager from op, press load, marvel at much lower (better) brightness levels
[Nexus 5 Original Android Development] gen10:
Just wondering when is the apply on boot going to come out for this mod?

Also anybody know of the fast charge is bad for the health of your battery?
[Nexus 5 Original Android Development] anthonyly:
isn't fast charge just like charing with a outlet but a computer? i don't see the harm
[Nexus 5 Original Android Development] Nelsocracy:
Was the lowest brightness lower on an earlier build?

I'm in my second nexus 5 and this one doesn't get anywhere near as dim even when I use the mod.

On my old phone it was so dim I could barely see it was on but now it's slightly too bright even on 0.
[Nexus 5 Original Android Development] GSLEON3:
You can use a kernel like Flar's ElementalX, which includes a brightness & Fast Charge module. Plus, if you set the kernel up correctly (automatic via Aroma Installer, no apps to mess with) you can get over 5 hours screen on time with 24 hours+ battery uptime.

I got 5 & 1/2 hours screen on time with a total battery uptime of 1 day, 4 hours & 37 minutes using 1728mhz max freq, 700 min freq (UV) with this module for nighttime use.
[Nexus 5 Original Android Development] dustywilson:
I'm on franco r14 and this dimmer module runs like a champ.
[Nexus 5 Original Android Development] bo0gietrain:
I normally use the kmm app from the OP to load these modules. On bricked kernel I click load and the button does not change to unload, and the module never gets loaded. Any way to make the modules available to the kernel so that I can enable them using kcontrol app or terminal, or is that what the. patch file in the op is?
[Nexus 5 Original Android Development] LaboDJ:
Hi [MENTION=5064727]arararagi[/MENTION], I'm here, another time.

I managed to compile my kernel with ftrace and dynamic ftrace option on :good: :victory:

Anyway your modules have problem:

-n5charge can't load

-n5dim loads but it can't unload

Other modules, like Touch Control module, load and unload correctly

kmsg log:

n5charge: version magic '3.4.0-1234567890123456789012345678901234567890123-g552a9b5 SMP preempt mod_unload ARMv7 ' should be '3.4.0-Linaro_Kernel SMP preempt mod_unload ARMv7 '
n5charge: version magic '3.4.0-Linaro_Kernel SMP preempt mod_unload modversions ARMv7 ' should be '3.4.0-Linaro_Kernel SMP preempt mod_unload ARMv7 '

In my opinion you should use -f option in insmod function or find a way to remove vermagic check, what do you think about it?

You can find my kernel HERE and my source HERE
[Nexus 5 Original Android Development] arararagi:
I've been away for a bit. Going to update this for 4.4.1 soon (before tonight, otherwise I won't be able to use my phone in bed).

[MENTION=702102]LaboDJ[/MENTION]

I'll take a look. vermagic shouldn't be a problem though since the apk includes a customised insmod that tries to guess the vermagic of the running kernel (which is like -f, but it doesn't prevent unloading).
[Nexus 5 Original Android Development] arararagi:
It doesn't work with bricked at the moment. I'm going to investigate.

The .ko module files themselves are in the apk in the lib directory, but just renamed as lib____.ko.so, if you want to extract them to load using another method but don't want to compile from source.
[Nexus 5 Original Android Development] arararagi:
The most minimum level has always been the same. I suspect hardware differences, just as some people have reported the screen being not visible at all or parts of the screen being darker than others when at the lowest level.
[Nexus 5 Original Android Development] tommi.a:
Hi arararagi,

any news for N7 flo users waiting for a brilliant but strongly dimmed display?

Edit: Maybe this the info about the ambient light sensor of the N7 you need to find out more:

Vendor: LSC

Version: 7

Power: 0.15mA

Resolution: 1.0

Max Range: 32768.0

(reported by "Quick System Info Pro")
[Nexus 5 Original Android Development] arararagi:
The information needed is the backlight controller.

I still can't find what it is, but it definitely isn't a lm3xxx chip, so it probably doesn't use the same system of two registers for setting the brightness, so another technique for dimming will need to be found (there could very well be code somewhere that is just restricting the minimum).
[Nexus 5 Original Android Development] arararagi:
[MENTION=702102]LaboDJ[/MENTION]

Figured it out. I was using the wrong method of noinline before.

With this patch, n5dim will work properly.

diff --git a/drivers/video/backlight/lm3630_bl.c b/drivers/video/backlight/lm3630_bl.c
index f686074..bfb5653 100644
--- a/drivers/video/backlight/lm3630_bl.c
+++ b/drivers/video/backlight/lm3630_bl.c
@@ -207,7 +207,7 @@ static void lm3630_set_brightness_reg(struct lm3630_device *dev, int level)
}
}

-static void lm3630_set_main_current_level(struct i2c_client *client, int level)
+noinline static void lm3630_set_main_current_level(struct i2c_client *client, int level)
{
struct lm3630_device *dev = i2c_get_clientdata(client);

Now to figure out why n5charge won't load.

EDIT: Full patch also fixing n5charge as well:

diff --git a/drivers/power/bq24192_charger.c b/drivers/power/bq24192_charger.c
index cba1005..0012f82 100644
--- a/drivers/power/bq24192_charger.c
+++ b/drivers/power/bq24192_charger.c
@@ -188,7 +188,7 @@ static int bq24192_read_reg(struct i2c_client *client, int reg, u8 *val)
return 0;
}

-static int bq24192_write_reg(struct i2c_client *client, int reg, u8 val)
+noinline static int bq24192_write_reg(struct i2c_client *client, int reg, u8 val)
{
s32 ret;

diff --git a/drivers/video/backlight/lm3630_bl.c b/drivers/video/backlight/lm3630_bl.c
index f686074..bfb5653 100644
--- a/drivers/video/backlight/lm3630_bl.c
+++ b/drivers/video/backlight/lm3630_bl.c
@@ -207,7 +207,7 @@ static void lm3630_set_brightness_reg(struct lm3630_device *dev, int level)
}
}

-static void lm3630_set_main_current_level(struct i2c_client *client, int level)
+noinline static void lm3630_set_main_current_level(struct i2c_client *client, int level)
{
struct lm3630_device *dev = i2c_get_clientdata(client);
[Nexus 5 Original Android Development] LaboDJ:
Great!! Thank you very very much!
[Nexus 5 Original Android Development] costcutter:
Is it possible for you to adjust the increments it is way too sensitive between 0% and 10%.
[Nexus 5 Original Android Development] arararagi:
Hoping to see it in your kernel soon!

I am thinking of trying everything dimmer except exactly 100%.

Unfortunately I've been pretty busy lately so it'll be a while. I also want to add load on boot and enable/disable to the app (because unload won't work on a lot of kernels).
[Nexus 5 Original Android Development] LaboDJ:
https://github.com/labodj/hammerhead-linaro/commit/49b9aac4d3cc92a658a73cb1d3fabf13d3178fcd

Now it loads in my private build, but it won't unload :confused:
[Nexus 5 Original Android Development] arararagi:
In my last post I explained how unload won't ever universally work with all kernel configs.

I'm going to change the "Unload" to "Disable" along with sysfs control to disable functionality.
[Nexus 5 Original Android Development] kepapas:
Any way to make it compatible with Trinity kernel?:D
[Nexus 5 Original Android Development] K3lthuzad:
ararararararagi, did you end up taking a look at this guy's thing?

Lower brightness on the Nexus 4 is something I sorely want. No pressure! :D
[Nexus 5 Original Android Development] neFAST:
Dear all,

I'm using LaboDJ latest kernel (great work!)

What should I do to have Lux work with darker settings?

Thanks in advance for your help
[Nexus 5 Original Android Development] bluenote73:
What kernels have this implemented right now?
[Nexus 5 Original Android Development] Tommmii:
I think I'm missing something here...

Nexus 5, with stock kernel that has modules enabled.

When I press load next to the n5dim, and I fiddle with the brightness slider, everything is as before.

I tried to insmod libn5dim.ko.so manually but that throws an error "exec format error"

This is after a reboot, prior to KMM

u0_a96@hammerhead:/sys/kernel/debug/lm3630 $ grep . *
BOOST_CTL:0x30
BRIGHTNESS_A:0x05
BRIGHTNESS_B:0x00
CONFIG:0x08
CONTROL:0x15
CURRENT_A:0x12
CURRENT_B:0x1f
FAULT_STAT:0x00
IRQ_ENABLE:0x00
IRQ_STATUS:0x06
ON_OFF_RAMP:0x00
PWM_OUT:0x00
REVISION:0x02
RUN_RAMP:0x00
SOFT_RESET:0x00

this is after KMM

u0_a96@hammerhead:/sys/kernel/debug/lm3630 $ grep . *
BOOST_CTL:0x30
BRIGHTNESS_A:0x05
BRIGHTNESS_B:0x00
CONFIG:0x08
CONTROL:0x15
CURRENT_A:0x12
CURRENT_B:0x1f
FAULT_STAT:0x00
IRQ_ENABLE:0x00
IRQ_STATUS:0x00
ON_OFF_RAMP:0x00
PWM_OUT:0x00
REVISION:0x02
RUN_RAMP:0x00
SOFT_RESET:0x00

help ?
[Nexus 5 Original Android Development] Tommmii:
is this thread dead ?
[Nexus 5 Original Android Development] Tommmii:
I switched kernels and it works now with [KERNEL] Bricked-Kernel Hammerhead | Sweep2wake | KnockKnock/Dt2w
[Nexus 5 Original Android Development] Dragn4rce:
Why is there not enough thanks for this... This mod is awesome.

Sent from my Ñ£×Ú$ 5
[Nexus 5 Original Android Development] bluenote73:
OP , it would be so good if you can make your code available to kernel devs who may integrate this more likely when it isn't an awkward module.
[Nexus 5 Original Android Development] knapz:
https://github.com/mzhou/n5dim

https://github.com/mzhou/n5charge
[Nexus 5 Original Android Development] lemaxxx:
Work smooth with Cataclysm and Faux123 kernel

Inviato dal mio Nexus 5 utilizzando Tapatalk
[Nexus 5 Original Android Development] ranadroid:
Nexus 5 already charges fast as he'll!!
[Nexus 5 Original Android Development] sturmeh:
Surely there's a way to enable this on boot by now. O_o
[Nexus 5 Original Android Development] tocirah1:
Not afaik...
[Nexus 5 Original Android Development] eustilou:
Will this work on 4.4.2?
[Nexus 5 Original Android Development] akaHardison:
Of course

---------- Post added at 09:24 AM ---------- Previous post was at 09:23 AM ----------

Maybe autotouch.That is the only way I found.Or you can create your own kernel
[Nexus 5 Original Android Development] 2point:
Two noob questions

1. How do I unload the module If I were ever to need to do so? Clicking unload does nothing.

2. If you can make the screen dimmer, is there a way to make to brighter past stock too? Would be useful for work in the studio, there are constant lights shining, and I think its fair to say it is brighter than the sun.
[Nexus 5 Original Android Development] akaHardison:
1:Kernel problem.Faux can unload.But franco can't.

2:eek:f course you can.You can make this by your self if you can.Screen light controlled by a chip.You can edit the register by i2c.But it may burn your phone.
[Nexus 5 Original Android Development] Nbsss:
Do u think its possible to get a script to load module at boot?
[Nexus 5 Original Android Development] seadersn:
sure. keyword: insmod.
[Nexus 5 Original Android Development] akaHardison:
insmod wouldn't work.
[Nexus 5 Original Android Development] seadersn:
hm, k, sry then. quick shot w/o big reading ;)
[Nexus 5 Original Android Development] omvir:
That charging speed doe! 2000mA! If you guys are wondering, no I am not using the stock nexus charger. Using the Samsung galaxy s4 wall adapter with an ecomoto micro USB wire.
[Nexus 5 Original Android Development] xnickfx:
I don't know how I missed this after all the searching but THANK YOU SO MUCH!
[Nexus 5 Original Android Development] 2point:
Same, exactly what is happening to me. Worked great on my first nexus then had to get a new one, now it is not as dim.
[Nexus 5 Original Android Development] salvatore94:
Is possible to compile screen dimmer module for LG G2?

Inviato dal mio LG-D802 utilizzando Tapatalk
[Nexus 5 Original Android Development] ricky56789:
Would love to see this working on bricked kernel. Modules don't load on April 6th version of bricked
[Nexus 5 Original Android Development] bluenote73:
This would be so much more useful and awesome if it was an Xposed module. Is this possible??
[Nexus 5 Original Android Development] Juzman:
Working fine on PA 4.4.4 :)
[Nexus 5 Original Android Development] Ümit:
Does this (screen dimmer) work on nexus 4?
[Nexus 5 Original Android Development] mdelleman:
What widget is that showing the charging amps??
[Nexus 5 Original Android Development] -Grift-:
A bit late but https://play.google.com/store/apps/details?id=com.manor.currentwidget&hl=en :good:
[Nexus 5 Original Android Development] bluenote73:
Op, please consider making this an Xposed module!
[Nexus 5 Original Android Development] akaHardison:
Op seems disappeared.But this mod is open sources.If you can,you can make by yourself.:)
[Nexus 5 Original Android Development] Humpie:
On which 4.4.4 kernels is this currently working? and does it work on elementalx for example? Or is there a way maybe to turn on this super fast charge manually?
[Nexus 5 Original Android Development] Tommmii:
has anyone tried this on Lollipop?
[Nexus 5 Original Android Development] peddalion:
Sadly not working..
[Nexus 5 Q&A, Help & Troubleshooting] lowlow2:
Hi all,

First thing I do on a Win7/Win8 device is 'make the font smaller' (DPI?), the thing with 150% / 125% / 100% (default. 125%)

I have the feeling, most of the time, the nexus 5 is set to 150%

One of the results could be you get more icons your homescreen => more rows, more columns

Can this be changed ? without rooting.

Thanks!

PS: yes, it is absolutely amazing and blazing fast
[Nexus 5 Q&A, Help & Troubleshooting] n7of9:
nope, and you couldn't do it if you were rooted either unless you coded it yourself
[Nexus 5 Q&A, Help & Troubleshooting] veli0s:
wrong ... yes you can change the display density (as in make everything smaller do display more stuff) and no you can't change it without root access

the setting you're looking for is the ro.sf.lcd_density property in the build.prop file. There are several editors available to do that.
[Nexus 5 Q&A, Help & Troubleshooting] lowlow2:
Okay thanks a lot for that, I'll have a look.... in a few days because I'm not about to root my brand-new phone :)
[Nexus 5 Q&A, Help & Troubleshooting] notbrodie:
If you're planning on rooting in the future, I hope you've already unlocked your bootloader...

Sent from my Nexus 5
[Nexus 5 Q&A, Help & Troubleshooting] Timdor:
I'm trying to change my DPI with Build Prop editor but every time I reboot, the changes revert to stock.
[Nexus 5 Q&A, Help & Troubleshooting] abaaaabbbb63:
Change it manually with a file explorer.
[Nexus 5 Q&A, Help & Troubleshooting] Timdor:
Trying now. Is there any reason that would be different than the build prop editor? It worked on all my other phones
[Nexus 5 Q&A, Help & Troubleshooting] OlliG:
I just changed dpi to 420 in build.prop ...looks way better now! 400 was to small for me!
[Nexus 5 Q&A, Help & Troubleshooting] tremblingwater:
Im on 380 and its perfect, for me. The default was absolutely huge.
[Nexus 5 Q&A, Help & Troubleshooting] RussianBear:
Amen. I tried 300 and it wouldn't boot. Had to make a flashable build.prop. I'll try your suggestions. 280 looked interesting, though lol also, which app do you guys use for it?

update: set it to 380 and i like what i see.
[Nexus 5 Q&A, Help & Troubleshooting] tremblingwater:
I normally just edit the build prop using a build prop editor. I have also used 'texdroider_dpi' from the playstore. The default for the N5 seems to be 480, for anyone who forgets.
[Nexus 5 Q&A, Help & Troubleshooting] OlliG:
I used the editor integrated within ES-Explorer for editing build.prop!
[Nexus 5 Q&A, Help & Troubleshooting] olieebur:
Anyone remember the default dpi? I changed it but I want to go back. Don't remember if it was 440 or 460. The number in the tabs in chrome is offset and it annoys me in smaller dpi.
[Nexus 5 Q&A, Help & Troubleshooting] ArkAngel06:
I think it was actually 480.
[Nexus 5 Q&A, Help & Troubleshooting] elliot.newnham:
I think 350 is the minimum.

At 380 now and liking it.