The standard Fedora installation process for Xfce desktop includes additional packages that may not be necessary for many users. This guide will allow you to install a minimal Xfce desktop, adding additional packages as needed.
-
A Fedora netinstall LIVE USB.
-
sudo privileges to install packages and run optional install script.
In the Software Selection menu, select Xfce Desktop
as the base environment & add the following additional softwares for the selected environment,
Applications for the Xfce Desktop
Multimedia support for Xfce
Note: You can skip these too maybe, installs a lot of crap.
LightDM was randomly causing Black Screen during some of my system startups. If it happens with you too, switch to SDDM.
Remove LightDM:
sudo dnf remove lightdm
Install SDDM:
sudo dnf install sddm
After this, if SDDM doesn't automatically start on restart, use the following command. (Note: I don't remember if I've used this command. So it might be wrong.)
sudo systemctl start sddm
Prerequisites:
- This guide requires the secure boot to be turned off to load up the unsigned NVIDIA kernel modules.
sudo dnf update
Install nonfree repositories & enable fedora-cisco-openh264 repository:
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf config-manager --enable fedora-cisco-openh264
sudo dnf update --refresh
Update the system:
sudo dnf update -y
Note: Reboot if not on the latest kernel.
Install the following packages:
sudo dnf install gcc
sudo dnf install automake
sudo dnf install akmod-nvidia
sudo dnf install xorg-x11-drv-nvidia-cuda
sudo dnf install xorg-x11-drv-nvidia-libs.i686
You must wait 5-10 minutes for the kernel modules to load. Please do not proceed to the next steps immediately. (Note: I'm not sure if it is necessary to wait. I've never tried not waiting. Just saw it in the doc, so putting it here.)
Once the module is built,
modinfo -F version nvidia
should outputs the version of the driver such as 440.64
& not modinfo: ERROR: Module nvidia not found.
sudo grubby --update-kernel=ALL --args='nvidia-drm.modeset=1'
Note: DO NOT restart after this step. Gives me black screen.
Install Vulkan
:
sudo dnf install vulkan
Install NVENC/NVDEC
:
sudo dnf install xorg-x11-drv-nvidia-cuda-libs
Note: xorg-x11-drv-nvidia-cuda already covers this installation.
Install VDPAU/VAAPI
:
sudo dnf install nvidia-vaapi-driver libva-utils vdpauinfo
Install xrandr
:
sudo dnf install xrandr
Edit the nvidia.conf
from /usr/share/X11/xorg.conf.d/
to add
Option "PrimaryGPU" "yes"
in the OutputClass
section of it.
For example, use MousePad
with root privileges to edit the nvidia.conf
file. Use the following command to launch MousePad
as root.
sudo MousePad
Then open nvidia.conf
file in MousePad
from /usr/share/X11/xorg.conf.d/
& make the required changes.
The file should look similar to this.
#This file is provided by xorg-x11-drv-nvidia
#Do not edit
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration"
Option "SLI" "Auto"
Option "BaseMosaic" "on"
Option "PrimaryGPU" "yes"
EndSection
Section "ServerLayout"
Identifier "layout"
Option "AllowNVIDIAGPUScreens"
EndSection
You can see the additions in both sections.
Execute the following command to copy the display render details for the X11:
sudo cp -p /usr/share/X11/xorg.conf.d/nvidia.conf /etc/X11/xorg.conf.d/nvidia.conf
Edit the Xsetup
file from /etc/sddm/
to add:
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
Restart SDDM:
systemctl restart sddm
Reboot your system and proceed to the next steps to verify the change in configuration.
sudo reboot
Execute:
glxinfo | egrep "OpenGL vendor|OpenGL renderer"
It should show your NVIDIA GPU.
Execute:
neofetch
It should show your NVIDIA GPU under the GPU name.
Execute:
glxgears
It should display 3D OpenGL graphics by running glxgears
program.
To boot using the Nouveau driver instead of the NVIDIA binary driver, edit the kernel entry from grub bootloader & remove the following linux boot command arguments,
rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1
then boot with the updated boot command.