68

I'm new to Linux systems in general (I'm using Ubuntu 16.04 LTS) and I'm having difficulty in changing the brightness of my notebook.

When I use the Fn+F8 or Fn+F9 the brightness bar shows up but there is no change in the actual brightness of the screen.

I tried every method described in this post (How to adjust screen brightness in Ubuntu 14.04?) to no success. Installing and using the xbacklight has no effect, same for editing the brightness file in the "intel_backlight" file.

Anyone knows how to solve this?

Pablo Bianchi
  • 15,657
Andrei
  • 783
  • 1
    I had the same problem using Toshiba C660 satelite a few years back. It wouldn't work, until I used the nvidia driver from the "additional drivers" tab, couldn't get it to fix, using the open-source driver. Does it happen to you, which driver are you using? – Mookey Apr 26 '16 at 06:30
  • I think you should add at least the model name – lrkwz Apr 26 '16 at 06:36
  • 1
    The graphics card is an Intel® HD Graphics 3000. I'm still not very familiar with the way linux handles the computer drivers and all, so I'm not sure what do you mean about "additional drivers tab". – Andrei Apr 26 '16 at 17:33
  • I found a strange workaround on my laptop (compaq cq70). Instead of pressing Fn+f7 to dim and Fn+f8 to brighten, I am able to use Ctrl+f10 to dim and press Ctrl+f11 to brighten. – Joel Sjögren Jul 24 '16 at 11:32
  • This is still not working even in Ubuntu 22.04 LTS – Soerendip Jul 05 '23 at 01:04

11 Answers11

89

This method does not work when nightlight/redshift is enabled, and also does not work with Wayland.


This does not make your brightness function keys work, but is a workaround.

Install Brightness Controller with the following commands:

sudo add-apt-repository ppa:apandada1/brightness-controller
sudo apt update

For Version 2 with Multi Monitor Support and Color Temperature support:

sudo apt install brightness-controller

enter image description here

For Version 1 with up to 4 Monitor Support:

sudo apt install brightness-controller-simple

Brightness Controller Version 1 (Note: Version 1 is not anymore updated)

