How to Configure Display Resolution and Refresh Rate on Fedora

Configure Fedora display resolution and refresh rate instantly using the xrandr command line tool.

You connected a high-refresh monitor and Fedora won't use it

You just connected your new 144Hz monitor to your Fedora workstation. The desktop boots, but the settings menu only shows 60Hz. Or you plugged in a 4K display and everything looks tiny because the system defaulted to 1080p. You need the correct resolution and refresh rate without reinstalling the OS. The hardware supports the mode, but the software stack is holding back.

What controls your display modes

The display pipeline has layers. The kernel detects the monitor via EDID (Extended Display Identification Data). EDID is a small memory chip on the monitor that tells the GPU what resolutions and refresh rates the panel supports. The kernel reads this data and passes it to the graphics driver. The compositor (GNOME Shell, KWin, or Sway) reads the driver's list and presents options in the GUI.

Sometimes the EDID is missing, corrupted, or the cable limits the bandwidth. The system falls back to a safe mode. You have to inject the correct mode manually or force the compositor to accept a mode it thinks is invalid.

Think of EDID like a menu at a restaurant. The kitchen can cook anything, but it only serves what is on the menu. If the menu is missing the steak, you have to ask the chef to cook it anyway. xrandr is how you talk to the chef on X11. On Wayland, you talk to the compositor directly.

Fedora defaults to Wayland for most desktop sessions. The tools you use depend on whether you are running X11 or Wayland. Check your session type before running commands.

Check your session type first

Wayland and X11 handle display configuration differently. Running X11 commands on a Wayland session often does nothing or returns stale data. Verify your session to pick the right tool.

# Check if you are running X11 or Wayland.
# WAYLAND_DISPLAY is set only in Wayland sessions.
# If this prints nothing, you are likely on X11.
echo $WAYLAND_DISPLAY

If the output is wayland-0, you are on Wayland. Use gnome-tweaks, kcmshell5, or wlr-randr depending on your desktop environment. If the output is empty, you are on X11. Use xrandr.

Apply resolution and refresh rate on X11

On X11, xrandr is the standard tool. It queries the X server for connected outputs and available modes. You can switch modes instantly.

# List connected outputs and available modes.
# Look for the output name like HDMI-1 or DP-1.
# The asterisk (*) marks the current active mode.
xrandr

Find your output name in the output. It is usually HDMI-1, DP-1, or eDP-1. Look for the mode you want in the list under that output. If the mode exists, apply it directly.

# Switch the output to a specific resolution and refresh rate.
# Replace HDMI-1 with your output name.
# Replace 1920x1080 and 144 with your target values.
xrandr --output HDMI-1 --mode 1920x1080 --rate 144

If the refresh rate is missing from the list, the EDID does not advertise it. You must create a custom mode.

Create a custom mode when the list is incomplete

When the desired mode is missing, you generate the timing parameters manually. The cvt command calculates a modeline compatible with modern digital displays. The modeline contains the pixel clock and timing values the hardware needs to render the frame.

# Calculate timing parameters for a custom mode.
# cvt generates a modeline for digital displays.
# Replace 1920 1080 144 with your resolution and refresh rate.
cvt 1920 1080 144

The output looks like a long string of numbers. Copy the line starting with Modeline. Use that string to create a new mode in xrandr.

# Define the new mode using the modeline from cvt.
# The name "1920x1080_144.00" is arbitrary but must be unique.
# Paste the values from the cvt output after --newmode.
xrandr --newmode "1920x1080_144.00" 230.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync

# Add the mode to the specific output.
# The output must support the bandwidth for this mode.
xrandr --addmode HDMI-1 "1920x1080_144.00"

# Switch the output to the new mode.
xrandr --output HDMI-1 --mode "1920x1080_144.00"

If xrandr prints X Error of failed request: BadMatch, the timing parameters are invalid for the hardware. The cable might be the bottleneck. HDMI 2.0 caps at 4K@60Hz. You need HDMI 2.1 or DisplayPort for higher rates. Check your cable version before forcing a mode.

Persist changes across reboots

Changes made with xrandr are temporary. They vanish when you log out or reboot. You need to save the configuration to make it permanent.

