Audio-Install-Script for Xubuntu 24.04 Minimal - the new star in audio pro heaven?

What other apps and distros do you use to round out your studio?

Moderators: MattKingUSA, khz

Post Reply
sebasaturn
Established Member
Posts: 5
Joined: Fri Aug 04, 2023 6:20 pm
Been thanked: 2 times

Audio-Install-Script for Xubuntu 24.04 Minimal - the new star in audio pro heaven?

Post by sebasaturn »

hey everybody,

i was about the last 6 month a hardcore distrohopper (approximatly 30 fresh installs).
my wishes:

  • does it run my NI kore audio 6 without crackles/xruns?
  • is pipewire stable?
  • is the gui of the wonderful&native VST "master mix" (tracktion) working?
  • is the kernel up2date enough for my ryzen 5700g?
  • is wine working fine for my breathcontroller (sylphyo) and the swam-winVST-stuff?
  • is it easy to install bitwig?- (deb prefered - cause yabridge isnt working with flatpak-version, rpm seems buggy)
  • is it stable and edgy enough?
  • is it too edgy that i am a beta-test-monkey?
  • is the desktop good looking and good for my windows-shortcuts-muscle-memory?
  • gtk or plasma?, plasma or gtk?, hmm, or or or...
  • and much more....

now - it seems that my journey ended!
the begin of the end was this website:
https://www.theregister.com/2024/04/30/ ... ss_ubuntu/

i read there something like:
wow - a brand new shit xubuntu without snap and with the rocksolid&fast xfce?
hmm, some months ago someone on youtube said, xubuntu is the fastest mainstream-distro for old hardware.
...but i didnt try cause 22.04 was too old for my ego ;)

but now 24.04? ok! - lets go!

the result is awesome:
i NEVER had a distro, where out-of-the-box bitwig with the swam-winVST-plugins was running like a a charm!
...even with the outdated "stock"-wine 8.0!
i did ZERO config-jonglage (and you can imagine, meanwhile i became the master-pedant-tune-audio-config-wizard through the last months ;)
but with Xubuntu 24.04 (!minimal edition!) "untouched" i have no crackles - even with no cpu governor change (simply "ondemand")!
and my f**n old i3 8GB laptop runs the bitwig demo-songs without hickups! for the first time! 48000/256->7ms!

so i started a script to express-install my three machines. and i want to share it with you to make it all together more perfect :)
see below.

some technical thoughts:
i was 6 months ago a linux-noob. now i am a high-motivated beginner. i love to learn from you!
i hate fundamental discussions about snap, systemd, cannonical and all the other "evil-stuff". i just want to make music without hazzle (and windows ;).
i think apt and flatpak are enough and both are stable. snap feels for me like too edgy.
so thats why i love Xubuntu 24.04 minimal - there are ZERO snaps preinstalled - there is nearly nothing preinstalled.
so clean - wonderful!

so in the first script below i deactivate snap, install apt-apps which i want to have stable and well system-integrated.
...and flatpaks when i want the brandnew shit. ...and wine, yabridge etc...

i use no gnome-software-app (i takes about 500mb ram - even when closed).
instead i made a button in the panel for flathub.org. on this website i choose an app and simply copy the install-command (next to the "install"-button) and paste it in the terminal - thats all.

for updating apt&flatpak i made a simple shutdown-script attached to a red button on my panel (see below)

xfce is ugly?
use a preinstalled dark mode theme, put the panel to bottom and maximize it to 32px, grap a breathtaking osx-style wallpaper.
this takes about 5 minutes and it looks so much better than stock-xfce!

maybe i should wait for 24.04.1 for perfect stability - but i am too excited now! :)

now enough blabla - have a look at my scripts.
i am looking very forward to your opinions/optimizations!

best regards
sebasaturn

Code: Select all

#!/bin/bash
### only xubuntu minimal has no snaps installed - otherwise use first the script 'clean_snaps.sh'

### remove snap ##############
sudo rm -rf /var/cache/snapd/
sudo apt autoremove --purge snapd gnome-software-plugin-snap
rm -fr ~/snap
sudo rm -rf /snap
sudo rm -rf /var/snap
sudo rm -rf /var/lib/snapd
sudo apt-mark hold snapd

