Brightness adjustment keys <Fn + ⇑/⇓> have no effect (although they are recognized by the environment), and I can't change the brightness using GUI tools as well. This seems like a problem in Linux itself, not the desktop environment.
I can change the brightness in Windows OS, so it's not some kind of hardware fault.
Details:
Lenovo B570 (Model Name: 20093)
Integrated Intel HD graphics card
Kubuntu 11.04 (Linux 2.6.38-10-generic, KDE 4.7.0), everything up to date
No proprietary graphics drivers (only Wi-Fi one)
What I've tried:
- Edit
/etc/default/grub
↦GRUB_CMDLINE_LINUX_DEFAULT
:acpi_osi=Linux
,acpi_backlight=vendor
,nomodeset
. And yes, I didupdate-grub
- Edit
/etc/X11/xorg.conf
(no such file, even aftersudo dpkg-reconfigure xserver-xorg
) - Edit
/proc/acpi/video/VGA/LCD/brightness
(no such file) sudo setpci -s 00:02.0 F4.B=
(no effect)XXxbacklight -set
("XXNo outputs have backlight property
")
How can I fix this issue?
If the GUI tools fail, try to use the terminal for it.
Open a terminal
Run:
ls /sys/class/backlight/*/brightness
. Example output would be:If nothing is found, the kernel does not support brightness control (missing drivers?). Otherwise, you can use the below commands (replace
acpi_video0
accordingly):Get the current brightness level:
Get the maximum brightness level:
These commands return brightness levels which ranges from zero to max_brightness (see above).
To change the brightness level, you need to write a number to the
brightness
file. This cannot be done by an editor likegedit
. Say you want to change your brightness to 5, you have to run:Alternatively, if you just want to set the brightness level to the highest available:
Try this. It worked for my Ubuntu 14, Lenovo B570, Intel Graphics.
Open a terminal and create the following configuration file, if it does not exist:
sudo touch /usr/share/X11/xorg.conf.d/20-intel.conf
Now we need to edit this file. You can use any editor be it a terminal one or graphical.
sudo gedit /usr/share/X11/xorg.conf.d/20-intel.conf
Add the following lines to this file:
Save it. Log out and log in back.
Install
linux-kamal-mjgbacklight
- a patch for Linux kernel.lsmod | grep ^i915
Something like
i915 331519 3
should appear. If there's no output, this will not work.sudo add-apt-repository ppa:kamalmostafa/linux-kamal-mjgbacklight
sudo apt-get update; sudo apt-get upgrade
)Reboot.
Now you can use the terminal to adjust brightness, as suggested by Lekensteyn.
If it's OK for you to change brightness with terminal+
sudo
, this is the end of the answer.If you are on GNOME desktop, brightness may even function fully already.
Download my brightness changer script, allow it to be executed, and put it to /usr/local/bin/:
wget -O brightness http://ideone.com/plain/yPlo5
chmod +x brightness
sudo mv brightness /usr/local/bin
We have to allow the brightness file to be edited, so that
sudo
isn't needed everywhere.Also, we want to make the brightness setting restore itself to the previous setting when the system boots (it is not saved by default, unfortunately).
The mentioned
brightness
script can handle it all (withrestore
parameter), just add it to autorun.To do this we will edit /etc/rc.local (
sudo nano /etc/rc.local
or any editor instead of nano).Add the following line before the
exit 0
line:/usr/local/bin/brightness restore
It is best to reboot now.
So the
brightness
script works. You may go to terminal any time and type these:brightness
- get current brightness settingbrightness value
- set the brightness to valuebrightness inc step
,brightness dec step
- increase or decrease the brightness by step (if it's not specified, a default value is used from the configuration file, usually 10% of maximal brightness)Now you might want to map brightness change to your hotkeys.
brightness inc
brightness dec
If you want to tweak something, make sure to look at /etc/bx_brightness.conf
You can change the step by which brightness is changed with
brightness inc
/dec
Thanks to Toz for his priceless help in this thread.
I think I found an easy and least effect to the existed things' way for adjusting intel_backlight using udev rules.
I noticed "change" action of "backlight" subsystem when I press Fn+Up/Down on my Lenovo G360 notebook running kernel 3.2. So I wrote a rules of
/etc/udev/rules.d/99-writeintelbacklight.rules
as below:Make the shell script
/usr/sbin/writeintelbacklight.sh
contain:Of course, you need do a
sudo chmod +x /usr/sbin/writeintelbacklight.sh
.This will not get your Fn keys working, but you will be able to assign any other key to adjust brightness.
I tried several of these solutions, but nothing worked for me until I found this little indicator program http://codevanrohde.nl/wordpress/?p=128. With it you can set up hot keys to control brightness, use your mousewheel or select from a drop down list in the indicator. I have replaced 'Fn' with 'Win+Alt' which is very similar for my hands and now I can also use it with an external keyboard!
To add PPA and install:
Hot keys should be assigned to:
and
Footnote: Out of the box, the birghtness indicator recognizes 7 levels of brightness in my system. By adding
acpi_backlight=vendor
to the lineGRUB_CMDLINE_LINUX_DEFAULT
in/etc/default/grub
, that number is bumped up to 16!I have a lenovo ideapad z400.
I tried all the TIPS listed above, no success.
So I found a different one that worked very well :
Put the following line in /etc/default/grub
YY = Swap area, use swapon -s to see you swap device.
Execute an update-grub as root
After the reboot the problem was solved.
I have a Thinkpad T450s with Nvidia graphics and binary drivers on Ubuntu 14.04. In order to get the backlight working I had to edit the /etc/X11/xorg.conf file by adding the following line to the intel device definition (The xorg.conf-file is created when installing the binary drivers):
The complete section is now:
This doesn't work for KDE users as it written in https://launchpad.net/~kamalmostafa/+archive/linux-kamal-mjgbacklight
However you can try a workaround found here.
That says to type in the terminal
echo XXX | sudo tee /sys/class/backlight/intel_backlight/brightness
where XXX is an integer value.In my case XXX can be a value from 0 to 4882, but be careful: if you write 0 the screen will be completely black and you'll se nothing.
Here is a patch you can do.
Create this script with the name .modificarBrillo.sh (in my case I created it in my home folder: ~/.modificarBrillo.sh)
However as the previous script needs execution permission and /sys/class/backlight/intel_backlight/brightness can only be edited by root and you have to execute in terminal:
The last command has to be executed every startup because the permissions of the brightness file are renewed with the startup. For doing so
sudo vim /etc/rc.local
and add the commandsudo chmod a+w /sys/class/backlight/intel_backlight/brightness
before the "exit 0" lineFinally you should install xbindkeys to assgin the Function key to execute the script.
In my case I add the lines to the configuration file ~/.xbindkeysrc
But you could also install the program xbindkeys-config to do the proccess graphically.
Edit the
/etc/default/grub
file and addpcie_aspm=force acpi_backlight=vendor
afterGRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
Then the whole line will look like this:
For more detail visit this link.