From: "Barnabás Pőcze" <pobrn@protonmail.com>
To: Matan Ziv-Av <matan@svgalib.org>
Cc: Hans de Goede <hdegoede@redhat.com>,
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 15:01:02 +0000 [thread overview]
Message-ID: <JC7il3WRp7mOUsysl5Ovyvp8xpmqQJ_HpkO0DSIRoJUi7yN3MLcAfsl-5I10D2X1O4kc9foQKsIFuUuMIk8RuwoOmqgKEU_TpzjDc82wQoY=@protonmail.com> (raw)
In-Reply-To: <d8f5fb50-68d5-b331-3a56-e638e423d269@svgalib.org>
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'"
The gnome-settings-daemon watches these signals and instructs the GNOME shell to display
an OSD about the new keyboard brightness. Well, at least on my machine. A quick search in
the repository[1] suggests that KDE's PowerDevil is also listening for these signals.
I am not sure now, but I seem to recall that UPower needed to be restarted to see a LED
that appeared after it was started when I was testing these LED brightness change notifications.
[1]: https://invent.kde.org/plasma/powerdevil
Best regards,
Barnabás Pőcze
next prev parent reply other threads:[~2021-08-18 15:01 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 [this message]
2021-08-18 15:30 ` Hans de Goede
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='JC7il3WRp7mOUsysl5Ovyvp8xpmqQJ_HpkO0DSIRoJUi7yN3MLcAfsl-5I10D2X1O4kc9foQKsIFuUuMIk8RuwoOmqgKEU_TpzjDc82wQoY=@protonmail.com' \
--to=pobrn@protonmail.com \
--cc=hdegoede@redhat.com \
--cc=matan@svgalib.org \
--cc=platform-driver-x86@vger.kernel.org \
/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).