The brightness of my laptop is reset to max on every restart. I tried the solution provided at this website but had no luck.
This command
cat /sys/class/backlight/acpi_video0/max_brightness
Returns
cat: /sys/class/backlight/acpi_video0/max_brightness: No such file or directory
Then I found that I don't have a folder named acpi_video0
, but a folder called intel_backlight
:
Every time I increase or decrease the brightness using the brightness control keys, the values in brightness
and actual_brightness
get updated.
Is there any method I could follow to set the brightness to a fixed value on every boot and vary it as and when I need it using the brightness control keys?
You could try adding a line to /etc/rc.local that will set the desired brightness level. To edit the file, run
and add the following
so that the end result looks like this
Substitute
X
by the desired brightness level.In case /etc/rc.local doesn't exist, as is the case with new Ubuntu releases, you'll need to create it, and make eecutable with the following commands:
PS: Alternatively, there may be
/sys/class/backlight/acpi_video0/brightness
instead of the above. Brightness levels vary wildly, and may range from 0 to 10 or to 1000. To find the maximum value, tryI converted my small script for saving and restoring backlight (brightness) level to Ubuntu package. It is located in my PPA and named
sysvinit-backlight
.It contains sysvinit init-script, placed in
/etc/init.d/sysvinit-backlight
.It is compatible with Ubuntu 12.04 LTS and 14.04 LTS.
For newer versions of Ubuntu my PPA is not needed as they use builtin systemd-backlight service.
You can install my script with the following commands:
You can remove it by
Please note: if you have installed the previous version of my script, please remove it by
The script functionality is:
The script options are:
sudo service sysvinit-backlight status
(show current brightness levels and saved in files values)sudo service sysvinit-backlight start
(set saved levels from files)sudo service sysvinit-backlight stop
(save current levels to files)You can contact me here or on launchpad.
Easiest way:
Open a terminal window.
Type in the following command then hit Enter after it.
Open the Startup Applications Preferences menu.
Click the Add button and add the following information:
xbacklight -set 60
Replace 60 with whatever brightness level you prefer.
Source: Set Startup Display Brightness
Before try workarounds in
rc.local
, it is worth to try the following:adding simple:
quiet splash acpi_backlight=vendor
to grub looks to be enough on my configuration.sudo gedit /etc/default/grub
replace
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
with
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset acpi_backlight=vendor"
sudo update-grub
and reboot.worked on:
nomodeset
and it will work fine)I modified the code in
/etc/rc.local
like this:Get maximum brightness:
Run
gksudo gedit /etc/rc.local
and edit the file:That worked for me.
Install xbacklight (
sudo apt-get install xbacklight
) and add(where 'x' = 0 to 100 desired brightness) to the startup applications via dashboard. For example:
The solutions offered here are somehow system-dependent.
A good design is to have one place that takes care of system-dependent details and provide a unified interface. It seems that currently the kernel does not offer such an easy interface through
/sys
. At X level, though, there is one :xbacklight
.A solution based on
xbacklight
is offered on How do I set default display brightness?, for 11.10 and up.Plus, it should not have the problems reported on some areas (e.g. http://ubuntuguide.net/how-to-save-screen-brightness-settings-in-ubuntu-12-04-laptop ) that wrong brightness comes back in some situations.
How to debug backlighting:
https://wiki.ubuntu.com/Kernel/Debugging/Backlight
Unfortunately just adding acpi_backlight=vendor doesn't seem to save the default value for my 12.04 Lenovo G575.
My laptop is Compaq Presario CQ62 111TU, installed Ubuntu 12.04. The Following steps worked for me well.
cat /sys/class/backlight/intel_backlight/actual_brightness
and take down the value.cat /sys/class/backlight/acpi_video0/actual_brightness
and take down the value.Enter
sudo gedit /etc/rc.local
and add these before the last lineexit 0
in gedit:save and enjoy.
My settings are shown below
I use a Sony Vaio S model and hybrid graphics. I disabled my ATI G card and so my intel HD 3000 serves as my only g card.
I found that setting the brightness value to the file
actual_brightness
in theintel_backlight
folder will help. and the other wont.for me my minimum brightness value is 236 and maximum is 4648, so you may set a value anywhere between this.
so try this: