FL STUDIO on Linux + VST (part 2) Pure Wine

Attention! For now, this is far from the final method; we need help with the settings and advice (except for advice on installing Windows).

In my recent article, I described the process of installing FL Studio on Linux. It is overgrown with UPD, but the point is that it used the following method:

  • Install Flapak

  • Install Lutris and Flatseal via Flatpak

  • Restrict access to files in Lutris via Flatseal so that the use of FL and plugins is safe for the main system

  • Create a prefix in Lutris, configure it a little, install FL via a script on the site Lutris and install the necessary VSTs

The method is very simple, the result is a fully working FL Studio with VST plugins, except that for 32 bit plugins an “External Window” is required, otherwise the process freezes. Everything works perfectly, there are no problems, nothing crashes, nothing glitches.

But there is one problem – a strong sound delay. Due to the nature of Wine, a delay of less than 60 milliseconds is not possible. Playing the guitar is almost impossible, and hearing yourself with a strong delay is very unpleasant. ASIO4ALL simply doesn't work, and even if it did, it would have the same problem as with the regular FL Studio driver – additional delay, no matter what buffer is set. It was decided to finally turn our attention to such a thing as WineASIO. In addition, Realtime modules have recently been added to new versions of the Linux kernel. So I started experimenting with WineASIO… And I still couldn’t put it on the prefix in Lutris. I'm clearly doing something wrong, but no matter what I tried, nothing worked.

And so, I decided to reduce the number of intermediaries, and came up with this option:

Firejail can be very finely tuned for security, and if the program has completed its work, but WineServer has not, you can easily slam all its elements by simply terminating the Firejail process, rather than searching through the process list for a million svchosts.

Installation

As a reminder, I'm using Artix Linux with the Pipewire audio server.

“–blacklist=/king” is how I block access to my second disk, you don’t have to write it.

Wine installation:

sudo pacman -S wine winetricks

Creating a Wine prefix:

mkdir $HOME/.wineFLu

firejail --noprofile \
--whitelist=$HOME/.wineFLu \
--blacklist=/king --noblacklist=/sys/module --noblacklist=/dev \
--env=WINEPREFIX="$HOME/.wineFLu" \
wineboot -i

mkdir $HOME/.wineFLu/drive_c/INSTALL

Installation of various libraries:

firejail --noprofile \
--whitelist=$HOME/.wineFLu \
--blacklist=/king --noblacklist=/sys/module --noblacklist=/dev \
--env=WINEPREFIX="$HOME/.wineFLu" \
winetricks vcrun6sp6 tahoma

Installing FL Studio and VST plugins. Installers should be placed in the C:/INSTALL folder relative to the prefix.

firejail --noprofile --net=none \
--whitelist=$HOME/.wineFLu \
--blacklist=/king --noblacklist=/sys/module --noblacklist=/dev \
--env=WINEPREFIX="$HOME/.wineFLu" \
wine64 "C:/INSTALL/..."

Also, there is an important note. Previously, I didn’t understand why FL Studio lags a lot on some versions of Wine, especially when opening context menus, when selecting plugins, and the spectrogram flies at an increased speed. Well, even now I don’t really know the reason, but I do know how to deal with it:

firejail --noprofile --net=none \
--whitelist=$HOME/.wineFLu \
--blacklist=/king --noblacklist=/sys/module --noblacklist=/dev \
--env=WINEPREFIX="$HOME/.wineFLu" \
wine64 winecfg

Open winecfg with the above command, and add the launchable “exe” file for FLStudio, type “FL64.exe”, to the list of applications, and set the Windows version to it as “Windows 7”. Yes, some plugins (for example GuitarRig) require Windows 10, but I checked – everything works. Just be sure to make sure that the “default” version for all applications is Windows 10.

Now the most interesting thing, and why this move was organized – WineASIO, here is its installation:

I have Artix Linux, and some packages were not delivered to it, but they can be stolen from Arch. Here link to the required package. You need to get to it through the terminal and run the command to install the package, and then add yourself to the group.

sudo pacman -U realtime-privileges-4-3-any.pkg.tar.zst
sudo usermod -aG realtime $(whoami)

On Arch, I suspect, it’s quite simple to do:

sudo pacman -S realtime-privileges
sudo usermod -aG realtime $(whoami)

Then you need to install WineASIO, I do this via AUR:

yay -S wineasio

And then install it in the desired Wine prefix:

env WINEPREFIX=$HOME/.wineFLu wineasio-register

Accordingly, in FL you need to change the driver to WineASIO, configure it a little (set 2 inputs and 2 outputs, turn off Fixed buffersize and set the one you need, 256 feels like no delay), and if you use WineASIO, you need to change the command for transferring sound to a virtual microphone PipeWire:

pw-link FL64:out_1 my-virtualmic:input_FL
pw-link FL64:out_2 my-virtualmic:input_FR

When installing VST plugins you need to be very careful; each plugin has its own problem and its own method of treatment.

Hidden text

Nexus 2:

