By now, you should have most of the packages needed to compile any packages on this page and beyond. The good news is you are now done with the hardest part of this book. Congrats!
Well, where do you go from here? You could continue straight to the following chapters if you wish. But to run graphical programs like Steam-1.0.0.82 and Wine-10.4 (including wineboot as shown in the setup for DXVK-2.6), you will need a graphical environment. There are a few components you will need in order to get a graphical environment working and not accidentally lock yourself inside of it without a hard reboot. The installation of those components is not covered in this book, as the specific components will depend on if you plan to use X11, Wayland, or both. This page acts as a simple nudge to help point you in the right direction. When you are done setting up your graphical environment, you can come back and continue with the next chapters.
While you are at it, make sure you have followed The Bash Shell Startup Files if you have not already as the files in that section set necessary variables.
It is recommended to read up on the BLFS page Xorg-7 Testing and Configuration. It is pretty comprehensive. However, using NVIDIA-570.133.07 with X11 requires a slightly different setup, and there may be extra information you wish to know.
Using a conventional /etc/X11/xorg.conf
can lead to issues, if
X11 manages to even start. In
order to use the NVIDIA driver
when starting X11, run the
following command as the root
user:
nvidia-xconfig
The above command will overwrite the current /etc/X11/xorg.conf
configuration file. If you
wish to preserve it, move it out of the way or rename it.
If you desire to use a high refresh rate, using cvt as the method will result
in failure. When you start the server, launch nvidia-settings as the
root
user and navigate to the
“X Server Display
Configuration” section on the left sidebar and
change the Hz located to the right of the screen size. Click
“Apply”
when you are done, accept the changes, then click “Save to X Configuration
File”. If given the option, choose to merge the
file. Note that this method requires GTK3.
If you have an integrated graphics card (being either AMD or
Intel) and a discrete graphics card (being NVIDIA), run the
following as the root
user:
nvidia-xconfig --prime
It will tell you to run a few commands. While in a TTY, put those
commands into your ~/.xinitrc
file,
or else when you start Xorg you will be greeted with a black
screen. You can also put the commands in a different script and
use a keybind to open a terminal and blindly execute the script —
at which point the graphics should appear like normal. Running
the commands in a TTY will result in complaints that no screens
were found. Additionally, make sure you have installed drivers
for both your iGPU and dGPU.
If you compiled Zink in Mesa-25.0.2, chances are X11 or any Wayland compositors will use the Gallium3D driver meant for your GPU specifically (for example, Nouveau for NVIDIA GPUs). You can override this by setting the following variable:
export MESA_LOADER_DRIVER_OVERRIDE=zink
This could be considered unstable, so if you experience crashes, the Zink driver could be the issue and you should use the Gallium3D driver meant for your GPU instead.
There are typically three important components of an X11 environment:
a window manager or desktop environment
a terminal and/or launcher
and optionally a compositor
A window manager is an application that manages windows, their
placement, how they move, and more. It is a minimal option for
a graphical environment. Some popular window managers include
AwesomeWM,
BSPWM, DWM, and i3. In
order to start your chosen window manager, add the following
line to ~/.xinitrc
:
echo "exec <WINDOW-MANAGER>
" >> ~/.xinitrc
Then launch it:
startx
A desktop environment is a more user-friendly graphical environment which provides much more than a standard window manager [9]. However, desktop environments also require more packages, RAM usage, and disk space. Some popular desktop environments include Cinnamon, GNOME, and KDE Plasma. These should be loaded by a display manager, like SDDM. A display manager is often loaded by a service or daemon.
By this point, you should know what a terminal is, whether it be a TTY or a graphical terminal. Terminals are almost a necessity and help when you are in a pinch. You can launch most applications with a terminal. This is useful when you have no other way to launch an application. There are a wide variety of terminals and some integrate better with the system depending on if you went with a window manager or desktop environment. Check the Arch Wiki page Category:Terminal emulators for a comprehensive list of terminals. Some of the listed terminals are in BLFS. If you decided to go with a window manager, make sure to add a keybind for your chosen terminal.
A launcher is what it sounds like: an application that launches
a specified application. Some launch applications by the binary
name in the PATH
variable, while
others launch applications according to desktop file
entries[10]. Don't be
afraid to create your own! It's okay to be creative sometimes.
Check the Arch Wiki page
Category:Application launchers for a comprehensive list of
launchers. Desktop environments include their own launcher and
are often accessed via the “start menu”. If you decide to use a
window manager, make sure to add a keybind for your chosen
launcher.
A compositor talks with Xorg-Server-21.1.16 and can
change what is seen on screen. Compositors can add animations,
borders, shadows, opacity, etc. to windows. They can also
enable vsync. Though compositors aren't needed on X11, they make the graphical environment
look nicer. These visual enhancements can be GPU-intensive if
the GPU is weak or the graphics driver isn't that
performant[11]. Check the
Arch Wiki page Xorg
Composite for a list of compositors. In order to enable a
compositor when starting a window manager[12], add the following line BEFORE the
line:
exec
...
<compositor>
&
Desktop environments include their own compositors which are started when the desktop environment loads up.
Wayland is much simpler to set up than X11. You should still read the X11 section above, as much of the information is also relevant to Wayland. There are a few changes, however.
Unlike X11, Wayland requires that the nvidia_drm module has the
modeset option set to true, which is not the case by default. Set
it to true by creating the following folder and file as the
root
user, then reboot:
mkdir -pv /etc/modprobe.d &&
cat > /etc/modprobe.d/nvidia.conf << "EOF"
options nvidia_drm modeset=1
EOF
Then you will only need to worry about the refresh rate if it's applicable to you. You won't need to worry about making sure the NVIDIA driver is used when starting Wayland. However, read through the installation instructions for your chosen graphical environment, as they may have information regarding NVIDIA. Results can be shotty, and sometimes the environment won't be able to start. Be diligent.
Unlike on X11, the window manager and compositor will always be combined on Wayland. Minimal graphical environments are called compositors instead of window managers, but desktop environments are still called desktop environments. For compositors, the only additional components that need to be installed are a terminal and optionally a launcher.
Many X11 window managers do not support Wayland. There are some unofficial ports that use certain reusable frameworks which would be called an X11 compositor, like wlroots (these are called compositor libraries). You can try some ports if you wish but some of them do their own thing which you may not agree with.
Native Wayland compositors include Hyprland, Sway, and Wayfire. In order to start these compositors, you can start them by using a display manager or simply running their binary.
Go with GNOME or KDE Plasma. They have good Wayland support. Like with X11, you can launch these using a display manager.
[9] It is worth noting that a desktop environment includes a window manager.
[10]
Desktop files are often located in /usr/share/applications
and/or ~/.local/share/applications
.
[11] If you decide to use a compositor, it might be a good idea to temporarily kill it when gaming.
[12] Note that some window managers handle compositing on their own. For more information, reference the Arch Wiki page Xorg Composite.