Write brightness to all raw devices
On some laptops, there are multiple enabled raw backlight devices, and backlighthelper can't choose right device. For example: NVIDIA Optimus laptop, Lenovo 15ARH05. It has two GPUs: AMD and NVIDIA, both of them provide their backlight device, both backlight devices are raw type and enabled(in case prime is used). Backlighthelper without this fix selects NVIDIA device for backlight, but on this laptop brightness is controlled by AMD gpu, so user can't control brightness. This fix implements additional list for all raw devices. This list is loaded on initUsingBacklightType. List contains pairs of sysfs path and max brightness of device. When brightness is changed, backlighthelper goes through entries starting from second(first device is written by data from m_dirname) and writes brightness with correcting difference between max_brightness in different devices. For all other cases(read brightness and other) first raw device is used. BUG: 399646 FIXED-IN: 5.25
parent
7586da3a
Loading
Loading
Pipeline
#154206
passed
with stage
in
1 minute and 11 seconds
Loading
-
mentioned in merge request !81 (merged)
-
mentioned in issue #19 (closed)
-
mentioned in merge request !181 (closed)
Please register or sign in to comment