My system specifications are: Ubuntu 12.04, 64-bit, Acer Aspire One D270, Intel Atom CPU
The usual brightness increase/decrease key combination using Fn key doesn't work in Ubuntu as many pointed out.
I had found two solutions on this forum to set the screen brightness.
One was to make the usual key combination work answer is given here:
Is there a way to set a hotkey to change screen brightness?
and the other is using the command
sudo setpci -s "00:02.0" F4.B=20
where the 20
is a hexadecimal number representing brightness.
It's only the latter that worked in my case.
I observe that the original brightness setting is restored after resumption from sleep mode.
All I want is to keep my brightness setting permanent. How do I do that?
Try 1: Tried Alok's suggestion. It just sits there as a startup application. Doesn't figure as an icon on the topbar of the screen, like the dropbox icon (my dropbox account it is linked to ubuntu) so that I can conveniently change the brightness.
Try 2: Also I must add, that the method System Settings -> Additional Drivers
gives an empty list. In my earlier install (which I had to overwrite-reinstall :-(), the list had (I think) Intel Cedarview Graphics Driver. So must I install before trying the methods in any of the answers below?
Update: I read somewhere Intel CedarView is only for 32-bit OS!
Try 3: Just tried the quiet_splash etc that I had to add to /etc/default/grub, even read the thread given in one of the answers below!
Temporarily settled myself with this method:
bash brightness.sh
Try 4a: I created an environment variable BRI ensured using env
it's there in the list, and tried using it, here's the bash file brightness.sh
#!/bin/bash
echo "Set Brightness (Values 00-FF): "
read s
sudo setpci -s "00:02.0" F4.B=$s
export BRI=s
However I have to give the administrative password, and have yet not succeeded in making it a permanent setting and am working on these aspects!
Try 4b: I even tried (in vain)
export BRI
into /etc/default/grub
and /etc/grub.conf
~/.bashrc
and to /etc/bash.bashrc
through the shell script brightness.sh
that I made
as I in each case restart and find BRI to still have its old value, and not the one given by executing brightness.sh via the launcher!
Possibly, the second solution posted in this thread applies to your laptop as well: passing the options
acpi_osi=Linux acpi_backlight=vendor
to grub. Try to edit the line starting with "GRUB_CMDLINE_LINUX" in the file/etc/default/grub
to:and then run
Maybe this will help.
Optionally you can install XBACKLIGHT
XBACKLIGHT
The review : "For those of you whos laptop starts up with the screen brighter than the surface of the sun, this one is it. You can easily set this terminal program to stop your eyes from being bleeched by your laptop's screen brightness. Download the app, then go to the system tab, which is the cog shaped thing in the top right corner of your screen. Go to startup applications, and then set the command line to "xbacklight -set 0" (or whatever percentage you want your backlight to snap to on start up) and obviously, remove the quotes from that command. Wallah, that should straighten all of those pesky backlight problems out. Tell your friends, because this one is a keeper"
Edit: The following solution seems to work for some Acer Computers.
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux i915.i915_enable_rc6=1"
in /etc/default/grub (and then updating with sudo update-grub) [the first option enables hardware control of backlight, the second implements a workaround for Intel graphics]
Source : http://ubuntuforums.org/showthread.php?t=1850190
I've kept this thread bookmarked and I check it from time to time. I finally found a way to solve this problem (for my hardware), so I'm writing this answer for archive and hopefully help someone else.
I've been struggling with the same problem for nearly a year and a half. I have an Acer Aspire 5750G running Ubuntu 12.04.04 (64 bits), Debian Wheezy (64 bits) and Windows 7 Ultimate.
The problem with the backlight sliding bar that should appear when hitting Fn+Left/Right arrow keys never worked for me except in Windows (I had to install Acer drivers after a fresh reinstall). I've put together something that seems to work using things I found here and in other places.
First: get the widget to show up
This method worked both in Debian Wheezy and Ubuntu 12.04
Edit
/etc/default/grub
and add at the end of theGRUB_CMDLINE_LINUX
lineacpi_backlight=vendor
, and then runsudo update-grub2
(please notice the 2 at the end, since I'm using GRUB2). And this should work after next boot.Second: preserve backlight
Make sure there's something in
/sys/class/backlight
. I have there a symlinkintel_backlight
that points to../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight
This folder has some files in it:
When I dim the brightness, the value in file actual_brightness decreases
976 is the value in max_brightness, and it's the max allowed value, so it won't go any further.
I made a little script and tried to set it up as a cron job. It stored the value as it was supposed to but was unable to restore it on boot.
A few days ago I found this book: Upstart Intro, Cookbook and Best Practices
So I made two upstart jobs to save and restore the value of the screen brightness.
Upstart is packaged on Ubuntu since version 6.10 (I think) and is an option on Debian. Check you have upstart and its version:
You can call it anything you like: anything.conf and it must be placed in
/etc/init/
This job is triggered when the computer is shutting down or rebooting and copies the file/sys/class/backlight/intel_backlight/actual_brightness
to/var/backups/actualb
(this too can be changed to whatever you like, but on the second job it has to be same).This job loads the value that has been stored and sets the screen backlight according to it. You can call it whatever.conf and place it in
/etc/init/
too.You can test the jobs by typing in a terminal:
Now everything works fine for me, the screen backlight is restored even before the login screen shows up.
Hope this helps
If you have Samsung in addition to
acpi_backlight=vendor
look at https://launchpad.net/~voria/+archive/ppa and install samsung-tools and samsung-backlight.Also no need to add
acpi_osi=Linux
.I myself made a geeky solutions for "brightness restoration" problem on my Acer 5755......
paste the following code in text file, make it executable, & add to startup applications....done
Your display brightness now set on startup, change "800" as per Your requirement.
as the brightness is moving all around, there is directory in /sys/class/backlight giving you semi-direct control of your devices. go to the one with your monitor name and you will find the file brightness. change the value in it...
in some cases linux cant change it on one device, so just go out and into another directory in /sys/class/backlight in order monitor, graphics, Xorg. Do not put values to high, try it gradually thou I would like to know what will happen. Probably kernel panic
I am back to the 32-bit OS! I had accidentally deleted
/bin/sh
resulting in a booting problem. So I decided to install Ubuntu 12.04 LTS 32-bit OS overwriting the entire 320 GB HDD. All my data is safe, for which I am profusely thankful to Dropbox and my cell phone!The brightness increases and decreases smoothly and even the brightness widget showing the level appears while adjusting the brightness.
In my case: Dell Inspiron N4050, 12.04, I had to execute the command in @Alok's answer. The difference is that the values vary from 0 to 15, so, his
800
didn't work.The code is:
I put this as a "Startup applications..." (does not require root password) and now I don't have to configure every time after boot.
One can get maximum brightness value for one's backlight with the option: