[APP][2.3+] Lux Auto Brightness

Search This thread

NYLimited

Inactive Recognized Contributor
Jan 5, 2008
3,825
2,286
New Hampshire, USA
Don't worry about it, I'm updating the market version tomorrow.

Just a quick note - installed the latest and all seems well based on a quick look/see.

I normally did not use the auto mode but left it on to see how it works. I may switch back to to having the app adjust the screen only when turned on.

The only thing I am not crazy about it is adding yet another icon to the task bar (sorry). It is getting crowded up there. :) I tried turning it off but, of course, the notification pulldown is also removed by that. I will leave it for now but may experiment with turning it off another time.

For now all is well - thanks for your efforts!

[ EDIT ] I switched the notification to the lowest priority which have removed the icon from the status bar - no issues with the app closing thus far.

 
Last edited:

forumx

Senior Member
Nov 29, 2007
207
21
OnePlus 7 Pro
Google Pixel 6 Pro
mxplayer and brightness control

I have included mxplayer in the sleep list so that I could adjust the brightness within the app itself. This has been working fine up to 0.76 but since 1.03, I am no longer able to adjust the brightness in mxplayer. I confirm that the app is still included in the sleep list so I think there must be a bug there somewhere.

Appreciate if you can take a look.

EDIT: I rebooted my phone and it is now working as expected, so no issue there.
 
Last edited:

lexluthor

Senior Member
Feb 7, 2007
1,927
204
Ok, there's a lot of stuff to reply to here, so I'll make some comments:

