PCsuggest

  • Quick tip
  • SECURITY
  • NETWORKING
  • OpenWrt
  • HARDWARE

How to adjust Linux screen brightness on laptops and PC

Updated - December 30, 2019 by Arnab Satapathi

Screen brightness adjustment is one of the basic tasks on any computer, and often required. However adjusting screen brightness on Linux could be a bit problematic.

Specially on laptops, as there's no dedicated hardware switch directly connected to the display.

Almost on every laptop the brightness up and down keys are combined with another key as a key combination, generally the Fn key.

On some laptops it just works out of the box by default. But it may require some tweaking to get the screen brightness adjustment working.

Contents

  • Adjust Linux screen brightness
    • 1. Enable ACPI backlight keys
    • 2. Change brightness on Linux through sysfs
    • 3. Using Xrandr command to adjust Linux screen brightness
  • Conclusion

Adjust Linux screen brightness

Here we'll discus about few different method to control brightness the same. Each method usability is depending on the hardware platform you're using like a laptop or desktop.

There's many GUI tool like XFCE Power Manager, to adjust the brightness. But here we'll focus on the command line tools.

1. Enable ACPI backlight keys

If the laptop's default brightness adjustment keys are not working, then add a boot time linux kernel parameter and try again.

  1. First open up the /etc/default/grub file with your favorite text editor as root.
    sudo nano /etc/default/grub
  2. Find the line staring with GRUB_CMDLINE_LINUX_DEFAULT=, most probably there will be the word quiet also.
    add acpi entry to linux screen brightness
  3. Add a few words there, acpi_backlight=vendor all inside the double quote.
  4. Save and exit the text editor and then reboot the laptop.

The acpi_backlight kernel parameter options are not just limited to vendor, and it's guaranteed to work.

You might have to experiment with other options like native and none . After rebooting if the brightness adjustment hotkeys are working then you can set a laptop's brightness with the xbacklight command.

If it's not installed, then install it with apt, sudo apt-get install xbacklight , and then run the command like below.

amazon prime logo
Try AmazonPrime for free
Enjoy free shipping and One-Day delivery, cancel any time.
xbacklight -set 20              # set brightness to 20%

2. Change brightness on Linux through sysfs

If the brightness adjustment key's are not working even after adding the kernel parameters, then you could try to directly manipulate the sysfs interface.

The display backlight related sysfs parameters are under the /sys/class/backlight/ directory. And there might be more than one controller interface.

In my case it's intel_backlight and acpi_video0, however it's not possible to change brightness with the second interface, in mu case.

So, first you might want to get an overview, what's actually inside that directories, use the ls command.

ls /sys/class/backlight/intel_backlight/

As you might have guessed, all the options there are quite straight forward to understand.

The value inside the max_brightness file is the maximum brightness you can assign to the display, and it's not possible to change.

The brightness file actually controls the amount of backligh, you can change it like below.

root@host:~# echo 200 > /sys/class/backlight/intel_backlight/brightness

And of course you need root privilege to manipulate that file.

The same thing as also applicable for the acpi_video0 directory, you can adjust linux screen brightness from there, only if it's supported. An example below.

echo '3' > /sys/class/backlight/acpi_video0/brightness       # set brightness level 3

3. Using Xrandr command to adjust Linux screen brightness

If it's a desktop or an external monitor is connected to a laptop with a VGA or HDMI cable, then the above method's won't work.

Every external monitor has some kind of remote or dedicated switch to control the brightness, contrast, color saturation etc. etc.

But that might not be enough, to lower the brightness even below the monitor vendor's lowest level, you've to use the xrandr Linux command line tool.

Few examples in the below list.

  1. For the internal display of a laptop, which is connected via LVDS, use
    xrandr --output LVDS1 --brightness 0.8
  2. If the monitor is connected to a HDMI port then use
    xrandr --output HDMI1 --brightness 0.7
  3. If the monitor is connected to a VGA port, then
    xrandr --output VGA1 --brightness 0.8
  4. Or if it's a Display Port, use
    xrandr --output DP1 --brightness 0.6

Simply you could say the brightness value 0.8 means 80% of the full display brightness, or 0.6 means 60%.

It's basically monitor's gamma adjustment, don't use anything above 1, it will whiten the display.

And it doesn't actually reduce the amount of backlight, more like a transparent black shadow over the display. Still better than nothing, easy on eyes. Read more about the xrandr command here.

Conclusion

It's a short quick tip, hope yo're now a little more familiar with Linux screen brightness adjustment.

If you have any question, suggestion and other methods to suggest, please leave commands below.

Filed Under: linux basics

Your comments
  1. Marcos says

    February 22, 2023

    Amazing tips. Thank you very much!

    Reply
  2. shaho says

    February 11, 2021

    Thanks for sharing this, It is work for me as well.

    Reply
  3. Edir says

    December 16, 2020

    The grub option worked fine for my Lenovo Legion 5i (Nvidia RTX 2060). Thank You!!!

    Reply
  4. Sunjoko says

    March 22, 2020

    Thanks pal.
    It works for me, with a little bit tweaking.
    I am using Lenovo Thinkpad T430 and the command I inserted was

    xrandr --output LVDS-1 --brightness 0.6
    (it accepted LVDS-1, LVDS1 was ignored)

    Reply
  5. Tomas says

    October 28, 2019

    no working for mi on HP 745 G5 , AMD Radeon Vega 6 graphic card, Cpu AMD Ryzen 3 2300u, tried both method

    Reply
  6. Edward Drake says

    March 24, 2019

    xrandr --verbose gave me the output I needed to switch. Built in HP Touchsmart.
    xrandr --output LVDS-1 --brightness 0.8

    Reply
    • doug morton says

      November 15, 2020

      thank you E.D. I have a touchsmart and verbose gave me eDP-1.
      I was able to up the brightness to 1.5. Any higher and the screen washed out white. I tried 10 originally and couldn't see anything and had to up arrow and backspace the 10 to set to 1 so I could see again.

      Reply
  7. simple user says

    September 22, 2018

    thanks it's worked !

    Reply
  8. Amit Ghosh says

    September 15, 2018

    Hey thanks for the acpi backlight tip.
    I had to add those extra lines on ubuntu 18.04. Brightness control is finally working on my HP laptop.

    Reply
    • Arnab Satapathi says

      September 15, 2018

      You're most welcome Amit.

      Reply

Leave a Reply Cancel 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.

Copyright © PCsuggest.com · All rights reserved.

  • Home
  • About
  • Contact
  • Privacy Policy
  • Sitemap