How To Adjust Monitor Brightness From Command Line In Linux

10 Responses

  1. 01101001b says:

    This is EXACTLY what I was searching for. Thank you so much!

  2. kumar says:

    It works. Thank you.

  3. Sturge says:

    There’s a simpler way: xgamma -gamma 1.0
    1.0 is the default value. Use 2.0 to double the brightness, 0.5 to halve it, etc.

  4. Agathe says:

    try xbacklight

  5. Stef says:

    As far as I know, gamma and brightness are two different things. See here for a detailed comparison Conceptually, the gamma is more like the ‘contrast’ than that ‘brigthness’. That does not mean that xgamma is useless but using it to control the brightness of the screen is probably a bad idea.

  6. Stef says:

    The problem with xrand is that it probably does not work when using a Wayland based desktop. This is because xrandr relies on X11 protocols that are only supported read-only in XWayland (the X11 emulation layer of Wayland). That makes sense since XWayland is not in charge of the whole screen when using a Wayland desktop.
    For my Sway desktop, I am currently using with the commands
    brightnessctl 10%+ # increase brightness by 10%
    brightnessctl 10%- # decrease brightness by 10%
    That tool is not specific to Wayland. It talks directly to the backlight device exposed by the Linux kernel in /sys/class/backlight

  7. Stef says:

    Another thing that people should be aware of is that the expected behavior is that the minimum brightness value should not very dark but still visible. Unfortunately, for some graphic cards (e.g. Intel) the minimum value of 0 produces a completely black screen which can be quite annoying. I could not find a proper solution to that problem so a few months ago, I wrote a small daemon script that monitors the value reported by the backlight device are reset it to 1 when it falls to 0 (must be run a root)

    if [ -f $B ] ; then
    inotifywait -q -e close_write -m $B | while read -r filename event; do
    V=$(cat $B)
    if [ “$V” -eq 0 ] ; then
    echo 1 > $B

    You may have to change /sys/class/backlight/intel_backlight/brightness to whatever blacklight device you are currently using.

    And of course, the script must be started at boot. For systemd user, see the example in

  8. Marllon says:

    Thank you so much!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.