Screen brightness in Ubuntu 18.04

24,984

Solution 1

I found an answer, but not the best one!

Read this, to change the /etc/X11/xorg.conf file.

I did the solution from that post, and installed the new updates, then xbacklight worked. But still, I couldn't change the brightness from setting. According to this answer, you can increase the screen brightness by 10% by this command:

xbacklight -inc 10

And decrease the brightness by 10% by this command:

xbacklight -dec 10

Then create a keyboard shortcut, for intsance, shift+f9 for command xbacklight -inc 10, or so. Unfortunately, it doesn't let you use fn+f9 shortcut, since it is supposed to have a job itself primitively.

Solution 2

On Ubuntu 18.04 (with xfce desktop) my brightness problem finally solved.

I opened 'Onboard Settings' under the 'Settings' menu. If your desktop doesn't have one, you can download it from Software Center.

On the 'Onboard Preferences' window, click the Layout menu, then choose the 'Full Keyboard' (Desktop keyboard with edit and function keys). Click here to view the Onboard Settings window

Solution 3

In case the above suggestion doesn't help you. Here I am suggesting which might help you. I have installed fresh Ubuntu 18.04 LTS and landed at this problem. In case, you have Nvidia Graphics Driver. Please do the following: Edit (or create) inside /usr/share/X11/xorg.conf.d/10-nvidia.conf

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "RegistryDwords" "EnableBrightnessControl=1;" # Add this if it exists
    ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg"
EndSection

Commands:

sudo vim /usr/share/X11/xorg.conf.d/10-nvidia.conf
Check with the above code.
Share:
24,984

Related videos on Youtube

Shayan
Author by

Shayan

Updated on September 18, 2022

Comments

  • Shayan
    Shayan over 1 year

    So at first even the brightness key (via Fn button) used to work in Ubuntu 18.04. After an update, i can't even change it from the setting. And with the keys, it just show the icon of the screen brightness which is changing, and doesn't actually do anything.

    To be mentioned, with brightness-controller-simple which is suggested in this answer, the "actual" brightness doesn't change, it just makes the colors more dark, with same amount of light coming out of the screen. The xbacklight also doesn't work; I mean, this command doesn't do a thing xbacklight -inc 10, which is suggested here.

    I finally could change the actual brightness, but from the terminal command which i read here. Which is this command:

    sudo bash -c "echo 130 > /sys/class/backlight/intel_backlight/brightness;"
    

    Is there any other way i could probably change the brightness?


    I have ASUS model V502U. And results from lspci -v | less, video adapter part:

    00:02.0 VGA compatible controller: Intel Corporation HD Graphics 520 (rev 07) (prog-if 00 [VGA controller])
    Subsystem: ASUSTeK Computer Inc. Skylake GT2 [HD Graphics 520]
    Flags: bus master, fast devsel, latency 0, IRQ 129
    Memory at dd000000 (64-bit, non-prefetchable) [size=16M]
    Memory at b0000000 (64-bit, prefetchable) [size=256M]
    I/O ports at f000 [size=64]
    [virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
    Capabilities: <access denied>
    Kernel driver in use: i915
    Kernel modules: i915
    
    • K7AAY
      K7AAY over 5 years
      It would be constructive to click on the edit link above and to the left, and note the make and model of your laptop or all-in-one machine. Please get the model number from the serial number plate, not the top of front of the PC, as the model number from the serial number plate is much more helpful. Also, please run lspci -v | less and also paste the video adapter information into the original post.
    • Shayan
      Shayan over 5 years
      @K7AAY Should i post the whole results from lspci -v | less?
    • K7AAY
      K7AAY over 5 years
      The video adapter information only.
  • jlettvin
    jlettvin over 5 years
    $ sudo apt install xbacklight This works very well. I created the following custom hotkeys: <Super><F4> for xbacklight -set 5 # Set to a reasonable lowest <Super><F5> for xbacklight -set 100 # Set to a highest
  • SonicARG
    SonicARG almost 5 years
    This does not work as intended, as it only changes the color brightness via software, and does not change the backlight as requested.
  • france1
    france1 over 2 years
    'not the best one' - gets best rate