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,

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




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

  Powered by Linux