Screen flickering on Fedora
You boot into Fedora, enter your password, and the desktop pulses. The cursor leaves a trail. Application windows tear horizontally. It happens after a routine update or on a fresh install. You are staring at a screen that refuses to stay stable.
What is actually happening
Screen flickering is rarely a dying panel or a loose cable. It is a timing mismatch between the kernel graphics stack, the display server, and your monitor's refresh cycle. The GPU renders frames and hands them to the compositor. The compositor schedules them for the next vertical blank. When the kernel driver, the display server, and the panel disagree on timing, frames arrive too early or too late. You see black flashes, strobing, or horizontal tearing.
Think of it like a traffic light and a synchronized intersection. The lights change on a fixed cycle. The cars arrive at different speeds. When the timing drifts, the intersection locks up or spills over. The kernel mode-setting driver controls the lights. The display server controls the cars. Fedora ships with open-source drivers that handle AMD and Intel hardware natively. NVIDIA hardware requires a separate proprietary stack that rebuilds itself after every kernel update. When that rebuild fails or the display server picks the wrong backend, the timing breaks.
The kernel Direct Rendering Manager handles hardware initialization. It negotiates resolution, refresh rate, and color depth with the monitor over the DisplayPort or HDMI link. If the firmware package is outdated, the GPU falls back to a safe mode. Safe mode disables adaptive sync and forces a lower refresh rate. The compositor expects the advertised refresh rate. The hardware delivers a different one. The mismatch creates the flicker.
The fix
Start by ensuring your system is fully synchronized with the current Fedora release. Package drift is the most common cause of driver mismatches.
Here is how to refresh the package metadata and apply all pending updates in one transaction.
sudo dnf upgrade --refresh -y
# --refresh forces dnf to ignore cached metadata and pull fresh repo state
# -y skips the interactive confirmation prompt for automated runs
Fedora's release cadence is six months. The N-2 release goes end-of-life when N+1 ships. Plan upgrades on that cycle. Running dnf upgrade --refresh is the normal weekly maintenance command. dnf system-upgrade is for crossing major Fedora releases. They are different commands. Don't conflate them.
After the base system updates, address the graphics stack. The path depends on your GPU vendor.
Here is how to install and activate the proprietary NVIDIA driver stack.
sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda -y
# akmod-nvidia builds the kernel module against the running kernel
# xorg-x11-drv-nvidia-cuda provides the userspace libraries and X11 backend
The akmod package contains the source code for the NVIDIA kernel module. The kmodtool service compiles it automatically when the kernel changes. If you are using Secure Boot, the unsigned module will be rejected by the kernel. You must enroll the MOK key during the first boot after installation. Follow the blue screen prompts. Type your password. Enroll the key. Reboot again.
Here is how to verify the NVIDIA module loaded correctly after the reboot.
lsmod | grep nvidia
# lsmod lists currently loaded kernel modules
# grep filters the output to show only NVIDIA-related entries
If you are on AMD or Intel hardware, the open-source drivers are already in the kernel. You only need to ensure the firmware and userspace components are current.
Here is how to update the firmware packages that feed the AMD and Intel GPU stacks.
sudo dnf install linux-firmware -y
# linux-firmware contains the binary blobs required for GPU initialization
# dnf handles dependencies automatically and replaces outdated firmware files
Reboot before you debug. Half the time the symptom is gone.
Verify it worked
A stable desktop does not guarantee the underlying stack is healthy. Check the compositor and driver state directly.
Here is how to confirm which display server and backend your session is using.
echo $XDG_SESSION_TYPE
# XDG_SESSION_TYPE reports wayland or x11 for the current login session
# Wayland is the default on Fedora Workstation since version 34
Here is how to check the kernel DRM subsystem for initialization warnings.
journalctl -b -t kernel | grep -i drm
# -b scopes the output to the current boot cycle
# -t kernel filters for kernel ring buffer messages
# grep -i drm isolates Direct Rendering Manager events
Look for lines containing NVRM or amdgpu or i915. Clean initialization ends with loaded or initialized. If you see failed to load or timeout, the driver did not bind to the hardware. Run journalctl -xe to read the full context. The x flag adds explanatory text and the e flag jumps to the end. Most sysadmins type journalctl -xeu <unit> muscle-memory style.
Here is how to verify the OpenGL renderer matches your hardware.
glxinfo | grep "OpenGL renderer"
# glxinfo queries the Mesa or NVIDIA OpenGL stack
# grep isolates the renderer string to confirm driver selection
If the output shows llvmpipe or softpipe, the system is falling back to software rendering. Software rendering cannot sync with the panel refresh cycle. The flicker will persist until the hardware driver loads. Check dmesg | grep -i nvidia or dmesg | grep -i amdgpu for the rejection reason.
Common pitfalls and what the error looks like
The dnf upgrade command will refuse to proceed and print Error: Transaction test error: package nvidia-driver conflicts with kmod-nvidia. The conflict is intentional. The package manager prevents two kernel module providers from occupying the same slot. Remove the conflicting package before proceeding.
If you see [FAILED] Failed to start gdm.service during boot, your display server configuration probably references a missing backend. GDM falls back to X11 when Wayland fails. Check /etc/gdm/custom.conf. The WaylandEnable=false line forces X11. Comment it out to restore the default behavior. Config files in /etc/ are user-modified. Files in /usr/lib/ ship with the package. Edit /etc/. Never edit /usr/lib/.
Secure Boot breaks akmod builds by design. The kernel refuses to load modules without a valid signature. You will see Loading module nvidia: module verification failed: signature and/or required key missing - tainting kernel in dmesg. Enroll the MOK key or disable Secure Boot in the firmware setup.
Wayland and X11 handle tearing differently. X11 relies on the driver to sync frames. Wayland delegates synchronization to the compositor. If you switch backends without updating the compositor, you will get screen tearing that looks like flickering. Run gnome-session-quit --logout --no-prompt to switch sessions cleanly.
SELinux denials show up in journalctl -t setroubleshoot with a one-line summary. Read those before disabling SELinux. A mislabeled NVIDIA library can trigger an access denial that blocks the X11 backend from starting. The system will drop to a TTY and leave you staring at a black screen. Trust the package manager. Manual file edits drift, snapshots stay.
When to use this vs alternatives
Use Wayland when you want smoother cursor movement and better multi-monitor scaling. Use X11 when you are running legacy applications that require direct X11 extensions. Use the proprietary NVIDIA stack when you need CUDA compute or Vulkan ray tracing. Use the open-source Nouveau driver when you want a fully free software stack and can accept lower 3D performance. Use akmod-nvidia when you want automatic kernel module rebuilding after updates. Use kmod-nvidia when you need a precompiled binary module for a specific kernel version. Stay on the default Fedora Workstation configuration if you only deviate from the defaults occasionally.