U-he Plugins in an Immutable environment

Post Reply New Topic
RELATED
PRODUCTS

Post

Hello, I’m investigating the possibility of moving from regular Fedora Workstation to an immutable OS technology, such as Fedora Silverblue. Can anyone confirm that the plugins will be allowed by the system to install on an immutable system?

Where are the files installed by default?
C/R, dongles & other intrusive copy protection equals less-control & more-hassle for consumers. Company gone-can’t authorize. Limit to # of auths. Instability-ie PACE. Forced internet auths. THE HONEST ARE HASSLED, NOT THE PIRATES.

Post

Anyone? Developers?
C/R, dongles & other intrusive copy protection equals less-control & more-hassle for consumers. Company gone-can’t authorize. Limit to # of auths. Instability-ie PACE. Forced internet auths. THE HONEST ARE HASSLED, NOT THE PIRATES.

Post

The default install location is in your user's home directory.

All the files are installed to a .u-he folder.
You can easily find it by right-clicking on a preset or a folder in the plugin's preset browser and choosing the "Show/Open in Explorer" option.

The VST2, VST3 and CLAP plugins are installed to .vst, .vst3 and .clap folders in your user's home directory.
That QA guy from planet u-he.

Post

tasmaniandevil wrote: Fri Aug 04, 2023 4:00 pm The default install location is in your user's home directory.

All the files are installed to a .u-he folder.
You can easily find it by right-clicking on a preset or a folder in the plugin's preset browser and choosing the "Show/Open in Explorer" option.

The VST2, VST3 and CLAP plugins are installed to .vst, .vst3 and .clap folders in your user's home directory.
Well, the home directory is a mutable location and accessible from everywhere in the system, so I bet it would work! Thanks for this useful information! :D
C/R, dongles & other intrusive copy protection equals less-control & more-hassle for consumers. Company gone-can’t authorize. Limit to # of auths. Instability-ie PACE. Forced internet auths. THE HONEST ARE HASSLED, NOT THE PIRATES.

Post

I use an immutable distribution called NixOS. I don't know how close it is to your variant of Fedora but to put it simply, whenever I want to make a change to my NixOS system, I need to use the nixos-rebuild command which will:
+ read a configuration file which details which settings and packages the next build of my system will need
+ install new packages in a directory called /nix (located near the root and away from the rest of the system)
+ link packages to relevant libraries

I was able to make u-he plugins run but I had to fix two issues stemming from NixOS's specificities. u-he plugins may work out of the box on your system but if that's not the case, I'm leaving the solution for you and other NixOS users.

Anyway, the following fix worked on NixOS version 22.11

Problem and Diagnostic

u-he plugins cannot be installed with install.sh which will display this error:

Code: Select all

/home/<USER>/Downloads/Filterscape-14785/Filterscape/dialog.64: error while loading shared libraries:
libgtk-3.so.0: cannot open shared object file: No such file or directory
Please install missing libraries:
$	not a dynamic executable
It is possible to manually move plugins to their expected location (~/.u-he and ~/.vst ~/.vst3 ~/.clap). Plugins will load in any DAW and Carla but pop ups (license/serial number window, options in the cogwheel menu and dropdown menus) won't respond to mouse inputs.

The issue comes from the .dialog file in the plugin folder as NixOS:
+ has bash installed in a specific place
+ does not link implicitly the plugin/daw to external libraries required to make popup Windows responsive (gtk3, glib).

We can see this last issue with the ldd command ran on .dialog.64 in the plugin's folder

Code: Select all

ldd ./dialog.64
The output should look like this and highlight missing libraries

Code: Select all

linux-vdso.so.1 (0x00007ffca349d000)
libgtk-3.so.0 => not found
libgobject-2.0.so.0 => not found
libglib-2.0.so.0 => not found
libc.so.6 => /nix/store/vnwdak3n1w2jjil119j65k8mw1z23p84-glibc-2.35-224/lib/libc.so.6 (0x00007fe05b800000)
/lib64/ld-linux-x86-64.so.2 => /nix/store/vnwdak3n1w2jjil119j65k8mw1z23p84-glibc-2.35-224/lib64/ld-linux-x86-64.so.2 (0x00007fe05ba76000)
Installation

You will need to replace the first line of the installation script and the dialog script in the plugin's folder.

This will invoke bash (rather than sh) which is installed in a specific location in NixOS (/run/current-system/sw/bin/bash):

Code: Select all

# comment this
# #! /bin/bash -e

# use this instead
#! /usr/bin/env bash
The easiest way to link the missing libraries is to use steam-run. I will mention later a better option (nix-ld) but for the time being, steam-run is more than enough.