- The CPU issue is poll rate related. I accidentally hard coded a fast poll rate into the app (so choosing a different rate doesn't change it). I pushed out an update to fix this just now.
I just noticed the CPU issue as well on my Galaxy S3. The poll rate was set to fastest. Was that what it was set to on the old version (before the newest slate of updates? If I have it on fast or even medium, it still keeps my CPU over 50%.

Seems like you shouldn't even have an option that would allow someone to set this to take up 50% of the CPU constantly. If I set it to slow, my CPU drops way down to about where it should be while idle.
 

Cyb3rGlitch

Senior Member
Apr 12, 2011
599
663
Could someone help explain the pollrate new setting? What does it do, what is the difference between that and the period check? Is it how quick the check is acted on? What values are the Fastest, Fast etc.
Poll rate defines how fast the light sensor is polled for changes. Even the slowest settings is quite fast. The only reason I have it there as an option is because devices with dodgy sensors don't work well with slower poll rates. On the other hand, good devices use too much CPU with faster poll rates. 'Slow' and 'slowest' are perfectly fine for quick updates - perhaps I should have named them something less negative sounding.

Basically, don't make it faster unless you get wacky sensor readings (usually a HTC issue).

Ok, in this case can I ask for just time settings for night mode? Will highly appreciate! Also it will be great to have possibility to link Night mode with offscreen buttons backlight (on/off). Thank you in advance to consider my small request :)
I'll consider this for a future update.

Latest update in the play store gives me an error about no SD card on my Nexus 7.
What are you doing when that occurs?


I just noticed the CPU issue as well on my Galaxy S3. The poll rate was set to fastest. Was that what it was set to on the old version (before the newest slate of updates? If I have it on fast or even medium, it still keeps my CPU over 50%.

Seems like you shouldn't even have an option that would allow someone to set this to take up 50% of the CPU constantly. If I set it to slow, my CPU drops way down to about where it should be while idle.
Yeah I agree, I shouldn't have given people that much control. It was put there for people with bad light sensors to try a higher poll rate, but now it's backfired because people like to touch settings they don't really understand.
 

200mpx

Senior Member
Sep 23, 2005
761
89
Moscow
Re: [APP][Official][2.1+] Lux Auto Brightness 0.76

Could anybody confirm that Manual backlight on call option is working? I can not switch it off. Even with unchecked box this option rule backlight for calls

Отправлено с моего GT-N7100 через Tapatalk
 

lexluthor

Senior Member
Feb 7, 2007
1,927
204
Sleep list isn't working on my galaxy s3. I go to sleep list, then add and it says loading, then it returns me back to the menu with sleep last in it.
 

Cyb3rGlitch

Senior Member
Apr 12, 2011
599
663
Could anybody confirm that Manual backlight on call option is working? I can not switch it off. Even with unchecked box this option rule backlight for calls

Отправлено с моего GT-N7100 через Tapatalk
Did the latest update fix this for you?

Sleep list isn't working on my galaxy s3. I go to sleep list, then add and it says loading, then it returns me back to the menu with sleep last in it.
It's working on my end. I'll see if I can try it on an S3.

1.0.4 in GP

Don't you think it is time to change topic title?
Indeed, I'll do it tomorrow when things settle down and I get time to update everything.
 

gobak

Senior Member
Jul 13, 2010
137
35
Re: [APP][Official][2.1+] Lux Auto Brightness 0.76

Hello,
I have troubles with setting the application on low lighting levels. It just jumps from one level to another and back over and over again, no smooth changes like when I was using stock autobrightness or enhanced brightness in Jellytime ROM.
I suppose it just sets it like:
sensor - level
10 - 20
160 - 40
280 - 60
and it cannot approximate values over certain period?

This permanent flickering is very annoying.

Sent from my Desire HD using xda app-developers app
 

rxmxsh

Senior Member
Dec 22, 2012
354
108
Vito - your app has too many permissions. I swear to God that my phone attempted to send all of my credit cards to Rwanda.

Kidding - the version that's in the store has been the smoothest build yet. Thank you for creating such a useful app that's thought out. I look forward to your future builds.
 

200mpx

Senior Member
Sep 23, 2005
761
89
Moscow
Re: [APP][Official][2.1+] Lux Auto Brightness 0.76

Will check tomorrow if the manual call brightness is working, now it is night here :).

About Samsung sensor not giving data sometimes to Lux, when in Debug section I see 0. At the same time stock auto brightness see very well the level of ambient light:
Here is two screenshots made when in complete darkness lux lost sensor data, stock brightness app see very well the level of ambient light


Отправлено с моего GT-N7100 через Tapatalk
 

Attachments

  • uploadfromtaptalk1361913277596.jpg
    uploadfromtaptalk1361913277596.jpg
    184 KB · Views: 365
  • uploadfromtaptalk1361913293686.jpg
    uploadfromtaptalk1361913293686.jpg
    62.5 KB · Views: 343

quack75

Senior Member
Sep 24, 2012
258
96
Redmi K20 / Xiaomi Mi 9T
Hello everyone, I have a problem with this application. It should change the brightness automatically, but for me it is only possible to change with negative numbers (sub) if I link for example - 50% with 0 lux, but between 0% and 100% I see no changes. Can someone help me  I use Cyanogenmodnightly 10.1 in a Samsung galaxy s I9000. Thanks

Inviato dal mio GT-I9000 con Tapatalk 2


Inviato dal mio GT-I9000 con Tapatalk 2
 

200mpx

Senior Member
Sep 23, 2005
761
89
Moscow
Re: [APP][Official][2.1+] Lux Auto Brightness 0.76

By the way, the version is mentioned like 0.8 on debug screen

The call brightness is working fine now. Thanks for fix

Отправлено с моего GT-N7100 через Tapatalk
 
Last edited:

ikjadoon

Senior Member
Jul 4, 2012
867
437
Lenovo P11
Re: [APP][Official][2.1+] Lux Auto Brightness 0.76

Poll rate defines how fast the light sensor is polled for changes. Even the slowest settings is quite fast. The only reason I have it there as an option is because devices with dodgy sensors don't work well with slower poll rates. On the other hand, good devices use too much CPU with faster poll rates. 'Slow' and 'slowest' are perfectly fine for quick updates - perhaps I should have named them something less negative sounding.

Basically, don't make it faster unless you get wacky sensor readings (usually a HTC issue).

On my Galaxy S3, it is set to fastest as default. Normal? That might be why earlier users had it like so:

Screenshot_2013-02-26-23-33-37_zps652bc76c.png


I changed it to slow, as recommended in your pop-up....however, to prevent these types of issues in the future, is there a guide or manual for Lux available anywhere? I could help you write one, if you'd like! :)

Also, would it be difficult to bring back the alpha settings for night mode? For me, the yellow filter seems too weak. :( One other poster mentioned this.

Also-sorry, I should have tried the beta-with the previous overlay, changing between manual and my automatic mode was simple, press and hold the circle refresh icon. Now, I have to open that menu, go past options I will likely never change, and tap manual. Do most people prefer the new way?
 
Last edited:

200mpx

Senior Member
Sep 23, 2005
761
89
Moscow
Re: [APP][Official][2.1+] Lux Auto Brightness 0.76

Hmm, today Lux appeared among battery eaters:



Отправлено с моего GT-N7100 через Tapatalk
 

Attachments

  • uploadfromtaptalk1361954938672.jpg
    uploadfromtaptalk1361954938672.jpg
    87.3 KB · Views: 329

Cyb3rGlitch

Senior Member
Apr 12, 2011
599
663
Hello,
I have troubles with setting the application on low lighting levels. It just jumps from one level to another and back over and over again, no smooth changes like when I was using stock autobrightness or enhanced brightness in Jellytime ROM.
I suppose it just sets it like:
sensor - level
10 - 20
160 - 40
280 - 60
and it cannot approximate values over certain period?

This permanent flickering is very annoying.

Sent from my Desire HD using xda app-developers app
I removed filtering from Lux in favour of a less CPU intensive solution (which only applies to dynamic and ascending modes). What automatic mode are you using?

Will check tomorrow if the manual call brightness is working, now it is night here :).

About Samsung sensor not giving data sometimes to Lux, when in Debug section I see 0. At the same time stock auto brightness see very well the level of ambient light:
Here is two screenshots made when in complete darkness lux lost sensor data, stock brightness app see very well the level of ambient light


Отправлено с моего GT-N7100 через Tapatalk
Samsung probably don't use the Android API to get the light readings, so they don't have to wait for an event to trigger to get data. Lux should be giving you the last detected light value, unless you restarted Lux (or your phone) in an area of constant lux.

Hello everyone, I have a problem with this application. It should change the brightness automatically, but for me it is only possible to change with negative numbers (sub) if I link for example - 50% with 0 lux, but between 0% and 100% I see no changes. Can someone help me  I use Cyanogenmodnightly 10.1 in a Samsung galaxy s I9000. Thanks

Inviato dal mio GT-I9000 con Tapatalk 2


Inviato dal mio GT-I9000 con Tapatalk 2
If it can only change subzero values, then your ROM/kernel isn't passing on the brightness values to the display. I use the Android API for this, so it should work fine. Also check that you haven't put Lux into sleep mode (see if it says 'sleeping' in the notification).

On my Galaxy S3, it is set to fastest as default. Normal? That might be why earlier users had it like so:

http://i13.photobucket.com/albums/a286/ikjadoon/Screenshot_2013-02-26-23-33-37_zps652bc76c.png

I changed it to slow, as recommended in your pop-up....however, to prevent these types of issues in the future, is there a guide or manual for Lux available anywhere? I could help you write one, if you'd like! :)

Also, would it be difficult to bring back the alpha settings for night mode? For me, the yellow filter seems too weak. :( One other poster mentioned this.

Also-sorry, I should have tried the beta-with the previous overlay, changing between manual and my automatic mode was simple, press and hold the circle refresh icon. Now, I have to open that menu, go past options I will likely never change, and tap manual. Do most people prefer the new way?
Latest update forces the poll rate to 'medium' (which now has a value between the 'slow' and 'slowest' values in the last release).

The alpha setting was replaced with the Kelvin select slider on the Dashboard. I'll see about adding an offset option.

The new drop down menu for automatic mode selection is more intuitive for new users, and when you get used to it you can quickly navigate between manual and your favourite auto method.

Hmm, today Lux appeared among battery eaters:



Отправлено с моего GT-N7100 через Tapatalk
This isn't unusual for Samsung devices. They all overstate how much power Lux uses. There's also a chance that the high poll rate causes that anomaly, which is now solved.
 
  • Like
Reactions: 200mpx

gobak

Senior Member
Jul 13, 2010
137
35
I removed filtering from Lux in favour of a less CPU intensive solution (which only applies to dynamic and ascending modes). What automatic mode are you using?

Playing with dynamic and ascending. What I am not able to achieve is some sort of constant backlight between 10 and 160 lux reading. Typical scenario: half-dark room with softly-lit lamp by the couch. When I move my hand over the device or just slightly change the angle, the sensor reads 160 for a moment and sets the brightness higher. 2 seconds later it comes back to 10 and the lowest backlight is back. And this repeats every 20 seconds or so.

It seems to me that I can't get analogue curve of brightness, it just jumps between sensor values. Maybe it's normal behaviour but I haven't noticed it with previous roms/brightness tools I tried.
 

Cyb3rGlitch

Senior Member
Apr 12, 2011
599
663
Playing with dynamic and ascending. What I am not able to achieve is some sort of constant backlight between 10 and 160 lux reading. Typical scenario: half-dark room with softly-lit lamp by the couch. When I move my hand over the device or just slightly change the angle, the sensor reads 160 for a moment and sets the brightness higher. 2 seconds later it comes back to 10 and the lowest backlight is back. And this repeats every 20 seconds or so.

It seems to me that I can't get analogue curve of brightness, it just jumps between sensor values. Maybe it's normal behaviour but I haven't noticed it with previous roms/brightness tools I tried.

AFAIK ROMs tend to use averaging filters to stop sudden changes. Lux used to have one too until I pulled it out (I wasn't happy with it). If I have time I'll see if I can add one back in, but my time is very limited going forward.
 
  • Like
Reactions: gobak

Top Liked Posts

  • There are no posts matching your filters.
  • 160
    unnamed.png


    Lux - The Original Android Auto-Brightness App

    So I thought I should make an XDA thread for Lux, over a year after releasing it to the Play Store!

    FULL or FREE


    Issues/Suggestions

    If you have any issues or suggestions, please add them to the public issue tracker found here. Be sure to search first, duplicated issues will not work in your favour.


    News
    • Update to 1.51 released to Play Store!
      - Profiles. Have different behaviour for day and night!
      - Root plug-ins. Custom kernel with RGB control? Make a plug-in to utilise it!
      - Improved notification
      - Low pass filter
      - Cubic interpolation
      - Polish/French/Russian/German/Italian translation
      - Manual sunrise location input
      - Control Dashboard slider with vol. keys
      - Fade duration/step
      - Reduced battery usage
      - Fixes

    • Update to 1.06 released to Play Store!
      - Automatic night mode (uses location for sunset/sunrise).
      - Notification priority
      - Enhanced dashboard and notification UI
      - Enable/disable and refresh Lux via Tasker
      - Bug fixes

    • Update to 0.76 released to Play Store!
      - Fixed brightness issues after call

    • Update to 0.74 released to Play Store!
      - Fixed max/phone brightness preferences swapped
      - Added ignore 0 lux option
      - Made static phone brightness optional

    • Update to 0.70 released to Play Store!
      - New 'ascending' automatic mode for zero jitter!
      - Expandable notification for added control (Android 4.1+)
      - Improved efficiency
      - Install to OS functionality
      - Set min/max brightness bounds
      - Adjustable night mode
      - Improved persistence (Android won't kill it!)
      - Fixed Nexus 7 255 luma bug
      - Fixed Tasker 'on wake' revert bug
      - Compat. mode is now known as 'sleep mode'
      - Night Mode now default Dashboard action (hold for Astro. mode)
      - Misc. tweaks and fixes.

    App Description

    Lux isn't your ordinary brightness app. It intelligently adjusts the brightness of your display based on the environment you're in. If, for example, you step into a dimly lit room, Lux will automatically lower the brightness of your display to make it not only comfortable to read, but to also preserve battery power.
    Lux provides the option to automatically adjust the backlight at fixed intervals (periodic mode), when a change in environment is detected (dynamic mode), or when the phone wakes from sleep. It's also possible to adjust the backlight manually. Simply disable automatic mode and you can use it like a traditional brightness tool!
    Perhaps the best thing about Lux is that you can teach it how to behave. If the backlight is too bright or dim for your liking, simply open the provided Dashboard, adjust the brightness slider to the level you desire, then hold the link button. Lux will use this new 'link' as a reference in future.

    Give it a go! I want you to test Lux for more than the 15 minute refund period offered by Google. I understand that some devices may not have the best quality light sensor, and that you may need more time to play around with settings. If you find that Lux doesn't suit you after the 15 minutes is up, you can request a refund at any time via e-mail - no questions asked.

    ★FEATURES★
    ■ Custom auto brightness.
    ■ Sub-zero brightness to make reading in the dark significantly less irritating.
    ■ Battery efficient
    ■ Handy brightness widget
    ■ Option to use the camera to read in ambient light.
    ■ Power-user settings such as choice of interpolation, sensor debugging, and linked sample editing.
    ■ Backup to SD.
    ■ 'Ascending' auto mode for phones with inaccurate light sensors.
    ■ Gradual fade for backlight adjustments.
    ■ Astronomer mode adds a red filter to the screen to preserve the eyesight of stargazers.
    ■ Jitter control to prevent constant small changes to the backlight.
    ■ Automatic night mode, to change the colour temperature of the display for comfortable night time viewing.
    ■ Add app specific exceptions via sleep mode
    ■ No ads, or other nuisances.
    ■ Tasker and Locale support!
    Note: Please disable other brightness apps before using Lux. The author is not liable for any issues caused when using this app.

    ★PERMISSIONS★
    TAKE PICTURES AND VIDEOS: Used to read in luma values, if camera input is selected.
    DRAW OVER OTHER APPS: Required for night/astro mode.
    READ PHONE STATE: Required to prevent Lux from interfering with phone controls in Android 4.1.
    MODIFY SYSTEM SETTINGS: Brightness is a system setting, as is toggling the default auto brightness.
    RETRIEVE RUNNING APPS: Required to make the 'sleep list' functionality work, so Lux can disable itself when certain apps are in the foreground.
    COARSE LOCATION: Required to automatically calculate sunrise/sunset times.
    IN APP BILLING: Required for purchasing future device specific root only plug-ins, to enhance functionality.
    14
    Lux Low-Level Plug-ins

    Soon Lux will support plug-ins to bypass Android API limitations. These plug-ins serve to replace the overlay system Lux uses to make adjustments for Night/Astronomer modes and brightness in general. The plug-in library is free to use for non-commercial development, and can be found here:

    Lux Plug-in Library | Nexus 4 Sample Plug-in Code

    How to make a plug-in

    There are two approaches to making a plug-in for Lux. The passive and the active method. The former is as easy as providing a set of superuser commands for Lux to interpret and apply. These command correlate to functions such as setting pixel RGB or brightness levels. This is the type of plug-in the Nexus 4 sample linked above takes.
    The active method requires you produce your own code to perform RGB/brightness adjustments. This might include importing a device specific library to do the heavy lifting, and then returning empty superuser commands back to Lux.


    Getting Started

    Simply import the Lux Plug-in Library source into your IDE as an Android Library Project, and then create a new Android app which extends PassiveDisplay.java.

    PassiveDisplay provides hooks into Lux's plug-in framework, which you can use to provide superuser commands for Lux to execute. These commands correlate to functions such as setting RGB values. Take a look at the sample Nexus 4 project to see how it's all done.
    Finally, in your new project's AndroidManifest.xml file, add the following:

    Code:
        <activity
            android:name="com.vitocassisi.lux.plugin.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
    
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    
        <receiver
            android:name="com.vitocassisi.lux.plugin.LuxBroadcastReceiver"
            android:exported="true" >
            <intent-filter>
                <action android:name="com.vitocassisi.lux.plugin.search" />
            </intent-filter>
        </receiver>
    
        <service
            android:name=".[B]MY_PLUGIN[/B]"
            android:exported="true" >
            <intent-filter>
                <action android:name="[B]YOUR_PACKAGE_NAME_HERE[/B]" />
            </intent-filter>
        </service>

    Be sure to replace YOUR_PACKAGE_NAME_HERE with the name of your plug-in's package, and MY_PLUGIN with your extended PassiveDisplay class.

    And that's it! Now you're ready to test!


    Enabling Plug-In support within Lux

    To enable plug-in support, you must check 'Enable plug-in support' in the Advanced section of Lux settings. Enabling this option forfeits all responsibility of mine for any issues caused while using Lux. Plug-in's can cause very real damage to your device if they're written incorrectly - don't use plug-ins from sources you don't trust!
    Testing your plug-in
    Testing is critical for creating a good plug-in. You are dealing directly with system files, and can easily cause damage if you do not know what you're doing.

    DO NOT RELEASE A PLUG-IN WITHOUT TESTING IT ON THE TARGET DEVICE FIRST!

    Ensure that the following work with your plug-in installed:
    • Astronomer Mode
    • Night Mode
    • General brightness adjustment
    • Lux readings functional

    BE METICULOUS WITH YOUR IMPLEMENTATION OF isSupportedDevice()!
    Modifying system files on the wrong model/kernel may cause irreversible issues!


    Licence
    Code:
    Copyright © 2013 Vito Cassisi
    
    You may not use this library except in compliance with the following:
        - It cannot be used for commercial purposes under any circumstances, unless explicit permission is granted in writing from the author.
        - Modifications to this library may not be distributed.
    
    Unless required by applicable law or agreed to in writing, software
    distributed under this licence is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    11
    Lux v1.99.8 released (staged rollout)

    - Added CF.lumen support (don't need CF.lumen active, just install the driver). Acts as a plug-in for all Android 4.4+ devices. Please buy the pro version to support his work.
    - System autobrightness enabled during calls
    - Option to shake at lockscreen to increase brightness
    - Option to prevent drop in brightness in landscape
    - Enforced persistent notification, added system removal method
    - Fixed dashboard width issue
    - Fixed notification priority resetting at boot
    - Misc. fixes
    11
    Hey everyone. Sorry to hear that people are having issues with the paid version. I'm working on hotfixes at the moment. A lot of these bugs don't appear on my test devices, which is why regressions happen seemingly randomly. I'm working hard on finding a reliable way to reproduce and test these issues to prevent this happening again.
    9
    Apologies to everyone for not being around lately. I've been answering support via email.

    A new release is rolling out on the market to 5% of users. Please use the 'Send Feedback' button in Lux preferences if you experience issues. Also, feel free to email me with any questions or concerns.