From Os X To Ubuntu

I’m an OSX user from 2003 until about 2 weeks ago. I now use Ubuntu 12.04 LTS on an X220 laptop with a crappy sound card.

I’m starting a thread to document my mis-adventures. I’ve committed to 3 years of Ubuntu. Default vanilla version(s). Stupid? Sure. But that’s what I’m doing.

Why a thread like this?

Threre seems to be a lot of misinformation or just plain outdated ideas floating around. For example, from the Renoise Linux FAQ:

Clicking on that link gives a 404. :(

This thread, with timestamps, will hopefully help people like me figure out what the hell is going on.

Here we go.

-=-=-

IMPORTANT: You, the user planning on following any of these tips should read the thread backwards. From last post to first post. Don’t make the same mistakes i did.

First thing to do after installing Renoise on any vanilla Linux, not just Ubuntu:

  
$ sudo nano -w /etc/security/limits.conf   
  

At the end of the file add:

  
YOURUSERNAME - rtprio 99  
YOURUSERNAME - nice -10  
  

Replace YOURUSERNAME with you, eg.

  
$ whoami  
  

More info here:
http://tutorials.renoise.com/wiki/Linux_FAQ#Realtime_Threads

After downloading Renoise, unarchiving, and running the included:

  
$ sudo install.sh  
  

The Renoise executable installs itself in:

  
/usr/local/bin/renoise  
  

The rest goes in /usr/local respecting the system nomenclature. It even has a man file in /usr/local/share/man, try it:

  
$ man renoise  
  

If ever you want to uninstall Renoise, just download the same version again, unarchive, and run:

  
$ sudo uninstall.sh  
  

Easy!

Both install.sh and uninstall.sh are human readable scripts. If you want to know what’s going on just open them in a text editor and look.

If I were to make a comment here, it’s that all my other “similarly distributed” apps (Chrome, Calibre, …) install in /opt. It’s cool, and historically correct, that Renoise goes in /usr/local/, but without a FSF compatible license I wonder if /opt isn’t a better choice?

I run Ubuntu 12.04. The default audio system in Ubuntu 12.04 is Pulse Audio. Everyone tells me Pulse Audio sucks. Beyond angry incoherent rants, no one offers any reason why it sucks. So here’s the deal, quoted from here:

[indent]A while ago Linux didn’t have ANY decent sound systems, so people started working on them. OSS came first, but there were license issues, so a group made ALSA. ALSA was unable to handle multiple applications (this was quite a while ago), so they made Pulse Audio. OSS was then ported (or something), so the licensing issues went away, but ALSA was staring to get a decent grip. Pulse Audio has some needed streaming/etc features (which few people actually use/can get working), so they made Jack for OSS (JACK works with ALSA as well) …[/indent]

So the problem isn’t really that Pulse Audio sucks. It’s that four competing systems came to be at around at the same time. If you dig deeper, you will find others (Gstreamer, FFADO, Xine, Phonon). All these sound systems all do pretty much the same thing; each one in a more confusing way than the previous.

If you go to each of these projects websites, they are all still in active development. For the new Linux user this extremely confusing. Nothing seems to die in Linux. Each sound system has their own cheer-leading squad (or hate mongerers). This is not information. This is propaganda and evangelism.

Fact is, in July 2012, all mainstream Linux distributions use Pulse Audio.

The Ubuntu I’m using (12.04 released 2 months ago) is using Pulse Audio version 1.1. In contrast, Pulse Audio released version 2 last month. So the Pulse Audio team are still working on this thing and it’s not going anywhere.

Fact is, in July 2012, Renoise supports ALSA and JACK.

So what does that mean for the vanilla Ubuntu user who doesn’t (yet) give a shit? Here’s a diagram explaining Pulse Audio:

Scroll to the bottom of that picture and look at the [Linux Kernel]. When using ALSA, Renoise communicates directly with that layer. In contrast, Ubuntu routes all sound through the [[Pulse Layers]].

This is a currently a problem for me. I don’t have Jack setup (yet). If I’m looking at a YouTube video in Chrome and I start Renoise, ALSA is blocked by Pulse Audio and Renoise complains, tries something, and fails.

GURU MEDITATION ALSA: If any sound is playing other than Renoise, in vanilla Ubuntu, Renoise will not work. You need to shut down all other apps that are making sounds, go into Renoise preferences and click ‘Reinitialize’ until it starts working again.

So my other option is clearly JACK. Great. I’m going to explore installing JACK. So far, all the advice given to me about JACK and Renoise sucked.

Here’s what doesn’t suck:

I had to find this on my own while ducking people spitting on me for mentioning Pulse Audio. I’m thinking the best approach, for me, is Option 4 in the first link.

More updates to come.

I run Renoise on an X220 laptop running Ubuntu 12.04.

It had weird CPU performance problems I didn’t understand. It was under performing.

My solution:

  
$ sudo apt-get install indicator-cpufreq  
  

Then reboot.

This puts an icon in Ubuntu’s appmenu (upper right). Select “Performance” (or top CPU speed) when running Renoise, problem solved.

Jack is installed and working.:

  
$ sudo apt-get install qjackctl  
  

This installs jack, dependencies, and qjackctl.

The install procedure asks me a question. I answer YES. It creates a file named `/etc/security/limits.d/audio.conf that contains:

  
# Provided by the jackd package.  
#  
# Changes to this file will be preserved.  
#  
# If you want to enable/disable realtime permissions, run  
#  
# dpkg-reconfigure -p high jackd  
  
@audio - rtprio 95  
@audio - memlock unlimited  
#@audio - nice -19  
  

This file is sort-of a duplication of what I manually put in /etc/security/limits.conf, but whatever, I’m not going to mess with this right now.

Then in Ubuntu’s Dash I type:

  
qjackctl  
  

Here, I click [Setup] and change the ‘Server Path’ to:

  
/usr/bin/pasuspender -- /usr/bin/jackd -S  
  

I did this because it’s recommended here (option 4) and here (-S). Then I clicked [Start].

It doesn’t work. I keep getting the error: Cannot lock down 82246176 byte memory area.

Googling reveals two things.

  1. I probably don’t need pasuspender with the Jack that was installed (aka JACK2, aka 1.9.8, aka your versioning sucks Mr. Davis)

  2. I need to logout/login to activate the “memlock unlimted” config above. I rebooted just to be anti-Linux.

Again, after reboot, in [Dash Home] I type:

  
qjackctl  
  

Then I click [Start].

In the messgaes log I still got “Cannot lock down 82246176 byte memory area” but the JACK server started now.

I launch Renoise, it connected to Jack, it works.

Tada.

Honestly, I don’t actually see myself using JACK (yet?). In the cases where I do want to use it, I will manually start/stop it using qjackctl.

I tested this for all of 30 seconds so no guarantees that what I did is correct. At least it’s installed?

TODO: Keep an eye on this thread Something about JACK1 vs JACK2 and Linux perfomance.

How to get out of a frozen desktop on Ubuntu 12.04 (last resort):

Press Ctrl+Alt+F2 (or F3, F4, F5, F6)

This switches to one of 5 terminals. (Pressing Ctrl+Alt+F7 will get you back to your Desktop)

Login. Type:

  
$ sudo stop lightdm  
$ sudo start lightdm  
  

More info here:

Noticed that on install JACK commented out:

  
#@audio - nice -19  
  

Found this thread:

[indent]“nice and renice have absolutely
nothing to do with making sure that audio plays correctly. the
capability that they represent should not be used for this purpose,
and people who spread around patches to limits.conf that include it
are simply confusing people with an error.”[/indent]

So, I decided to revert the edits I made in Post #2, and instead add myself to the audio group created by the jack install, eg.

  
$ sudo adduser YOURUSERNAME audio  
  

I had to logout and login for the changes to take effect.

“You will find on this page what to do if you want to setup a multimedia production workstation with a standard Ubuntu installation (means without installing Ubuntu Studio).”

https://help.ubuntu.com/community/UbuntuStudioPreparation

Jack, the way I have it set up on Ubuntu 12.04, is currently crashing when I try to shut it down.

afaik, vanilla Debian just uses ALSA, not PulseAudio.

edit: aside from that: nice thread! even though i’m not on Ubuntu, i’m still curious about your progress here. good luck.

I’m not a fan of having to be root to install anything other then actual system stuff. Sadly, way too many apps that are not debs or rpms have install.sh things that require you to run them sudo, and I’ve had one too many systems borked because one or another script messed something up (e.g overwrote some lib or changed symlinks for stuff).

When I first installed Renoise on Ubuntu I did not use sudo, saw the errors, and edited the script to install everything under my home directory. This may break any possible unistall script but it looks like “rm -rf” in the right place would work.

I’ve had zero issues running Renoise this way and have no concerns about errant root behavior.

Thanks for sharing. Maybe a blog would be a better fit for these posts, but they’ll certainly come in handy. I’m thinking of making this transition myself, depending on how bad the walled-garden gets with OSX and whether I can find a pc with build quality that I’m satisfied with (pre-lenovo thinkpads were awesome, but imo I haven’t seen anything that’s filled that void… and I’ve splurged on the more expensive stuff like lenovo and sony vaio).

Yes, this is true. Alsa is installed all the time. You can install pulseaudio or jack with:

apt-get install pulseaudio  
or  
apt-get install jack  

I’ve never actually used the install.sh script.

Once you unpack the archive, it is ready to run from that directory.

I just unpack to ~/bin/renoise// and put a symlink in ~/bin

@mxb: thanks for confirming that. i’m too much of a noob to actually find out where i could get definitive proof of my assumption. but i know i just never used pulseaudio, and have been using #! linux which is Debian-based for 1,5 years now.

i was also gonna post that i do the same thing as you do with Renoise: no install-script. just unpack it and run it, and it works. great stuff btw, i love that. no unnecesarry complications, very portable.

Actually you can start from F1 up to F6 with F7 restricted to the X server.

Personally I have never had any issues running sh or installing Renoise in Linux. I have installed Renoise in Ubuntu, Linux Mint and I even installed Renoise on the first Asus eee netbook with a that annoying version of linux preinstalled and everything installed fine (I dont know if anyone ever used the first batch of eee netbooks… the Linux they came with really sucked). Renoise has always worked fine for me, but the system audio has always been a problem. In my setup I have always run JACK, but intermittently JACK does not work. Sometimes Jack shows MIDI and audio sources and sometimes JACK shows nothing. The only fix I have ever found is to ‘kill’ pulse, Jack or gnome sound applet and usually I have to restart. I have been using Renoise in Linux for over 3 years, and largely its always the same issues. Gnome audio applet, Pulse, KDE audio applet or some other lower layer audio app/plugin does not cooperate with ALSA and/or JACK.

The best results I have found running Renoise in Linux is when I use a desktop environment that does not use pulse or any audio applets or controllers that might otherwise confuse JACK or ALSA. My best results were with enlightenment, fluxbox, and variants like IceWM. Also KDE and Gnome(Unity) have become resource hogs and renoise generally runs better on more barebones desktop managers.

Also, I don’t know if anyone has brought this up, but Renoise running on netbooks is impossible. The best I can ever get is showing about 3/4 of the renoise interface. Has anyone looked into modifying the interface of renoise to fit smaller screens like a 7 inch screen? maybe this has already been fixed because I have not tried this on a netbook for at least a year.

haha nope I got the same thing but it’s sad, but logical, Renoise manual or system specs or sth says somewhere already that you need at least 1024x768. :)
Also, even if you hook up a lcd to e.g. the eee 701g that i got (700MHz, 512MB), whenever you have more than 2 tracks playing samples at the same time with like 2 different (native) fx in them, you have to render & play that, so it’s not that workable or versatile.

1024x600 is supported (which is for most netbooks the maximum resolution), you indeed can’t expand everything with that resolution, but Renoise got adapted to allow users to install and run Renoise on a netbook. The point is that a netbook has certain limitations and if that if a netbook is the only choice, you will have to learn to live with those limitations.

You’ve probably already discovered it but thought I’d point you towards the Linux Audio Users list, just in case you hadn’t.

http://lists.linuxaudio.org/listinfo/linux-audio-user/

And if you think GStreamer or Phonon are the same as ALSA in their job I suggest you do some more reading…