Every time I reboot my machine the brightness goes back to 100% in Gnome. I wish it would keep the last setting. Is there anyway?
Every time I reboot my machine the brightness goes back to 100% in Gnome. I wish it would keep the last setting. Is there anyway?
The file /etc/rc.local should look like this:
Per @zerdo: In my dell studio 1558 the brightness setting is stored in
/sys/class/backlight/intel_backlight/brightness
. Just change the path if your computer doesn't use the acpi_video0 folder.Also, per @Nick : If this is the only answer you read, note that the 0 in
echo 0
is going to be your default brightness setting. I had set this up and it was driving me crazy for a long time : every time I booted up, it would set it to the lowest brightness setting. I prefer mine to start at max brightness, so I usedecho 10
instead. Your hardware might vary in brightness scale.This function, the backlight control, is dependent on your bios and kernel version.
Try these four things.
Kernel (boot) options
When you boot, at the grub screen, hit e to edit. To the kernel line add
nomodeset acpi_backlight=vendor
Some hardware may work with different options.Intel -
nomodeset acpi_backlight=intel
Acer -acpi_backlight=acer_acpi
or evenacpi_osi=Linux acpi_backlight=legacy
.As you can see, you may need to google search for your settings.
If that works, edit
/etc/default/grub
and add those options to the default options.Edit the "GRUB_CMDLINE_LINUX_DEFAULT" line so it looks like this
Save your edit, update grub
Command line
If that does not work, you can try to manually set the brightness.
Note: Path may vary with hardware / kernel version, may be
/proc/acpi/video0 ...
, you may need to browse the /proc/acpi directory to find the brightness setting and adjust the following commands accordingly.The output of that command varies a bit with hardware, 1 -> 10 , 1 -> 12 , 1 -> 100 ??? Choose a value and set it (choose the value for your hardware).
If that works, add it to
/etc/rc.local
Add in your setting above "exit 0"
xbacklight
You can also try
xbacklight
You then adjust with the command line
Again, add that to
/etc/rc.local
Add in, above "exit 0"
setpci
You can try to set your brightness with
setpci
The general syntax is
You identify your pci bus address with
Example
If you get your setting wrong, most likely you will just loose your display, and have to reboot. As this is a hardware setting, you really need to identify your hardware and research the settings first.
Examples
Intel - https://bbs.archlinux.org/viewtopic.php?id=74914
Toshiba - http://www.linlap.com/wiki/toshiba+satellite+t130
Acer extensa - https://bugs.launchpad.net/ubuntu/+source/linux/+bug/518002
Ubuntu man page setpci
This is supposed to be configurable in the energy options, set the brightness to the desired level and it will always be used. If you use a laptop you will also need to configure the level for battery mode as well...
I found that Gnome has some issues about lcd panel brightness, e.g. if I run on battery mode and set the brightness manually to a given level and leave the laptop unattended for 10 seconds it will go back to the preset brightness when I take control back. Same goes when on A/C mode except it takes longer so goes unnoticed more easily. I believe all those settings should be saved somewhere and restored - at least for A/C mode.
EDIT: For gnome3 this does not work (at least for me).
Here is a quick workaround for that :-
Try testing the setting by typing this command in terminal
if the brightness changes to minimum, you have got it right !
Edit the
/etc/rc.local
file by typingin terminal
Comment out the
exit 0
by adding # in the beginning such that it looks like this :-this is necessary otherwise it wont work !
after this add the following line in the file
such that it looks like this :-
replace 0 with the required brightness value ( ranges from 0 to 10 )
save the file and exit.
Reboot to see the changes.
Note:- you may have to replace
acpi_video0
with your device code if you have a different one (it's mostlyacpi_video0
). Most users won't need to do so.To adjust screen brightness in 11.10, you will need to access the "System Settings":
Right-click directly to the right of your username in the toolbar in the upper-right corner of your screen.
Select "System Settings."
Select "Screen".
Drag the slider with your mouse to adjust screen brightness.
If Ubuntu isn't remembering your adjustment, you may use an application or you may need to use the workaround for GNOME: Brightness setting not saved in Ubuntu 11.10
Here is a great work around I found, credit and thanks to thaelim on Ubuntu forum How to get effective display brightness management under Unity/Gnome Shell just download the script edit the perimeters at the beginning of the script and save it when your done to your home folder. Heres the download of the full script brightmanager.py
These are the variable perimeters to change to your desired settings, as you can see I like mine at 20 all the time with no idle timeout.
After saving then open a terminal and enter
Then open up startup applications from the dash, click on the add button, name your start up application, and enter your command as:
replacing "david" with your home folders name, then add a description and click add, logout, and back in, and your done, you now have brightness settings for battery, AC, and idle.
You will want to do this for each user and each user should have their own copy of the script in their home folder with their own desired settings in the beginning of the script.
There seems to be a bug report about this:
https://bugs.launchpad.net/ubuntu/+source/upower/+bug/840707
For me, it has worked to place:
in /etc/rc.local.
Or, as others suggested,
might work.
The "Screen" option of "System Settings" works OK, and in
/sys/class/backlight/acpi_video0/brightness
the option also change accordingly, but the problem is that nothing happens with the real brightness.I found the solution to my problem:
Add the next option under your "Device" section in
/etc/X11/xorg.conf
and restart:Option "RegistryDwords" "EnableBrightnessControl=1"
This worked for my NVIDIA card (Ubuntu 11.10 x64 on Toshiba Satellite L745-SP4142CL)
It worked for me with the following spesifications:
I found a workaround on webupd8: Fix brightness getting reset (to a very low value or maximum) on reboot in Ubuntu