Due to driver compatibility issues, the open source graphics card driver cannot be used directly, and only the closed source Nvidia driver can be used. As a result, the screen brightness cannot be adjusted. The solution is as follows:
Method 1: Use Brightness-controller (simple, but not the root cause)
sudo add-apt-repository ppa:apandada1/brightness-controller
sudo apt-get update
sudo apt-get install brightness-controller-simple
Method 2: Adjust system configuration to achieve brightness control (recommended)
- Make sure the Nvidia discrete graphics driver is installed
It can be installed in Ubuntu's Softwares center, or it can be installed using the command line.
If it is found /sys/class/backlight
to be empty by accident (it should have content normally), proceed to the following steps.
- Revise
/etc/default/grub
ps: I am using the Sublime editor, so yes subl
, if you are used to gedit, please change accordingly gedit
.
sudo subl /etc/default/grub
Bundle
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
change into:
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash acpi_osi=Linux”
GRUB_CMDLINE_LINUX="acpi_backlight=vendor“
save, thenupdate-grub
sudo update-grub
After restarting, it is found that the brightness cannot be adjusted, but the brightness icon will appear after pressing the shortcut key.
- modified
10-nvidia.conf
configuration
sudo subl /usr/share/X11/xorg.conf.d/10-nvidia.conf
Add Option "RegistryDwords" "EnableBrightnessControl=1"
it in, for example, my modification is:
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration"
Option "RegistryDwords" "EnableBrightnessControl=1"
ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg"
EndSection
- modify
/etc/modprobe.d/blacklist.conf
, disable*labtop
sudo gedit /etc/modprobe.d/blacklist.conf
Add at the end of the file:
blacklist dell-laptop
The keywords of different brands are different, mine is dell, corresponding dell-labtop
, part of the association is ideapad_laptop
that different brands can use sudo find /sys/ -type f -iname '*brightness*' | grep labtop
to view the corresponding keywords ( labtop
just see the words).
latest updateupdate-initramfs
sudo update-initramfs -u
Then restart the computer.
- If it still doesn't work, follow the steps
sudo subl /etc/initramfs-tools/modules
Add the following at the end:
nvidia
nvidia-drm
nvidia-modeset
Finally update update-initramfs
, then restart the computer, try to adjust the brightness shortcut key, everything is ok.
sudo update-initramfs -u
- regret medicine
If after using any of the above steps, the boot is stuck on any interface, it means that there is a problem with the configuration, use the following steps to restore the modified configuration file:
Power on Esc
, then select Adavance ...
that item (the second item?), then select ...(recovery mode)
, and then select ...root
, a command line interface will appear, use vim to restore the modified file, then execute sudo update-grub
or sudo update-initramfs -u
, and finally reboot
restart.
reference:
- Solve the problem that the brightness adjustment of the Linux desktop does not work
- Ubuntu system installs the graphics card driver and the screen brightness cannot be adjusted after installation
- (Linux system) Under Ubuntu, the Fn function key cannot be used to adjust the screen brightness and /sys/class/backlight is empty.