2

So I have seen this a few times but haven't seen a solution. I also don't know if it is computer hardware related problem or not.

My brightness keys ( fn + F2 and F3) to set the brightness in Ubuntu 16.04 does nothing, I have a HP Pavillion Laptop computer. Can anyone help me fix this. I have seen a "sort of solution" downloading an application called "Brightness Controller" but that is not a real solution for me.

Please help me with this if you can.. Thanks W

When running acpi_listen command in the terminal I get the following output:

video/brightnessdown BRTDN 00000087 00000000 
video/brightnessdown BRTDN 00000087 00000000 
video/brightnessup BRTUP 00000086 00000000 
video/brightnessup BRTUP 00000086 00000000   
Videonauth
  • 33,355
  • 17
  • 105
  • 120
wblm
  • 357
  • doesn't seem to do anything after installing the above – wblm Jun 10 '16 at 14:03
  • nothing happening with {xbacklight -dec 20} .. the folder got "Intel Backlight" " acpi_video0" "acpi_video1" forlders inside – wblm Jun 10 '16 at 14:09
  • I am finding it hard to change these settings.. please explain a bit more – wblm Jun 10 '16 at 14:42
  • 1
    @Sneetsher I have found the following link and it seems to work. It is a manual approach. – wblm Jun 10 '16 at 14:58
  • 1
    its a bit of a pain but thanks for you help..I'll stick with it for now. Thanks once again. This script work great , I modified it slightly to fit my system#!/bin/mksh printf " \n Entering file to change brightness in 3 seconds\n remember - no new line after number. "; sleep 3; sudo nano /sys/class/backlight/intel_backlight/brightness – wblm Jun 10 '16 at 15:11

1 Answers1

1
  1. Run acpi_listen in the terminal, to test if the key event received by the system. Then press Fn+F2 & Fn+F3. Below an output example:

     # acpi_listen 
      PNP0C14:00 000000d0 00000000
     video/brightnessup BRTUP 00000086 00000000
      PNP0C14:00 000000d0 00000000
     video/brightnessdown BRTDN 00000087 00000000
    
  2. See if you can control backlight using

     sudo apt-get install xbacklight
         xbacklight -inc 20
         xbacklight -dec 20
    

    Another try at lower level

     # ls -l /sys/class/backlight/
     lrwxrwxrwx 1 root root 0 Jun 10 13:56 /sys/class/backlight/intel_backlight -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight
    

    ls -l /sys/class/backlight/intel_backlight/

    total 0 -r--r--r-- 1 root root 4096 Jun 10 14:28 actual_brightness -rw-r--r-- 1 root root 4096 Jun 10 14:28 bl_power -rw-r--r-- 1 root root 4096 Jun 10 15:19 brightness lrwxrwxrwx 1 root root 0 Jun 10 14:28 device -> ../../card0-LVDS-1 -r--r--r-- 1 root root 4096 Jun 10 14:28 max_brightness drwxr-xr-x 2 root root 0 Jun 10 14:28 power lrwxrwxrwx 1 root root 0 Jun 10 14:28 subsystem -> ../../../../../../../class/backlight -r--r--r-- 1 root root 4096 Jun 10 14:28 type -rw-r--r-- 1 root root 4096 Jun 10 14:28 uevent

    echo 3600 > /sys/class/backlight/intel_backlight/brightness

  3. Setup an ACPI script as explained in What code is executed when headphones are disconnected?

    /etc/acpi/events/intel-backlight

     event=video/brightness*
     action=/etc/acpi/intel-backlight.sh
    

    /etc/acpi/intel-backlight.sh

     #!/bin/bash
    

    x=$(cat /sys/class/backlight/intel_backlight/actual_brightness)

    if [ "$2" == "BRTUP" ] then x=$(echo $x+490 | bc) echo $x > /sys/class/backlight/intel_backlight/brightness fi

    if [ "$2" == "BRTDN" ] then x=$(echo $x-490 | bc) echo $x > /sys/class/backlight/intel_backlight/brightness fi

    Make the script executable with chmod +x /etc/acpi/intel-backlight.sh.

Eliah Kagan
  • 117,780
user.dz
  • 48,105