Code: Select all

nix-shell -p steam-run # (temporary install of steam-run in NixOS)
steam-run ./install.sh
You can then install the software normally.

Running

You can use steam-run again to start your DAW and fix the issue with unresponsive menus but this is not optimal as steam-run provides way more libraries than what is actually needed.

Code: Select all

# replace reaper by your daw of choice
steam-run reaper
A better alternative consists in using steam-ld (full documentation: https://github.com/Mic92/nix-ld).

You will need to write the following shell.nix file to provide the missing libraries to the plugin:

Code: Select all

# shell.nix
with import <nixpkgs> {};
mkShell {
  NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [
    gtk3
    glib
  ];
  NIX_LD = lib.fileContents "${stdenv.cc}/nix-support/dynamic-linker";
}
Note that for older NixOS versions (before 23.05), nix-ld must be installed with a flake containing:

Code: Select all

inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";

    nix-ld = {
      url = "github:Mic92/nix-ld";
      inputs.nixpkgs.follows = "nixpkgs";
    };
};
  
outputs = { self, nixpkgs, nix-ld }:
{
    modules =
    [    
         # ld will be fully available in NixOS 23.05
         nix-ld.nixosModules.nix-ld

         # The module in this repository defines a new module under (programs.nix-ld.dev) instead of (programs.nix-ld) 
         # to not collide with the nixpkgs version.
         { programs.nix-ld.dev.enable = true; }
    ];
}
Starting from NixOS version 23.05, the following line of code may be all you need in your NixOS configuration to get access to nix-ld (untested as I am still on version 22.11)

Code: Select all

programs.nix-ld = true;
With nix-ld, you can now use the script provided at the beginning of this section to provide the libraries required by u-he plugins to your daw

Code: Select all

# replace reaper by your daw of choice
nix-shell /path/to/shell.nix --run reaper
Your daw should start and u-he plugins will let you interact with all the popups menus generated by .dialog / .dialog.64

Bonus

For some extra comfort, you can use home-manager to create an entry for your favourite application launcher.

Code: Select all

{ pkgs, home-manager, ... }:

{
  # replace <USER> by your own home-manager username
  home-manager.users.<USER> = {

    xdg.desktopEntries = {

      u-he-reaper = {
        name = "REAPER";
        genericName = "REAPER";

        # u-he dialog fix
        exec = "nix-shell .nix.d/nix-shell/u-he.nix --run reaper";

        icon = "/home/<USER>/.nix.d/home/icons/Reaper Logo.png";
        terminal = false;
        type = "Application";
      };

      u-he-bitwig = {
        name = "Bitwig Studio";
        genericName = "Bitwig Studio";

        # u-he dialog fix
        exec = "nix-shell .nix.d/nix-shell/u-he.nix --run bitwig-studio";

        icon = "/home/<USER>/.nix.d/home/icons/Bitwig Logo.png";
        terminal = false;
        type = "Application";
      };
    };
  };
}
Last edited by Miralis on Sun Aug 13, 2023 10:47 am, edited 5 times in total.

Post

Useful information! 🙂 Thank you! 🙂
C/R, dongles & other intrusive copy protection equals less-control & more-hassle for consumers. Company gone-can’t authorize. Limit to # of auths. Instability-ie PACE. Forced internet auths. THE HONEST ARE HASSLED, NOT THE PIRATES.

Post

Update:

The latest filterscape release (September 2023), has introduced a new issue on NixOS due to new dependancies: entering your credentials and pressing "Apply" to unlock the product will not do anything.

With Reaper launched from the command line, it is possible to catch the following error: JSON Dialog ended with error: /nix/store/path.../lib/gio/modules/libgvfscommon.so failed to load module /nix/store/path.../lib/gio/modules/libgvfsdbus.so

Adding gvfs to my nix-shell script does not seem to do the trick but since this issue only affects the "enter credentials window" which you only need once, you can start your daw in a terminal with steam-run <daw>, enter your credentials successfully and the next times rely as per usual on my nix-shell script to fix the dialog file.

I may eventualy edit this post with a better fix once I find a more elegant solution but for the time being this should be good enough.
Last edited by Miralis on Wed Sep 13, 2023 1:43 pm, edited 1 time in total.

Post

Miralis wrote: Wed Sep 13, 2023 10:13 am The latest filterscape release (September 2023), has introduced a new issue on NixOS due to new dependancies: entering your credentials and pressing "Apply" to unlock the product will not do anything.
Sorry to hear that.
Have to admit, I had to google what NixOS is.
What kind of desktop environment and file browser is your OS using?
I can make a ticket in our database, but I cannot promise a quick fix.
That QA guy from planet u-he.