Note: This does not decrease the intensity of backlight, so won't save your batteries. But you can use this as a last resort to save your eyes. This also works in desktops, where there is no option to control brightness.

Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212
  • 20
    This not a brigthness controller. This just play with colors of system – Harshit Chaudhary May 05 '16 at 18:59
  • 1
    @HarshitChaudhary you are right..this is a bug with this version.Thanks! – williamj949 May 12 '16 at 16:38
  • 1
    Refer this link for more details https://bugs.launchpad.net/hundredpapercuts/+bug/1270579 – williamj949 May 12 '16 at 16:44
  • Finally I can set the brightness. For some reason I only have primary brightness, secondary isn't working. And clearly it is secondary brightness that is used by settings menu and xbacklight. All the various grub solutions didn't work for me (I tried many of them). [I am on an ASUS A555U, ubuntu 16.04 - to spare anyone else the effort] – JasoonS Jun 20 '16 at 01:55
  • 1
    @JasoonS You don't have access to secondary brightness as your computer is connected to only one monitor. – Archisman Panigrahi Jun 20 '16 at 16:24
  • @ArchismanPanigrahi Thanks, that makes sense. Well bottom line, this worked, so (y) – JasoonS Jun 20 '16 at 16:32
  • @HarshitChaudhary Currently it seems to control the brightness well, as it claims. Not the colors. – xji Jul 03 '16 at 10:26
  • This doesn't work for me at all. The brightness controller window says "Primary Not Found" and that's that. No controls, nothing. I don't get how this is such a big issue. Ubuntu should be able to handle this out of the box. :( – Vala Jul 27 '16 at 10:31
  • Hello - dialog box comes up, but no effect: 14.04 on MSI laptop with hybrid Intel graphics on the motherboard and NVIDIA (boo) as the standalone. Running brightness-controller on the command line I get xrandr: Failed to get size of gamma for output default on the first line, then xrandr: Gamma size is 0. each time I adjust the slider. – WillC May 15 '17 at 14:46
  • Works on Ubuntu 16.04 + Asus ROG.
    1. Set acpi_backlight = native in grub (If you're looking at this page, you probably tried the grub already)

    2. I needed to quit flux / redshift for this application to take effect. Screen brightness is controllable now PLUS the added benefit of the "flux effect". Perfect. Thanks.

    – Sterls Jul 02 '17 at 15:56
  • This does not work together with Ubutu 18.04 Nightlight. Nightlight is disabled when I change any slider in the brightness controller. – Christoph Thiede Mar 17 '24 at 21:55
37

Hardware brightness buttons

Since Ubuntu LTS 18.04

Here is every step required for xbacklight control:

  1. $ sudo nano /etc/default/grub and replace the corresponding line with GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"
  2. $ sudo update-grub
  3. No joking, make sure that the appropriate drivers are actually installed: $ sudo apt install xbacklight xorg xserver-xorg-video-intel
  4. Issuing $ find /sys -type f -name brightness should yield something like /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness
  5. $ cd /sys/class This directory should contain a soft link called brightness to the brightness device discovered in the previous step. Should it be missing, create it: $ sudo ln -s /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness /sys/class/brightness
  6. $ cat /etc/X11/xorg.conf should read:

    Section "Device"
        Identifier      "Device0"
        Driver          "intel"
        Option          "Backlight"      "intel_backlight"
    EndSection
    
    Section "Monitor"
        Identifier      "Monitor0"
    EndSection
    
    Section "Screen"
        Identifier      "Screen0"
        Monitor         "Monitor0"
        Device          "Device0"
    EndSection
    

    If it doesn't, edit it with $ sudo nano /etc/X11/xorg.conf

  7. The assignment of the physical XF86MonBrightnessDown and XF86MonBrightnessUp keys is explained here for Xubuntu LTS or XFCE users.

  8. Finally, reboot for these changes to take effect.

Finer-grained brightness control (all Ubuntu versions)

If brightness control happens to be too coarse, then make this additional adjustment.

Ubuntu LTS 16.04

To find out if you have integrated Intel video graphics, enter the following command:

$ ls /sys/class/backlight/
    intel_backlight  panasonic

At least intel_backlight should be mentioned, most probably in addition to an OEM name like for example panasonic, dell_backlight, etc.

If this is the case, proceed with creating the following file

$ sudo nano /usr/share/X11/xorg.conf.d/20-intel.conf

containing the following lines:

Section "Device"
        Identifier  "card0"
        Driver      "intel"
        Option      "Backlight"  "intel_backlight"
        BusID       "PCI:0:2:0"
EndSection

Reboot, and enjoy your backlight buttons! [Source]

Before Ubuntu LTS 16.04

Under (X)Ubuntu 14.04 LTS, brightness control on my Panasonic Toughbook CF-52 used to work fine by adding acpi_osi=Linux to the GRUB_CMDLINE_LINUX_DEFAULT= line in /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux"

and issuing

$ sudo update-grub

after editing and before rebooting.

Serge Stroobandt
  • 5,268
  • 1
  • 48
  • 59
6

Another option is the application Redshift, which in addition to adjusting brightness can also adjust the color temperature to reduce the blue light at night.

Example usage: redshift -b 0.8 will set the brightness to 0.8 on a scale of 0 to 1

xji
  • 642
  • When using redshift, I get the problem of multiple commands being stacked, causing the screen to flicker. If i close my terminal, redshift stops working – drewburr Apr 14 '17 at 16:21
  • From Redshift docs: Redshift has a brightness adjustment setting, but it does not work the way most people might expect. In fact it is a fake brightness adjustment obtained by manipulating the gamma ramps, which means that it does not* reduce the backlight of the screen.* – rustyx Oct 14 '19 at 20:32
5

I use Lenovo Z570 and adding acpi_backlight=none to /etc/default/grub and updating grub worked nicely with Fn key.

andrew.46
  • 38,003
  • 27
  • 156
  • 232
2

In XFCE, you must enable "Handle display brightness keys" on XFCE Power Manager, under the General tab.

enter image description here

Nabil Kadimi
  • 2,212
1

For AMD Radeon Graphics Card on Ubuntu 22.04 (this closely follows Serge's answer:

  • Install pre-requisite packages:

    sudo apt install xbacklight
    sudo apt install xorg
    
  • Find brightness config file

    sudo find /sys -type f -name brightness
    
  • You may see multiple options, but the one indicating the graphics driver will be needed. In my case, its:

    /sys/devices/pci0000:00/0000:00:08.1/0000:07:00.0/backlight/amdgpu_bl1/brightness
    
  • Create / edit /etc/X11/xorg.conf so that it looks like:

    Section "Device"
        Identifier      "Device0"
        Driver          "amd"
        Option          "Backlight"      "amdgpu_bl1"
    EndSection
    

    Section "Monitor" Identifier "Monitor0" EndSection

    Section "Screen" Identifier "Screen0" Monitor "Monitor0" Device "Device0" EndSection

  • Edit parameter GRUB_CMDLINE_LINUX_DEFAULT in the GRUB file /etc/default/grub to:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux"
    
  • Update the GRUB file

    sudo update-grub
    
  • Restart

Saurabh
  • 141
  • 1
  • 8
1

In 16.04 there is a package in the repos called "backlight-indicator" which will use your camera to set backlight (or not) and differentially set it for AC and/or battery usage.

Andor Kiss
  • 779
  • 1
  • 6
  • 19
  • E: Unable to locate package backlight-indicator No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS Release: 16.04 Codename: xenial – Enigma Aug 30 '16 at 00:18
  • http://www.ubuntuupdates.org/package/atareao_atareao/xenial/main/base/backlight-indicator – Andor Kiss Aug 31 '16 at 10:29
  • you should add this @Enigma ppa:

    sudo add-apt-repository ppa:atareao/atareao

    – Mohammad Rafigh Nov 04 '16 at 21:31
0

I have a Panasonic CF-LX3, and it reports as having 2 brightness controls:

/sys/class/backlight/:
intel_backlight -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight
panasonic -> ../../devices/virtual/backlight/panasonic

But actually on this machine the first one works and the vendor one doesn't.

So adding acpi_brightness=video to GRUB_CMDLINE_LINUX_DEFAULT in /etc/defaults/grub helped.

(don't forget to update-grub)

rustyx
  • 917
0

After following the accepted answers, it still did not work in Ubuntu 18.04. Then, I changed /etc/default/grub to contain the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=none"

Instead of:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

And run:

sudo update-grub

Then reboot. It worked perfectly.

Eliah Kagan
  • 117,780
0

I fixed this on my Asus UX303UB with a little difference:

  • set to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=" (acpi_osi= did it for me, other options didn't work, got this from here). Of course after this run update-grub. This make function keys respond showing the Ubuntu notification, but doesn't really change brightness. One more thing taken from other answers:
  • sudo nano /usr/share/X11/xorg.conf.d/20-intel.conf

with contents:

Section "Device"
    Identifier  "card0"
    Driver      "intel"
    Option      "Backlight"  "intel_backlight"
    BusID       "PCI:0:2:0"
EndSection

Now the only problem is to associate Fn+F7 to xset dpms force standby to turn off the screen.

Pablo Bianchi
  • 15,657
0

In my case, the problem was because of some issue with my graphics drivers. Changing them to a stable version solved the issue.

sv_jan5
  • 151