On Fri, 13 May 2011 15:32:04 +0200 Mathieu Taillefumier
<mathieu.taillefum...@free.fr> said:

> 
> > do we really need that?
> 
> I do not think so but others might want to have lower backlight when 
> browsing etc... Personnaly I do not find that practical, but it is 
> matter of taste.
> 
> >
> >> - dialog box for setting the backlight extensions (maybe go as an
> >> advanced setting of the screen dialog box).
> >
> > you can just have a new dialog box for this - thats easy enough - copy and
> > paste a simple one from somewhere and modify as needed. as such i can only
> > think of a few things config needs:
> >
> > 1. if there is no randr backlight, and there is more than 1 /sys or acpi
> > backlight control, be able to choose which one to control.
> > 2. set some "enumerated" backlight levels. "default" (eg 100%), "idle" (eg
> > 50%), "sleep" (eg 0%), and then power management will set the backlight TO
> > the "default", "idle" or "sleep" states
> > 3. idle timeout between default and idle
> >
> > eg idle timeout could be 10 secs, and sleep be 5 mins (screensaver set to
> > kick in at 6mins to go completely blank).
> 
> I will add the sleep mode. For now, I have default and idle modes. It is 
> nothing to add.
> 
> >
> >> - acpi code for setting the backlight property (Is it useful nowadays ?)
> >
> > yes. nvidia drivers dont support randr backlight for example. you have to go
> > direct to the backlight controls - well not just acpi /sys/... stuff.
> > there's several places you'll find backlight controls. use randr IF its
> > there, if not, find a /sys or /acpi backlight control and modify that.
> 
> Thanks. I Forgot that nvidia is ways behind with the xrandr extension. 
> The backlight controls for the nvidia driver are a real mess (they 
> change the brightness not the actual backlight) and accessing the 
> backlight registers needs a specific driver (that is not in the kernel 
> by default). I will have to search for that.

actually i see the backlight controls in:

/proc/acpi/video/NGFX/LCD/brightness
/proc/acpi/video/NGFX/CRT/brightness
/proc/acpi/video/NGFX/HDMI/brightness
/sys/devices/virtual/backlight/acpi_video0/brightness
/sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/leds/ath9k-phy0::radio/brightness
/sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/leds/ath9k-phy0::assoc/brightness
/sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/leds/ath9k-phy0::tx/brightness
/sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/leds/ath9k-phy0::rx/brightness
/sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/leds/mmc0::/brightness
/sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.4/leds/mmc1::/brightness

for example. some of these are led's for network and sd card slots, not the
screen.brightness controls also floating about in /proc

on another laptop with a radeon it's:
/proc/acpi/video/VGA/DFP1/brightness
/proc/acpi/video/VGA/TV/brightness
/proc/acpi/video/VGA/CRT/brightness
/proc/acpi/video/VGA/LCD/brightness

as well as more in /sys... pick the one thats used :) (probably LCD). i've
found others in other weird places. but whenever xrandr doesn't work - the
fallback is to go to /proc or /sys - also dont assume users will have the
latest and greatest of drivers and kernels so even if a newer driver does work,
an older may not, so need to go to /proc or /sys

> >> - a nice little box indicating the backlight level when it is changed
> >> (edje kind of thing, related to themes).
> >
> > steal all the code from mixer gadget - for its gadget and popup. thats what
> > u need there. :)
> >
> >> - find a way to update backlight when modified by an other program
> >> (xbacklight for instance).
> >
> > for now i'd say use a poller like battery and temperature and make it poll
> > by default every 32ticks (4seconds). allow setting poll interval. should
> > also GET the backlight value first every time you try and modify it.
> 
> It was more or lest my intention, i.e. I will use a timer and check that 
> backlight property did not change outside e17. it is simple to do that. 
> I will code that today if I have time.

use a poller, not timer. :) see other modules like above :)

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to