Post

Thanks for your quick answer.

Please don't bother with this. The problem I mentionned is not a bug nor an issue that you should address from your side and the workarounds I mentionned are good enough for the time being.

Although, if there is one thing you could do, it would be to consider changing the first line of your install and dialog scripts to

Code: Select all

#! /usr/bin/env bash
as this would let the OS choose where to look for bash.

=====

If, out of curiosity, you want a more complete explanation about the quirks of NixOS and the origin of the problem I described, you may keep reading:

NixOS manages softwares by reading a user written configuration file which contains instructions to:
+ install softwares and dependancies/libraries in a specific directory (located in /nix/store)
+ link softwares to their respective libraries
+ for instance, this is how it is done for Reaper: https://github.com/NixOS/nixpkgs/blob/m ... efault.nix

This provides many advantages but also leads to the problem mentionned in my previous posts: u-he plugins only have access to libraries which have been listed in the daw/host .nix configuration file.

So when a u-he plugin needs glib and gtk3 to draw a menu or gvfs to enter a serial number, nothing happens as NixOS has not been explicitely told to provide these libraries to the software hosting the u-he plugin.

This is where my first post comes into play where I describe how to diagnose this issue to fellow NixOS users and provide a script which handles GUI issues related to glib/gtk3 by extending reaper with the missing libraries.

I wrote my second post to warn other users that my patch did not cover the new credentials window and provided in the meantime a workaround.

I will discuss all this later on the NixOS forum. Our community is very good at fixing this kind of issues (since we created them in the first place) but it always takes a bit of time to sort them as nix is poorly documented and relatively niche.

Post

Miralis wrote: Wed Sep 13, 2023 12:57 pm Although, if there is one thing you could do, it would be to consider changing the first line of your install and dialog scripts to

Code: Select all

#! /usr/bin/env bash
as this would let the OS choose where to look for bash.
Ok, I can relay this to the developers.
Miralis wrote: Wed Sep 13, 2023 12:57 pm If, out of curiosity, you want a more complete explanation about the quirks of NixOS and the origin of the problem I described, you may keep reading:
What always amazes me is the dedication and perseverance of people in the Linux community to create the operating system of their dreams. :tu:
That QA guy from planet u-he.

Post

A better alternative consists in using steam-ld (full documentation: https://github.com/Mic92/nix-ld).

You will need to write the following shell.nix file to provide the missing libraries to the plugin:

Code: Select all

# shell.nix
with import <nixpkgs> {};
mkShell {
  NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [
    gtk3
    glib
  ];
  NIX_LD = lib.fileContents "${stdenv.cc}/nix-support/dynamic-linker";
}
I tried this approach and it didn't work, steam-run did however. Is it that much more inefficient? Thanks for all the help.

Post

Sorry for the late reply. Did you eventually find a way to make nix-ld work?

steam-run is a bit more cumbersome as it requires quite a few dependencies but once you have downloaded everything, it should be pretty fast. On my laptop, it only slows reaper's startup by less than a second.

If nix-ld still does not work, you may want to double check these basic requirements step by step to make sure you did not overlook something.

1) Make sure you are running the latest NixOS version (with the nixos-version command and nix-channel --list) to avoid pulling a daw which may be missing crucial dependencies. Note that if you have a flake.nix in your configuration, the second command should not return anything as your channels are specified in the flake itself.

2) Import the following module in your own configuration.nix to enable nix-ld. If your system predates nixos 23.11, you will need to get nix-ld from the official flake stored in the project's github repository.

Code: Select all

{ ... }:

{
    programs.nix-ld.enable = true;
}
3) I took a screenshot of my setup where I invoke the following command to start reaper. Note that my script only solves a problem related to drop down menus like the one shown in the picture near Hive's oscillator. Besides that, it seems that gtk3 can be used instead of gtk3.out

Code: Select all

# Note: I have renamed shell.nix to u-he.nix on my system
nix-shell ./u-he.nix --run reaper
I double checked on my laptop and if I disable nix-ld or start reaper normally, I become unable to see the list of oscillator waveforms or any other menus. If it still does not work on your side, it can only mean that you're missing a library I do not know about. ldd is your best friend to discover it and sticking to steam-run should be totally viable.

For a complete tutorial, see: https://blog.thalheim.io/2022/12/31/nix ... -on-nixos/
You do not have the required permissions to view the files attached to this post.

Post Reply

Return to “u-he Linux support”