Story opener
You just installed a new piece of software, or maybe you are trying to share your screen in a video call, and the application behaves strangely. Cursor lag, missing overlays, or a flat refusal to capture the desktop. The first question you need to answer is not about the application. It is about the display server. Fedora ships with Wayland as the default, but your system might be running Xorg instead. Knowing which one is active changes how you troubleshoot.
What is actually happening
The display server is the layer that translates your mouse clicks and keyboard strokes into pixels on the screen. Xorg has been the standard for decades. It works by giving every application direct access to the screen buffer. Wayland changes the model. It acts as a strict gatekeeper. Each application gets its own isolated buffer, and the compositor stitches them together. This isolation improves security and reduces screen tearing, but it also breaks tools that expect direct screen access. When an app misbehaves, checking the active session type tells you whether you are dealing with legacy X11 compatibility or modern Wayland isolation.
Think of Xorg like a shared whiteboard. Every program can draw on it, erase it, or stick a sticky note anywhere. Wayland is like a series of locked glass panels. Each program gets its own panel. The compositor is the window frame that holds them together. You cannot reach through another program's panel to grab its cursor or read its pixels. That design choice is why some older tools fail on Wayland and why modern applications run smoother.
Fedora defaults to Wayland because the protocol handles high-DPI displays, touch input, and multi-monitor setups without the legacy baggage of X11. The display manager negotiates with the kernel and your GPU driver during boot. If the driver supports modern buffer sharing, GDM launches a Wayland compositor. If the driver lacks support or reports a critical failure, GDM falls back to Xorg to keep the desktop functional.
How to check the active session
Open a terminal and run the environment variable check. This is the fastest method because the shell already knows which session it belongs to.
echo $XDG_SESSION_TYPE
# Prints wayland or x11 directly to the terminal
# The variable is set by the display manager when your session starts
# No root privileges are required to read it
If the output says wayland, you are on the modern compositor. If it says x11, you are on the legacy server. The variable is reliable for local desktop sessions. It will be empty if you are connected over SSH without X11 forwarding.
When you need to audit sessions across the system, use loginctl. This command queries systemd directly instead of relying on shell environment variables.
loginctl show-session $(loginctl list-sessions | grep $(whoami) | awk '{print $1}') -p Type
# Queries the systemd logind service for the current user
# Extracts the session ID from the active session list
# Requests only the Type property to keep output clean
The output will read Type=wayland or Type=x11. This method works even if your shell environment is corrupted or if you are checking from a different TTY.
You can also verify the session through the graphical interface. Open the Settings application and navigate to the About panel. The Windowing System line will state Wayland or X11. Match the terminal output to the GUI label. If they disagree, your environment variable is being overridden by a script. Trust the loginctl output in that case.
Verify it worked
You do not need a separate verification step for these commands. The output is immediate. If you want visual confirmation, open the Settings application and navigate to the About panel. The Windowing System line will state Wayland or X11. Match the terminal output to the GUI label. If they disagree, your environment variable is being overridden by a script. Trust the loginctl output in that case.
Common pitfalls and what the error looks like
Several scenarios force Fedora to fall back to Xorg automatically. NVIDIA proprietary drivers used to require X11, though recent driver versions support Wayland. If your GPU driver is outdated, GDM will silently switch to Xorg to keep the desktop functional. You will see x11 in the terminal even though you never selected it. Another common trap is remote desktop. VNC and RDP sessions run on X11 by default because the Wayland protocol does not support multiple concurrent input sources well. If you connect via gnome-remote-desktop or xrdp, the session type will report x11.
Screen sharing applications like Zoom or OBS will fail to capture the desktop on Wayland unless you install the xdg-desktop-portal-gnome package. The error usually looks like a black screen or a permission denied dialog. Check the session type before reinstalling the application. If you see Error: Failed to start screen sharing service in the terminal, the issue is almost certainly a missing portal backend, not a broken display server.
SELinux denials can also interrupt session startup. If your desktop fails to load and drops you to a text console, check journalctl -t setroubleshoot for a one-line summary. Read those before disabling SELinux. A missing policy module or a mislabeled custom script is usually the culprit. Restoring the default context with restorecon -Rv /path/to/file often resolves the hang.
Debugging session failures
When the display server crashes or refuses to start, the terminal is your only reliable window into the problem. Run journalctl -xeu gdm to see why the display manager chose a specific backend. The x flag adds explanatory text and the e flag jumps to the end. Most sysadmins type journalctl -xeu <unit> muscle-memory style. Read the actual error before guessing. If the log shows Failed to initialize Wayland compositor, your hardware acceleration is likely misconfigured. Check your driver packages before disabling Wayland entirely.
If the graphical interface is completely unresponsive, switch to a virtual console by pressing Ctrl+Alt+F3. Log in with your username and password. From the TTY, you can inspect logs, reinstall drivers, or reset configuration files without risking a partial save state. Configuration files in /etc/ are user-modified. Files in /usr/lib/ ship with the package. Edit /etc/. Never edit /usr/lib/.
sudo dnf upgrade --refresh
# Forces dnf to re-download all metadata before applying updates
# Resolves stale package cache issues that break driver installations
# Run this weekly as standard maintenance before troubleshooting
After updating packages, restart the display manager with sudo systemctl restart gdm. The change takes effect immediately. Test the new configuration in a separate session before logging out of your current work. A botched configuration can lock you out of the graphical interface. Reboot before you debug. Half the time the symptom is gone.
How to switch between Wayland and Xorg
Fedora lets you choose your display server at the login screen. Click your username, then look for the gear icon in the bottom right corner. Select GNOME on Xorg to force the legacy server. Select GNOME to use the default Wayland session. The choice applies only to that login. It does not change the system default.
If you need to enforce a system-wide default, edit the GDM configuration file.
# /etc/gdm/custom.conf
[daemon]
# Uncomment to force Xorg for all users
# WaylandEnable=false
# Leave commented to keep Wayland as the default
Save the file and restart the display manager with sudo systemctl restart gdm. The change takes effect immediately. Test the new default in a separate session before logging out of your current work. A botched configuration can lock you out of the graphical interface. Reboot before you debug. Half the time the symptom is gone.
When to use Wayland versus Xorg
Use Wayland when you want hardware-accelerated compositing, better input latency, and stricter application isolation. Use Xorg when you rely on screen recording tools that require root access, or when you run legacy enterprise software that hooks into the X11 window manager. Use Wayland for daily desktop work and gaming. Use Xorg for remote desktop hosting or when troubleshooting GPU driver instability. Stay on the default Wayland session unless a specific workflow breaks. Trust the package manager. Manual file edits drift, snapshots stay.