Manually changing brightness
Remember that on Linux/Unix everything is a file. Brightness value is also stored in a file. Open a command line ( aka Terminal) by pressing Ctrl+Alt+T, or by searching 'terminal' application in the dash. Then execute these commands:cd /sys/class/backlight/
. cd is basically used for navigating through directories. And under backlight for me there is folder acpi_video0, but for you it may be different. Use ls
command to find out what folder name it is. cd to that folder as well. So for example, I would do as show in picture
OK, so by now you have navigated to the folder which contains your brightness settings. Inside there is brightness
file and max_brightness
file.
cat max_brightness
will tell you the maximum brightness that you can set on the screen. brightness is the actual file that controls brightness. You can change it from 0 to whatever number is in max_brightness.
See the number 7 after I did cat max_brightness
? This is my maximum brightness value, so it means i can change brightness from 0 to 7.
Now we can edit brightness file to actually change screen brightness. We will need some text editor command. I prefer using command line text editor nano. So I would do
sudo nano brightness
It will ask you for your password. Enter it, and you will see a screen something like this:
Do you see where is my cursor? right after the number. That's what i mean when i said, don't hit enter. This file has to have only that one line, no other. You can use left/right keys to move cursor, and backspace or del keys to delete old number, and then type new. Remember, that you can only go from whatever number was in max_brightness file to 0.
When you wrote new number, press Ctrl+X, it will ask if you want to "Save modified buffer". Press Y. Then it will asks what name of the file to write. Just press enter, we do not want to change name of this file. Done. At this point your brightness should change.
Small note on the side: The problem with graphic text editor like gedit, is that it tries to create a backup for every file, and brightness file and that folder has permissions such that only root can modify it, so it won't let gedit to change that file or create backup, even with gksudo - i tried
Script version:
This script opens my brightness file with nano editor. Make necessary adjustments for your system, as some folder names may be different.
#!/bin/mksh
printf " \n Entering file to change brightness in 3 seconds\n remember - no new line after number. ";
sleep 3;
sudo nano /sys/class/backlight/acpi_video0/brightness
Best Answer
Please try:
It works at least for me on my acer asus 1005P, contrary to what it's written here. (maybe the kernels are different).