[Sugar-devel] [FEATURES] Display Device
Simon Schampijer
simon at schampijer.de
Mon Nov 21 12:29:39 EST 2011
El 21/11/11 17:16, Paul Fox escribió:
> peter wrote:
> > On Mon, Nov 21, 2011 at 3:33 PM, Simon Schampijer<simon at schampijer.de> wrote:
> > > El 21/11/11 15:18, Paul Fox escribió:
> > >>
> > >> simon wrote:
> > >> > Hi,
> > >> >
> > >> > I would like to propose the following Feature to enhance the Sugar
> > >> > learning environment:
> > >> >
> > >> > "Add a frame device to control the display. The idea is to add their
> > >> an
> > >> > option to change the brightness and to take a screenshot. Both actions
> > >> > are only available via the keyboard as of today." [1]
> > >>
> > >> oh, good idea. in fact, i have another job for it to do. :-)
> > >> it would be great if it could switch the display from color to
> > >> monochrome, as well. see my email on automatic backlight control,
> > >> which i've composed but haven't sent yet. i'll do so right now.
> > >>
> > >> paul
> > >
> > > Hi Paul,
> > >
> > > I just looked at olpc-kbdshim the olpc-brightness for how we adjust the
> > > brightness on the XO. Looks like we simply echo the values to the files like
> > > '/sys/class/backlight/dcon-bl/brightness'. I wonder what the generic
> > > solution is for that (Sugar on other devices).
> > >
> > > From a quick test, I have the following files on my T61:
> > > /sys/class/backlight/intel_backlight/max_brightness and
> > > /sys/class/backlight/intel_backlight/actual_brightness which change
> > > accordingly when adjusting the brightness. But I guess there is a generic
> > > tool for doing that...?
> > >
> > > /me should probably have a look what GNOME is doing...
> >
> > There's recently been introduced a generic backlight class so I think
> > its all being converted over to that. Its like the IBM one in
> > /sys/class/backlight but I'm not sure the full details for
> > manipulating it programaticly but I'm sure its documented somewhere.
> >
> > Some details are:
> > https://lwn.net/Articles/423170/
> > https://wiki.kubuntu.org/Kernel/Debugging/Backlight
>
> we seem to implement anything mentioned in those two links. i wouldn't
> be surprised if there was a more recent higher level interface that
> might be useful.
>
> paul
> =---------------------
> paul fox, pgf at laptop.org
I have been checking what gnome is doing (gnome-settings-daemon (the
functionality was in gnome-power-manager before)):
- they use xbacklight [1] if possible to get/set the brightness [2],
doing this through the gnome-desktop library [3]
- there is fallback code to deal with hardware where xbacklight is not
available [4] using the content of "/sys/class/backlight"
Regards,
Simon
[1] http://linux.die.net/man/1/xbacklight
[2]
http://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/power/gsd-power-manager.c#n2405
[3]
http://git.gnome.org/browse/gnome-desktop/tree/libgnome-desktop/gnome-rr.c#n1682
[4]
http://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/power/gsd-backlight-helper.c
More information about the Sugar-devel
mailing list