How Ubuntu uses commands to adjust screen brightness

  

We all know that the brightness of the screen can be adjusted using the buttons on the display, but do you know? Ubuntu system can use the command to adjust the screen brightness, today Xiaobian will introduce you to Ubuntu using the command to adjust the screen brightness, let's learn together.

User questions: My Fujitsu S7211 notebook screen in Ubuntu 10.04 as good as bright in Vista, always thought it was driven problem. Later, from the blog of a foreigner, I found that the brightness of this screen can be adjusted.

2 methods:

1. Adjust the screen contrast parameter gamma value

》 xgamma -gamma .75

If not, try .75 Modify it to test between 0.5~1.0. I feel the same brightness as Vista after using 1.0.

This command does not require administrator privileges.

2. Adjust the brightness of the screen backlight pci

sudo setpci -s 00:02.0 F4.B=xx

xx is the screen brightness value in hexadecimal notation, Range 0 (brightest) ~ FF (darkest).

00:02.0 is your monitor VGA device code.

Use the lspci command to check your VGA device code:

》 lspci 00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 03) 00:02.0 VGA Compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 03) 00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 03) 00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 03)

Note the second line of 00:02.0 VGA compatible controller.

sudo setpci -s 00:02.0 F4.B=FF

Explain:

setpci is a command to modify device properties

-s indicates Enter the address of the device

00:02.0 VGA device address (:.)

F4 The address of the attribute to be modified, this should indicate "brightness"

.B modified length (B should be byte (Byte), and W (should be Word, two bytes), L (should be Long, 4 bytes))

=FF The value to be modified (can be changed)

I am here 00 is the darkest, FF is the brightest, different computers may not be the same.

For example, I think FF is too flashy, I can sudo setpci -s 00:02.0 F4.B=CC, it will be darker

The above is Ubuntu use the command to adjust the screen brightness The method is introduced. In this paper, two methods are introduced, and the brightness of the screen can be adjusted by using any one of them.

Copyright © Windows knowledge All Rights Reserved