I increase and reduce the LCD brightness on the command line as described here1:
xrandr --output HDMI-0 --brightness 0.2
My problem is that my brightness setting is automatically reset after a few seconds.
My workaround is a small Autokey (Python) script (gist) that permanently sets my setting.
How can it be done better without this little unnecessary extra CPU load?
Operating System: Kubuntu 20.04
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Kernel Version: 5.4.0-52-generic
OS Type: 64-bit
1: By the way: There is a question with the same name, but it describes a slightly different problem. Is there a way to permanently set the brightness level
That must be due to Redshift/Night Color. Use the command
sudo apt remove redshift
to uninstall redshift. In case Night Color is enabled, disable it in system settings.If you are using a laptop, you can control brightness with the function keys, there's no need to use
xrandr
.If you are using a desktop, you can use Brightness Controller, which is a GUI tool to control brightness, and it can also change the color temperature (it uses
xrandr
in the backend)(disclaimer - I am one of the developers of this software)
You will have to disable Night Color to use Brightness Controller (note that it does not work with Wayland).
This is a long-known open (Nov2020) bug with redshift (bug open since 2015). Described here githubredshift issues 175 and something similar here how-to-use-xrandr-gamma-for-gnome-night-light-like-usage.
Some Workarounds (not yet completely substitute solutions):
most of they does not change automatically depending on day time and recommends detestation of redshift
WinEunuuchs2Unix writes a collection of bash scripts to adjust brightness and gamma gradually at dawn and dusk
Simple AutoKey Script which runs every second (so RedShift does not have to be uninstalled).: gist
brightness-controller https://askubuntu.com/a/1290035/1017209