maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] EBD - Enhanced Backlight Daemon (https://talk.maemo.org/showthread.php?t=70797)

nightfire 2011-03-08 02:44

[Announce] EBD - Enhanced Backlight Daemon
 
1 Attachment(s)
Hey everyone,

I'd like to introduce EBD - the Enhanced Backlight Daemon.

It monitors the N900's light sensor, and adjusts the backlight according to ambient light conditions.. a feature I was surprised to find missing on release... and again with each update.

EDIT: As others have posted, the feature does exist! Mine just wasn't working. In any case, I'll continue to improve this daemon as more customizable alternative. If nothing else, at least it's GPL, replacing the functionality in MCE.

The daemon itself is written in C and is optimized to reduce its footprint; it draws less than 1MB ram (DBUS aware), and only wakes up when the screen is on.

At the moment, there is no configuration, but I'll add that in the days/weeks to come. Note that it will fight with other LCD brightness events, so if you have a backlight control panel present, it won't work properly while EBD is running. I hope to fix this in a future release.

This is my first official package, so bear with me. I've attached the .deb, until I get set up on the Maemo repositories. It works fine for me, but remember to backup your device before installing anything from outside the stable tree!

To install it, just run (as root):

Code:

dpkg -i ebd_1.1-1_armel.deb
The help sheet:

Code:

10 root@glamb-n900 [~]# ebd -h
EBD - Enhanced Backlight Daemon

The Enhanced Backlight Daemon monitors ambient light conditions using
the device's light sensor, and adjusts the LCD backlight accordingly.

Usage: ebd [-vfVh]
        -v, --verbose          Run in verbose mode
        -f, --foreground        Run in foreground (don't daemonize)
        -V, --version          Display version information
        -h, --help              Display this help sheet

Just a note - if you kill the process (/etc/init.d/ebd stop), you can relaunch it in the foreground as root. In verbose mode, it tells you a bit about what's going on.

Comments/feedback appreciated!

casketizer 2011-03-08 02:55

Re: [Announce] EBD - Enhanced Backlight Daemon
 
What am I missing? My backlight changes all the time when I switch on lights etc.
What does this do different?

lifenexus 2011-03-08 03:11

Re: [Announce] EBD - Enhanced Backlight Daemon
 
im guessing your talking abt the keyboard backlight. this is for lcd back light
Edit: actually even my backlight changes based on the ambient light conditions. never noticed it a lot though. hehe

nman 2011-03-08 03:23

Re: [Announce] EBD - Enhanced Backlight Daemon
 
+1, my n900 already does this...but I'd love to be able to tweak it!

ajack 2011-03-08 03:43

Re: [Announce] EBD - Enhanced Backlight Daemon
 
Can I make a suggestion to this wonderful program?

Instead of using the full brightness, may scale the minimum (current ebd default) and maximum to the maximum brightness as set in the brightness settings of the N900.

Hope you understand what I'm suggesting. Love the app... :)

nightfire 2011-03-08 04:15

Re: [Announce] EBD - Enhanced Backlight Daemon
 
Hmmm.. mine definitely was not adjusting to ambient light, which is why I wrote this.

For everyone whose backlight already auto-adjusts, do you know where the setting is to enable it? I can't find one anywhere and I'm running PR1.3.

glabifrons 2011-03-08 04:18

Re: [Announce] EBD - Enhanced Backlight Daemon
 
Quote:

Originally Posted by casketizer (Post 962880)
What am I missing? My backlight changes all the time when I switch on lights etc.
What does this do different?

Mine too... in fact I find it annoying as I frequently find myself moving my thumb over the sensor and making the display go dim while I'm still in bright light. I have to be careful how I hold the device so the display stays bright enough to be comfortable.
I even noticed it today at work when I walked from a brightly lit part of a hallway to a slightly less well lit part - and my display got considerably dimmer. I had to tilt it towards the light to get the display to brighten back up.

Don't all of 'em do this? (running 1.3 firmware)

glabifrons 2011-03-08 04:21

Re: [Announce] EBD - Enhanced Backlight Daemon
 
Quote:

Originally Posted by ajack (Post 962893)
Can I make a suggestion to this wonderful program?

Instead of using the full brightness, may scale the minimum (current ebd default) and maximum to the maximum brightness as set in the brightness settings of the N900.

Hope you understand what I'm suggesting. Love the app... :)

I like that idea... I've noticed mine overreacts and over-dims when the light around it dims slightly. Being able to adjust the gamma (so to speak) would be nice.

nightfire 2011-03-08 04:25

Re: [Announce] EBD - Enhanced Backlight Daemon
 
Ok, well looks like at some point a year ago I must have disabled my auto-adjustment settings and forgot. :)

Well. Now I feel a little silly.

But, I suppose I can add more functionality and intelligence into ebd to make it superior to the stock auto-adjustment. Keep the suggestions coming everyone; I'll implement them as I have time.

nightfire 2011-03-08 04:32

Re: [Announce] EBD - Enhanced Backlight Daemon
 
Quote:

Originally Posted by ajack (Post 962893)
Can I make a suggestion to this wonderful program?

Instead of using the full brightness, may scale the minimum (current ebd default) and maximum to the maximum brightness as set in the brightness settings of the N900.

Hope you understand what I'm suggesting. Love the app... :)

I think I can make that work. It was my original intention but turned out to be tricky because a lot of processes adjust the brightness level on various events.

At worst, I'll implement an applet to make quick adjustments to the minimum and maximum (ie. LCD profiles).

9000 2011-03-08 04:38

Re: [Announce] EBD - Enhanced Backlight Daemon
 
Yes the mechanism does exist, and it's actually working quite well (compare to other smartphones). However it doesn't mean your concept is redundant, because I always want to customize the backlight behaviour.

Keep up the good work!

casketizer 2011-03-08 06:00

Re: [Announce] EBD - Enhanced Backlight Daemon
 
@nightfire

where/how did you disable it? I normally like it but in bed with strong halogen bedlight over my head it sometimes overreacts and i would like to temporrily disable it.

hawaii 2011-03-08 11:57

Re: [Announce] EBD - Enhanced Backlight Daemon
 
When the brightness bar is on 100% it doesn't auto-dim using the ALS. Once you move it a notch down it will do so.

cutehunk04 2011-03-08 15:04

Re: [Announce] EBD - Enhanced Backlight Daemon
 
not working for me...says incompatiable package.....unable to install...:(

nightfire 2011-03-08 19:53

Re: [Announce] EBD - Enhanced Backlight Daemon
 
Quote:

Originally Posted by casketizer (Post 962945)
@nightfire

where/how did you disable it? I normally like it but in bed with strong halogen bedlight over my head it sometimes overreacts and i would like to temporrily disable it.

I'm not 100% sure, but try disabling "power save mode" under Settings->Display, and see if that helps.

Quote:

Originally Posted by cutehunk04 (Post 963219)
not working for me...says incompatiable package.....unable to install...:(

Can you paste the result of the dpkg -i line?

Alfred 2011-03-08 21:10

Re: [Announce] EBD - Enhanced Backlight Daemon
 
wow! just found that my lcd doesn't change at all, when i'm trying to do anything with the sensor... what can help?

cutehunk04 2011-03-08 21:18

Re: [Announce] EBD - Enhanced Backlight Daemon
 
here is the screenshot

http://i53.tinypic.com/16lh3dj.png

JimKnopf 2011-03-08 23:03

Re: [Announce] EBD - Enhanced Backlight Daemon
 
Just for your interest:

Custom Brightness

May find something useful.

hawaii 2011-03-08 23:16

Re: [Announce] EBD - Enhanced Backlight Daemon
 
FWIW, this works absolutely beautifully. Smooth and consistent. ^5 on this.

@cutehunk04 - you didn't provide the entire filename. You're missing the extension.
Code:

`dpkg -i ebd_1.1-1_armel.deb`

F2thaK 2011-03-08 23:28

Re: [Announce] EBD - Enhanced Backlight Daemon
 
im guessing there will be option for no dimming?

will this also affect keyboard backlight?

hawaii 2011-03-08 23:40

Re: [Announce] EBD - Enhanced Backlight Daemon
 
Keyboard backlight is a binary value. If you want manual dimming, use the status-menu plugin for backlight control.

This daemon follows the Unix philosophy - write programs that do one thing and do it well.

Clutter, we do not want.

nightfire 2011-03-09 03:08

Re: [Announce] EBD - Enhanced Backlight Daemon
 
Quote:

Originally Posted by f2thak (Post 963567)
im guessing there will be option for no dimming?

will this also affect keyboard backlight?

There will be, ya. I'm on a business trip at the moment but as soon as I get home I plan to implement a nice handy status menu widget for controlling its behavior.

Regarding keyboard backlight... I would normally say hawaii does have a point that daemons should be unipurposed, but on a memory/CPU/battery restricted device like the n900, it would make sense to maximize the functionality of each individual system (to avoid excess polling, for example).

So, yes - I'll add support for keyboard light control. hawaii, don't worry; I'll ensure it takes 0% CPU if disabled. :)

Possibly also battery conservation mode: if enabled, would dim the backlights more (and sooner) when battery is low. It would mesh well with another project I'm considering.. an app to track battery usage by component (processes, LCD, various radios, etc) similar to what Android users have.

cutehunk04 2011-03-09 09:31

Re: [Announce] EBD - Enhanced Backlight Daemon
 
did as you said and here is the result

http://i54.tinypic.com/ja9gua.png

cutehunk04 2011-03-09 10:03

Re: [Announce] EBD - Enhanced Backlight Daemon
 
finally done....:)....is there any icon in menu...?

ivgalvez 2011-03-09 10:16

Re: [Announce] EBD - Enhanced Backlight Daemon
 
Are you considering to integrate this with the CSSU?

nightfire 2011-03-09 14:52

Re: [Announce] EBD - Enhanced Backlight Daemon
 
Quote:

Originally Posted by cutehunk04 (Post 963875)
finally done....:)....is there any icon in menu...?

Not yet... just a daemon for now (no configuration). But there will be. Updates to follow. :)

