NVIDIA GPU
NVIDIA’s GPUs (Graphics Processing Units) are a family of microprocessors that provide a unified architecture for both visual and parallel computing. They are high-performance devices that enable powerful graphics rendering and processing.
In general, the real GPU can be used only in baremetal or on virtualization software that support GPU Passthrough (i.e., VMware vSphere). In these two scenarios, the correct setting of NVIDIA GPU has two scenarios:
- Client with integrated GPU (i.e., Intel GPU) and dedicated GPU (i.e., ASUS ROG Strix GeForce RTX 3060)
- Client without integrated GPU but only a dedicated GPU (i.e., ASUS ROG Strix GeForce RTX 3060)
Athena OS automatically recognizes the NVIDIA GPU and it is able to retrieve the correct driver according to the NVIDIA GPU family and the installed kernel inside of the sytem.
Integrated GPU and Dedicated GPU
During the installation phase in Calamares, Athena will set the NVIDIA drivers automatically.
Xorg
The switch between Integrated and Dedicated GPU can be managed by EnvyControl.
There are three working modes:
- Integrated
- The integrated Intel or AMD GPU is used exclusively
- Nvidia dedicated GPU is turned off to reduce power consumption
- External screens cannot be used if the video ports are wired to the dedicated GPU
- Hybrid
- Enables PRIME render offloading
- RTD3 allows the dGPU to be dynamically turned off when not in use
- Available choices for the
--rtd3
flag (based on the official documentation)0
disabled1
coarse-grained2
fine-grained (default value if you don’t provide one)3
fine-grained for Ampere and later
- Only works in Turing and later
- Available choices for the
- Performance on external screens might be reduced
- Nvidia
- The Nvidia dedicated GPU is used exclusively
- Higher graphical performance and higher power consumption
- Recommended when working with external screens
- If facing screen tearing enable ForceCompositionPipeline with the —force-comp flag
- Allows overlocking (not recommended) with the
--coolbits
flag- The default value is
28
bits however it can be manually adjusted according to this guide
- The default value is
- Wayland sessions default to hybrid mode
Generally, at the first startup, the system should work in Integrated mode. If you wish to switch to a specific mode, here some examples:
- Query the current graphics mode:
Terminal window envycontrol --query - Set graphics mode to integrated:
Terminal window sudo envycontrol -s integrated - Set graphics mode to hybrid and enable fine-grained power control:
Terminal window sudo envycontrol -s hybrid --rtd3 - Set graphics mode to nvidia, enable ForceCompositionPipeline and Coolbits with a value of 24:
Terminal window sudo envycontrol -s nvidia --force-comp --coolbits 24 - Set current graphics mode to nvidia and specify to setup LightDM display manager:
Terminal window sudo envycontrol -s nvidia --dm lightdm - Revert all changes made by EnvyControl:
Terminal window sudo envycontrol --reset
Wayland
Currently EnvyControl does not work on Wayland. In case you are in this kind of environment and you need to switch to a dedicated NVIDIA GPU scenario, Athena OS offers nvx.
Just open a terminal and run:
nvx on
It will turn on the NVIDIA GPU and load the related modules.
Dedicated GPU only
During the installation phase in Calamares, Athena will set the NVIDIA drivers automatically in order to use your dedicated GPU right away.
Remove NVIDIA
If you are on a working environment with no NVIDIA drivers installed, then you install them and you cannot access to your environment (i.e., GNOME crashes at boot time (if you are using GDM) or after login (if you are using a different display manager)), to completely restore a working status, you need to remove completely all NVIDIA components. The only driver package removal is not enough.
To completely remove NVIDIA, boot to a TTY by pressing CTRL + ALT + F2 (or any function key from F2 to F6), login to the session and run:
sudo pacman -Rns <nvidia-driver-pkg-you-installed>
Check on /etc/mkinitcpio.conf
inside MODULES
array that no nvidia
parameters are shown, otherwise, delete them. Move to HOOKS
array and restore kms
parameter, if needed, to finally have:
HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole block sd-encrypt lvm2 filesystems fsck)
and save the file.
Check on /etc/default/grub
, inside GRUB_CMDLINE_LINUX_DEFAULT
variable, that no nvidia
parameters are stored, otherwise delete them.
Run:
sudo rm -rf /etc/ld.so.conf.d/00-nvidia.confsudo rm -rf /etc/X11/xorg.conf.d/10-nvidia*.confsudo rm -rf /usr/share/X11/xorg.conf.d/10-nvidia*.conf
If kernel module exists, remove it by:
sudo rm -rf /etc/modprobe.d/nvidia*.confsudo modprobe -r nvidia
Finally, run:
sudo ldconfigsudo mkinitcpio -P
If no errors occur, reboot the system by running reboot
command.