### install firefox from ppa ######################
sudo apt-get install wget
sudo install -d -m 0755 /etc/apt/keyrings
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null
gpg -n -q --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); if($0 == "35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3") print "\nThe key fingerprint matches ("$0").\n"; else print "\nVerification failed: the fingerprint ("$0") does not match the expected one.\n"}'
echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | sudo tee -a /etc/apt/sources.list.d/mozilla.list > /dev/null
echo '
Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000
' | sudo tee /etc/apt/preferences.d/mozilla 
sudo apt-get update && sudo apt-get install firefox
sudo apt-get install firefox-l10n-de

### install flatpak ##############################
sudo apt install flatpak -y
#sudo apt install gnome-software -y
#sudo apt install gnome-software-plugin-flatpak -y
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
### go to flathub.org choose an app and click the arror next to 'install' and insert the 1st command in terminal

### install your favorite flatpaks - flatpaks will be very actual but maybe limited in systemintegration - flatseal could help ##############
flatpak install flathub org.rncbc.qpwgraph -y
flatpak install flathub org.kde.kdenlive -y
flatpak install flathub com.nextcloud.desktopclient.nextcloud -y
flatpak install flathub org.signal.Signal -y
flatpak install flathub org.telegram.desktop -y
flatpak install flathub com.valvesoftware.Steam -y
flatpak install flathub org.ryujinx.Ryujinx -y
flatpak install flathub org.onlyoffice.desktopeditors -y
flatpak install flathub org.mixxx.Mixxx -y

### install your favorite apps via ppa - these apps will be very stable and well integrated in your system ###########################
sudo apt install evolution -y
sudo apt install doublecmd-gtk -y
sudo apt install libunrar5 -y
sudo apt install gthumb -y
sudo apt install obs-studio -y
sudo apt install vlc -y
sudo apt install wine -y
sudo apt install evince -y
sudo apt install xfce4-clipman-plugin -y
sudo apt install system-config-printer -y
sudo apt install mousepad -y
sudo apt install file-roller -y
sudo apt install thunar-archive-plugin -y
sudo apt install gnome-disk-utility -y
sudo apt install xfce4-taskmanager -y
sudo apt install lightdm-settings -y

### install yabridge for Windows-VSTs #########################
wget -O yabridge.tar.gz https://github.com/robbert-vdh/yabridge/releases/download/5.1.0/yabridge-5.1.0.tar.gz
mkdir -p ~/.local/share
tar -C ~/.local/share -xavf yabridge.tar.gz
rm yabridge.tar.gz
echo '' >> ~/.bash_aliases
echo '# Audio: yabridge path' >> ~/.bash_aliases
echo 'export PATH="$PATH:$HOME/.local/share/yabridge"' >> ~/.bash_aliases
. ~/.bash_aliases


### Create common VST paths ##########################
mkdir -p "$HOME/.wine/drive_c/Program Files/Steinberg/VstPlugins"
mkdir -p "$HOME/.wine/drive_c/Program Files/Common Files/CLAP"
mkdir -p "$HOME/.wine/drive_c/Program Files/Common Files/VST3"
# Add them into yabridge
yabridgectl add "$HOME/.wine/drive_c/Program Files/Steinberg/VstPlugins"
yabridgectl add "$HOME/.wine/drive_c/Program Files/Common Files/CLAP"
yabridgectl add "$HOME/.wine/drive_c/Program Files/Common Files/VST3"

### be part of audio-relevant groups #############################
sudo adduser $USER audio
sudo adduser $USER pipewire

### full localisation (if necessary) ########################
#sudo dpkg-reconfigure locales
sudo apt-get install language-pack-gnome-de -y

### install wine-staging ########################
sudo dpkg --add-architecture i386
sudo apt update && sudo apt dist-upgrade -y
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/noble/winehq-noble.sources
sudo apt update
sudo apt install --install-recommends winehq-staging -Y
sudo apt install winetricks -Y
winetricks corefonts
cp -r ~/.wine ~/.wine-base
winetricks dxvk # for freezing winVST-guis like the swam-stuff

