Sway does not officially support NVIDIA’s proprietary driver. I run it anyway on Fedora — but not with the stock session and not with GDM or SDDM. Both of those gave me a black screen after the proprietary driver was installed: login manager visible, session starts, no picture.
This post documents the setup that actually works on my machine, in the order I applied it.
System and hardware
This guide was written and tested on the following setup. If your GPU or driver branch differs, the overall flow should still apply — but your package names may vary.
Current system:
| OS | Fedora 44 |
| Kernel | 7.2.11-200.fc44.x86_64 |
| Desktop | Sway (custom session + Fedora start-sway) |
| Display manager | ly |
| GPU | NVIDIA GeForce GTX 1060 6GB |
| Driver packages | akmod-nvidia-580xx / xorg-x11-drv-nvidia-580xx (580.178.04) |
GPUs and driver branches I tried:
| GPU | Driver branch | Notes |
|---|---|---|
| GTX 1060 | akmod-nvidia-580xx / xorg-x11-drv-nvidia-580xx | Current machine (Pascal). Needs the 580xx branch on RPM Fusion |
| RTX 3060 Ti | akmod-nvidia / xorg-x11-drv-nvidia-cuda (595.xx) | Earlier machine; same ly + kernel param + --unsupported-gpu flow |
Kernel parameters, nvidia.conf, and the session launch pattern did not change between the two cards — only the package names.
1. Enable RPM Fusion (nonfree)
Fedora does not ship the proprietary NVIDIA driver. I only added the nonfree RPM Fusion repo — that was enough for the NVIDIA packages I needed.
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm After that, these repo files showed up under /etc/yum.repos.d/:
rpmfusion-nonfree.reporpmfusion-nonfree-updates.reporpmfusion-nonfree-updates-testing.repo(disabled by default)
The enabled ones I actually use:
rpmfusion-nonfree
rpmfusion-nonfree-updates No separate rpmfusion-free repo on my system — nonfree alone covered the driver install.
2. Install the proprietary driver
Pick the RPM Fusion branch that matches your GPU generation.
On the GTX 1060 (Pascal):
sudo dnf install akmod-nvidia-580xx xorg-x11-drv-nvidia-580xx On newer cards (for example an RTX 3060 Ti), the rolling package is usually enough:
sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda Reboot after install so akmods can finish building the kmod for your running kernel. Then confirm the proprietary module loaded:
lsmod | grep nvidia
cat /sys/module/nvidia_drm/parameters/modeset You want nvidia / nvidia_drm in lsmod, and modeset Y.
Optional: nvidia-smi is useful, but it may live in a separate CUDA/tools package depending on the branch. If the command is missing, that alone does not mean the driver failed — check lsmod and /var/cache/akmods/ (or /var/log/akmods/) first.
Important: if you previously removed the proprietary packages, Fedora will fall back to nouveau. Sway will start in that state. After you reinstall NVIDIA and blacklist nouveau, Sway will suddenly refuse to start unless --unsupported-gpu is present. That is expected — you switched drivers, you did not break Sway.
3. Kernel parameters
I did not use a modprobe drop-in. The full GRUB_CMDLINE_LINUX line from /etc/default/grub on my system:
GRUB_CMDLINE_LINUX="rhgb quiet nvidia-drm.modeset=1 rd.driver.blacklist=nouveau,nova_core modprobe.blacklist=nouveau,nova_core" What each part does:
nvidia-drm.modeset=1— kernel mode setting for Waylandrd.driver.blacklist=nouveau,nova_core— keep the open-source driver off at early bootmodprobe.blacklist=nouveau,nova_core— same blacklist once the system is up
After editing /etc/default/grub, regenerate the bootloader config and reboot:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
sudo reboot If you install NVIDIA packages while still logged into a nouveau session, the proprietary module cannot claim the GPU until reboot:
NVRM: GPU ... is already bound to nouveau
NVRM: No NVIDIA devices probed. Blacklist + reboot fixes that.
4. NVIDIA environment variables
Sway needs a few wlroots/NVIDIA variables. Mine live in ~/.config/environment.d/nvidia.conf:
WLR_NO_HARDWARE_CURSORS=1
GBM_BACKEND=nvidia-drm
__GLX_VENDOR_LIBRARY_NAME=nvidia WLR_NO_HARDWARE_CURSORS=1 fixes the invisible cursor. Without it I had a working desktop and no pointer.
Fedora’s /usr/bin/start-sway loads environment.d for you. Keep NVIDIA-specific vars here, not duplicated in the session script.
5. Why a custom Sway session — and why ly
Stock GDM and SDDM both failed with the proprietary driver: black screen at login, no output at all. The display manager itself was not usable on my setup.
The fix was a TTY-based display manager. I installed ly — minimal, runs on a TTY, no graphical greeter fighting the NVIDIA stack.
Then I created a Sway Custom session. Reasons:
- Sway refuses proprietary NVIDIA unless you pass
--unsupported-gpu - I needed a single entry point that starts Sway correctly under ly
- A custom
.desktopfile survives package updates better than patching the stock one
Pass --unsupported-gpu for every Sway session
Fedora’s /usr/bin/start-sway reads ~/.config/sway/environment. Put the flag there so both the stock Sway entry and Sway Custom get it:
~/.config/sway/environment:
# Loaded by /usr/bin/start-sway for every Sway session (stock + custom).
# Required when the proprietary NVIDIA module is loaded.
SWAY_EXTRA_ARGS="$SWAY_EXTRA_ARGS --unsupported-gpu" Session desktop file
/usr/share/wayland-sessions/sway-custom.desktop:
[Desktop Entry]
Name=Sway Custom
Comment=Sway with NVIDIA --unsupported-gpu
Exec=/home/osman/start-sway.sh
Type=Application
DesktopNames=sway Adjust the Exec= path to wherever you put your startup script.
Startup script
~/start-sway.sh:
#!/bin/bash
# Sway + NVIDIA proprietary launcher for ly.
# Do NOT use dbus-run-session here — ly already sets DBUS_SESSION_BUS_ADDRESS.
set -euo pipefail
LOG="${XDG_STATE_HOME:-$HOME/.local/state}/sway-start.log"
mkdir -p "$(dirname "$LOG")"
exec >>"$LOG" 2>&1
echo "==== $(date -Is) starting Sway Custom ===="
export XDG_CURRENT_DESKTOP="${XDG_CURRENT_DESKTOP:-sway}"
export XDG_SESSION_TYPE="${XDG_SESSION_TYPE:-wayland}"
export MOZ_ENABLE_WAYLAND=1
export CLUTTER_BACKEND=wayland
# Prefer Fedora's wrapper so environment.d / sway/environment are loaded.
if [ -x /usr/bin/start-sway ]; then
exec /usr/bin/start-sway --unsupported-gpu "$@"
fi
exec /usr/bin/sway --unsupported-gpu "$@" Make it executable:
chmod +x ~/start-sway.sh Why this shape:
- ly already starts a user session and sets
DBUS_SESSION_BUS_ADDRESS. Wrapping withdbus-run-sessionnests a second bus and can kill the session immediately (often with a flash of errors and an empty~/.local/state/ly-session.log). - Fedora’s
/usr/bin/start-swayloadsenvironment.dand~/.config/sway/environment, then runsswaywithSWAY_EXTRA_ARGS. - The log file under
~/.local/state/sway-start.logis useful when ly redirects session stdout/stderr poorly.
At the ly login screen, select Sway Custom (or stock Sway, once ~/.config/sway/environment is in place) and log in.
6. Verify
Quick checks after login:
echo $GBM_BACKEND
echo $WLR_NO_HARDWARE_CURSORS
lsmod | grep nvidia
swaymsg -t get_version You should see the NVIDIA module loaded, environment variables set, and Sway running. The proprietary-driver message may still print once as a warning; with --unsupported-gpu the session continues.
Common problems
| Symptom | What I checked |
|---|---|
| Black screen at GDM/SDDM | Switched to ly + custom Sway session |
Sway refuses to start (Proprietary Nvidia drivers are in use) | Missing --unsupported-gpu — set it in ~/.config/sway/environment and/or the custom launcher |
Custom session dies in ~1s, empty ly-session.log | Nested dbus-run-session under ly — use /usr/bin/start-sway instead |
| Invisible cursor | WLR_NO_HARDWARE_CURSORS=1 in environment.d |
nvidia-smi missing but desktop works | Tools package not installed; trust lsmod + modeset |
| Module fails after kernel update | Wait for akmods, reboot, check /var/cache/akmods/ |
NVRM: already bound to nouveau | Still on nouveau in the live session — blacklist + reboot |
| Thought “NVIDIA was working yesterday” | Yesterday may have been nouveau after an earlier dnf remove of the proprietary packages |
Logs when stuck:
journalctl -b | grep -iE 'nvidia|sway|ly|NVRM'
cat ~/.local/state/sway-start.log Closing notes
This is not an officially supported configuration. Sway upstream and the Fedora Sway spin both distance themselves from proprietary NVIDIA. I document it because it is what runs on my machine — ly on a TTY, Fedora start-sway with --unsupported-gpu, RPM Fusion nonfree, and explicit kernel blacklists for nouveau.
If you want fewer moving parts on Fedora, GNOME or KDE handle NVIDIA with less friction. I wanted Sway, so I accepted the workarounds.
Changelog
2026-10-20 — Fixed the session launch path after a GTX 1060 reinstall broke login.
| Before | After | |
|---|---|---|
| GPU / packages in “current system” | Documented as RTX 3060 Ti + rolling akmod-nvidia (595.xx) | GTX 1060 + akmod-nvidia-580xx / xorg-x11-drv-nvidia-580xx (580.178.04) |
| Custom launcher | exec dbus-run-session sway --unsupported-gpu | exec /usr/bin/start-sway --unsupported-gpu (no nested dbus under ly) |
--unsupported-gpu coverage | Only inside the custom script | Also in ~/.config/sway/environment via SWAY_EXTRA_ARGS, so stock Sway works too |
| Desktop entry | Name=Sway (Custom), no DesktopNames | Name=Sway Custom, DesktopNames=sway |
| Failure notes | Generic “missing --unsupported-gpu” | Documented ly + dbus-run-session nesting, nouveau fallback after dnf remove, and NVRM: already bound to nouveau |
| Verify step | Relied on nvidia-smi | Prefer lsmod + modeset; nvidia-smi optional |
| Debug aid | Only journalctl | Also ~/.local/state/sway-start.log from the custom launcher |