8

My laptop is Lenovo T400, and my OS is Ubuntu 10.10. I change the brightness of my screen by pressing the FN key and one of the two keys for increasing/decreasing brightness.

The brightness I feel comfortable is between two consecutive levels that are offered. So I wonder if it is possible to fine-tune the screen's brightness?

studiohack
  • 13,468
  • 19
  • 88
  • 118
Tim
  • 16,963
  • 69
  • 181
  • 260

5 Answers5

7

A somewhat overly technical answer, but you did ask "is it possible..."

Open Terminal and go to /sys/class/backlight, then into the backlight control's directory (the name varies, acpi_video0 in my laptop), then read the files max_brightness and actual_brightness. GNOME limits itself to 5 levels between zero and max, but the actual hardware usually has at least 10 levels. If the max_brightness file says "10" or more, a finer adjustment will be possible.

$ cd /sys/class/backlight
$ ls
acpi_video0@
$ cd acpi_video0
$ ls
actual_brightness  device@         subsystem@
bl_power           max_brightness  type
brightness         power/          uevent
$ cat max_brightness
10

You can write the desired level to a file named brightness in that directory, but in this example GNOME's own tool is used, which does not require root access.

$ pkexec /usr/sbin/gnome-power-backlight-helper --set-brightness 7

or in more recent versions of GNOME the path changed to:

$ pkexec /usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 7

As Linker3000 said, there might be a GNOME Panel applet for controlling the brightness. Right-click the top panel and choose "Add".

Dan Stowell
  • 655
  • 2
  • 5
  • 14
u1686_grawity
  • 426,297
  • 64
  • 894
  • 966
  • Thanks! (1) I dont have brightness under /sys/class/. Which directory shall I go? (2) I found /sys/class/backlight/ has similar directories acpi_video0 and acpi_video1, both of which have the same-name files. What do acpi_video0 and acpi_video1 mean respectively? (3) The max_brightness files of both directories have the same value 15. But the brightness applet added to the panel also has much more adjustable levels. How is that possible? – Tim Aug 15 '11 at 18:14
  • @Tim: Sorry, it *is* `/sys/class/backlight` in fact. The two directories may correspond to different devices; you could compare the content of `......./acpi_video0/device/uevent` and the PCI IDs reported by `lspci`. – u1686_grawity Aug 15 '11 at 18:25
  • @Tim: I recall an old rumor about how GNOME would, instead of changing the backlight, simply make the colors darker... The best way to check it is to simply compare the contents of `actual_brightness` before and after adjustments -- if the applet works, but the numbers stay the same, the applet might be faking it. (Remember to check *both* `acpi_video*` directories.) – u1686_grawity Aug 15 '11 at 18:29
  • Thanks! I compared the content of ......./acpi_video0/device/uevent and the PCI IDs reported by lspci, but don't find anything in common. The former says `MODALIAS=acpi:device:`. – Tim Aug 15 '11 at 18:31
  • @Tim: How about acpi_video1? The 'device/uevent' file should have PCI_SLOT_NAME if the control belongs to a PCI device (for example, in my laptop acpi_video0 is tied to the ATI Radeon card). If not, it might be a virtual device or something. But in the end, it doesn't really matter -- just adjust whichever works. – u1686_grawity Aug 15 '11 at 18:34
  • ......./acpi_video1/device/uevent and ......./acpi_video0/device/uevent have the same content. – Tim Aug 15 '11 at 18:39
  • Why do you say Gnome limits itself to 5 levels? Can we change that on the gnome level ? – Rémi Benoit Mar 27 '14 at 08:41
  • @Rémi: At the time it was based purely on experiments. (However it turns out I was seeing the double-adjustment bug, where each key press would go 2 levels as both GNOME and the video card driver reacted independently, thus halving the 10 levels my laptop had.) – u1686_grawity Mar 27 '14 at 08:44
  • @grawity Ok, I don't got this bug (checked with acpi_event) but still got only 5 level with a maximum_brightness of 854! Did you stumble upon anything else that would block from using fine steps? – Rémi Benoit Mar 27 '14 at 10:02
2

The Fn+Key brightness levels are probably setup as a table in the machine's BIOS, but depending on your exact GUI setup (eg: Gnome, KDE etc..), there may be a plugin or widget that you can add to the desktop or status bar that adds a slider for screen brightness. I can't get in front of a Ubuntu machine with a GUI at the moment but I also believe there may be a brightness slider in some of the power management apps - maybe someone else can enlighten...

Linker3000
  • 27,498
  • 3
  • 52
  • 73
  • 1
    The Fn+backlight keys send ACPI events, which are handled by GNOME, not the BIOS. – u1686_grawity Aug 15 '11 at 17:38
  • @grawity That's interesting as there was a BIOS update issued for the original Acer Aspire One to modify the brightness table - might it be the case that the ACPI event triggers a step change to the next value up/down in the table? – Linker3000 Aug 15 '11 at 18:37
  • 1
    If an ACPI-capable OS is running, the BIOS does nothing. (That's mostly the point of ACPI, to allow the OS have fine control over power settings.) ACPI events merely inform the OS that something happened (AC unplugged, power button pressed). On Linux, they are are forwarded to user-space tools, namely *acpid* and some-or-other GNOME component. // The translation of `/sys/class/backlight/*/brightness` values to the apropriate voltages and parameters, however, *is* handled by the BIOS (probably by the video BIOS, though). – u1686_grawity Aug 15 '11 at 18:42
  • @grawity Cheers; that makes sense. – Linker3000 Aug 15 '11 at 19:16
1

After installing pommed (sudo apt-get install pommed), I changed the step value to 0.3 (step = 0.3) in /etc/pommed.conf file. Restarted the computer and it is now working fine.

Raphael
  • 11
  • 1
0

You can change the brightness with echo $VALUE | sudo tee /sys/class/backlight/intel_backlight/brightness where $VALUE is a number you want to try. Your permitted values are probably different from mine (0 to ~852). In the case of my Lenovo Thinkpad laptop, it simply says Invalid argument if a wrong value is used.

0

This worked for me.

echo 0 | sudo tee /sys/module/video/parameters/brightness_switch_enabled
ChrisF
  • 41,278
  • 17
  • 101
  • 154
panickal
  • 131
  • 2