Solve problems where Ubuntu can't adjust and save screen brightness

Source: Internet
Author: User

1. Problem finding

Ubuntu cannot adjust the screen brightness, it is very power-hungry for notebooks, and it is also very dazzling, because it works by default with maximum brightness.

The so-called adjustment, method for one of the following:

    1. fn+ the shortcut keys, brightness unchanged

    2. No change in brightness and lock screen pull progress bar brightness

FN regulates the/sys/class/backlight/acpi_video0/brightness file

And I-card file is/sys/class/backlight/intel_backlight/brightness.

2. What is I card?

Three major brands of graphics cards: Nvidia, Amd/ati and Intel

2.1 Nvidia

Provides the most basic open-source driver that supports only 2D (only the closed driver). But the performance of the closed-source drive is very good, almost the same as on Windows. And Nvidia's drivers are updated very often, and they also use the VDPAU Accelerator API to provide fast video acceleration, which is only supported by the latest Adobe Flash beta. So, if you often watch full-screen HD video, a piece of Nvidia graphics card plus their driver should be the best solution. But Nvidia does not yet support the XRANDR protocol, and the XRANDR protocol allows X to adjust the display resolution, or extend/clone to an external display.

2.2 Amd/ati

Before AMD acquired ATI, it can be said that there is basically no decent ATI driver on Linux. But the situation has become vastly different since it was acquired by AMD. ATI's closed-source Linux driver has evolved over-the-board and supports the XRANDR protocol, so you can use the Ubuntu built-in resolution adjustment tool completely. And in terms of performance is also very good, also can work well with Wine. AMD does contribute to the Linux drive. Of course, a bit similar to the Nividia driver is that KMS is not supported. Closed-source AMD drivers use different video APIs than Nvidia, but Va-api, unfortunately Adobe has not supported it so far, so Flash-based HD video is affected. Another thing that's missing from Nvidia is that the AMD driver will take more time to support the new version of the kernel and the newer X Server versions, but it's not a problem for Ubuntu users because it will be installed by default in the Ubuntu release.

2.3 Intel

It can be said that Intel is the king of open source Linux graphics card drivers, they only publish the Linux platform on the open-source drive, which also means that you can experience such as KMS and Xrandar support all the features. But Intel is not perfect, and if you have a GMA500-based card, it's basically not working on Ubuntu because it's been purchased by Intel from another company's chipset and renamed it, and they can't develop an open source driver for it, although Intel is still addressing the issue. Another of Intel's biggest drawbacks is that their hardware performance is far worse than AMD and Nvidia, and not good enough for game support.

2.4 Summary

If it's important for you to have an open source driver, then you can use Intel or AMD cards, and if you're more focused on performance then you can use AMD or Nvidia cards.
In general, Amd/ati is a more forward-looking, more recommended, because they provide a stable open source drive, but also provides a reliable and fast closed-source drive, it is the good of both worlds.

3 Solutions

Back to the original question

A comparison will be the method is just boot up when you press fn+ around the key, so you can change the brightness. Once in, you can't change it.

The perfect method is as follows:

3.1 Configuring Grub allows FN to adjust brightness

First, modify the Grub user profile,/etc/default/grub

Note that the profile is grub2 only, first you must be clear about how much your grub version is, and the lower version does not have this setup file
?
For more information about configuration files, see

To modify the system startup item Grub2 configuration method Ubuntu

GRUB2 's/etc/default/grub file

sudo vim /etc/default

will be GRUB_CMDLINE_LINUX="" changed GRUB_CMDLINE_LINUX="acpi_backlight=vendor" to
Or use the more complex configuration below

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""

Revision changed to

acpi_osi=Linux acpi_backlight=vendorGRUB_CMDLINE_LINUX_DEFAULT=”quiet splash acpi_osi=Linux”GRUB_CMDLINE_LINUX="acpi_backlight=vendor“

Update Grub.cfg

Viewing grub.cfg, you can see that each boot entry is joined with "Acpi_backlight=vendor"

Grub.cfg is located in/boot/grub/grub.cfg

3.2 Modifying files that affect screen brightness

FN Adjusts the/sys/class/backlight/acpi_video0/brightness file, and the/sys/class/backlight/acpi_video0/brightness file stores the maximum screen brightness.

And I card file is/sys/class/backlight/intel_backlight/brightness, same/sys/class/backlight/intel_backlight/max_ The brightness file stores the maximum screen value it identifies

3.2.1 The FN Key System configuration file

First look at the range of brightness values for your screen:

sudo cat /sys/class/backlight/acpi_video0/max_brightness

Mine is 9, which means the brightness value can be between 0 and 9.

To modify/etc/rc.local, add before the last Exit 0:

3 > /sys/class/backlight/acpi_video0/brightness

You can set the screen brightness to the desired value after the system starts

3.2.2 Intel-Set Profile
sudo vim /sys/class

The maximum value is 976
Change the value, after saving the screen brightness will change corresponding changes (0-976)
Alternatively, you can enter the following command to change its value directly

50 > /sys/class/backlight/intel_backlight/brightness

The value in this way is changed to 50, of course the other values are the same. However, this command must be in the root environment

What if you feel like you're setting it up every time? It's too much trouble.
The echo 50>/sys/class/backlight/intel_backlight/brightness added to the/etc/rc.local can be turned on automatically set the screen initial brightness, of course, we can first in the terminal often try several times, Choose a brightness that feels most comfortable for you

3.3 Adjusting the gamma value
.7

About Gamma:

The gamma value is represented by a curve, which is an inductive curve of the light of a person's eyes, which includes the physical quantity, the sense of the body and the mind.
If a display is to complete a highly realistic picture (whether it is a high-brightness picture or a low-brightness screen), then the display's contrast rarely must be more than 5,000:1, and our display due to cost considerations, we can only make 500~1000:1 when We have to use gamma correction to compensate, that is, in the darker film we choose a higher gamma value (such as 2 or 3, or even 4), at the expense of some of the light level to obtain more dark level, in contrast to some of the more bright film (more locations) we choose a lower gamma value (such as 0,- 1 or 2) at the expense of part of the dark level, so that the light level (such as clouds) can be more distinct.
PS: What is the contrast of the monitor?
The so-called contrast refers to the brightest divided by the darkest

In the actual landscape environment, you rarely from a very bright screen moment into the very dark picture, but in the movie or TV and game screen we often suddenly from a very bright screen into a very dark picture, or from a very dark screen into a very bright picture, So the correct gamma curve setting can help us get the most realistic visual perception.

Reboot and you're done.

Solve problems where Ubuntu can't adjust and save screen brightness

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.