0

I've searched a method to change the brightness of my laptop display. I saw one article on this forum and followed the instruction like below (under the line) written by Serge (user name).

I ran command line sudo nano brightness and when editor popped up I typed 100 and hit the new. However, the brightness didn't get changed even though I restarted the laptop. So I gave up changing setting.

Then, I want to delete the setting, file or folder that I created(?) using nano which I typed 100 in it. How can I do this?


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 another screen. Look at where your cursoris, 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.

  • 1
    Welcome to Askubuntu.com! There are a couple of things missing from this question. If you simply want to delete the file called brightness then rm brightness would be the correct command. But please edit your question and include a link to the original answer by Serge: simply creating a file called brightness will not alter the brightness. – Jos Apr 12 '15 at 13:34
3

The file "brightness" is on a pseudo file system used by the kernel.

See Why are these directories called file systems?

The general location is /sys/class/backlight/ , although the exact location varies by graphics card.

Example - /sys/class/backlight/intel_backlight/brightness

You can not delete these files.

There are many ways to adjust brightness, but of them I would not use nano.

See How to change LCD brightness from command line (or via script)?

Personally I a script and invoke the script as sudo or you can simply

echo 10 | sudo tee /sys/class/backlight/.../brightness

The "..." varies with video card and driver, you will need to adjust the path an necessary.

For example, using an Intel GMA500 (my favorite card ;p)

  • Poulsbo driver (closed source) path is /sys/class/backlight/psblvds/brightness
  • Open source (kernel) driver path is /sys/class/backlight/acpi_video0/brightness

Note: depending on the card there may be a fix, see also https://wiki.ubuntu.com/Kernel/Debugging/Backlight

  • The "..." varies by video card and driver. In the example I posted it was "intel_backlilght" for a path of /sys/class/backlight/intel_backlight/brightness but the path for an ATI or other video card and driver varies. For example, with an intel GMA500 it is ` /sys/class/backlight/psblvds/brightness` with the Poulsbo driver, and ` /sys/class/backlight/acpi_video0/brightness` using the open source driver. – Panther Apr 12 '15 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.