Difference between revisions of "Running LFS on Linux"
Ramco man8 (talk | contribs) |
Ramco man8 (talk | contribs) (→Fedora) |
||
| Line 58: | Line 58: | ||
Also install winetricks: | Also install winetricks: | ||
| − | sudo | + | sudo dnf install winetricks |
=== Using winetricks to install DXVK and other dependencies === | === Using winetricks to install DXVK and other dependencies === | ||
Revision as of 09:16, 8 March 2026
This document will guide you through the process of installing and configuring Wine and LFS to allow you to run the LFS game client in Linux. We'll also touch on the subjects of configuring your wheel and solving common problems.
Intro
What to expect
Users have reported that LFS runs great on Linux. Force Feedback should be the only point that may cause issues. Graphics and audio appears to be at par with the native environment, and gamepads should work out of the box (although you may have to map the buttons manually).
(June 2025) I (Bokujishin) have been playing LFS on Manjaro Linux (KDE Plasma Wayland) for about 2 years now, and it works just fine. The steps in this article were updated and verified to work on both Manjaro Linux and Ubuntu 24.04 (running in virtual machines), and so should work for most Arch-based and Ubuntu-based distributions.
(March 2026) I (ramco_man8) can also confirm that LFS works fine in Fedora Linux, regardless of your desktop environment (GNOME / KDE / etc). I have added documentation for Fedora Linux users in the following steps.
Prerequisites
- A GPU with Vulkan support.
- Basic knowledge of Linux and your distribution (shell, package manager).
- A recent version of the Linux Kernel.
- Willingness to spend a little time setting things up (probably less time than I spent writing this article!)
Install and configure Wine manually
(NOTE: This is not the recommended way for playing LFS on Linux. See the Bottles method below.)
LFS, like any other Windows software, runs on Linux through wine (or Proton, the Valve-developed fork that runs Steam games). LFS can be run using either of those, but wine is quite simple to setup, and lets you run LFS without launching Steam.
Ubuntu
On Ubuntu, you can install wine with the following command:
sudo apt install wine
Note that LFS is still a 32-bit program, and Ubuntu will only install the 64-bit version of wine, so you need to enable support for the 32-bit architecture, and install wine32:
sudo dpkg --add-architecture i386 && sudo apt update && sudo apt install wine32:i386
Also install winetricks:
sudo apt install winetricks
Manjaro
Manjaro makes things easier for us: you can open the GUI software center/updater to look for "wine" and install it (or use the pamac command, or more generally for Arch, pacman). You don't need to manually add support for the 32-bit architecture or install wine32.
Fedora
On Fedora Linux, the wine meta-package can be installed with the following command(s)
sudo dnf install wine
This should also install wine32 alongside the regular 64-bit wine. Since LFS is a 32-bit application, you can make sure it's installed by running:
sudo dnf install wine32
Also install winetricks:
sudo dnf install winetricks
Using winetricks to install DXVK and other dependencies
(March 2026 Update) DXVK (thus a compatible GPU) is practically essential after the 0.8B graphical update. Expect instability if you don't use it or have a GPU without Vulkan support.
If your GPU supports Vulkan, you should enable dxvk (Vulkan renderer for DirectX) for better performance (in my case, it also prevented crashes from full grids of cars, and properly showed my GPU in the game's options).
You might also want to install the allfonts, cjkfonts and the unifont packages. These provide the core font files that's used in-game (e.g. fancy usernames or Insim windows).
Using the terminal (RECOMMENDED)
Launch your preferred terminal application.
First, install dxvk by running:
winetrick dxvk
Then install the font packages:
winetricks allfonts cjkfonts unifont
Using the GUI
Launch winetricks using either the terminal or your preferred application launcher.
From there, choose Select the default prefix > Install a Windows DLL or component > dxvk.
Restart winetricks and choose Select the default prefix > Install a font > allfonts, cjkfonts and unifont. This might take a while.
During installation, you may see warning about the wine prefix being 64-bit. You can ignore those warnings. On Ubuntu, you will be prompted to install multiple Microsoft redistributables.
Install LFS
If you haven't done so already, download the game from https://www.lfs.net, then open a terminal and execute the setup with wine:
wine LFS_S3_xx_setup.exe
If wine fails to execute with the error wine: could not load kernel32.dll, simply delete the configuration folder in ~/.wine and try again. This error is especially likely to occur on Ubuntu, since we added 32-bit support manually.
Once the game is installed, you can launch it from the app launcher like any other app, or double-click the desktop icon (on Ubuntu, you will first need to allow executing it). You can also go the manual way and launch it through wine:
wine ~/.wine/drive_c/LFS/LFS.exe
This can be useful to get logs in the terminal, if you have issues.
Use Bottles to simplify the installation process
Bottles is a distro-agnostic application (meaning you can run it on pretty much any distribution of your liking) that lets you easily install Windows applications inside so-called "bottles". This (on paper) provides isolation and improved security. The main reason I'm using it here is because it provides a simple GUI that does (mostly) everything mentioned above automatically and reliably.
You need to have Flatpak installed in order to install Bottles.
Install Bottles
Ubuntu
Flatpak can be installed with:
sudo apt install flatpak
After installation, add the Flathub repositories:
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
Manjaro
Flatpak is installed by default on Manjaro 20 and higher. All you need to do is to add the Flathub repositories:
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
Fedora
Flatpak is installed by default on Fedora. If not, you can install it by running:
sudo dnf install flatpak
Then add the repositories:
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
The rest of the guide can be applied to any distro from now on.
You can now install Bottles:
sudo flatpak install com.usebottles.bottles
This shouldn't take too long.
Create the LFS bottle and configure it
At the first launch, Bottles will configure some dependencies automatically. After it's finished, you can then create a bottle by clicking the button.
You can name the bottle whatever you want. Pick the Game preset and click Create.
After the bottle is created, click on the bottle and under Options, click on Settings. Make sure you enable DXVK and VKD3D. If you're on a laptop and want to use your GPU rather than integrated graphics (which will increase performance at the cost of power consumption), enable Discrete Graphics under the Display tab.
Also under the Display tab, click on Advanced Display Settings. Scroll down and set the Renderer as Vulkan. Click Save afterwards.
Head back one menu and click on Dependencies. From that menu, install the allfonts, cjkfonts and unifont packages.
You can now install LFS. Head back to the bottle's main menu and click on ▶ Run Executable.... Select your LFS installer EXE and proceed with the installation.
After LFS is installed, LFS.exe should show up under the Programs tab. Click on the ▶ icon to launch the game.
Controllers and force feedback
All controllers should work out of the box, as far as input is concerned. You will likely need to assign all axes and buttons to your preferences.
The main issue on Linux has to do with FFB, or rather the lack thereof: steering wheel manufacturers typically provide their drivers for Windows only, and getting FFB to work on Linux has historically proven challenging. However, things are much better today than they used to be, and we have several options, even for direct drive wheels and the multiple brands that sell them:
- Oversteer is a generic steering wheel manager for Linux. Some distributions provide packages for it. The github repository also provides links to projects for specific drivers, so you should test FFB with Oversteer first (especially if you have a Logitech or Thrustmaster wheel), and then look for those specific drivers; for direct drive wheels, you can directly check the specific drivers, chances are you will not have FFB out of the box.
- Logitech and Thrustmaster drivers are available in recent Linux kernels, those wheels should therefore work without much trouble.
- Fanatec: A driver specific to Fanatec wheels is being developed. I am myself using a Clubsport DD and driving with this.
- Moza, Asetek, and likely many others: A more universal option, which should work with at least Moza wheels, is available. The repository also claims support for Asetek and other brands (user feedback would be appreciated for those).
Note that wine 10 includes support for raw PID communication, which also helps directly translate FFB to Linux, and additionally allows games to make use of a wheel's advanced features, for instance using the FanatecSDK to communicate with the wheel's LEDs; LFS does not seem to be affected by this. Do also note that at the time of this writing, the wine version packaged with Ubuntu 24.04 is still 9.x.
Firmware updates
While wine allows running all sorts of software on Linux, with various success, firmware updates for your wheel base and other devices are still better left for a Windows OS. If you do not have a Windows PC available, you should try running a virtual machine. Or maybe we can petition manufacturers to provide Linux drivers and software...