### corectrl can select performance-cpu-governor automated when f.e. bitwig starts ######################
sudo apt install corectrl -Y
sudo apt install xfce4-cpufreq-plugin -Y
# see for details https://gitlab.com/corectrl/corectrl/-/wikis/Setup
pkaction --version

## todos:
# fix tiling (windows/shortcuts)
# put corectrl in startup and fix its sudo-rights, make a corectrl-bitwig-profile "performance"
# see for details https://gitlab.com/corectrl/corectrl/-/wikis/Setup
# add cpu-plugin in tray for checking if corectrl is working - or not
# bug of xubuntu:
# sudo nano /etc/default/grub
# splash -> nosplash
# sudo update-grub
#
# add shutdown.sh-script as a shutdown-button in panel
# 
# and here some heavy-audio-tweaking-stuff i dont need anymore:
# links: https://github.com/brendaningram/linux-audio-setup-scripts
# links: https://interfacinglinux.com/2023/11/14/pro-audio-on-linux-with-debian-12/
# links: https://www.youtube.com/watch?v=cnUo3SPQQmw&themeRefresh=1

and the shutdown.sh-script.

Code: Select all

#!/bin/bash
echo "Nach einem Update wird das System heruntergefahren..."
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && flatpak update -y
sudo shutdown now

and finally the clean_snap.sh-script:
use it first if you are using another 24.04 distro.

Code: Select all

#!/bin/bash

set -euo pipefail

# snaps can only be removed if they have no other snaps
# depending on them. We use a brute force approach and
# just try to uninstall them multiple times.
#
# try at most 30 times to uninstall all snaps
MAX_TRIES=30

for try in $(seq 1 $MAX_TRIES); do
  INSTALLED_SNAPS=$(snap list 2> /dev/null | grep -c  ^Name || true)
  if (( $INSTALLED_SNAPS == 0 )); then
    echo "all snaps removed"
    exit 0
  fi
  echo "Attempt $try of $MAX_TRIES to remove $INSTALLED_SNAPS snaps."


  # we ignore error during uninstall as we are retrying in the loop
  snap list 2> /dev/null | grep -v ^Name |  awk '{ print $1 }'  | xargs -r -n1  snap remove || true
done

echo "ERROR: Unable to uninstall"
exit 1


sebasaturn-scripts-xubuntu2404minimal.zip
(2.99 KiB) Downloaded 65 times
User avatar
bluebell
Established Member
Posts: 2065
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 159 times
Been thanked: 178 times

Re: Audio-Install-Script for Xubuntu 24.04 Minimal - the new star in audio pro heaven?

Post by bluebell »

Yeah, xfce4 is my desktop envoronment of choice, too. Eons ago I was inspired by the kde3-panel that could be set to x% of the screen's width and could have 2 rows of buttons for running apps' windows. I adapted that for xfce4:

Image

The 2 rows layout needs a ~/.config/gtk-3.0/gtk.css like this:

Code: Select all

wnck-pager:selected {
  background-color: lightblue; }
wnck-pager:hover {
  background-color: gray; }

tooltip { opacity: 0; }

XfdesktopIconView {
   -XfdesktopIconView-ellipsize-icon-labels: 0;

   -XfdesktopIconView-cell-spacing: 6;
   -XfdesktopIconView-cell-padding: 6;
   -XfdesktopIconView-cell-text-width-proportion: 2.5;

   -XfdesktopIconView-label-alpha: 0;
   -XfdesktopIconView-selected-label-alpha: 20;

   -XfdesktopIconView-shadow-x-offset: 0;
   -XfdesktopIconView-shadow-y-offset: 0;
   -XfdesktopIconView-shadow-color: "#000000";
   -XfdesktopIconView-selected-shadow-x-offset: 0;
   -XfdesktopIconView-selected-shadow-y-offset: 0;
   -XfdesktopIconView-selected-shadow-color: "#ffffff";
}

/* window button height -> 2 rows */
.tasklist {
  -XfceTasklist-max-button-size: 20;
  -XfceTasklist-max-button-length: 200;
}

