10

I know this issue had been addressed in the past (like this, this, this, this, this, this and more), but none were actually given a definite answer.

To begin, I'm using a NVDIA GTX1080 Max-Q graphic card. Installed driver 390 (Can't seems to switch to 396, it automatically rolled back to 390 when I select in 'Additional Drivers'). And the folder /sys/class/backlight is empty, as mentioned.

Next, I try to disable Wayland in /etc/gdm3/custom.conf and that resulted with me greeted by black screen after login. Can't seems to enter grub mode by pressing Alt+Ctrl+F1. Referred answer here. Reinstalled Ubuntu many times just to be sure about this.

Then, tried the method as suggested here and here. Still didn't fix it.

Temporarily I'm using the bash script to adjust the brightness, but it would jump to maximum again if a prompt pop up, like Authentication or copying files.

Any actual way to fix this once and for all?

6 Answers 6

9

xbacklight does not work for you, right?

In my case a workaround is use the line

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia.NVreg_EnableBacklightHandler=1"

in the /etc/default/grub file.
The problem is explained here

6
  • worked for nvidia 1070 msi laptop Jul 20, 2019 at 7:52
  • Not work on Ubuntu 18.04 install at Razer Studio Nvidia RTX 5000 Mar 11, 2020 at 8:54
  • Not working on Kali linux : HP Spectre x360 1650 ti NVIDIA 4gb Apr 19, 2020 at 21:50
  • not working on HP with Geforce 1650, Ubuntu 18.04
    – rob
    Apr 28, 2021 at 7:52
  • Did not work on an Asus G752VS with a GTX 1070 under Ubuntu 20.04. Pretty different from the usual answers on this topic though! A shame it's still a pain to get brightness working after 16 years of using Ubuntu :( Apr 14, 2022 at 14:57
4

For me this worked on my old laptop with NVIDIA GeForce 410M graphics card, Intel Core i3.

I've tried all of those too and found this one working: you make a file into this folder /usr/share/X11/xorg.conf.d the file name should be this: cat 80-nvidia.conf

so this should be like : /usr/share/X11/xorg.conf.d$ cat 80-nvidia.conf

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "NVS 3100M"
Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection
1

Same issue on Ubuntu 20.04 with GeForce 9400 and NVIDIA 340. I solved it using this answer:

For me this worked on my old laptop with NVIDIA GeForce 410M graphics card, Intel Core i3.

I've tried all of those too and found this one working: you make a file into this folder /usr/share/X11/xorg.conf.d the file name should be this: cat 80-nvidia.conf

so this should be like : /usr/share/X11/xorg.conf.d$ cat 80-nvidia.conf

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "NVS 3100M"
Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection
0

OK I tested it out with a few different versions. This is with the nvidia "legacy" 340.107 drivers. with my macbook late 2009 (nvidia) I got empty /sys/class/backlight in every version of Ubuntu I tried. No amount of tinkering with GRUB_CMDLINE_LINUX_DEFAULT helped. Maybe with newer nvidia cards that don't require the "legacy" old drivers it might be different.

And xbacklight doesn't work either, until you add a device file like Satya's answer to this question mentioned. Then after exiting and logging in again, xbacklight works (ex: `xbacklight -set 60). But not the hotkeys and not the GUI dragger.

There's a library called "nvidiabl" that's supposed to be some fake software drivers to populate /sys/class/backlight when the nvidia ones don't. It didn't compile for me on 18.04 so no go there.

Based on a bug report that ascribed it to a gnome bug "not being able to use xbacklight", tried it with 18.04 with "kde plasma" and unity instead. With both of them the backlight keys work (notwithstanding empty /sys/class/backlight). So guessing it's a thing gnome could work around?

Tested it out using 19.04 and still needed the .conf file added, and /sys/class/backlight is still empty. But now it works natively (gnome), no manual hotkeys needed to call out to xbacklight, woot! Added bonus: gnome is way more cpu efficient in 19.04 than 18.04 so even using nouveau things are snappier, woot (also things are snappier on 18.04 with KDE FWIW).

So overall fix: update to 19.04 and create new conf.d file

1
  • downvoters please leave comments, cheers!
    – rogerdpack
    Nov 13, 2019 at 14:08
0

If /sys/class/backlight/ is empty it means your graphic card driver is not installed. That happens due to a kernel update which does not provide a driver for your GPU.

Issue:

$ sudo lshw -c video

to find out what is your graphic card. For example mine is "GP106BM [GeForce GTX 1060 Mobile 6GB]" which is an Nvidia graphic card.

Then for automatic install of Nvidia driver using PPA repository issue:

$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt install nvidia-driver-440
-1

I followed Satya;s advice but it didn't work for me.

I have also created another config file as per Brightness problem - Ubuntu Forums but it didn't help either.

Finally I followed Ducky's answer as described in Brightness problem Ubuntu 18.04 LTS and changed grub a bit.

Open the file /etc/default/grub using gedit or any other text editor. Find below line.

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"  

Change above line to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

Finally my function keys became operative.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.