From: Hans de Goede <hdegoede@redhat.com>
To: "Barnabás Pőcze" <pobrn@protonmail.com>,
"Matan Ziv-Av" <matan@svgalib.org>
Cc: Platform Driver <platform-driver-x86@vger.kernel.org>
Subject: Re: [PATCH] platform/x86: lg-laptop: Support for battery charge limit on newer models
Date: Wed, 18 Aug 2021 17:30:21 +0200 [thread overview]
Message-ID: <c82478f9-980a-c49d-9975-d977fe63c44d@redhat.com> (raw)
In-Reply-To: <JC7il3WRp7mOUsysl5Ovyvp8xpmqQJ_HpkO0DSIRoJUi7yN3MLcAfsl-5I10D2X1O4kc9foQKsIFuUuMIk8RuwoOmqgKEU_TpzjDc82wQoY=@protonmail.com>
Hi,
On 8/18/21 5:01 PM, Barnabás Pőcze wrote:
> Hi
>
>
> 2021. augusztus 18., szerda 15:36 keltezéssel, Matan Ziv-Av írta:
>> [...]
>>> If this hotkey changes the kbd-backlight level "in hardware"
>>> then it should not send a key-press instead you should specify
>>>
>>> led_classdev.flags = LED_BRIGHT_HW_CHANGED
>>>
>>> For the kbd-backlight led_classdev and then call:
>>>
>>> led_classdev_notify_brightness_hw_changed(&kbd_backlight, new_backlight_level);
>>>
>>> When receiving the event. upower will pick the event send by this up
>>> and then notify interested parties such as e.g. gnome-settings-daemon
>>> which will then show a nice OSD with the new backlight level similar
>>> to how it is done for e.g. volume controls.
>>>
>>>
>>> If you can also send patches to change these 2 things, so that lg-laptop
>>> conforms with the standard userspace APIs used for this that would be great.
>>
>> I sent patches for this (in a separate thread). But in my testing, this
>> does not happen automatically and I did not find yet how to configure
>> udev/upower/kde to display this notification.
>>
>
> You can check the events by running something like:
>
> dbus-monitor --system "type='signal',interface='org.freedesktop.UPower.KbdBacklight',member='BrightnessChanged'"
Right, one important remark though, for some reason when the brightness_hw_changed
API was added to the LED subsystem it was decided to make this a Kconfig
option, so in order for this to work you must also make sure to have:
CONFIG_LEDS_BRIGHTNESS_HW_CHANGED=y
in your .config .
Regards,
Hans
next prev parent reply other threads:[~2021-08-18 15:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-13 22:11 [PATCH] platform/x86: lg-laptop: Support for battery charge limit on newer models Matan Ziv-Av
2021-08-18 7:33 ` Hans de Goede
2021-08-18 13:36 ` Matan Ziv-Av
2021-08-18 15:01 ` Barnabás Pőcze
2021-08-18 15:30 ` Hans de Goede [this message]
2021-08-18 15:31 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c82478f9-980a-c49d-9975-d977fe63c44d@redhat.com \
--to=hdegoede@redhat.com \
--cc=matan@svgalib.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=pobrn@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).