-
-
Notifications
You must be signed in to change notification settings - Fork 717
Milestone
Description
Checklist
- I have read the appropriate section in the contributing guidelines
- I believe this issue is a problem with polybar itself and not a misconfiguration on my part
- I have searched for other open and closed issues that may have already reported this problem
- I have checked the known issues page for this problem.
- I have followed the debugging guide to narrow down the problem to a minimal config.
Steps to reproduce
I am using the following configuration:
[module/brightness]
type = internal/backlight
card = amdgpu_bl0
format = <ramp> <label>
label = %percentage: 2%%
ramp-0 =
ramp-1 =
enable-scroll = true
However, the value displayed is one value late. This is easy to reproduce:
09:33 ❱ brightnessctl set 5%+ ; brightnessctl
Updated device 'amdgpu_bl0':
Device 'amdgpu_bl0' of class 'backlight':
Current brightness: 26 (10%)
Max brightness: 255
Device 'amdgpu_bl0' of class 'backlight':
Current brightness: 26 (10%)
Max brightness: 255
The value display stays to 5%. Adding a sleep 0.1
between the two commands "fix" the issue. So, I am wondering if polybar is not eating some inotify events? With inotifywait -m
, I am getting all the events:
/sys/class/backlight/amdgpu_bl0/brightness OPEN
/sys/class/backlight/amdgpu_bl0/brightness ACCESS
/sys/class/backlight/amdgpu_bl0/brightness CLOSE_NOWRITE,CLOSE
/sys/class/backlight/amdgpu_bl0/brightness OPEN
/sys/class/backlight/amdgpu_bl0/brightness ACCESS
/sys/class/backlight/amdgpu_bl0/brightness CLOSE_NOWRITE,CLOSE
/sys/class/backlight/amdgpu_bl0/brightness OPEN
/sys/class/backlight/amdgpu_bl0/brightness ACCESS
/sys/class/backlight/amdgpu_bl0/brightness CLOSE_NOWRITE,CLOSE
/sys/class/backlight/amdgpu_bl0/brightness OPEN
/sys/class/backlight/amdgpu_bl0/brightness ACCESS
/sys/class/backlight/amdgpu_bl0/brightness CLOSE_NOWRITE,CLOSE
/sys/class/backlight/amdgpu_bl0/brightness MODIFY
/sys/class/backlight/amdgpu_bl0/brightness OPEN
/sys/class/backlight/amdgpu_bl0/brightness MODIFY
/sys/class/backlight/amdgpu_bl0/brightness CLOSE_WRITE,CLOSE
/sys/class/backlight/amdgpu_bl0/brightness OPEN
/sys/class/backlight/amdgpu_bl0/brightness ACCESS
/sys/class/backlight/amdgpu_bl0/brightness CLOSE_NOWRITE,CLOSE
Minimal config
[module/brightness]
type = internal/backlight
card = amdgpu_bl0
format = <label>
label = %percentage: 2%%
Polybar log
No response
Expected behavior
The brightness should always be up-to-date.
Actual behavior
The brightness is one read late.
Window Manager and Version
i3-gaps 4.21
Linux Distribution
Debian unstable
Polybar version
polybar 3.6.3
Features: +alsa -curl +i3 -mpd +network(libnl) +pulseaudio +xkeyboard
X extensions: +randr (+monitors) +composite +xkb +xrm +xcursor
Build type: Release
Compiler: /nix/store/j061mvdxw70xz20r2r0lr5lk0rcsjf9i-gcc-wrapper-11.3.0/bin/g++
Compiler flags: -O3 -DNDEBUG -Wall -Wextra -Wpedantic -Wsuggest-override
Linker flags: -Wall -Wextra -Wpedantic -Wsuggest-override -Wall -Wextra -Wpedantic -Wsuggest-override
Additional Context / Screenshots
No response