I'm facing this issue on ubuntu 20.10 with i3 window manager: in i3 I found this workaround to change the screen brightness with a little .sh script:
#!/bin/bash echo -n "Enter brightness: " read brightness echo "$brightness" > /sys/class/backlight/intel_backlight/brightness
The problem is that it requires sudo, and it doesen't fix changing the sudoers.d file or with sudo visudo, so the only way to avoid using sudo every time is by giving this command:
sudo chown username:username /sys/class/backlight/intel_backlight/brightness
and then it works fine without sudo. But every time i boot my system the brightness file's ownership goes back to root. Is there a way I can allways maintain this change?
I tried other solutions for controlling brightness in i3, such as xbacklight or light, but the first doesen't work at all, while with light i have the same sudo problem.