/* window button font */
.tasklist button {
  color: #000000;
}

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

User avatar
Linuxmusician01
Established Member
Posts: 1646
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland (Europe)
Has thanked: 875 times
Been thanked: 165 times

Re: Audio-Install-Script for Xubuntu 24.04 Minimal - the new star in audio pro heaven?

Post by Linuxmusician01 »

On a side note: why does Ubuntu use Snap and how can we purge it completely from out system?

sebasaturn
Established Member
Posts: 5
Joined: Fri Aug 04, 2023 6:20 pm
Been thanked: 2 times

Re: Audio-Install-Script for Xubuntu 24.04 Minimal - the new star in audio pro heaven?

Post by sebasaturn »

Linuxmusician01 wrote: Sat May 25, 2024 9:20 am

On a side note: why does Ubuntu use Snap and how can we purge it completely from out system?

Use my script "clean_snaps.sh" and then the first part of my 1st script. (See first post here)

brian.madigan
Established Member
Posts: 8
Joined: Tue Jul 30, 2024 6:07 pm
Has thanked: 3 times

Re: Audio-Install-Script for Xubuntu 24.04 Minimal - the new star in audio pro heaven?

Post by brian.madigan »

I've been chasing xruns for too long on this system. I mainly use Bitwig on it, but I get xruns from Ardour as well. It's a 24-core (dual) i7 Mac Pro 32GB ram/2x512 SSD running Ubuntu Studio. I'm running alsa only, no Jack no Pipewire etc. I have not upgraded to the latest Bitwig, but that's probably a good idea, since I'm running the 5.1.x branch. The interface is an SSL 12 USB. There's plenty of power/memory/disk speed and IO there, there's no reason it should get unstable after 5-10 minutes at 3-5% DSP load. Setting enormous buffer sizes shouldn't be necessary either.
I've tried all the usual stuff - killing Jack, pulseaudio, pipewire, it only runs on alsa with this interface/software which is fine (i guess. no browser audio, but that's a minor concern at the moment)
I ran Xubuntu for years with Fluxbox as a developer, so I am a fan of Ubuntu in general. I just don't think Ubuntu Studio is working well with Bitwig.

2x12-core i7 Mac Pro, 32GB, 2x512 SSD
Ubuntu Studio
Bitwig 5.1.8
SSL 12 USB

brian.madigan
Established Member
Posts: 8
Joined: Tue Jul 30, 2024 6:07 pm
Has thanked: 3 times

Re: Audio-Install-Script for Xubuntu 24.04 Minimal - the new star in audio pro heaven?

Post by brian.madigan »

So do you attribute this to the kernel with 24? 48000/256 @7ms and no xruns would make me happy.

2x12-core i7 Mac Pro, 32GB, 2x512 SSD
Ubuntu Studio
Bitwig 5.1.8
SSL 12 USB

User avatar
sunrat
Established Member
Posts: 1106
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 182 times
Been thanked: 301 times

Re: Audio-Install-Script for Xubuntu 24.04 Minimal - the new star in audio pro heaven?

Post by sunrat »

@sebasaturn How does Corectrl work for you? I just installed it on Debian, set up a profile for Ardour and it doesn't seem to change the cpu governor. It does start correctly with a polkit authentication box when started manually, but just has no effect.
I have no trouble changing governor manually with a little script linked to a .desktop file with icon on my desktop, or with cpupower-gui.

User avatar
bluebell
Established Member
Posts: 2065
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 159 times
Been thanked: 178 times

Re: Audio-Install-Script for Xubuntu 24.04 Minimal - the new star in audio pro heaven?

Post by bluebell »

brian.madigan wrote: Tue Jul 30, 2024 6:46 pm

I've been chasing xruns for too long on this system. I mainly use Bitwig on it, but I get xruns from Ardour as well. It's a 24-core (dual) i7 Mac Pro 32GB ram/2x512 SSD running Ubuntu Studio.

See
https://www.kvraudio.com/forum/viewtopic.php?t=580007

