2

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

SL5net
  • 628
  • 9
  • 22
  • xrandr won't work with Wayland (let alone it doesn't work with some graphics drivers), thus is not the ideal way for a modern Kubuntu system (it has been sunsetted by KDE). Sorry I use Lubuntu so can provide the lxqt commands but not appropriate KDE commands. – guiverc Nov 06 '20 at 06:52

2 Answers2

2

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)

sudo add-apt-repository ppa:apandada1/brightness-controller
sudo apt update
sudo apt install brightness-controller

image

(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).

Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212
  • Since the problem is no longer there, at the moment, at almost 8 a.m., I suspect that you are right. I'll test this out tonight. – SL5net Nov 06 '20 at 06:57
  • Yes, I had "Night Color" activated so that I (my eyes) get tired in the evening and I don't work too long. It is described in the "Night Color" GUI as: "makes the colors on the screen warmer to reduce eye strain" (imgur). – SL5net Nov 06 '20 at 07:09
  • @SL5net Check my edited answer. You can disable night color and use an alternative software which can control both brightness and color of the screen – Archisman Panigrahi Nov 06 '20 at 07:54
  • Found this is a long-known open issue with redshift open since 2015. Workarounds for this already exist, but you have to make the settings yourself during the day. they does not change automatically (depending on time / latitude/longitude ) – SL5net Nov 06 '20 at 08:24
0

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

SL5net
  • 628
  • 9
  • 22