How to make xrandr modifications persist for more than 1 second

brightnessmulti-monitorxrandr

Updates:


My external screen is too bright, even on the lowest brightness setting. Too dampen the brightness, I am trying to use xrandr --output HDMI2 --brightness 0.5 as detailed in this post How do dim screen, even if artifically, below the minimum?.

However, while this command does lower the brightness, the screen switches back to the brighter level in an instant. Basically, the screen blinks once in a darker brightness. I tried with my primary laptop screen, xrandr --output eDP1 --brightness 0.5, with the same outcome. I also tried changing the gamma, xrandr --output eDP1 --gamma 1.0:1.0:0.5, again with the same transient result, this time a one second flash in a yellow tint.

How can I make xrandr modifications persist until I specifically change it? If it persists through reboot or not isn't a big deal.

My xrandr is version 1.5.0 and I am on Antergos Linux (an Arch derivative) with Gnome 3.20.2 and kernel 4.6.2-1.

Best Answer

What you want, is to set the backlight to your desired value. Since you are on Gnome 3, you might want to change it in Gnome.

gdbus call --session --dest org.gnome.SettingsDaemon.Power --object-path /org/gnome/SettingsDaemon/Power --method org.freedesktop.DBus.Properties.Set org.gnome.SettingsDaemon.Power.Screen Brightness "50"

If that does not work, the ArchWiki has many alternatives, including ACPI and kernel parameters ...

Select your monitors in the following:

# ls /sys/class/backlight/

inspect the maximum brightness:

# cat /sys/class/backlight/<device>/max_brightness

Then you set it to your desired value:

# echo 5 > /sys/class/backlight/acpi_video0/brightness

Source (ArchWiki): https://wiki.archlinux.org/index.php/backlight

DISCLAIMER: I do not run Gnome 3, so cannot test this.

Related Question