Re: [PATCH] platform/x86: lg-laptop: Support for battery charge limit on newer models

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux