Fortnite on Linux (Fedora + NVIDIA, CachyOS)
Download script.sh Full version
One script that makes NVIDIA work with Secure Boot on Fedora, so Fortnite's
anti-cheat lets you in.
You need
- Fedora Workstation, x86_64
- Secure Boot on
- NVIDIA GTX 16xx, RTX 20xx or newer (not GTX 10xx or older)
CachyOS? Same commands. The script runs CachyOS's own setup (eac-setup), any
GPU. To play: sudo eac-setup boot. Details
Other distros? Not supported, see Other distros.
AMD or Intel GPU? Do not run the script. Turn on Secure Boot, TPM and IOMMU
in BIOS, then run this and reboot (details):
sudo grubby --update-kernel=ALL --args="sysctl.kernel.kexec_load_disabled=1"
Do this
1. Download and run
curl -fLO https://deandark.me/FortniteOnLinux/script.sh
chmod +x script.sh
sudo ./script.sh
2. Reboot. A blue screen appears (only once, so stay there):
Enroll MOK → Continue → Yes → password universalblue → Reboot
3. Run it again
sudo ./script.sh
Asked to remove the current NVIDIA drivers? Type y.
Wait for Update finished!, then reboot. Done.
Later: nothing. It updates Fedora, the kernel and the driver by itself once a
day. When you get "NVIDIA driver updated", reboot before playing.
GNOME Software and dnf upgrade are safe to use.
Undo: sudo ./script.sh --restore brings back the RPM Fusion driver.
Fortnite says "does not recognize a Machine Owner Key"
You have an extra key. The script prints its name:
Warning: other Machine Owner Keys are enrolled: ...
cd /tmp && mokutil --export
for f in MOK-*.der; do echo "$f: $(openssl x509 -inform der -in "$f" -noout -subject)"; done
Find the file with that name (not fedoraca, not ublue kernel) and delete it:
sudo mokutil --delete /tmp/MOK-0002.der
Set any password → reboot → Delete MOK → Continue → Yes → password → Reboot.
Something went wrong
| Message |
Fix |
Secure Boot is disabled. |
Turn it on in BIOS. |
has not built the driver for kernel ... yet |
Wait a day or two, run again. |
wrong checksum |
sudo rm /etc/pki/ublue/public_key.der, run again. |
Update did not finish. |
Safe to reboot, the old kernel is still the default. Read the error above it. |
What it changes
Removes the RPM Fusion NVIDIA driver and installs the signed one from
Universal Blue (the Bazzite people) plus the
matching Fedora kernel, and updates the rest of Fedora. Never reboots by itself.
Credits
Original script by AmilieFOSS, sincerest thanks.
I tuned it up: auto key enrollment, one-step driver swap, one confirmation, anti-cheat
key warnings.
Unofficial. Not made by Fedora, Universal Blue, NVIDIA or Epic.
NVIDIA drivers for Fedora with Secure Boot (Universal Blue)
Download script.sh Short version
script.sh replaces the NVIDIA driver on Fedora with the prebuilt, signed driver
from Universal Blue (the project behind
Bazzite, Bluefin and Aurora), and installs the Fedora kernel that driver was
built for.
Why you might want this:
- The driver works with Secure Boot turned on, without signing anything yourself.
- No compiling on your machine, so no broken driver after a kernel update.
- Games using Easy Anti-Cheat for Linux v2, such as Fortnite, accept the Universal
Blue key. They reject the private key that RPM Fusion's
akmod-nvidia creates.
Contents
Requirements
- Fedora Workstation (or a Fedora spin), not Silverblue, Kinoite or other atomic
editions. Those should use Bazzite, Bluefin or Aurora instead.
- An x86_64 PC (Intel or AMD). Not ARM.
- Secure Boot turned on in the BIOS/UEFI.
- An NVIDIA card supported by the open kernel modules: GTX 16xx, RTX 20xx or
newer. Older cards (GTX 10xx and earlier) are not supported and would be
left without a working driver.
- AMD or Intel GPU: do not use the script, see AMD or Intel GPU.
podman (installed by default on Fedora Workstation).
- An internet connection.
What the script changes
- Adds the Universal Blue key to
/etc/pki/ublue/public_key.der and asks the
firmware to trust it (a Machine Owner Key, MOK).
- Removes the RPM Fusion NVIDIA packages (
akmod-nvidia,
xorg-x11-drv-nvidia*) if they are installed. It lists them and asks first.
- Installs the Universal Blue NVIDIA packages, the matching Fedora kernel and
nvidia-driver-selinux from the negativo17 repository. The negativo17 repository
is used only during this install and is not added to your system.
- Updates the rest of Fedora on every run.
- Makes the new kernel the default boot entry. Older kernels stay installed.
- Turns on daily automatic updates and makes Fedora kernels come only through the
script, see Updating later. It keeps the driver download
cached (about 800 MB), so a day without changes costs only a small request.
sudo ./script.sh --restore undoes the driver change, see
Going back to RPM Fusion.
It never reboots the computer by itself.
How to use it
1. Download and make it executable
curl -fLO https://deandark.me/FortniteOnLinux/script.sh
chmod +x script.sh
2. First run: enroll the key
sudo ./script.sh
On the first run the script downloads the Universal Blue key, checks its
checksum and requests enrollment, then stops with a message like:
Universal Blue key enrollment requested. Reboot now. ...
3. Reboot and confirm the key
Reboot. Before Fedora starts, a blue screen called MOK Manager appears.
It shows up only once, so do not walk away.
- Press a key to start, then choose Enroll MOK.
- Choose Continue, then Yes.
- Type the password:
universalblue
The keyboard is a US QWERTY layout on this screen, and nothing shows while you
type.
- Choose Reboot.
If you missed the screen, run sudo ./script.sh again. It tells you the key is
still waiting, and the screen appears on the next reboot.
You can check the result after booting:
mokutil --test-key /etc/pki/ublue/public_key.der
It should say ... is already enrolled.
4. Second run: install the driver
sudo ./script.sh
If RPM Fusion's NVIDIA driver is installed, the script lists its packages and asks
Remove the current NVIDIA drivers and switch to Universal Blue? [y/N]. Type y.
After that it runs without questions, downloads about 800 MB, installs everything
and ends with:
Update finished! Kernel: ..., NVIDIA: ...
Do not reboot before you see that line. Then reboot and check:
nvidia-smi
Updating later
Nothing to do: updates are automatic. After the first successful run the script
installs itself as /usr/local/sbin/fortnite-on-linux with a daily timer. Once a
day (on AC power, in the background, with low priority) it updates Fedora, then
moves to the newest kernel Universal Blue has built the NVIDIA driver for. When the
driver changes, a notification asks you to reboot: until then, new games and apps
using the GPU may fail to start.
It also tells DNF to take Fedora kernels only through the script (a file in
/etc/dnf/repos.override.d/), so GNOME Software and dnf upgrade are safe to use
and never install a kernel without the NVIDIA driver.
To update right now:
sudo /usr/local/sbin/fortnite-on-linux
Check the last automatic run:
journalctl -u fortnite-on-linux-update -n 30
The script does not update itself. To get a newer version, download it again and
run it once.
Fortnite and Easy Anti-Cheat
Easy Anti-Cheat for Linux v2 accepts only well-known keys. Epic's list includes
the Fedora and Universal Blue keys, so this setup works. It also has other
requirements. Check them with these commands:
| Requirement |
Command |
Expected |
| Secure Boot |
mokutil --sb-state |
SecureBoot enabled |
| TPM 2.0 |
cat /sys/class/tpm/tpm0/tpm_version_major |
2 |
| Kernel lockdown |
cat /sys/kernel/security/lockdown |
[integrity] selected |
| kexec disabled |
cat /proc/sys/kernel/kexec_load_disabled |
1 |
| IOMMU on, no passthrough |
journalctl -k -b | grep 'iommu: Default domain' |
Translated |
| BPF LSM |
cat /sys/kernel/security/lsm |
contains bpf |
If lockdown, kexec or IOMMU do not match, add the boot options and reboot:
# Intel CPU
sudo grubby --update-kernel=ALL --args="lockdown=integrity iommu.passthrough=0 intel_iommu=on sysctl.kernel.kexec_load_disabled=1"
# AMD CPU
sudo grubby --update-kernel=ALL --args="lockdown=integrity iommu.passthrough=0 sysctl.kernel.kexec_load_disabled=1"
TPM 2.0 and IOMMU (VT-d on Intel, AMD-Vi or SVM on AMD) may also need to be
turned on in the BIOS.
"This game does not recognize a Machine Owner Key (MOK)"
Every enrolled MOK must be well-known, so leftover keys block the game. Typical
leftovers: the RPM Fusion akmods key (named after your computer), Ventoy, VirtualBox
or a DKMS key. The script warns about them:
Warning: other Machine Owner Keys are enrolled: kronos_1785354888_5de559e1
To remove one:
cd /tmp && mokutil --export
for f in MOK-*.der; do echo "$f: $(openssl x509 -inform der -in "$f" -noout -subject)"; done
Find the file whose CN= matches the key from the warning (never the ones with
CN=fedoraca or CN=ublue kernel), then:
sudo mokutil --delete /tmp/MOK-0002.der
Use your file's number instead of 0002. Pick any one-time password, reboot,
choose Delete MOK, Continue, Yes, type the password and choose
Reboot.
Removing a key stops the modules it signed from loading. If you later install
something that builds its own kernel module (VirtualBox, OpenRazer, any DKMS
package) and enroll its key, games with Easy Anti-Cheat stop working again.
AMD or Intel GPU
Do not run the script. It is only for NVIDIA cards and stops with
No NVIDIA GPU found. on other GPUs. AMD and Intel drivers are part of the Fedora
kernel and already signed by Fedora, so no extra key is needed.
Fortnite still needs the Easy Anti-Cheat requirements above. On a default Fedora
with Secure Boot on, kernel lockdown and the BPF LSM are already active. Usually
left to do:
In the BIOS/UEFI: turn on Secure Boot, TPM 2.0 (fTPM on AMD, PTT on Intel) and
IOMMU (AMD-Vi on AMD, VT-d on Intel).
Disable kexec, then reboot:
sudo grubby --update-kernel=ALL --args="sysctl.kernel.kexec_load_disabled=1"
Check everything with the table in the section above.
CachyOS
CachyOS has official Easy Anti-Cheat support: a kernel signed by CachyOS
(linux-cachyos-eac) with prebuilt NVIDIA modules, and the eac-setup tool.
On CachyOS the script updates the system and runs eac-setup, nothing else.
AMD, Intel and NVIDIA (GTX 750 and newer) are all supported.
curl -fLO https://deandark.me/FortniteOnLinux/script.sh
chmod +x script.sh
sudo ./script.sh
Things to know before you start, from the
CachyOS guide:
eac-setup may ask you to put the firmware into Setup Mode first
(systemctl reboot --firmware-setup), then run the script again.
- It changes the Secure Boot keys. Have your BitLocker recovery key (Windows
dual boot) or LUKS passphrase ready.
- Fortnite runs only in the separate EAC boot entry. To play, run
sudo eac-setup boot: it reboots into it once, the next reboot goes back to normal.
- DKMS modules (VirtualBox and similar) do not load in the EAC boot entry.
- Not for the Steam Deck.
The automatic updates and --restore are Fedora only. CachyOS updates the EAC
kernel with the normal sudo pacman -Syu.
Other distros
The script supports only Fedora and CachyOS and stops on anything else. Easy
Anti-Cheat needs a kernel signed with a key Epic knows, so the distro has to
provide it:
| Distro |
Fortnite |
| Bazzite, Bluefin, Aurora |
Works out of the box, NVIDIA included. |
| Ubuntu, Linux Mint |
Kernel key is on Epic's list, Epic tested Ubuntu. NVIDIA: use the signed driver from sudo ubuntu-drivers install, not DKMS. Not tested by me. |
| Debian |
Kernel key is on Epic's list. NVIDIA from Debian is built with DKMS, which Easy Anti-Cheat rejects. |
| openSUSE |
Kernel key is on Epic's list. Not tested by me. |
| Arch and other Arch-based distros |
Not supported: no signed kernel with a key Epic knows. Use CachyOS. |
CachyOS kernel on Fedora or other distros: ports that build linux-cachyos
themselves (COPR, PPA, Nix and others) are not signed with a key Epic knows, so they
cannot pass Easy Anti-Cheat. What works is CachyOS's own prebuilt, CachyOS-signed
linux-cachyos-eac binary, booted through CachyOS's signed systemd-boot with the
CachyOS EAC CA enrolled in Secure Boot. CachyOS officially supports this only on
CachyOS. Community repackages exist, for example for NixOS
(nix-cachyos-kernel-eac,
experimental by its own description).
Error messages
| Message |
What to do |
Please run this script with sudo. |
Run sudo ./script.sh. |
No NVIDIA GPU found. |
You do not need this script, see AMD or Intel GPU. |
Only Fedora and CachyOS are supported |
See Other distros. |
Secure Boot is disabled. |
Turn on Secure Boot in the BIOS/UEFI. |
... has the wrong checksum, delete it and run again. |
sudo rm /etc/pki/ublue/public_key.der, then run again. |
An update is already running. |
Wait for the other run to finish. |
Universal Blue has not built the driver for kernel ... yet. |
Your kernel is newer than the driver build. Wait a day or two and run again. |
Expected five NVIDIA modules. or Unexpected module signer. |
The download looks wrong. Nothing was installed. Try again later. |
Canceled, nothing was changed. |
You answered no (or ran it without a terminal). Run again and type y. |
Needs an answer, run it by hand or run by hand |
(automatic update) Run sudo /usr/local/sbin/fortnite-on-linux once and answer. |
The RPM Fusion NVIDIA module did not build |
(--restore) Do not reboot. Read the build log in /var/cache/akmods/nvidia/. |
The RPM Fusion nonfree repository is not enabled |
(--restore) Enable it, see rpmfusion.org. |
Update did not finish. Check the drivers before rebooting. |
The install failed. The old kernel was set as the default again, so a reboot is safe. Read the DNF error above it. |
Going back to RPM Fusion
sudo ./script.sh --restore
It lists the packages, asks for confirmation, turns off the automatic updates and
the kernel lock, removes the Universal Blue driver,
installs akmod-nvidia from RPM Fusion and builds the module for your default
kernel. Wait for Back on the RPM Fusion NVIDIA driver. before rebooting.
If the RPM Fusion signing key is not enrolled, it requests the enrollment. Reboot
and on the blue MOK Manager screen choose Enroll MOK, Continue, Yes,
type rpmfusion and choose Reboot.
The RPM Fusion key blocks games with Easy Anti-Cheat. The Universal Blue key stays
enrolled, it is harmless. The RPM Fusion nonfree repository must be enabled
(how).
Credits
The original script was written by AmilieFOSS.
My sincerest thanks for it. This version builds on it: it enrolls the key by itself,
replaces the RPM Fusion driver in one step after one confirmation and warns about
MOKs that block Easy Anti-Cheat.
Disclaimer
This is an unofficial script. It is not made or supported by Fedora, Universal
Blue, NVIDIA or Epic Games. Read it before running it as root.