После установки:
firejail --noprofile --net=none \
--whitelist=$HOME/.wineFLu \
--blacklist=/king --noblacklist=/sys/module --noblacklist=/dev \
--env=WINEPREFIX="$HOME/.wineFLu" \
wine64 regedit
>>> HKEY_CURRENT_USER\Software\reFX\Nexus -> Поменять "ContentPath" на путь до папки с библиотеками, например "C:/Nexus content/" <<<
В первый раз открывать через "Fruit Wrapper", нажать шестерёнку, потом "VST Wrapper Settings" и заменить инструмент на Nexus, нажать "External Window"

Retro Color:

После установки:
Запустить в FL Studio, лицензии пока не будет, но нужно чтобы узнать точный ComputerID
Закрыть
%USERPROFILE%\Documents\RC-20 Retro Color Logs\...
Скопировать "ComputerId" из лога
Что с ним делать? Не знаю, сами угадайте)))

Guitar RIG:

После установки:
firejail --noprofile \
--whitelist=$HOME/.wineFLu \
--blacklist=/king --noblacklist=/sys/module --noblacklist=/dev \
--env=WINEPREFIX="$HOME/.wineFLu" \
wine64 uninstaller
>>> Microsoft Visual C++ 2013 Redistributable -> Изменить -> Repair <<<

Well, after all the work done, you can launch FL, this is how I do it:

firejail --noprofile --env=WINEDEBUG=-all --net=none \
--whitelist=$HOME/.wineFLu \
--blacklist=/king --noblacklist=/sys/module --noblacklist=/dev \
--env=WINEPREFIX="$HOME/.wineFLu" --env=WINEESYNC=1 --env=WINEFSYNC=1 --env=STAGING_SHARED_MEMORY=1 --env=STAGING_WRITECOPY=1 \
wine64 "C:/Program Files/Image-Line/FL Studio 21/FL64.exe"

You can even make a shortcut, but you will have to remove all the “\” and replace all the “$HOME” with global addresses taking into account your name to use, “$USER” unfortunately does not work.

micro $HOME/.local/share/applications/fl.desktop

[Desktop Entry]
Name=FL Studio
GenericName=FL Studio
Comment=Music
Exec=firejail ...
Icon=lmms
Terminal=false
Type=Application
PrefersNonDefaultGPU=true
Categories=AudioVideo

Wine – so different

And now it’s worth talking about the disadvantages of this method – you will be tortured to close WineServer. The cursor capture does not work, so using the volume controls will turn into a nightmare, the cursor will constantly fly out of the window.

You can use another Wine – I tested this Wine-GE:

yay -S wine-ge-custom-bin

It is launched no longer through wine64, but through /opt/wine-ge-custom/bin/wine64.

One of the advantages is that you don’t need to change the version of Windows in FL Studio to seven, any one works without brakes. Twisters also work adequately, that is, cursor capture. And WineServer itself closes when you close FL Studio. The downside is that it is very unstable, and not all installers work adequately. For example, the FL Studio installer froze for me at the “Edge Internet or something” stage, I had to install it through regular Wine, and run it through Wine-GE.

Also, with any Wine, not all plugins start up normally, for example Nectar3, and in GuitarRig you constantly have to scan presets, it forgets them every time. I suspect the problem is something else.

Is it necessary at all?

During installation, I encountered a very strange thing: Guitar Rig was very capricious, the debug pointed to the “msvcr120” library, as if some method was not implemented in it. A strange dissonance could not leave my head from the fact that everything works perfectly in Lutris, but I myself have to hunch my shoulders, and even the libraries do not work. I ended up just copying the “msvcr120” library files from the Lutris prefix to the Wine prefix, and guess what? It worked. That is, Lutris has some of its own libraries that are very different from the original ones? Is there something I don't know? Does Lutris have its own library “repositories”? Or am I using some wrong Wine and Winetricks? In general, I spent a lot of nerves trying to make everything work, I got WineASIO, but at the cost of great instability. And here's what I thought…

It would be great if it were possible to run WineASIO in Lutris. I tried different ways, but it didn't work. I tried copying the libraries manually and registering them in the registry – nothing worked. If anyone succeeds, be sure to write! There will be a new way to install FL Studio with low latency on Linux without any hassle. The only disadvantages that I see in Lutris are that even Wine-DE does not close when closing FL Studio, and if the security settings are lost during the next update, FL Studio with a bunch of cracked virus VSTs will have full access to your system, which I really wouldn’t want. But otherwise, I think it would be nice to pair WineASIO with Lutris.

I also really like the method with pure Wine via Firejail, although it is a bit steamier. But there is something wrong with the libraries – the original ones don’t fit, you have to steal from Lutris.

In general, to summarize, here are all the methods, or rather their pros and cons. If anyone knows how to solve any of the disadvantages of any of the methods, be sure to let me know in the comments!

Flatpak + Lutris:

  • + Very easy installation, suitable for beginners

    + Everything works without any problems with libraries

    – WineASIO does not work

    – There is a possibility that the ban on files outside Flatpak will be lifted

Firejail + pure Wine:

  • + Works WineASIO

    – Not working libraries

    – Mouse capture does not work

    – WineServer does not close, you have to close it through the task manager

Firejail + pure WineGE:

  • + Works WineASIO

    – Not working libraries

    – Some installers do not work, including FL Studio (I think this can be fixed somehow, because everything works in Lutris)

    – Unstable work

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *