diff --git a/CHANGELOG.md b/CHANGELOG.md index b3f47974..13701c47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,7 +30,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### 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/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). - 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/). diff --git a/src/modules/backlight.cpp b/src/modules/backlight.cpp index 4e4c47da..abdcd8e4 100644 --- a/src/modules/backlight.cpp +++ b/src/modules/backlight.cpp @@ -70,13 +70,7 @@ namespace modules { // Build path to the sysfs folder the current/maximum brightness values are located m_path_backlight = string_util::replace(PATH_BACKLIGHT, "%card%", card); - /* - * 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); + m_use_actual_brightness = m_conf.get(name(), "use-actual-brightness", m_use_actual_brightness); std::string brightness_type = (m_use_actual_brightness ? "actual_brightness" : "brightness"); auto path_backlight_val = m_path_backlight + "/" + brightness_type;