Difference between revisions of "Backlight"

From ArchWiki
Jump to: navigation, search
(better categorizing; improved headings; merge with Laptop?)
Line 3: Line 3:
 
{{Merge|Laptop}}
 
{{Merge|Laptop}}
  
There are many ways to adjust the backlight of laptop screen, but sometimes only some of them are available on some kinds of the laptop. This article tries to summarize all possible ways to adjust the backlight.
+
Screen brightness can often be tricky to control. On many machines, physical hardware switches are missing and software solutions may or may not work well. Make sure to find a working method for your hardware! Too bright screens can cause eye strain.
  
==setpci method==
+
There are many ways to adjust the screen backlight of a monitor, laptop or integrated panel (such as the iMac) using software, but depending on hardware and model, sometimes only some options are available. This article aims to summarize all possible ways to adjust the backlight.
It is possible to set the register of the graphic card to adjust the backlight. It means you adjust the backlight by manipulating the hardware which is not a good idea. And also not all of the graphic card support this method.
+
By using this method, you need "lspci" first to find out where is your graphic card.
+
setpci -s 00:02.0 F4.B=0
+
  
==ACPI method==
+
==ACPI==
It is possible to adjust the laptop by ACPI. But sometimes ACPI doesn't work well due to different implementation on mother board. You could use following kernel parameters in grub to adjust ACPI model.
+
It is often possible to adjust the backlight by ACPI. This controls the actual LEDs or cathodes of the screen. When this ACPI option is available, the illumination is controllable using a GUI slider in the Display/Screen system settings or by simple commands on the CLI. The ACPI kernel interface for interacting with the backlight is typically be located here:
acpi_osi=Linux
+
acpi_backlight=vendor
+
  
==xbacklight method==
+
/sys/class/backlight/acpi_video0/
You also could adjust the backlight through the xorg-server command.
+
 
  xbacklight
+
It contains the following files and folders:
 +
 
 +
actual_brightness  brightness        max_brightness    subsystem/    uevent           
 +
bl_power          device/            power/            type
 +
 
 +
The maximum brightness (often 15) can be found by running {{Codeline|cat}}:
 +
 
 +
# cat /sys/class/backlight/acpi_video0/max_brightness
 +
15
 +
 
 +
Brightness can then be set (as root) with {{Codeline|echo}}:
 +
 
 +
# echo 5 > /sys/class/backlight/acpi_video0/brightness
 +
 
 +
Sometimes ACPI doesn't work well due to different motherboard implementations and ACPI quirks. You can try adding the following kernel parameters in grub to adjust ACPI model:
 +
 
 +
acpi_osi=Linux acpi_backlight=vendor
 +
 
 +
==xbacklight==
 +
You can adjust the backlight through the xorg-server command {{Codeline|xbacklight}}:
 +
 
 +
A useful demonstration was posted by [http://www.youtube.com/watch?v=_pi3iKMAJcY gotbletu on Youtube]. He suggests the following commands to adjust the backlight:
 +
 
 +
* brighten up:
 +
  xbacklight -inc 40
 +
 
 +
* dim down:
 +
xbacklight -dec 40
 +
 
 +
==xcalib==
 +
The program [http://xcalib.sourceforge.net/ xcalib] can be downloaded from [https://aur.archlinux.org/packages.php?ID=10969 AUR] and used to dim the screen. Again, the use gotbletu posted a demonstration on [http://www.youtube.com/watch?v=_pi3iKMAJcY Youtube]. This program can correct gamma, invert colors and reduce contrast, the latter of which we use in this case:
 +
 
 +
* dim down:
 +
xcalib -co 40 -a
 +
 
 +
This program uses ICC technology to interact with X11 and while the screen is dimmed, you may find that the mouse cursor is just as bright as before.
 +
 
 +
==redshift==
 +
The program [http://jonls.dk/redshift/ redshift] in the community repository uses {{Codeline|randr}} to adjust the screen brightness depending on the time of day and your geographic position. It can also do RGB gamma corrections and set color temperatures. As with {{Codeline|xcalib}}, this is very much a software solution and the look of the mouse cursor is unaffected. To execute a single quick adjustment of the brightness, try something like this:
 +
 
 +
redshift -o -l 0:0 -b 0.8 -t 6500:6500
 +
 
 +
==setpci (use with great care)==
 +
It is possible to set the register of the graphic card to adjust the backlight. It means you adjust the backlight by manipulating the hardware directly, which can be risky and generally is not a good idea. Not all of the graphic cards support this method.
 +
By using this method, you need to use {{Codeline|lspci}} first to find out where is your graphic card.
 +
 
 +
# setpci -s 00:02.0 F4.B=0

Revision as of 20:56, 23 August 2011

Merge-arrows-2.pngThis article or section is a candidate for merging with Laptop.Merge-arrows-2.png

Notes: please use the second argument of the template to provide more detailed indications. (Discuss in Talk:Backlight#)

Screen brightness can often be tricky to control. On many machines, physical hardware switches are missing and software solutions may or may not work well. Make sure to find a working method for your hardware! Too bright screens can cause eye strain.

There are many ways to adjust the screen backlight of a monitor, laptop or integrated panel (such as the iMac) using software, but depending on hardware and model, sometimes only some options are available. This article aims to summarize all possible ways to adjust the backlight.

ACPI

It is often possible to adjust the backlight by ACPI. This controls the actual LEDs or cathodes of the screen. When this ACPI option is available, the illumination is controllable using a GUI slider in the Display/Screen system settings or by simple commands on the CLI. The ACPI kernel interface for interacting with the backlight is typically be located here:

/sys/class/backlight/acpi_video0/

It contains the following files and folders:

actual_brightness  brightness         max_brightness     subsystem/    uevent             
bl_power           device/            power/             type

The maximum brightness (often 15) can be found by running Template:Codeline:

# cat /sys/class/backlight/acpi_video0/max_brightness
15

Brightness can then be set (as root) with Template:Codeline:

# echo 5 > /sys/class/backlight/acpi_video0/brightness

Sometimes ACPI doesn't work well due to different motherboard implementations and ACPI quirks. You can try adding the following kernel parameters in grub to adjust ACPI model:

acpi_osi=Linux acpi_backlight=vendor

xbacklight

You can adjust the backlight through the xorg-server command Template:Codeline:

A useful demonstration was posted by gotbletu on Youtube. He suggests the following commands to adjust the backlight:

  • brighten up:
xbacklight -inc 40
  • dim down:
xbacklight -dec 40

xcalib

The program xcalib can be downloaded from AUR and used to dim the screen. Again, the use gotbletu posted a demonstration on Youtube. This program can correct gamma, invert colors and reduce contrast, the latter of which we use in this case:

  • dim down:
xcalib -co 40 -a

This program uses ICC technology to interact with X11 and while the screen is dimmed, you may find that the mouse cursor is just as bright as before.

redshift

The program redshift in the community repository uses Template:Codeline to adjust the screen brightness depending on the time of day and your geographic position. It can also do RGB gamma corrections and set color temperatures. As with Template:Codeline, this is very much a software solution and the look of the mouse cursor is unaffected. To execute a single quick adjustment of the brightness, try something like this:

redshift -o -l 0:0 -b 0.8 -t 6500:6500

setpci (use with great care)

It is possible to set the register of the graphic card to adjust the backlight. It means you adjust the backlight by manipulating the hardware directly, which can be risky and generally is not a good idea. Not all of the graphic cards support this method. By using this method, you need to use Template:Codeline first to find out where is your graphic card.

# setpci -s 00:02.0 F4.B=0