10 July 2010

Ubuntu Minimal studio preparation


Thanks to these great PPA repositories, it's quite easy to build a stable and powerful music production system on Ubuntu Minimal 10.04 LTS. This is a short how-to for building a light-weight system with a good rt-kernel and up-to-date audio applications. Ubuntu Minimal provides a platform where only the necessary packages can be added - and the rest can be left out. Of course, it is possible to add more apps later, if needed.

Couple of screenshots here and here.

This how-to will result to a system without PulseAudio.  
(If you want to use PulseAudio, see the first comment below by Totalchaos. In section 11, removing pavucontrol and adding volume control applet are not needed, if you choose to use PA.)

I have tested this with a 64-bit system, but it should apply for 32-bit too.

Compliments to JeanK for providing the idea and basic instructions for the Minimal setup.

1. Install Ubuntu Lucid Minimal 10.04 LTS

Download Ubuntu Lucid Lynx 10.04 Minimal CD image here.

Write down the commands in section 2, if you do not have another computer with internet access available, because there will be no desktop after the first boot.

Install Ubuntu Minimal without selecting additional packages. Instructions for installation are available here.

Boot to the minimal system, log in as a user.

2. Desktop environment

# sudo apt-get update

You may now choose the type of desktop you want. I chose Gnome, because that's what I'm used to... However, e.g. LXDE would be a lighter choice. If you want LXDE, skip a. and jump to b. "Installing Lubuntu desktop". (KDE users may rather consider KXStudio, for which the same FalkTX repositories are meant for.)

a. Installing Gnome desktop (make sure you have "--no-install-recommends" in the end of the first line, if you do not wish to install PulseAudio and many other possibly unnecessary packages):
# sudo apt-get install xorg gdm gnome-desktop-environment --no-install-recommends
# sudo service gdm start
→ log in and you should now have a minimal Gnome desktop. Skip b. and jump to section 3.

b. Installing Lubuntu desktop:
# sudo apt-get install lubuntu-desktop
# startx

3. Add FalkTX and abogani PPA repositories

Open terminal and copy-paste the lines below:
# sudo apt-get install add-apt-key python-software-properties
# sudo gedit /etc/apt/sources.list

Add these three lines in sources.list:

deb http://ppa.launchpad.net/falk-t-j/lucid/ubuntu/ lucid main #packages used in KXStudio compatible with Ubuntu Lucid

deb http://ppa.launchpad.net/falk-t-j/music/ubuntu lucid main #samples and soundfonts

deb http://ppa.launchpad.net/abogani/ppa/ubuntu/ lucid main #Real-Time/Low-Latency kernels

Save and exit. Add keys for these repositories:
# sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 736E4F0B F141B61E

Update repositories:
# sudo apt-get update

4. Realtime kernel and headers

# sudo apt-get install linux-realtime

This will install Alessio Bogani's kernel and headers (currently 2.6.33-23-realtime). There are also other kernel options available in the repositories.

5. Tweaks for realtime audio

# sudo gedit /etc/security/limits.conf

→ add these lines before "# End of file":
@audio - rtprio 99
@audio - memlock unlimited

Save and exit.

6. Audio applications

These are the ones that I installed:
# sudo apt-get install alsa-firmware alsa-firmware-loaders alsa-tools alsa-tools-gui alsa-utils alsa-oss alsamixergui esound esound-clients libesd-alsa0 ardour audacity hydrogen hydrogen-drumkits jackd jack-rack qjackctl seq24 vkeybd yoshimi patchage vlc gcdmaster  midisport-firmware blop caps cmt fil-plugins rev-plugins swh-plugins tap-plugins blepvco mcp-plugins amb-plugins omins dssi-host-jack dssi-example-plugins fluidsynth-dssi hexter xsynth-dssi calf-plugins invada-studio-plugins-lv2 invada-studio-plugins-ladspa leet-plugins rakarrack rosegarden monobristol holap ladish soundconverter muse qtractor streamtuner whysynth lmms lame jack-keyboard  guitarix jamin ams rezound jcgui jkmeter linuxsampler jsampler fmit midisport-firmware fluid-soundfont-gm qsynth musescore musescore-soundfont-gm timemachine ladish

Open Synaptic to see the plethora of other apps available.

7. Firewire audio interfaces

Sorry, i have no experience of firewire audio interfaces, but these should be rather well supported in Ubuntu Lucid. If you use firewire, open synaptic and search for "ffado" and/or "firewire" -> select and install what you need.

8. Restricted hardware drivers

# sudo apt-get install jockey-gtk

Select from menu: System -> Administration -> Hardware drivers -> install drivers, if needed
(Note I have not tested how restricted graphics drivers behave with Alessio's realtime kernel.)

9. More Restricted stuff, if needed

# sudo apt-get install ubuntu-restricted-extras flashplugin-nonfree

10. VST stuff, for those who like

# sudo apt-get install fst wineasio vst-plugin-all winvst-plugin-all

Ardour with VST-support:
# sudo apt-get install ardourvst-32bit

LMMS with VST-support:
# sudo apt-get install lmms-vst

11. Desktop tweaks and applets (for GNOME)

Remove pulseudio volume control from the main menu, because there is no pulseaudio installed:
# sudo apt-get remove pavucontrol

Add Volume Control applet:
# sudo add-apt-repository ppa:dtl131/ppa
# sudo apt-get install gnome-applets gnome-media gnome-settings-daemon
→ right click on panel and add Volume Control
or go to System → Preferences → Keyboard shortcuts → assign keys to volume mute, down and up.

Network manager might be useful too:
# sudo apt-get install network-manager
# if [ ! -d ~/.config/autostart ];then mkdir ~/.config/autostart; fi
# cp /etc/xdg/autostart/nm-applet.desktop ~/.config/autostart/

12. Reboot to your new Linux studio!

# sudo reboot
... and choose 2.6.33-23-realtime kernel from the Grub menu.

No sound after reboot?

Open (Gnome) Alsamixer and see that output is not muted.

If still no sound, run:
# gstreamer-properties

→ set defaults to alsa, reboot

Eyecandy etc. for Gnome (optional)

Blubuntu theme:
# sudo apt-get install blubuntu-look

Ubuntu Studio outlook:
# sudo apt-get install ubuntustudio-theme ubuntustudio-menu ubuntustudio-icon-theme ubuntustudio-wallpapers plymouth-theme-ubuntustudio
select System → Preferences → Appearance → choose the theme you like

Disable bootsplash (optional) to see system messages during boot:
# sudo gedit /etc/default/grub

Replace "splash" with "nomodeset noplymouth"

Save and close. Run:
# sudo update-grub

If you found this how-to useful, please drop a comment. If you found errors or have ideas for improving the how-to, please tell!