mirror of https://github.com/polybar/polybar.git
backlight: Remove actual_brightness amdgpu check (#2839)
The issue has been fixed in the linux kernel version 5.9 and above so we
are removing our workaround for this from polybar.
Users with older versions can still work around this by explicitly
setting `use-actual-brightness` to false, it is just not done by default
anymore.
Closes #2835
Ref https://bugzilla.kernel.org/show_bug.cgi?id=203905
Ref 69d9f4278d
This commit is contained in:
parent
303015244e
commit
e9713185cb
|
@ -30,7 +30,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- `internal/fs`: Use `/` as a fallback if no mountpoints are specified ([`#2572`](https://github.com/polybar/polybar/issues/2572), [`#2705`](https://github.com/polybar/polybar/pull/2705))
|
- `internal/fs`: Use `/` as a fallback if no mountpoints are specified ([`#2572`](https://github.com/polybar/polybar/issues/2572), [`#2705`](https://github.com/polybar/polybar/pull/2705))
|
||||||
- `internal/backlight`: Detect backlight if none specified ([`#2572`](https://github.com/polybar/polybar/issues/2572), [`#2728`](https://github.com/polybar/polybar/pull/2728))
|
- `internal/backlight`:
|
||||||
|
- Detect backlight if none specified ([`#2572`](https://github.com/polybar/polybar/issues/2572), [`#2728`](https://github.com/polybar/polybar/pull/2728))
|
||||||
|
- `use-actual-brightness` defaults to `true` for `amdgpu` backlights ([`#2835`](https://github.com/polybar/polybar/issues/2835), [`2839`](https://github.com/polybar/polybar/pull/2839))
|
||||||
- Providing a negative min-width to a token adds right-padding ([`#2789`](https://github.com/polybar/polybar/issues/2789), [`#2801`](https://github.com/polybar/polybar/pull/2801)) by [@VanillaViking](https://github.com/VanillaViking).
|
- Providing a negative min-width to a token adds right-padding ([`#2789`](https://github.com/polybar/polybar/issues/2789), [`#2801`](https://github.com/polybar/polybar/pull/2801)) by [@VanillaViking](https://github.com/VanillaViking).
|
||||||
- Changed fuzzy match option on i3 and bspwm modules to find longest match instead of the first match ([`#2831`](https://github.com/polybar/polybar/pull/2831), [`#2829`](https://github.com/polybar/polybar/issues/2829)) by [@Ron0Studios](https://github.com/ron0studios/).
|
- Changed fuzzy match option on i3 and bspwm modules to find longest match instead of the first match ([`#2831`](https://github.com/polybar/polybar/pull/2831), [`#2829`](https://github.com/polybar/polybar/issues/2829)) by [@Ron0Studios](https://github.com/ron0studios/).
|
||||||
|
|
||||||
|
|
|
@ -70,13 +70,7 @@ namespace modules {
|
||||||
// Build path to the sysfs folder the current/maximum brightness values are located
|
// Build path to the sysfs folder the current/maximum brightness values are located
|
||||||
m_path_backlight = string_util::replace(PATH_BACKLIGHT, "%card%", card);
|
m_path_backlight = string_util::replace(PATH_BACKLIGHT, "%card%", card);
|
||||||
|
|
||||||
/*
|
m_use_actual_brightness = m_conf.get(name(), "use-actual-brightness", m_use_actual_brightness);
|
||||||
* amdgpu drivers set the actual_brightness in a different scale than [0, max_brightness]
|
|
||||||
* The only sensible way is to use the 'brightness' file instead
|
|
||||||
* Ref: https://github.com/Alexays/Waybar/issues/335
|
|
||||||
*/
|
|
||||||
bool card_is_amdgpu = (card.substr(0, 9) == "amdgpu_bl");
|
|
||||||
m_use_actual_brightness = m_conf.get(name(), "use-actual-brightness", !card_is_amdgpu);
|
|
||||||
|
|
||||||
std::string brightness_type = (m_use_actual_brightness ? "actual_brightness" : "brightness");
|
std::string brightness_type = (m_use_actual_brightness ? "actual_brightness" : "brightness");
|
||||||
auto path_backlight_val = m_path_backlight + "/" + brightness_type;
|
auto path_backlight_val = m_path_backlight + "/" + brightness_type;
|
||||||
|
|
Loading…
Reference in New Issue