Quote:

Originally Posted by ivgalvez (Post 963882)
Are you considering to integrate this with the CSSU?

I'd be honored if they'd include it... but it still needs a lot of work before I'd even consider approaching them.

handaxe 2011-03-09 16:34

Re: [Announce] EBD - Enhanced Backlight Daemon
 
Having read the thread I am a wee bit confused - once installed this daemon does not contest control with the standard services?

cutehunk04 2011-03-09 19:56

Re: [Announce] EBD - Enhanced Backlight Daemon
 
now my brightness is always high which drains battery lot.... any way to keep it low ...

cutehunk04 2011-03-12 05:57

Re: [Announce] EBD - Enhanced Backlight Daemon
 
its draining my battery a lot as the brightness level is always high cant make it low... so how can i delete it ... couldnt find it in application manager.:(

geekgirl74 2011-03-12 06:35

Re: [Announce] EBD - Enhanced Backlight Daemon
 
Quote:

Originally Posted by cutehunk04 (Post 966201)
its draining my battery a lot as the brightness level is always high cant make it low... so how can i delete it ... couldnt find it in application manager.:(

just do:
sudo gainroot
dpkg -r ebd

that should do it...

cutehunk04 2011-03-12 06:49

Re: [Announce] EBD - Enhanced Backlight Daemon
 
worked....:)

nightfire 2011-03-12 18:40

Re: [Announce] EBD - Enhanced Backlight Daemon
 
Sorry guys... I will continue working on this as soon as I get back from my trip!

And if anyone wants the code in the meantime let me know!

Char 2011-03-12 19:26

Re: [Announce] EBD - Enhanced Backlight Daemon
 
what would be nice is if you made this something like f.lux. though, i don't know if that's possible with the n900. and xflux just MIGHT be able to run on it. you never know

butler 2011-03-12 20:50

Re: [Announce] EBD - Enhanced Backlight Daemon
 
Quote:

Originally Posted by Char (Post 966451)
what would be nice is if you made this something like f.lux. though, i don't know if that's possible with the n900. and xflux just MIGHT be able to run on it. you never know

Yes, that would be nice. There is an opensource program "redshift" that does the same and it's packaged in (easy) debian. Problem is that it doesn't work, at least on my n900. Xrandr method does nothing, and vidmode X server extension is missing. On my linux desktop with an nvidia card it works, but only through vidmode.

And about EBD GUI -- it would be great to be able to switch automatic mode on/off and set fixed brightness with logarithmic slider.

BTW, here is how to turn off standard automatic brightness adjustment:
http://talk.maemo.org/showthread.php...&highlight=als


All times are GMT. The time now is 10:39.

vBulletin® Version 3.8.8