"I found out tonight that switching the Plug-in Hosting Mode to Individually dramatically increased the performance in my system with little overhead in memory usage."

Does this help?

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

brian.madigan
Established Member
Posts: 8
Joined: Tue Jul 30, 2024 6:07 pm
Has thanked: 3 times

Re: Audio-Install-Script for Xubuntu 24.04 Minimal - the new star in audio pro heaven?

Post by brian.madigan »

I'm not running any 3rd party plugins, but I have experimented with those settings. For internal modules, Bitwig optimizes parallelization if you don't do anything silly like side-chain the output of one track to a module in another track. So being aware of how audio processing works in multi-threaded systems is good. What I'm interested in is how different distributions/kernels effect the stability of Bitwig's audio engine. Maybe I just need to update Ubutuntu to get the latest kernel, or update ubuntu AND bitwig.

2x12-core i7 Mac Pro, 32GB, 2x512 SSD
Ubuntu Studio
Bitwig 5.1.8
SSL 12 USB

sebasaturn
Established Member
Posts: 5
Joined: Fri Aug 04, 2023 6:20 pm
Been thanked: 2 times

Re: Audio-Install-Script for Xubuntu 24.04 Minimal - the new star in audio pro heaven?

Post by sebasaturn »

On Xubuntu Corectrl with polkit is working perfect automated with Starting/quiting of Bitwig.

sunrat wrote: Wed Jul 31, 2024 3:09 am

@sebasaturn How does Corectrl work for you? I just installed it on Debian, set up a profile for Ardour and it doesn't seem to change the cpu governor. It does start correctly with a polkit authentication box when started manually, but just has no effect.
I have no trouble changing governor manually with a little script linked to a .desktop file with icon on my desktop, or with cpupower-gui.

User avatar
noedig
Established Member
Posts: 243
Joined: Wed Feb 12, 2014 4:39 am
Location: South Africa
Has thanked: 9 times
Been thanked: 57 times

Re: Audio-Install-Script for Xubuntu 24.04 Minimal - the new star in audio pro heaven?

Post by noedig »

I don't want to lure you away from your long last newfound bliss, but I'm curious whether you've tried Linux Mint Xfce edition. Snap is disabled by default. Non snap versions of important software like Firefox is included. Flatpak is included and even managed by the Mint update manager along with the normal apt repos. The updater is well thought out and designed to notify you occasionally but not be intrusive. The default Xfce look of Linux Mint is very polished in my opinion.

I think this could potentially be a good base for your minimal needs. In my opinion, Mint rounds off the annoying edges of Ubuntu. Would be interesting what your experience is.

Note that version 22 just dropped. This is the first version with Pipewire, I have not used it for music purposes yet, was still on plain Jack until now.

indigenous
Posts: 1
Joined: Mon Sep 16, 2024 12:02 pm

Re: Audio-Install-Script for Xubuntu 24.04 Minimal - the new star in audio pro heaven?

Post by indigenous »

brian.madigan wrote: Tue Jul 30, 2024 6:46 pm

I've been chasing xruns for too long on this system. I mainly use Bitwig on it, but I get xruns from Ardour as well. It's a 24-core (dual) i7 Mac Pro 32GB ram/2x512 SSD running Ubuntu Studio. I'm running alsa only, no Jack no Pipewire etc. I have not upgraded to the latest Bitwig, but that's probably a good idea, since I'm running the 5.1.x branch. The interface is an SSL 12 USB. There's plenty of power/memory/disk speed and IO there, there's no reason it should get unstable after 5-10 minutes at 3-5% DSP load. Setting enormous buffer sizes shouldn't be necessary either.
I've tried all the usual stuff - killing Jack, pulseaudio, pipewire, it only runs on alsa with this interface/software which is fine (i guess. no browser audio, but that's a minor concern at the moment)
I ran Xubuntu for years with Fluxbox as a developer, so I am a fan of Ubuntu in general. I just don't think Ubuntu Studio is working well with Bitwig.

Do you have any applets or desktop add-ons that can disable cpu turbo, set min/max freq etc? try disabling turbo and peg the min/max freq at max

Post Reply