O3DE on Fedora Kinoite/Silverblue

This video was recorded on Fedora Kinoite 38 on Wayland with an Nvidia RTX 4090 using an old test project. The view jump at 0:22 is because the mouse isn't locked to the center, and I guess it confused my camera when it went to a second monitor. There's probably a way to fix that.

Fedora Silverblue is an immutable Linux-based operating system, and Fedora Kinoite is the exact same thing, except using the KDE desktop environment by default (instead of Gnome). If you happen to be the one other person in the universe who is interested in this particular combination of software, then this tutorial is for you!

This will work with both Xorg and Wayland, and depending on gpu/driver, you may run into subtle and/or extreme bugs. For what it's worth, I had a usable editor experience on my machine with a recent Nvidia GPU under both wayland and X. On wayland though, there were some minor bugs that ranged from mildly annoying to "I can't use this part of the editor at all". Your mileage may vary!

Creating a Toolbox

Since the base system is immutable, I will install everything in a toolbox. Toolboxes are a wrapper around Podman (which is a Docker alternative) that makes it easy and convenient to use for development. Basically, you create a toolbox, and then enter it. While Kinoite's base system is immutable, toolboxes are not, so we can install whatever we want there.

1
2
3
4
#Start by creating a toolbox which will house our development environment
toolbox create dev
#Now 'enter' it
toolbox enter dev

To make things simple, I like to add this snippet to my .zshrc file so that I can add per-toolbox init files that get automatically loaded when I enter them:

1
2
3
4
5
6
7
8
9
#$HOME/.zshrc

#Source toolbox-specific scripts
if [ -f /run/.toolboxenv ]; then
    source /run/.containerenv
    CONFIG=~/.toolbox_${name}.rc
    echo "Loading config ${CONFIG}"
    source ${CONFIG}
fi

(obviously if you're not using zsh, don't put it in .zshrc)

Now we can add a .toolbox_dev.rc file to our home folder, which will be sourced every time we enter the "dev" toolbox. (this will be useful later).

Dependencies

The O3DE docs are written for Ubuntu, so you'll have to find all the equivalent packages for Fedora. I did it manually, one by one as needed, but didn't write everything down since it's likely I'd miss some stuff that was already installed in my toolbox before I started.

To not leave you hanging, I took the dependencies in the official .deb and tried to look up the equivalent names for Fedora:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
sudo dnf install \
    cmake \
    clang \
    ninja-build \
    libxkbcommon-x11-devel \
    libxkbcommon-devel \
    libunwind-devel \
    libzstd-devel \
    pkg-config \
    mesa-libGL-devel \
    mesa-libGLU-devel \
    libxcb \
    libXinerama-devel \
    fontconfig-devel \
    libxkbcommon-devel \
    pcre2-devel \
    zlib-devel

It may or may not be everything you need, but it's a good start.

Installing Nvidia drivers

If you have an Nvidia card, you probably already have the Nvidia drivers installed on your base system, but you'll also need to install them in the dev toolbox, otherwise O3DE and other graphical apps launched from the toolbox wont work.

The caveat is that the version you install in your toolbox needs to match the version you have on your base system. The easiest way to ensure this is to just install the latest version on both. Fortunately, someone on Github provided a nice script to mostly automate this.

You can verify that it works by running nvidia-smi in the toolbox. If it works, you should get an output that looks like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Sun Feb 12 18:00:04 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.85.05    Driver Version: 525.85.05    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0  On |                  N/A |
| 33%   56C    P0   127W / 250W |   2314MiB / 11264MiB |     28%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1168      G   /usr/libexec/Xorg                 474MiB |
|    0   N/A  N/A      1266      G   /usr/bin/kwalletd5                  2MiB |
|    0   N/A  N/A      1405      G   /usr/bin/ksmserver                  2MiB |
|    0   N/A  N/A      1408      G   /usr/bin/kded5                      2MiB |
|    0   N/A  N/A      1411      G   /usr/bin/kwin_x11                 208MiB |
|    0   N/A  N/A      1471      G   /usr/bin/plasmashell               58MiB |
|    0   N/A  N/A      1518      G   ...de-authentication-agent-1        2MiB |
|    0   N/A  N/A      1520      G   ...ec/xdg-desktop-portal-kde        2MiB |
|    0   N/A  N/A      1654      G   /usr/bin/kaccess                    2MiB |
|    0   N/A  N/A      1659      G   .../libexec/DiscoverNotifier        2MiB |
|    0   N/A  N/A      2008      G   /usr/bin/konsole                    2MiB |
|    0   N/A  N/A      3682      G   ...et/ch-0/1.14.78/bin/Fleet       14MiB |
|    0   N/A  N/A      6379      G   ...le/Default/AssetProcessor        2MiB |
|    0   N/A  N/A      7423      G   /usr/bin/dolphin                    2MiB |
|    0   N/A  N/A      8117      G   /usr/lib64/firefox/firefox        168MiB |
|    0   N/A  N/A     10899      G   ...AAAAAAAAA= --shared-files       42MiB |
|    0   N/A  N/A     36926    C+G   ...ux/profile/Default/Editor     1109MiB |
|    0   N/A  N/A     37686      G   ...RendererForSitePerProcess      193MiB |
+-----------------------------------------------------------------------------+

Installing O3DE

As of writing, the latest stable version of O3DE is 22.10.0. You could use the latest version from github, but a stable release is a safer bet if you're planning to start a project.

Fortunately, the official installation docs for O3DE are very helpful. I won't waste time duplicating that information here, so just head on over there and follow the Pre-built SDK engine instructions until you hit a wall.

NOTE: you can do the source engine option instead if you really want to

Creating a new project

Again, there are official instructions, so I won't duplicate that here.

The UI is broken!

Depending on your display setup, it's possible that you'll run into an issue where the UI is broken (text/graphics will look cut off or missing). This problem will affect the editor and the project manager.

Fortunately, fixing this is easy! Just add the following environment variable:

1
export QT_AUTO_SCREEN_SCALE_FACTOR=0

If you re-run the o3de project manager, everything should look fine. To make that variable persistent, you can add it to the $HOME/.toolbox_dev.rc file we created earlier, so that it automatically gets set when we enter the toolbox.