$ lspci | grep -i --color vgaResult:
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)01:00.0 VGA compatible controller: NVIDIA Corporation GM206 [GeForce GTX 960] (rev a1)Driver installed for GeForece GTX 960 (device 01:00.0):
$ sudo lspci -v -s 01:00.0 | grep KernelResult:
Kernel driver in use: nouveauKernel modules: nouveau$ lspci -nnk | grep -i vga -A3 | grep 'in use'sudo apt install nvidia-driver-418WARNING: Don't restart the computer after installation. Instead, follow next steps intermediately:
/etc/modprobe.d/blacklist-nouveau.conf with the following contents: blacklist nouveauoptions nouveau modeset=0$ sudo update-initramfs -uFind out the connected display:
$ xrandr -q | grep ' connected' | head -n 1 | cut -d ' ' -f1In my case, the connected display is HDMI-3. You can now set the brightness with this command (values between 0.0 and 1.0):
$ xrandr --output HDMI-3 --brightness 0.8Xrandr allow us to change monitor brightness between the ranges of 0.0 and 0.99 values, being 0.0 total darkness and 0.99 total brightness. We can make a command to set the brightness.
Note: For this work on Fedora, you must disable Wayland and enable Xorg as default GNOME session. Please read intructions here.
$ mkdir bin$ vi bin/mycommand#!/bin/bashdisplay=$(xrandr -q | grep ' connected' | head -n 1 | cut -d ' ' -f1)xrandr --output $display --brightness 0.$1$ chmod +x bin/mycommand~/.bashrc and add the following line:export set PATH=$PATH:~/binUsage example
Set brightness to 0.75:
$ mycommand 75In case you want to restore your system to the state it was before, do:
If you can't use your desktop environment:
hit Ctrl+alt+F2
login as root
# apt-get purge nvidia. (don't forget the "." dot) It erases every package with "nvidia" on its name # /etc/init.d/gdm3 stop (gdm3 for gnome 3) # apt-get install --reinstall xserver-xorg # apt-get install --reinstall xserver-xorg-video-nouveau # killall Xorg # rebootXorg should reconfigure itself, if not run a terminal and pass
# X -configure