On GNOME, the display settings are stored in ~/.config/monitors.xml. When you apply a mode in the GUI or gnome-tweaks, GNOME writes this file. If you used xrandr to add a custom mode, you can edit the XML file to include it.

# Edit the GNOME display configuration file.
# This file persists across reboots for the current user.
# Backup the file before editing.
cp ~/.config/monitors.xml ~/.config/monitors.xml.bak
nano ~/.config/monitors.xml

Add the custom mode to the XML structure. The format matches the xrandr output. If you prefer X11 persistence, create a configuration file in /etc/X11/xorg.conf.d/.

# /etc/X11/xorg.conf.d/10-monitor.conf
# Xorg reads this directory on startup.
# Place custom modes here to persist across reboots.
# This file applies to all users on the system.
Section "Monitor"
    Identifier "HDMI-1"
    Modeline "1920x1080_144.00" 230.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
    Option "PreferredMode" "1920x1080_144.00"
EndSection

Reboot to test persistence. If the screen goes black, you have 10 seconds to switch to a TTY and fix the config.

Handle NVIDIA proprietary drivers

NVIDIA proprietary drivers have their own display stack. xrandr works, but nvidia-settings is often more reliable. If you are on Wayland with NVIDIA, you must enable DRM modesetting in the kernel parameters. Without this, Wayland fails and display configuration breaks.

# Edit GRUB to enable DRM modesetting for NVIDIA.
# This is required for Wayland and proper refresh rate handling.
sudo nano /etc/default/grub
# Add nvidia-drm.modeset=1 to GRUB_CMDLINE_LINUX.
# Update GRUB config.
sudo grub2-mkconfig -o /boot/grub2/grub.cfg

After updating GRUB, reboot. Use nvidia-settings to configure displays if xrandr struggles. The NVIDIA settings tool writes to /etc/X11/xorg.conf or uses the PRIME profile system. Trust the NVIDIA tool when running proprietary drivers. Manual xrandr edits can conflict with the NVIDIA control panel.

Verify the configuration

Run xrandr again to confirm the active mode. Look for the asterisk next to your resolution and refresh rate.

# Check the current active mode.
# The asterisk (*) indicates the mode in use.
# Verify the refresh rate matches your target.
xrandr | grep '*'

If you are on Wayland, check the refresh rate in gnome-tweaks or the system settings. The terminal output may not reflect Wayland state accurately. Open the settings app and confirm the dropdown shows the correct value.

Common pitfalls and recovery

Setting a bad mode can leave you with a black screen. The monitor rejects the signal, or the GPU cannot generate the timing. You need a recovery path.

If the screen goes black, switch to a virtual terminal. Press Ctrl+Alt+F3. Log in with your username and password. Reset the display to default.

# Reset the display to the default mode.
# This restores the EDID-advertised safe mode.
# Replace HDMI-1 with your output name.
xrandr --output HDMI-1 --auto

If xrandr fails in the TTY, edit the configuration file that caused the issue. Remove the custom mode or fix the typo. Reboot.

Another common error is xrandr: cannot find mode. This means the output name is wrong. Run xrandr without arguments to list the correct names. Output names change if you swap cables or ports. HDMI-1 might become HDMI-2 if you plug into a different port.

Multi-monitor setups with different refresh rates can cause tearing or stuttering. The compositor struggles to sync frames when one monitor runs at 60Hz and another at 144Hz. If you experience jank, set both monitors to the same refresh rate or use a compositor that supports per-monitor refresh rates.

Choose the right tool for your setup

Use gnome-tweaks when you are on GNOME Wayland and need to toggle refresh rates without touching the terminal. Use xrandr when you are on X11 or need to script display changes for automation. Use nvidia-settings when you are running the proprietary NVIDIA driver and xrandr fails to apply modes correctly. Use cvt and xrandr --newmode when the desired resolution or refresh rate is missing from the EDID list. Use monitors.xml when you need to persist custom configurations across reboots on GNOME. Use /etc/X11/xorg.conf.d/ when you manage a server or multi-user X11 system and need system-wide display rules.

Trust the EDID first. Manual modelines introduce timing errors that cause flickering. Only inject custom modes when the hardware supports them but the software does not see them.

Where to go next