* Illuminated keyboard on ASUS U50VG laptop, backlight or led ? @ 2009-07-24 7:34 Corentin Chary 2009-07-28 19:51 ` Corentin Chary 0 siblings, 1 reply; 19+ messages in thread From: Corentin Chary @ 2009-07-24 7:34 UTC (permalink / raw) To: linux acpi, Matthew Garrett, Alan Jenkins Hi, I'm working on Illimunated keyboard for some new Asus U50VG, There is some kind of backlight for the keyboard: http://forum.amtech.com.vn/attachments/reviews-zone/16272d1245751662-laptop-asus-u50vg-con-sot-moi-cua-asus-p1010643.jpg There is 4 level of brightness. I've found the ACPI to control that, but I'm not sure if I should register it as a led or as a backlight. Any Idea ? Thanks -- Corentin Chary http://xf.iksaif.net - http://uffs.org ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Illuminated keyboard on ASUS U50VG laptop, backlight or led ? 2009-07-24 7:34 Illuminated keyboard on ASUS U50VG laptop, backlight or led ? Corentin Chary @ 2009-07-28 19:51 ` Corentin Chary 2009-07-28 20:04 ` Matthew Garrett 0 siblings, 1 reply; 19+ messages in thread From: Corentin Chary @ 2009-07-28 19:51 UTC (permalink / raw) To: linux acpi, Matthew Garrett, Alan Jenkins, acpi4asus-user On Fri, Jul 24, 2009 at 9:34 AM, Corentin Chary<corentin.chary@gmail.com> wrote: > Hi, > I'm working on Illimunated keyboard for some new Asus U50VG, > There is some kind of backlight for the keyboard: > http://forum.amtech.com.vn/attachments/reviews-zone/16272d1245751662-laptop-asus-u50vg-con-sot-moi-cua-asus-p1010643.jpg > There is 4 level of brightness. > > I've found the ACPI to control that, but I'm not sure if I should > register it as a led or as a backlight. > > Any Idea ? > > Thanks No answers. I think I'll implement that as a backlight, because it is a backlight even if it's not for a screen. -- Corentin Chary http://xf.iksaif.net - http://uffs.org ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Illuminated keyboard on ASUS U50VG laptop, backlight or led ? 2009-07-28 19:51 ` Corentin Chary @ 2009-07-28 20:04 ` Matthew Garrett 2009-08-01 10:40 ` Corentin Chary 0 siblings, 1 reply; 19+ messages in thread From: Matthew Garrett @ 2009-07-28 20:04 UTC (permalink / raw) To: Corentin Chary; +Cc: linux acpi, Alan Jenkins, acpi4asus-user On Tue, Jul 28, 2009 at 09:51:09PM +0200, Corentin Chary wrote: > No answers. > I think I'll implement that as a backlight, because it is a backlight > even if it's not for a screen. I believe the SMC driver for the Apples does it via LED, so it might make sense to be consistent with that. -- Matthew Garrett | mjg59@srcf.ucam.org ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Illuminated keyboard on ASUS U50VG laptop, backlight or led ? 2009-07-28 20:04 ` Matthew Garrett @ 2009-08-01 10:40 ` Corentin Chary 2009-08-01 11:19 ` Alan Jenkins 0 siblings, 1 reply; 19+ messages in thread From: Corentin Chary @ 2009-08-01 10:40 UTC (permalink / raw) To: Matthew Garrett; +Cc: linux acpi, Alan Jenkins, acpi4asus-user On Tue, Jul 28, 2009 at 10:04 PM, Matthew Garrett<mjg59@srcf.ucam.org> wrote: > On Tue, Jul 28, 2009 at 09:51:09PM +0200, Corentin Chary wrote: > >> No answers. >> I think I'll implement that as a backlight, because it is a backlight >> even if it's not for a screen. > > I believe the SMC driver for the Apples does it via LED, so it might > make sense to be consistent with that. > > -- > Matthew Garrett | mjg59@srcf.ucam.org > So it will be a led. There is another problem, Fn+F3/F4 generate ACPI events Fn+F3 : hotkey ATKD 000000c5 00000000 Fn+F4 : hotkey ATKD 000000c4 00000000 Fn+F3: decreases keyboard brightness Fn+F4: increases keyboard brightness Should we handle these events with acpi scripts or directly in the driver ? IMHO it can be done directly in the driver, like LCD On/Off keys. -- Corentin Chary http://xf.iksaif.net - http://uffs.org ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Illuminated keyboard on ASUS U50VG laptop, backlight or led ? 2009-08-01 10:40 ` Corentin Chary @ 2009-08-01 11:19 ` Alan Jenkins 2009-08-01 12:40 ` Corentin Chary 0 siblings, 1 reply; 19+ messages in thread From: Alan Jenkins @ 2009-08-01 11:19 UTC (permalink / raw) To: Corentin Chary; +Cc: Matthew Garrett, linux acpi, acpi4asus-user Corentin Chary wrote: > On Tue, Jul 28, 2009 at 10:04 PM, Matthew Garrett<mjg59@srcf.ucam.org> wrote: > >> On Tue, Jul 28, 2009 at 09:51:09PM +0200, Corentin Chary wrote: >> >> >>> No answers. >>> I think I'll implement that as a backlight, because it is a backlight >>> even if it's not for a screen. >>> >> I believe the SMC driver for the Apples does it via LED, so it might >> make sense to be consistent with that. >> >> -- >> Matthew Garrett | mjg59@srcf.ucam.org >> >> > > So it will be a led. > I think you should also match the LED name used by the apple driver. As far as I know it's the only sensible way for userspace to identify the LED. The SMC driver uses "smc::kbd_backlight", so something like "eeepc::kbd_backlight". > There is another problem, Fn+F3/F4 generate ACPI events > > Fn+F3 : hotkey ATKD 000000c5 00000000 > Fn+F4 : hotkey ATKD 000000c4 00000000 > > Fn+F3: decreases keyboard brightness > Fn+F4: increases keyboard brightness > > Should we handle these events with acpi scripts or directly in the driver ? > IMHO it can be done directly in the driver, like LCD On/Off keys. > Here's my opinion based on no experience and 10 minutes with google :-). Userspace should take charge of changing the brightness. It would be good to generate input events (KEY_KBDILLUMUP etc) as well though. Hopefully hald-addon-generic-kbd-backlight already responds to KEY_KBDILLUM*. If so, then one could use Hal along with an FDI file like the apple one (<http://lists.freedesktop.org/archives/hal/2008-October/012360.html>). That's close to what we should ultimately be aiming for, except for the specific match on "smc::kbd_backlight". It would be great to just have one rule matching on *::kbd_backlight. Alan ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Illuminated keyboard on ASUS U50VG laptop, backlight or led ? 2009-08-01 11:19 ` Alan Jenkins @ 2009-08-01 12:40 ` Corentin Chary 2009-08-01 13:21 ` Danny Kukawka 0 siblings, 1 reply; 19+ messages in thread From: Corentin Chary @ 2009-08-01 12:40 UTC (permalink / raw) To: Alan Jenkins Cc: Matthew Garrett, acpi4asus-user, Henrik Rydberg, hal, linux acpi On Sat, Aug 1, 2009 at 1:19 PM, Alan Jenkins<alan-jenkins@tuffmail.co.uk> wrote: > Corentin Chary wrote: >> On Tue, Jul 28, 2009 at 10:04 PM, Matthew Garrett<mjg59@srcf.ucam.org> wrote: >>> I believe the SMC driver for the Apples does it via LED, so it might >>> make sense to be consistent with that. >>> >>> -- >>> Matthew Garrett | mjg59@srcf.ucam.org >> >> So it will be a led. > > I think you should also match the LED name used by the apple driver. As > far as I know it's the only sensible way for userspace to identify the > LED. The SMC driver uses "smc::kbd_backlight", so something like > "eeepc::kbd_backlight". Not an eeepc, but yeah, it will be asus::kbd_backlight >> There is another problem, Fn+F3/F4 generate ACPI events >> >> Fn+F3 : hotkey ATKD 000000c5 00000000 >> Fn+F4 : hotkey ATKD 000000c4 00000000 >> >> Fn+F3: decreases keyboard brightness >> Fn+F4: increases keyboard brightness >> >> Should we handle these events with acpi scripts or directly in the driver ? >> IMHO it can be done directly in the driver, like LCD On/Off keys. >> > > Userspace should take charge of changing the brightness. It would be > good to generate input events (KEY_KBDILLUMUP etc) as well though. > > Hopefully hald-addon-generic-kbd-backlight already responds to > KEY_KBDILLUM*. If so, then one could use Hal along with an FDI file > like the apple one > (<http://lists.freedesktop.org/archives/hal/2008-October/012360.html>). > That's close to what we should ultimately be aiming for, except for the > specific match on "smc::kbd_backlight". It would be great to just have > one rule matching on *::kbd_backlight. Maybe just *:kbd_backlight . The naming scheme is vendor:color:name The problem is that hald-addon-generic-kbd-backlight is not merged upstream. So, hal mailing list is now CC'ed Is there any plan to merge hald-addon-generic-kbd-backlight ? Patch can be found here: http://lists.freedesktop.org/archives/hal/2008-October/012361.html Thanks, -- Corentin Chary http://xf.iksaif.net - http://uffs.org ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Illuminated keyboard on ASUS U50VG laptop, backlight or led ? 2009-08-01 12:40 ` Corentin Chary @ 2009-08-01 13:21 ` Danny Kukawka 2009-08-01 15:50 ` Corentin Chary 0 siblings, 1 reply; 19+ messages in thread From: Danny Kukawka @ 2009-08-01 13:21 UTC (permalink / raw) To: hal Cc: Matthew Garrett, acpi4asus-user, linux acpi, Alan Jenkins, Corentin Chary, Henrik Rydberg On Samstag, 1. August 2009, Corentin Chary wrote: > Maybe just *:kbd_backlight . The naming scheme is vendor:color:name > The problem is that hald-addon-generic-kbd-backlight is not merged > upstream. > > So, hal mailing list is now CC'ed > Is there any plan to merge hald-addon-generic-kbd-backlight ? > Patch can be found here: > http://lists.freedesktop.org/archives/hal/2008-October/012361.html This patch is not needed. There is a generic addon for the leds subsystem in HAL. Check out: http://people.freedesktop.org/~dkukawka/hal-spec-git/hal-spec.html#interface-device-leds If there is any problem with this addon, let me know. Danny ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Illuminated keyboard on ASUS U50VG laptop, backlight or led ? 2009-08-01 13:21 ` Danny Kukawka @ 2009-08-01 15:50 ` Corentin Chary 2009-08-01 16:30 ` Alan Jenkins 0 siblings, 1 reply; 19+ messages in thread From: Corentin Chary @ 2009-08-01 15:50 UTC (permalink / raw) To: Danny Kukawka Cc: hal, Alan Jenkins, Matthew Garrett, acpi4asus-user, linux acpi On Sat, Aug 1, 2009 at 3:21 PM, Danny Kukawka<danny.kukawka@web.de> wrote: > On Samstag, 1. August 2009, Corentin Chary wrote: >> Maybe just *:kbd_backlight . The naming scheme is vendor:color:name >> The problem is that hald-addon-generic-kbd-backlight is not merged >> upstream. >> >> So, hal mailing list is now CC'ed >> Is there any plan to merge hald-addon-generic-kbd-backlight ? >> Patch can be found here: >> http://lists.freedesktop.org/archives/hal/2008-October/012361.html > > This patch is not needed. There is a generic addon for the leds subsystem in > HAL. > > Check out: > http://people.freedesktop.org/~dkukawka/hal-spec-git/hal-spec.html#interface-device-leds > > If there is any problem with this addon, let me know. > > Danny It seems there is also a KeyboardBacklight interface which is what we want, but I didn't find how to use it without an addon (like addon-macbookpro-backlight). Summary of the thread: Asus U50 provide a keyboard backlight, I didn't know how to expose that to userspace. Matthew told me that in Apples, the SMC driver expose the keyboard backlight as a led. Then Alan found hald-addon-generic-kbd-backlight to plug the led subsystem and org.freedesktop.Hal.Device.KeyboardBacklight interface. What we want to do is change the brightness when KEY_KBDILLUM* is pressed. I believe that we need a keyboard backlight addon that respond to KEY_KBDILLUM* and update the corresponding /sys/class/vendor:color:kbd_backlight. -- Corentin Chary http://xf.iksaif.net - http://uffs.org ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Illuminated keyboard on ASUS U50VG laptop, backlight or led ? 2009-08-01 15:50 ` Corentin Chary @ 2009-08-01 16:30 ` Alan Jenkins 2009-08-01 17:21 ` Danny Kukawka 0 siblings, 1 reply; 19+ messages in thread From: Alan Jenkins @ 2009-08-01 16:30 UTC (permalink / raw) To: Corentin Chary Cc: Danny Kukawka, hal, Matthew Garrett, acpi4asus-user, linux acpi On 8/1/09, Corentin Chary <corentin.chary@gmail.com> wrote: > On Sat, Aug 1, 2009 at 3:21 PM, Danny Kukawka<danny.kukawka@web.de> wrote: >> On Samstag, 1. August 2009, Corentin Chary wrote: >>> Maybe just *:kbd_backlight . The naming scheme is vendor:color:name >>> The problem is that hald-addon-generic-kbd-backlight is not merged >>> upstream. >>> >>> So, hal mailing list is now CC'ed >>> Is there any plan to merge hald-addon-generic-kbd-backlight ? >>> Patch can be found here: >>> http://lists.freedesktop.org/archives/hal/2008-October/012361.html >> >> This patch is not needed. There is a generic addon for the leds subsystem >> in >> HAL. >> >> Check out: >> http://people.freedesktop.org/~dkukawka/hal-spec-git/hal-spec.html#interface-device-leds >> >> If there is any problem with this addon, let me know. >> >> Danny > > It seems there is also a KeyboardBacklight interface which is what we > want, but I didn't find how to use it > without an addon (like addon-macbookpro-backlight). But if you look at the methods, they are exactly the same, right? I think the idea is to use an FDI file to match our LED device (or possibly create it as a hal device... I'm still really fuzzy on hal), and then mark it as having the "keyboard_backlight" capability. > Summary of the thread: > Asus U50 provide a keyboard backlight, I didn't know how to expose > that to userspace. > Matthew told me that in Apples, the SMC driver expose the keyboard > backlight as a led. > Then Alan found hald-addon-generic-kbd-backlight to plug the led subsystem > and > org.freedesktop.Hal.Device.KeyboardBacklight interface. > > What we want to do is change the brightness when KEY_KBDILLUM* is pressed. > > I believe that we need a keyboard backlight addon that respond to > KEY_KBDILLUM* > and update the corresponding /sys/class/vendor:color:kbd_backlight. Oops, thats not the addons job. It's for something like the gnome power manager. It looks like g-p-m already picks up the device with a "keyboard_backlight" capability, and react to keyboard brightness key events. Regards Alan ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Illuminated keyboard on ASUS U50VG laptop, backlight or led ? 2009-08-01 16:30 ` Alan Jenkins @ 2009-08-01 17:21 ` Danny Kukawka 2009-08-01 19:43 ` Alan Jenkins 0 siblings, 1 reply; 19+ messages in thread From: Danny Kukawka @ 2009-08-01 17:21 UTC (permalink / raw) To: hal Cc: Matthew Garrett, acpi4asus-user, Alan Jenkins, Corentin Chary, linux acpi On Samstag, 1. August 2009, Alan Jenkins wrote: > On 8/1/09, Corentin Chary <corentin.chary@gmail.com> wrote: [...] > > > > It seems there is also a KeyboardBacklight interface which is what we > > want, but I didn't find how to use it > > without an addon (like addon-macbookpro-backlight). > > But if you look at the methods, they are exactly the same, right? Yes, they are. > I > think the idea is to use an FDI file to match our LED device (or > possibly create it as a hal device... I'm still really fuzzy on hal), > and then mark it as having the "keyboard_backlight" capability. No, it wouldn't work this way. At least not with the current key. I changed the led addon in my repo to check if a led has leds.function=kbd_backlight and provide then the org.freedesktop.Hal.Device.KeyboardBacklight interface instead of org.freedesktop.Hal.Device.Leds. Please check if this helps. see: http://cgit.freedesktop.org/~dkukawka/hal/commit/?id=c900d0e5012b1dd0e0fa6e20fd0d92a59b3de093 [...] > > I believe that we need a keyboard backlight addon that respond to > > KEY_KBDILLUM* > > and update the corresponding /sys/class/vendor:color:kbd_backlight. > > Oops, thats not the addons job. It's for something like the gnome > power manager. It looks like g-p-m already picks up the device with a > "keyboard_backlight" capability, and react to keyboard brightness key > events. Correct. It's not the job of the addon to react on keyevents. This is up to a desktop application which listen to the events and call then the interface. The same way it work for e.g. the brightness of your laptop panel. Danny ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Illuminated keyboard on ASUS U50VG laptop, backlight or led ? 2009-08-01 17:21 ` Danny Kukawka @ 2009-08-01 19:43 ` Alan Jenkins 2009-08-01 19:47 ` Alan Jenkins 2009-08-02 7:20 ` Corentin Chary 0 siblings, 2 replies; 19+ messages in thread From: Alan Jenkins @ 2009-08-01 19:43 UTC (permalink / raw) To: Danny Kukawka Cc: hal, Corentin Chary, Matthew Garrett, acpi4asus-user, linux acpi On 8/1/09, Danny Kukawka <danny.kukawka@web.de> wrote: > On Samstag, 1. August 2009, Alan Jenkins wrote: >> I >> think the idea is to use an FDI file to match our LED device (or >> possibly create it as a hal device... I'm still really fuzzy on hal), >> and then mark it as having the "keyboard_backlight" capability. > > No, it wouldn't work this way. At least not with the current key. > > I changed the led addon in my repo to check if a led has > leds.function=kbd_backlight and provide then the > org.freedesktop.Hal.Device.KeyboardBacklight interface instead of > org.freedesktop.Hal.Device.Leds. Please check if this helps. > > see: > http://cgit.freedesktop.org/~dkukawka/hal/commit/?id=c900d0e5012b1dd0e0fa6e20fd0d92a59b3de093 > > [...] >> > I believe that we need a keyboard backlight addon that respond to >> > KEY_KBDILLUM* >> > and update the corresponding /sys/class/vendor:color:kbd_backlight. >> >> Oops, thats not the addons job. It's for something like the gnome >> power manager. It looks like g-p-m already picks up the device with a >> "keyboard_backlight" capability, and react to keyboard brightness key >> events. > > Correct. It's not the job of the addon to react on keyevents. This is up to > a > desktop application which listen to the events and call then the interface. > The same way it work for e.g. the brightness of your laptop panel. > > Danny Thanks! It's not my hardware, but I think I see an issue: Don't you also need to set "keyboard_backlight.num_levels"? According to Documentation/leds-class.txt, valid led values are 0-255, so I expect num_levels should be set to 256. Yuck... I think the backlight interface is better in that it exports the available granularity. But I guess all one really wants is "on" and "off", with finer adjustment being either automatic (light sensor) or buried as a config option. I assume info.capabilities=["keyboard_backlight"] gets set automatically on the KeyboardBacklight interface. Alan ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Illuminated keyboard on ASUS U50VG laptop, backlight or led ? 2009-08-01 19:43 ` Alan Jenkins @ 2009-08-01 19:47 ` Alan Jenkins 2009-08-02 7:20 ` Corentin Chary 1 sibling, 0 replies; 19+ messages in thread From: Alan Jenkins @ 2009-08-01 19:47 UTC (permalink / raw) To: Danny Kukawka Cc: hal, Corentin Chary, Matthew Garrett, acpi4asus-user, linux acpi On 8/1/09, Alan Jenkins <sourcejedi.lkml@googlemail.com> wrote: > On 8/1/09, Danny Kukawka <danny.kukawka@web.de> wrote: >> On Samstag, 1. August 2009, Alan Jenkins wrote: >>> I >>> think the idea is to use an FDI file to match our LED device (or >>> possibly create it as a hal device... I'm still really fuzzy on hal), >>> and then mark it as having the "keyboard_backlight" capability. >> >> No, it wouldn't work this way. At least not with the current key. >> >> I changed the led addon in my repo to check if a led has >> leds.function=kbd_backlight and provide then the >> org.freedesktop.Hal.Device.KeyboardBacklight interface instead of >> org.freedesktop.Hal.Device.Leds. Please check if this helps. >> >> see: >> http://cgit.freedesktop.org/~dkukawka/hal/commit/?id=c900d0e5012b1dd0e0fa6e20fd0d92a59b3de093 >> >> [...] >>> > I believe that we need a keyboard backlight addon that respond to >>> > KEY_KBDILLUM* >>> > and update the corresponding /sys/class/vendor:color:kbd_backlight. >>> >>> Oops, thats not the addons job. It's for something like the gnome >>> power manager. It looks like g-p-m already picks up the device with a >>> "keyboard_backlight" capability, and react to keyboard brightness key >>> events. >> >> Correct. It's not the job of the addon to react on keyevents. This is up >> to >> a >> desktop application which listen to the events and call then the >> interface. >> The same way it work for e.g. the brightness of your laptop panel. >> >> Danny > > Thanks! It's not my hardware, but I think I see an issue: > > Don't you also need to set "keyboard_backlight.num_levels"? According > to Documentation/leds-class.txt, valid led values are 0-255, so I > expect num_levels should be set to 256. > > Yuck... I think the backlight interface is better in that it exports > the available granularity. ^ Sorry, to avoid confusion I was moaning about the _kernel_ backlight interface. Apologies for being obscure. Thanks again Alan ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Illuminated keyboard on ASUS U50VG laptop, backlight or led ? 2009-08-01 19:43 ` Alan Jenkins 2009-08-01 19:47 ` Alan Jenkins @ 2009-08-02 7:20 ` Corentin Chary 2009-08-06 10:07 ` Corentin Chary 1 sibling, 1 reply; 19+ messages in thread From: Corentin Chary @ 2009-08-02 7:20 UTC (permalink / raw) To: Danny Kukawka Cc: Matthew Garrett, acpi4asus-user, Alan Jenkins, hal, linux acpi >> see: >> http://cgit.freedesktop.org/~dkukawka/hal/commit/?id=c900d0e5012b1dd0e0fa6e20fd0d92a59b3de093 It's not my hardware either, but I can try to create a fake kbd_keyboard led to test that. > Don't you also need to set "keyboard_backlight.num_levels"? According > to Documentation/leds-class.txt, valid led values are 0-255, so I > expect num_levels should be set to 256. Valid led values are between 0 and max_brightness (like for backlight I think). I think the led addon should set keyboard_backlight.num_levels to max_brightness (+1 ?). > Yuck... I think the backlight interface is better in that it exports > the available granularity. But I guess all one really wants is "on" > and "off", with finer adjustment being either automatic (light sensor) > or buried as a config option. On the Asus U50 there is 3 levels (+ off), and keys to change the brightness. And the user want to use all the backlight levels with the Fn+F3/F4 keys. -- Corentin Chary http://xf.iksaif.net - http://uffs.org ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Illuminated keyboard on ASUS U50VG laptop, backlight or led ? 2009-08-02 7:20 ` Corentin Chary @ 2009-08-06 10:07 ` Corentin Chary 2009-08-06 10:48 ` Danny Kukawka 0 siblings, 1 reply; 19+ messages in thread From: Corentin Chary @ 2009-08-06 10:07 UTC (permalink / raw) To: Danny Kukawka Cc: Matthew Garrett, acpi4asus-user, Alan Jenkins, hal, linux acpi On Sunday 02 August 2009 09:20:00 Corentin Chary wrote: > >> see: > >> http://cgit.freedesktop.org/~dkukawka/hal/commit/?id=c900d0e5012b1dd0e0f > >>a6e20fd0d92a59b3de093 > > It's not my hardware either, but I can try to create a fake > kbd_keyboard led to test that. > > > Don't you also need to set "keyboard_backlight.num_levels"? According > > to Documentation/leds-class.txt, valid led values are 0-255, so I > > expect num_levels should be set to 256. > > Valid led values are between 0 and max_brightness (like for backlight I > think). I think the led addon should set keyboard_backlight.num_levels to > max_brightness (+1 ?). > > > Yuck... I think the backlight interface is better in that it exports > > the available granularity. But I guess all one really wants is "on" > > and "off", with finer adjustment being either automatic (light sensor) > > or buried as a config option. > > On the Asus U50 there is 3 levels (+ off), and keys to change the > brightness. And the user want to use all the backlight levels with the > Fn+F3/F4 keys. Hi Danny, I was trying to add keyboard_backlight.num_levels support for your modified led-addon. But there is something I don't understand :- keyboard_backlight.num_levels is used in: - examples/light_sensors_and_keyboard_backlight.py - fdi/policy/10osvendor/10-macbookpro-utils.fdi - kde/solid/hal/halpower.cpp But it is not defined in doc/spec/hal-spec-properties.xml. Should I make another patch to fix hal-spec-properties ? Thanks, -- Corentin Chary http://xf.iksaif.net - http://uffs.org ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Illuminated keyboard on ASUS U50VG laptop, backlight or led ? 2009-08-06 10:07 ` Corentin Chary @ 2009-08-06 10:48 ` Danny Kukawka 2009-08-06 11:59 ` Corentin Chary 0 siblings, 1 reply; 19+ messages in thread From: Danny Kukawka @ 2009-08-06 10:48 UTC (permalink / raw) To: hal Cc: Corentin Chary, Matthew Garrett, acpi4asus-user, Alan Jenkins, linux acpi On Donnerstag, 6. August 2009, Corentin Chary wrote: > Hi Danny, > I was trying to add keyboard_backlight.num_levels support for your modified > led-addon. But there is something I don't understand :- > keyboard_backlight.num_levels is used in: > - examples/light_sensors_and_keyboard_backlight.py > - fdi/policy/10osvendor/10-macbookpro-utils.fdi > - kde/solid/hal/halpower.cpp > But it is not defined in doc/spec/hal-spec-properties.xml. > > Should I make another patch to fix hal-spec-properties ? Can you please provide a "grep . */*" from /sys/class/leds/ with the affected device? If I read the kernel doc for leds (which this device is), we don't need a num_levels for it: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/leds-class.txt;h=6399557cdab3d6542a0feea0c0cd2c6b2af5ffad;hb=HEAD "... The brightness file will set the brightness of the LED (taking a value 0-255). Most LEDs don't have hardware brightness support so will just be turned on for non-zero brightness settings. ..." Danny ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Illuminated keyboard on ASUS U50VG laptop, backlight or led ? 2009-08-06 10:48 ` Danny Kukawka @ 2009-08-06 11:59 ` Corentin Chary 2009-08-06 16:20 ` Danny Kukawka 0 siblings, 1 reply; 19+ messages in thread From: Corentin Chary @ 2009-08-06 11:59 UTC (permalink / raw) To: Danny Kukawka Cc: hal, Matthew Garrett, acpi4asus-user, Alan Jenkins, linux acpi On Thu, Aug 6, 2009 at 12:48 PM, Danny Kukawka<danny.kukawka@web.de> wrote: > On Donnerstag, 6. August 2009, Corentin Chary wrote: >> Hi Danny, >> I was trying to add keyboard_backlight.num_levels support for your modified >> led-addon. But there is something I don't understand :- >> keyboard_backlight.num_levels is used in: >> - examples/light_sensors_and_keyboard_backlight.py >> - fdi/policy/10osvendor/10-macbookpro-utils.fdi >> - kde/solid/hal/halpower.cpp >> But it is not defined in doc/spec/hal-spec-properties.xml. >> >> Should I make another patch to fix hal-spec-properties ? > > Can you please provide a "grep . */*" from /sys/class/leds/ with the affected > device? If I read the kernel doc for leds (which this device is), we don't > need a num_levels for it: > > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/leds-class.txt;h=6399557cdab3d6542a0feea0c0cd2c6b2af5ffad;hb=HEAD > > "... The brightness file will set the brightness of the LED (taking a value > 0-255). Most LEDs don't have hardware brightness support so will just be > turned on for non-zero brightness settings. ..." > The documentation is probably out of date, the led class provide a max_brightness file. 255 is the default value, but it can be overridden. See: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/leds/led-class.c;h=f2cc13d76810f457c752d6f92f53759980f465ea;hb=HEAD#l76 leds-dac124s085.c define it to 0xFFF for example. And asus-laptop will soon use 3 as max_brightness for asus::kbd_backlight. But still, it seems that examples/light_sensors_and_keyboard_backlight.py and others are using something that is not defined in hal-spec-properties. Thanks, -- Corentin Chary http://xf.iksaif.net - http://uffs.org ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Illuminated keyboard on ASUS U50VG laptop, backlight or led ? 2009-08-06 11:59 ` Corentin Chary @ 2009-08-06 16:20 ` Danny Kukawka 2009-08-06 17:00 ` Corentin Chary 2009-12-07 7:51 ` Corentin Chary 0 siblings, 2 replies; 19+ messages in thread From: Danny Kukawka @ 2009-08-06 16:20 UTC (permalink / raw) To: hal Cc: Corentin Chary, Matthew Garrett, acpi4asus-user, Alan Jenkins, linux acpi On Donnerstag, 6. August 2009, Corentin Chary wrote: > On Thu, Aug 6, 2009 at 12:48 PM, Danny Kukawka<danny.kukawka@web.de> wrote: [...] > > Can you please provide a "grep . */*" from /sys/class/leds/ with the > > affected device? If I read the kernel doc for leds (which this device > > is), we don't need a num_levels for it: > > > > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f > >=Documentation/leds-class.txt;h=6399557cdab3d6542a0feea0c0cd2c6b2af5ffad;h > >b=HEAD > > > > "... The brightness file will set the brightness of the LED (taking a > > value 0-255). Most LEDs don't have hardware brightness support so will > > just be turned on for non-zero brightness settings. ..." > > The documentation is probably out of date, the led class provide > a max_brightness file. 255 is the default value, but it can be overridden. > > See: > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=d >rivers/leds/led-class.c;h=f2cc13d76810f457c752d6f92f53759980f465ea;hb=HEAD#l >76 > > leds-dac124s085.c define it to 0xFFF for example. > And asus-laptop will soon use 3 as max_brightness for asus::kbd_backlight. > > But still, it seems that examples/light_sensors_and_keyboard_backlight.py > and others are using something that is not defined in hal-spec-properties. Thanks for the information. Please check out my latest commits: http://cgit.freedesktop.org/~dkukawka/hal/log/ I hope this finally solve the problem. Danny ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Illuminated keyboard on ASUS U50VG laptop, backlight or led ? 2009-08-06 16:20 ` Danny Kukawka @ 2009-08-06 17:00 ` Corentin Chary 2009-12-07 7:51 ` Corentin Chary 1 sibling, 0 replies; 19+ messages in thread From: Corentin Chary @ 2009-08-06 17:00 UTC (permalink / raw) To: Danny Kukawka Cc: Matthew Garrett, acpi4asus-user, Alan Jenkins, hal, linux acpi On Thu, Aug 6, 2009 at 6:20 PM, Danny Kukawka<danny.kukawka@web.de> wrote: > On Donnerstag, 6. August 2009, Corentin Chary wrote: >> On Thu, Aug 6, 2009 at 12:48 PM, Danny Kukawka<danny.kukawka@web.de> wrote: > [...] >> > Can you please provide a "grep . */*" from /sys/class/leds/ with the >> > affected device? If I read the kernel doc for leds (which this device >> > is), we don't need a num_levels for it: >> > >> > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f >> >=Documentation/leds-class.txt;h=6399557cdab3d6542a0feea0c0cd2c6b2af5ffad;h >> >b=HEAD >> > >> > "... The brightness file will set the brightness of the LED (taking a >> > value 0-255). Most LEDs don't have hardware brightness support so will >> > just be turned on for non-zero brightness settings. ..." >> >> The documentation is probably out of date, the led class provide >> a max_brightness file. 255 is the default value, but it can be overridden. >> >> See: >> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=d >>rivers/leds/led-class.c;h=f2cc13d76810f457c752d6f92f53759980f465ea;hb=HEAD#l >>76 >> >> leds-dac124s085.c define it to 0xFFF for example. >> And asus-laptop will soon use 3 as max_brightness for asus::kbd_backlight. >> >> But still, it seems that examples/light_sensors_and_keyboard_backlight.py >> and others are using something that is not defined in hal-spec-properties. > > Thanks for the information. Please check out my latest commits: > http://cgit.freedesktop.org/~dkukawka/hal/log/ > > I hope this finally solve the problem. It seems ok, I'll try it ASAP and report any problem. I'll also write Documentation/ABI/testing/sysfs-class-{led-backlight-lcd} and update Documentation/led-class.txt to avoid any confusion. Thanks, -- Corentin Chary http://xf.iksaif.net - http://uffs.org ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Illuminated keyboard on ASUS U50VG laptop, backlight or led ? 2009-08-06 16:20 ` Danny Kukawka 2009-08-06 17:00 ` Corentin Chary @ 2009-12-07 7:51 ` Corentin Chary 1 sibling, 0 replies; 19+ messages in thread From: Corentin Chary @ 2009-12-07 7:51 UTC (permalink / raw) To: Danny Kukawka Cc: Matthew Garrett, acpi4asus-user, Alan Jenkins, hal, linux acpi On Thu, Aug 6, 2009 at 5:20 PM, Danny Kukawka <danny.kukawka@web.de> wrote: > On Donnerstag, 6. August 2009, Corentin Chary wrote: >> On Thu, Aug 6, 2009 at 12:48 PM, Danny Kukawka<danny.kukawka@web.de> wrote: > [...] >> > Can you please provide a "grep . */*" from /sys/class/leds/ with the >> > affected device? If I read the kernel doc for leds (which this device >> > is), we don't need a num_levels for it: >> > >> > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f >> >=Documentation/leds-class.txt;h=6399557cdab3d6542a0feea0c0cd2c6b2af5ffad;h >> >b=HEAD >> > >> > "... The brightness file will set the brightness of the LED (taking a >> > value 0-255). Most LEDs don't have hardware brightness support so will >> > just be turned on for non-zero brightness settings. ..." >> >> The documentation is probably out of date, the led class provide >> a max_brightness file. 255 is the default value, but it can be overridden. >> >> See: >> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=d >>rivers/leds/led-class.c;h=f2cc13d76810f457c752d6f92f53759980f465ea;hb=HEAD#l >>76 >> >> leds-dac124s085.c define it to 0xFFF for example. >> And asus-laptop will soon use 3 as max_brightness for asus::kbd_backlight. >> >> But still, it seems that examples/light_sensors_and_keyboard_backlight.py >> and others are using something that is not defined in hal-spec-properties. > > Thanks for the information. Please check out my latest commits: > http://cgit.freedesktop.org/~dkukawka/hal/log/ > > I hope this finally solve the problem. > > Danny > > > Hi, Was this patch merged upstream ? Do we need to do something else for DeviceKit now that hal is deprecated ? Thanks -- Corentin Chary http://xf.iksaif.net ^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2009-12-07 7:51 UTC | newest] Thread overview: 19+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-07-24 7:34 Illuminated keyboard on ASUS U50VG laptop, backlight or led ? Corentin Chary 2009-07-28 19:51 ` Corentin Chary 2009-07-28 20:04 ` Matthew Garrett 2009-08-01 10:40 ` Corentin Chary 2009-08-01 11:19 ` Alan Jenkins 2009-08-01 12:40 ` Corentin Chary 2009-08-01 13:21 ` Danny Kukawka 2009-08-01 15:50 ` Corentin Chary 2009-08-01 16:30 ` Alan Jenkins 2009-08-01 17:21 ` Danny Kukawka 2009-08-01 19:43 ` Alan Jenkins 2009-08-01 19:47 ` Alan Jenkins 2009-08-02 7:20 ` Corentin Chary 2009-08-06 10:07 ` Corentin Chary 2009-08-06 10:48 ` Danny Kukawka 2009-08-06 11:59 ` Corentin Chary 2009-08-06 16:20 ` Danny Kukawka 2009-08-06 17:00 ` Corentin Chary 2009-12-07 7:51 ` Corentin Chary
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox