Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1301041 > unrolled thread
| Started by | Pavel Machek <pavel@ucw.cz> |
|---|---|
| First post | 2016-01-04 21:20 +0100 |
| Last post | 2016-01-12 19:00 +0100 |
| Articles | 20 on this page of 25 — 7 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Pavel Machek <pavel@ucw.cz> - 2016-01-04 21:20 +0100
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Pali Rohár <pali.rohar@gmail.com> - 2016-01-04 21:30 +0100
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Pali Rohár <pali.rohar@gmail.com> - 2016-01-04 21:50 +0100
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Henrique de Moraes Holschuh <hmh@hmh.eng.br> - 2016-01-09 18:40 +0100
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Henrique de Moraes Holschuh <hmh@hmh.eng.br> - 2016-01-09 18:50 +0100
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Darren Hart <dvhart@infradead.org> - 2016-01-11 20:10 +0100
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Henrique de Moraes Holschuh <hmh@hmh.eng.br> - 2016-01-11 20:30 +0100
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Pali Rohár <pali.rohar@gmail.com> - 2016-01-11 21:10 +0100
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Johannes Stezenbach <js@sig21.net> - 2016-01-11 22:20 +0100
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Henrique de Moraes Holschuh <hmh@hmh.eng.br> - 2016-01-12 17:10 +0100
Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Add support for keyboard backlight Yves-Alexis Perez <corsac@debian.org> - 2016-01-12 17:30 +0100
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Johannes Stezenbach <js@sig21.net> - 2016-01-12 17:40 +0100
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Henrique de Moraes Holschuh <hmh@hmh.eng.br> - 2016-01-12 19:00 +0100
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Johannes Stezenbach <js@sig21.net> - 2016-01-12 23:10 +0100
Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Add support for keyboard backlight Kevin Locke <kevin@kevinlocke.name> - 2016-01-12 19:20 +0100
Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Add support for keyboard backlight Henrique de Moraes Holschuh <hmh@hmh.eng.br> - 2016-01-12 19:30 +0100
Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Add support for keyboard backlight Kevin Locke <kevin@kevinlocke.name> - 2016-01-12 19:40 +0100
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Henrique de Moraes Holschuh <hmh@hmh.eng.br> - 2016-01-12 17:10 +0100
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Pavel Machek <pavel@ucw.cz> - 2016-01-12 23:00 +0100
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Pali Rohár <pali.rohar@gmail.com> - 2016-01-13 10:00 +0100
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Pavel Machek <pavel@ucw.cz> - 2016-01-13 20:10 +0100
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Pavel Machek <pavel@ucw.cz> - 2016-01-13 20:20 +0100
Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Add support for keyboard backlight Yves-Alexis Perez <corsac@debian.org> - 2016-01-11 23:50 +0100
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Darren Hart <dvhart@infradead.org> - 2016-01-12 18:00 +0100
Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight Henrique de Moraes Holschuh <hmh@hmh.eng.br> - 2016-01-12 19:00 +0100
Page 1 of 2 [1] 2 Next page →
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2016-01-04 21:20 +0100 |
| Subject | Re: [PATCH] thinkpad_acpi: Add support for keyboard backlight |
| Message-ID | <qNjLK-8i4-41@gated-at.bofh.it> |
Hi1 > This patch adds support for controlling keyboard backlight via standard > linux led class interface (::kbd_backlight). It uses ACPI HKEY device with > MLCG and MLCS methods. > > Signed-off-by: Pali Rohár <pali.rohar@gmail.com> > Tested-by: Fabio D'Urso <fabiodurso@hotmail.it> On my thinkpad, keyboard light is controlled by /sys/class/leds/tpacpi\:\:thinklight/brightness (that's a bad name). On n900, it is .../leds/kb0..kb6. Now we'd have kbd_backlight. I guess we should standartize on one name for this light, so that userspace has the chance to handle it automatically... Also, neccessity of workqueues for LED setting is slowly being removed from the kernel, see LED mailing list for details. Thanks, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Pali Rohár <pali.rohar@gmail.com> |
|---|---|
| Date | 2016-01-04 21:30 +0100 |
| Message-ID | <qNjVo-8lm-1@gated-at.bofh.it> |
| In reply to | #1301041 |
[Multipart message — attachments visible in raw view] — view raw
On Monday 04 January 2016 21:12:31 Pavel Machek wrote: > Hi1 > > > This patch adds support for controlling keyboard backlight via > > standard linux led class interface (::kbd_backlight). It uses ACPI > > HKEY device with MLCG and MLCS methods. > > > > Signed-off-by: Pali Rohár <pali.rohar@gmail.com> > > Tested-by: Fabio D'Urso <fabiodurso@hotmail.it> > > On my thinkpad, keyboard light is controlled by > > /sys/class/leds/tpacpi\:\:thinklight/brightness > > (that's a bad name). Hi! That is light in upper case of bezel/display, right? Thinklight is probably official marketing name for that by IBM/Lenovo. My patch adds support for keyboard backlight (light under the keyboard). > On n900, it is .../leds/kb0..kb6. Now we'd have kbd_backlight. I > guess we should standartize on one name for this light, so that > userspace has the chance to handle it automatically... Looks like userspace already uses /sys/class/leds/*::kbd_backlight for keyboard backlight (light under the keyboard). At least other drivers uses this name and my KDE desktop recognized "dell::kbd_backlight" (from dell-laptop.ko) and "tpacpi::kbd_backlight" too. So really for keyboard backlight use *::kbd_backlight it is already handled by existing userspace applications. > Also, neccessity of workqueues for LED setting is slowly being > removed from the kernel, see LED mailing list for details. My patch uses kbd_backlight LED in same as as other LEDs in thinkpad acpi driver. -- Pali Rohár pali.rohar@gmail.com
[toc] | [prev] | [next] | [standalone]
| From | Pali Rohár <pali.rohar@gmail.com> |
|---|---|
| Date | 2016-01-04 21:50 +0100 |
| Message-ID | <qNkeK-8sV-7@gated-at.bofh.it> |
| In reply to | #1301048 |
[Multipart message — attachments visible in raw view] — view raw
On Monday 04 January 2016 21:23:52 Pali Rohár wrote:
> Looks like userspace already uses /sys/class/leds/*::kbd_backlight
> for keyboard backlight (light under the keyboard). At least other
> drivers uses this name and my KDE desktop recognized
> "dell::kbd_backlight" (from dell-laptop.ko) and
> "tpacpi::kbd_backlight" too.
>
> So really for keyboard backlight use *::kbd_backlight it is already
> handled by existing userspace applications.
upower is one of tool used on linux desktops. See this source code:
http://cgit.freedesktop.org/upower/tree/src/up-kbd-backlight.c
It has function up_kbd_backlight_find() which do:
/* find a led device that is a keyboard device */
while ((filename = g_dir_read_name (dir)) != NULL) {
if (g_strstr_len (filename, -1, "kbd_backlight") != NULL) {
dir_path = g_build_filename ("/sys/class/leds",
filename, NULL);
break;
}
}
--
Pali Rohár
pali.rohar@gmail.com
[toc] | [prev] | [next] | [standalone]
| From | Henrique de Moraes Holschuh <hmh@hmh.eng.br> |
|---|---|
| Date | 2016-01-09 18:40 +0100 |
| Message-ID | <qP5EC-k4-17@gated-at.bofh.it> |
| In reply to | #1301041 |
On Mon, Jan 4, 2016, at 18:12, Pavel Machek wrote: > > This patch adds support for controlling keyboard backlight via standard > > linux led class interface (::kbd_backlight). It uses ACPI HKEY device with > > MLCG and MLCS methods. > > > > Signed-off-by: Pali Rohár <pali.rohar@gmail.com> > > Tested-by: Fabio D'Urso <fabiodurso@hotmail.it> > > On my thinkpad, keyboard light is controlled by > > /sys/class/leds/tpacpi\:\:thinklight/brightness > > (that's a bad name). That's because the driver was not updated to support your laptop, AND I don't recall if someone mapped the full behavior of the ACPI thinklight interface in your thinkpad :-( -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
[toc] | [prev] | [next] | [standalone]
| From | Henrique de Moraes Holschuh <hmh@hmh.eng.br> |
|---|---|
| Date | 2016-01-09 18:50 +0100 |
| Message-ID | <qP5Oi-od-9@gated-at.bofh.it> |
| In reply to | #1305332 |
On Sat, Jan 9, 2016, at 15:39, Henrique de Moraes Holschuh wrote:
> On Mon, Jan 4, 2016, at 18:12, Pavel Machek wrote:
> > > This patch adds support for controlling keyboard backlight via standard
> > > linux led class interface (::kbd_backlight). It uses ACPI HKEY device with
> > > MLCG and MLCS methods.
> > >
> > > Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> > > Tested-by: Fabio D'Urso <fabiodurso@hotmail.it>
> >
> > On my thinkpad, keyboard light is controlled by
> >
> > /sys/class/leds/tpacpi\:\:thinklight/brightness
> >
> > (that's a bad name).
>
> That's because the driver was not updated to support your laptop, AND I
> don't recall if someone mapped the full behavior of the ACPI thinklight
> interface in your thinkpad :-(
Argh. If by "keyboard light" you mean the LED above the *screen* that
shines down on the whole keyboard, please disregard my previous reply...
As for the naming, the idea of a LED up there shining in the keyboard
is:
1. patented by IBM
2. named "ThinkLight" by IBM, one of the "Think Technologies" in the
"ThinkPad" (add TM after everything :p) and every
old-timer thinkpad user knew it by that name.
4. called "thinklight" by the driver since before the LED sysfs class
even existed :p
ibm-acpi, since then renamed thinkpad-acpi *predates* most generic
interfaces. Heck, it predates sysfs.
So, this is ABI set in stone. If there is a way to add an "alias" of
kbd_backlight that won't drive userspace crazy, we might do that though.
But it looks quite risky to me...
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
[toc] | [prev] | [next] | [standalone]
| From | Darren Hart <dvhart@infradead.org> |
|---|---|
| Date | 2016-01-11 20:10 +0100 |
| Message-ID | <qPQ0O-6AV-9@gated-at.bofh.it> |
| In reply to | #1305337 |
On Sat, Jan 09, 2016 at 03:46:41PM -0200, Henrique de Moraes Holschuh wrote: > On Sat, Jan 9, 2016, at 15:39, Henrique de Moraes Holschuh wrote: > > On Mon, Jan 4, 2016, at 18:12, Pavel Machek wrote: > > > > This patch adds support for controlling keyboard backlight via standard > > > > linux led class interface (::kbd_backlight). It uses ACPI HKEY device with > > > > MLCG and MLCS methods. > > > > > > > > Signed-off-by: Pali Rohár <pali.rohar@gmail.com> > > > > Tested-by: Fabio D'Urso <fabiodurso@hotmail.it> > > > > > > On my thinkpad, keyboard light is controlled by > > > > > > /sys/class/leds/tpacpi\:\:thinklight/brightness > > > > > > (that's a bad name). > > > > That's because the driver was not updated to support your laptop, AND I > > don't recall if someone mapped the full behavior of the ACPI thinklight > > interface in your thinkpad :-( > > Argh. If by "keyboard light" you mean the LED above the *screen* that > shines down on the whole keyboard, please disregard my previous reply... > > As for the naming, the idea of a LED up there shining in the keyboard > is: > 1. patented by IBM > 2. named "ThinkLight" by IBM, one of the "Think Technologies" in the > "ThinkPad" (add TM after everything :p) and every > old-timer thinkpad user knew it by that name. > 4. called "thinklight" by the driver since before the LED sysfs class > even existed :p > > ibm-acpi, since then renamed thinkpad-acpi *predates* most generic > interfaces. Heck, it predates sysfs. > > So, this is ABI set in stone. If there is a way to add an "alias" of > kbd_backlight that won't drive userspace crazy, we might do that though. > But it looks quite risky to me... Henrique, so are you taking back your Ack from 10 minutes prior? I've dropped this patch. Please let me know if I should pick it back up. -- Darren Hart Intel Open Source Technology Center
[toc] | [prev] | [next] | [standalone]
| From | Henrique de Moraes Holschuh <hmh@hmh.eng.br> |
|---|---|
| Date | 2016-01-11 20:30 +0100 |
| Message-ID | <qPQk9-6HH-1@gated-at.bofh.it> |
| In reply to | #1306604 |
On Mon, Jan 11, 2016, at 17:04, Darren Hart wrote: > On Sat, Jan 09, 2016 at 03:46:41PM -0200, Henrique de Moraes Holschuh > wrote: > > On Sat, Jan 9, 2016, at 15:39, Henrique de Moraes Holschuh wrote: > > > On Mon, Jan 4, 2016, at 18:12, Pavel Machek wrote: > > > > > This patch adds support for controlling keyboard backlight via standard > > > > > linux led class interface (::kbd_backlight). It uses ACPI HKEY device with > > > > > MLCG and MLCS methods. > > > > > > > > > > Signed-off-by: Pali Rohár <pali.rohar@gmail.com> > > > > > Tested-by: Fabio D'Urso <fabiodurso@hotmail.it> > > > > > > > > On my thinkpad, keyboard light is controlled by > > > > > > > > /sys/class/leds/tpacpi\:\:thinklight/brightness > > > > > > > > (that's a bad name). > > > > > > That's because the driver was not updated to support your laptop, AND I > > > don't recall if someone mapped the full behavior of the ACPI thinklight > > > interface in your thinkpad :-( > > > > Argh. If by "keyboard light" you mean the LED above the *screen* that > > shines down on the whole keyboard, please disregard my previous reply... > > > > As for the naming, the idea of a LED up there shining in the keyboard > > is: > > 1. patented by IBM > > 2. named "ThinkLight" by IBM, one of the "Think Technologies" in the > > "ThinkPad" (add TM after everything :p) and every > > old-timer thinkpad user knew it by that name. > > 4. called "thinklight" by the driver since before the LED sysfs class > > even existed :p > > > > ibm-acpi, since then renamed thinkpad-acpi *predates* most generic > > interfaces. Heck, it predates sysfs. > > > > So, this is ABI set in stone. If there is a way to add an "alias" of > > kbd_backlight that won't drive userspace crazy, we might do that though. > > But it looks quite risky to me... > > Henrique, so are you taking back your Ack from 10 minutes prior? Hmm? No, the ACK stands. Pavel was talking about another feature altogether, apparently: older thinkpads did not have "keyboard backlight" (as in light from below the keys). They had a "ThinkLight", which is an overhead light that shines down on the keyboard. The two features are not the same (and are handled differently by the firmware, for whatever reason), although they do serve the same purpose. I don't think a thinkpad will ever have both features at the same time, so I have no idea why they changed the firmware interface. The patch adds support to the "keyboard backlight" feature, which was previously NOT supported. > I've dropped this patch. Please let me know if I should pick it back up. Please pick it back up. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
[toc] | [prev] | [next] | [standalone]
| From | Pali Rohár <pali.rohar@gmail.com> |
|---|---|
| Date | 2016-01-11 21:10 +0100 |
| Message-ID | <qPQWT-7fk-19@gated-at.bofh.it> |
| In reply to | #1306615 |
[Multipart message — attachments visible in raw view] — view raw
On Monday 11 January 2016 20:28:00 Henrique de Moraes Holschuh wrote > The two features are not the same (and are handled differently by the > firmware, for whatever reason), although they do serve the same > purpose. I don't think a thinkpad will ever have both features at > the same time, so I have no idea why they changed the firmware > interface. Maybe we should decide if ::kbd_backlight LED suffix could be used also for other LED devices and not only for those which are physically under the keyboard. At least I understand "keyboard backlight" as light which is under the keyboard... And more important, I was told that ThinkPad x230 comes in variant with both ThinkLight (that LED upper the display) and keyboard backlight (under they keyboard). So I'm against merging ThinkLight and keyboard backlight to one sysfs path... -- Pali Rohár pali.rohar@gmail.com
[toc] | [prev] | [next] | [standalone]
| From | Johannes Stezenbach <js@sig21.net> |
|---|---|
| Date | 2016-01-11 22:20 +0100 |
| Message-ID | <qPS2D-7X2-23@gated-at.bofh.it> |
| In reply to | #1306642 |
On Mon, Jan 11, 2016 at 09:03:01PM +0100, Pali Rohár wrote: > On Monday 11 January 2016 20:28:00 Henrique de Moraes Holschuh wrote > > The two features are not the same (and are handled differently by the > > firmware, for whatever reason), although they do serve the same > > purpose. I don't think a thinkpad will ever have both features at > > the same time, so I have no idea why they changed the firmware > > interface. ... > And more important, I was told that ThinkPad x230 comes in variant with > both ThinkLight (that LED upper the display) and keyboard backlight > (under they keyboard). I can confirm this, my x230 has both. FWIW, BIOS hotkey Fn+Space cycles through off, dim backlight, full backlight and full thinklight. /sys/class/leds/tpacpi::thinklight/brightness can be read (showing either 0 or 255) but writes are ignored. Dito for /proc/acpi/ibm/light. Johannes
[toc] | [prev] | [next] | [standalone]
| From | Henrique de Moraes Holschuh <hmh@hmh.eng.br> |
|---|---|
| Date | 2016-01-12 17:10 +0100 |
| Message-ID | <qQ9Ga-3id-11@gated-at.bofh.it> |
| In reply to | #1306713 |
On Mon, Jan 11, 2016, at 19:12, Johannes Stezenbach wrote: > On Mon, Jan 11, 2016 at 09:03:01PM +0100, Pali Rohár wrote: > > On Monday 11 January 2016 20:28:00 Henrique de Moraes Holschuh wrote > > > The two features are not the same (and are handled differently by the > > > firmware, for whatever reason), although they do serve the same > > > purpose. I don't think a thinkpad will ever have both features at > > > the same time, so I have no idea why they changed the firmware > > > interface. > ... > > And more important, I was told that ThinkPad x230 comes in variant with > > both ThinkLight (that LED upper the display) and keyboard backlight > > (under they keyboard). > > I can confirm this, my x230 has both. FWIW, BIOS hotkey > Fn+Space cycles through off, dim backlight, full backlight > and full thinklight. /sys/class/leds/tpacpi::thinklight/brightness > can be read (showing either 0 or 255) but writes are ignored. > Dito for /proc/acpi/ibm/light. We likely need to integrate better (future work) the new backlight control with the thinklight control and the firmware interface in the x230. Is the ACPI AML for fn+space readable enough, or is it trapping directly into SMM? Because if it interacts with the traditional higher-level ACPI AML we already use to talk to the thinklight (and now to the backlight), it should be relatively easy to fix the driver to better support the x230. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
[toc] | [prev] | [next] | [standalone]
| From | Yves-Alexis Perez <corsac@debian.org> |
|---|---|
| Date | 2016-01-12 17:30 +0100 |
| Subject | Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Add support for keyboard backlight |
| Message-ID | <qQ9Zx-3q9-11@gated-at.bofh.it> |
| In reply to | #1307582 |
[Multipart message — attachments visible in raw view] — view raw
On mar., 2016-01-12 at 14:07 -0200, Henrique de Moraes Holschuh wrote: > We likely need to integrate better (future work) the new backlight > control with the thinklight control and the firmware interface in the > x230. Ok so I've just checked my work X230, and I was just wrong: no ThinkLight on it, although I really had the impression there /was/ a dual generation. Regards, -- Yves-Alexis
[toc] | [prev] | [next] | [standalone]
| From | Johannes Stezenbach <js@sig21.net> |
|---|---|
| Date | 2016-01-12 17:40 +0100 |
| Message-ID | <qQa9d-3tC-23@gated-at.bofh.it> |
| In reply to | #1307582 |
On Tue, Jan 12, 2016 at 02:07:10PM -0200, Henrique de Moraes Holschuh wrote: > On Mon, Jan 11, 2016, at 19:12, Johannes Stezenbach wrote: > > > > I can confirm this, my x230 has both. FWIW, BIOS hotkey > > Fn+Space cycles through off, dim backlight, full backlight > > and full thinklight. /sys/class/leds/tpacpi::thinklight/brightness > > can be read (showing either 0 or 255) but writes are ignored. > > Dito for /proc/acpi/ibm/light. > > We likely need to integrate better (future work) the new backlight > control with the thinklight control and the firmware interface in the > x230. > > Is the ACPI AML for fn+space readable enough, or is it trapping directly > into SMM? Because if it interacts with the traditional higher-level > ACPI AML we already use to talk to the thinklight (and now to the > backlight), it should be relatively easy to fix the driver to better > support the x230. I have no clue about ACPI, do you have some hints how to get the info you want? I found this: sudo acpidump > acpidata.dat acpixtract -sSSDT acpidata.dat acpixtract -sDSDT acpidata.dat iasl -d DSDT.dat SSDT*.dat ..and then look at the .dsl files that contain the AML assembler. But what to look out for? PS: failed to mention my x230 kernel was still 4.2.x in case it matters Thanks, Johannes
[toc] | [prev] | [next] | [standalone]
| From | Henrique de Moraes Holschuh <hmh@hmh.eng.br> |
|---|---|
| Date | 2016-01-12 19:00 +0100 |
| Message-ID | <qQboC-4jE-1@gated-at.bofh.it> |
| In reply to | #1307616 |
On Tue, Jan 12, 2016, at 14:35, Johannes Stezenbach wrote: > On Tue, Jan 12, 2016 at 02:07:10PM -0200, Henrique de Moraes Holschuh > wrote: > > Is the ACPI AML for fn+space readable enough, or is it trapping directly > > into SMM? Because if it interacts with the traditional higher-level > > ACPI AML we already use to talk to the thinklight (and now to the > > backlight), it should be relatively easy to fix the driver to better > > support the x230. > > I have no clue about ACPI, do you have some hints > how to get the info you want? I found this: > > sudo acpidump > acpidata.dat > acpixtract -sSSDT acpidata.dat > acpixtract -sDSDT acpidata.dat > iasl -d DSDT.dat SSDT*.dat > > ..and then look at the .dsl files that contain the AML assembler. > > But what to look out for? Well, you should familiarize yourself with ACPI AML a bit. Then, look for the ACPI methods that thinkpad-acpi (and the patch to add backlight support) calls, and try to work out how they work in your thinkpad. Typical thinkpad firmware behavior is to sometimes have a lower level implementation, a higher level ACPI API that the O.S. is supposed to call (and which will call into the lower level implementation, or to the work itself). We want to stick to the higher level API, as it is more stable. Use of lower-level APIs or direct EC access must be whitelist-restricted. > PS: failed to mention my x230 kernel was still 4.2.x in case it matters It doesn't. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
[toc] | [prev] | [next] | [standalone]
| From | Johannes Stezenbach <js@sig21.net> |
|---|---|
| Date | 2016-01-12 23:10 +0100 |
| Message-ID | <qQfiy-7aq-15@gated-at.bofh.it> |
| In reply to | #1307688 |
On Tue, Jan 12, 2016 at 03:56:07PM -0200, Henrique de Moraes Holschuh wrote:
> On Tue, Jan 12, 2016, at 14:35, Johannes Stezenbach wrote:
> > But what to look out for?
>
> Well, you should familiarize yourself with ACPI AML a bit. Then, look
> for the ACPI methods that thinkpad-acpi (and the patch to add backlight
> support) calls, and try to work out how they work in your thinkpad.
>
> Typical thinkpad firmware behavior is to sometimes have a lower level
> implementation, a higher level ACPI API that the O.S. is supposed to
> call (and which will call into the lower level implementation, or to the
> work itself).
>
> We want to stick to the higher level API, as it is more stable. Use of
> lower-level APIs or direct EC access must be whitelist-restricted.
So if I interpret this correctly it calls SMI BIOS on x230, too:
Method (MLCG, 1, NotSerialized)
{
Local0 = \KBLS (0x00, 0x00)
Return (Local0)
}
Method (MLCS, 1, NotSerialized)
{
Local0 = \KBLS (0x01, Arg0)
If (!(Local0 & 0x80000000))
{
If ((Arg0 & 0x00010000))
{
\_SB.PCI0.LPC.EC.HKEY.MHKQ (0x6001)
}
ElseIf (\_SB.PCI0.LPC.EC.HKEY.MHKK (0x00020000))
{
\_SB.PCI0.LPC.EC.HKEY.MHKQ (0x1012)
}
}
Return (Local0)
}
Method (KBLS, 2, NotSerialized)
{
Return (SMI (0x14, 0x09, Arg0, Arg1, 0x00))
}
FWIW, full dump is here:
https://linuxtv.org/~js/ahSheaw0eezahqu1aethohLae4MeiPhe/
Johannes
[toc] | [prev] | [next] | [standalone]
| From | Kevin Locke <kevin@kevinlocke.name> |
|---|---|
| Date | 2016-01-12 19:20 +0100 |
| Subject | Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Add support for keyboard backlight |
| Message-ID | <qQbHZ-4HB-27@gated-at.bofh.it> |
| In reply to | #1307582 |
On 01/12/2016 08:07 AM, Henrique de Moraes Holschuh wrote: > On Mon, Jan 11, 2016, at 19:12, Johannes Stezenbach wrote: >> I can confirm this, my x230 has both. FWIW, BIOS hotkey >> Fn+Space cycles through off, dim backlight, full backlight >> and full thinklight. /sys/class/leds/tpacpi::thinklight/brightness >> can be read (showing either 0 or 255) but writes are ignored. >> Dito for /proc/acpi/ibm/light. > > We likely need to integrate better (future work) the new backlight > control with the thinklight control and the firmware interface in the > x230. > > Is the ACPI AML for fn+space readable enough, or is it trapping directly > into SMM? Because if it interacts with the traditional higher-level > ACPI AML we already use to talk to the thinklight (and now to the > backlight), it should be relatively easy to fix the driver to better > support the x230. I looked through the DSDT and SSDT AML on the T430 (which also has both a keyboard backlight and ThinkLight) and couldn't deduce which method was being invoked for Fn+Space or an analog to MLCG/MLCS for the ThinkLight. However, that may be due to my inexperience interpreting AML. I'll keep looking/learning. I've posted the files online if anyone else has time/interest to take a look: https://kevinlocke.name/misc/t430-acpi/ Best regards, Kevin
[toc] | [prev] | [next] | [standalone]
| From | Henrique de Moraes Holschuh <hmh@hmh.eng.br> |
|---|---|
| Date | 2016-01-12 19:30 +0100 |
| Subject | Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Add support for keyboard backlight |
| Message-ID | <qQbRD-4Np-11@gated-at.bofh.it> |
| In reply to | #1307730 |
On Tue, Jan 12, 2016, at 16:11, Kevin Locke wrote: > I looked through the DSDT and SSDT AML on the T430 (which also has both > a keyboard backlight and ThinkLight) and couldn't deduce which method > was being invoked for Fn+Space or an analog to MLCG/MLCS for the > ThinkLight. However, that may be due to my inexperience interpreting > AML. I'll keep looking/learning. It calls directly into the SMBIOS :-( -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
[toc] | [prev] | [next] | [standalone]
| From | Kevin Locke <kevin@kevinlocke.name> |
|---|---|
| Date | 2016-01-12 19:40 +0100 |
| Subject | Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: Add support for keyboard backlight |
| Message-ID | <qQc1k-4Ra-9@gated-at.bofh.it> |
| In reply to | #1307732 |
On 01/12/2016 10:20 AM, Henrique de Moraes Holschuh wrote: > On Tue, Jan 12, 2016, at 16:11, Kevin Locke wrote: >> I looked through the DSDT and SSDT AML on the T430 (which also has both >> a keyboard backlight and ThinkLight) and couldn't deduce which method >> was being invoked for Fn+Space or an analog to MLCG/MLCS for the >> ThinkLight. However, that may be due to my inexperience interpreting >> AML. I'll keep looking/learning. > > It calls directly into the SMBIOS :-( Bummer! Thank you for taking the time to figure that out. Kevin
[toc] | [prev] | [next] | [standalone]
| From | Henrique de Moraes Holschuh <hmh@hmh.eng.br> |
|---|---|
| Date | 2016-01-12 17:10 +0100 |
| Message-ID | <qQ9Ga-3id-15@gated-at.bofh.it> |
| In reply to | #1306642 |
On Mon, Jan 11, 2016, at 18:03, Pali Rohár wrote: > On Monday 11 January 2016 20:28:00 Henrique de Moraes Holschuh wrote > > The two features are not the same (and are handled differently by the > > firmware, for whatever reason), although they do serve the same > > purpose. I don't think a thinkpad will ever have both features at > > the same time, so I have no idea why they changed the firmware > > interface. > > Maybe we should decide if ::kbd_backlight LED suffix could be used also > for other LED devices and not only for those which are physically under > the keyboard. Maybe, but that doesn't matter for thinkpad-acpi: the "thinklight" LED name is kernel-userspace ABI so frozen by years and years of use that it is not even funny. It cannot be changed. > At least I understand "keyboard backlight" as light which is under the > keyboard... So do I... > And more important, I was told that ThinkPad x230 comes in variant with > both ThinkLight (that LED upper the display) and keyboard backlight > (under they keyboard). Ok, so there is yet another damn good reason to keep both separate. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2016-01-12 23:00 +0100 |
| Message-ID | <qQf8T-6R1-21@gated-at.bofh.it> |
| In reply to | #1306642 |
Hi! On Mon 2016-01-11 21:03:01, Pali Rohár wrote: > On Monday 11 January 2016 20:28:00 Henrique de Moraes Holschuh wrote > > The two features are not the same (and are handled differently by the > > firmware, for whatever reason), although they do serve the same > > purpose. I don't think a thinkpad will ever have both features at > > the same time, so I have no idea why they changed the firmware > > interface. > > Maybe we should decide if ::kbd_backlight LED suffix could be used also > for other LED devices and not only for those which are physically under > the keyboard. Another problem is that N900 has _6_ backlight LEDs. Named lp5523::kb1..6. ... Which does means desktop software will probably not pick them up :-(. I guess we could have "/sys/class/kbd_light/brightness" that would control all of them with one write. Next question is.. apparently there are some keyboards that have per-key RGB backlight... but maybe we can just call that "weird enough" and ignore... Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [next] | [standalone]
| From | Pali Rohár <pali.rohar@gmail.com> |
|---|---|
| Date | 2016-01-13 10:00 +0100 |
| Message-ID | <qQprA-5DL-5@gated-at.bofh.it> |
| In reply to | #1307860 |
On Tuesday 12 January 2016 22:58:04 Pavel Machek wrote: > Hi! > > On Mon 2016-01-11 21:03:01, Pali Rohár wrote: > > On Monday 11 January 2016 20:28:00 Henrique de Moraes Holschuh wrote > > > The two features are not the same (and are handled differently by the > > > firmware, for whatever reason), although they do serve the same > > > purpose. I don't think a thinkpad will ever have both features at > > > the same time, so I have no idea why they changed the firmware > > > interface. > > > > Maybe we should decide if ::kbd_backlight LED suffix could be used also > > for other LED devices and not only for those which are physically under > > the keyboard. > > Another problem is that N900 has _6_ backlight LEDs. Named > lp5523::kb1..6. ... Which does means desktop software will probably > not pick them up :-(. > > I guess we could have "/sys/class/kbd_light/brightness" that would > control all of them with one write. Probably... But there is problem that lp5523 is not ordinary on/off light, it can be programmed to execute own "light" application. > Next question is.. apparently there are some keyboards that have > per-key RGB backlight... but maybe we can just call that "weird > enough" and ignore... First we need to defines stable kernel ABI for keyboard backlight. And I suggest to use existing convention used by upower/console-kit and other userspace apps... -- Pali Rohár pali.rohar@gmail.com
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | linux.kernel
csiph-web