HowTo Adjust The Display Brightness On A Laptop In Console Mode Using The Command Line
Overview
This page demonstrates how one can adjust the display brightness on a laptop computer running NST using the command line. It may be desirable to completely set the brightness value to the lowest possible setting to increase the time that an NST server is running on battery power.
Adjust The Display Brightness Using the Command Line
This brightness display settings can be found in the sysfs pseudo file system provided by the Linux kernel within the following directory:
[root@nst34-mbp ~]# ls -al /sys/class/backlight/intel_backlight/ 0 drwxr-xr-x 3 root root 0 Sep 20 10:42 . drwxr-xr-x 6 root root 0 Sep 20 10:42 .. -r--r--r-- 1 root root 4096 Sep 20 15:00 actual_brightness -rw-r--r-- 1 root root 4096 Sep 20 15:00 bl_power -rw-r--r-- 1 root root 4096 Sep 20 10:45 brightness lrwxrwxrwx 1 root root 0 Sep 20 15:00 device -> ../../card0-eDP-1 -r--r--r-- 1 root root 4096 Sep 20 10:42 max_brightness drwxr-xr-x 2 root root 0 Sep 20 15:00 power -r--r--r-- 1 root root 4096 Sep 20 15:00 scale lrwxrwxrwx 1 root root 0 Sep 20 10:42 subsystem -> ../../../../../../../class/backlight -r--r--r-- 1 root root 4096 Sep 20 10:42 type -rw-r--r-- 1 root root 4096 Sep 20 10:42 uevent [root@nst34-mbp ~]#
The maximum brightness value for your laptop can be found here. The value shown below is for an Apple MacBook Pro model: A1502, EMC 2835. The root user or using sudo for a non-root user is required to make adjustments.
[root@nst34-mbp ~]# cat /sys/class/backlight/intel_backlight/max_brightness 1388 [root@nst34-mbp ~]#
Set the display brightness to 100% (I.e., Maximum brightness).
[root@nst34-mbp ~]# echo 1388 > /sys/class/backlight/intel_backlight/brightness [root@nst34-mbp ~]# cat /sys/class/backlight/intel_backlight/brightness 1388 [root@nst34-mbp ~]#
Set the display brightness to 0% (I.e., Display off).
[root@nst34-mbp ~]# echo 0 > /sys/class/backlight/intel_backlight/brightness [root@nst34-mbp ~]# cat /sys/class/backlight/intel_backlight/brightness 0 [root@nst34-mbp ~]#
Set the display brightness to 7% (I.e., A dim console display setting).
[root@nst34-mbp ~]# echo 100 > /sys/class/backlight/intel_backlight/brightness [root@nst34-mbp ~]# cat /sys/class/backlight/intel_backlight/brightness 100 [root@nst34-mbp ~]#