tisdag 30 december 2008

New distro, old kernel - Hardy's 2.6.24-22-rt kernel on Intrepid

First off, let me get this straight: I am currently reporting about my experiments with two different versions of the Ubuntu Studio distribution: 8.04 (Hardy Heron) and 8.10 (Intrepid Ibex). I'm dual booting between these two and trying to figure out which one will work better with my hardware and for my purposes. I realize this can be a bit confusing. When I will finally get this somewhat done, I'll write a summary of the pros and cons of each.

I have updated my first post, Introduction / My goals - I've re-structured the sections and added some basic information about my hardware which I guess is quite relevant to this whole experiment.

Thanks to Andreas Nilsson for putting a link to me in his blog!

What I did today
I did what LDiablo][ suggests in his comment to the Intrepid real time kernel bug.

I downloaded the following four packages to downgrade to the old kernel:
linux-image-2.6.24-22-rt (2.6.24-22.45)
linux-rt (2.6.24.22.24)
linux-restricted-modules-2.6.24-22-rt (2.6.24.14-22.53)
linux-restricted-modules-rt (2.6.24.22.24)

...and istalled them with dpkg --force-depends. I'm not exactly sure why I would need the restricted drivers, though.

The system boots up fine, but without ALSA. No sound at all, in other words.

qjackctl says the following:

13:45:02.348 Could not open ALSA sequencer as a client. ALSA MIDI patchbay will be not available.
ALSA lib seq_hw.c:457:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory


Also, when trying to use real time mode:

cannot use real-time scheduling (FIFO at priority 10) [for thread -1210079568, from thread -1210079568] (1: Operation not permitted)
cannot create engine


I have a vague memory of fixing the latter issue before in Hardy - it obviously has something to do with permissions. Googling will probably do the trick. I'm more concerned about ALSA.

lsmod |grep snd gives me nothing, and when trying modprobe snd_seq I get the following message:

FATAL: Module snd_seq not found.
FATAL: Error running install command for snd_seq


I'll take a break now for a day or two. Any and all suggestions are welcome!

I'm quite surprised about acutally having readers/commenters already - thanks for contributing, and have a happy new year!

Preparing the system

Today I've done the following:

System tweaks and stuff

I've set the noatime mount option for my drives to increase performance.

With Boot-Up Manager (BUM) I disabled some services that I don't think I need running all the time.

My accents (as in é and á) didn't work - I fixed this with "setxkbmap se" (as I'm using a Swedish keymap).

Software updates
Thanks to khashayar, I now have Ardour 2.7.1 and Audacity 1.3.6 as well as recent versions of LMMS and Rosegarden - from www.getdeb.net. I haven't had much time to try them out yet, but Ardour does seem a bit faster than I'm used to.

Dual screen, big desktop
I have literally spent HOURS trying to figure out how to use both of my screens (the laptop's 1280x800 screen and my LCD with 1280x1024) for one, continuous desktop. After screwing around endlessly with aticonfig, I realized that the proprietary fglrx driver does not support such a virtual desktop - both screens would need to have the same resolution. I can, however, switch screens (this is called "clone mode") which is more than nothing, I guess. Apparently I can't install the more recent (and open source) radeon driver, as it depends on the drm module which throws a "Can't allocate memory" error when I try to modprobe it.

I checked in Ubuntu 8.10, and sure enough, the radeon driver is on and configuring the dual monitor desktop is easy as pie. No screwing around in the console (aticonfig) or with some proprietary controller software (amdcccle) - just click, drag and apply. Things do get better, it seems. Too bad the realtime kernel in Intrepid doesn't work with dual core processors. I know, I'm repeating this in each blog post, but it really is annoying. (On a side note: there seems to be a war between two drivers: radeon and radonhd. It is amusing and tragic at the same time).

Further steps
1. One comment to the bug report suggests that it's possible to install an older kernel in Intrepid and be able to use real time capabilities. I might try this. I'm pretty sure I have already but I can't remember what happened.

2. Do I really need real time capabilities? Maybe I can do without it for now?

3. Maybe I should check out the 64 bit version of Ubuntu Studio.

4. I must go to bed much earlier than 5am.

söndag 28 december 2008

First steps - I've got sound!

I have now installed Ubuntu 8.04 (Hardy) on my laptop. Sadly, Hardy's ATI drivers for Xorg don't seem to support my ATI Mobility Radeon HD 3400, so I have to run proprietary drivers for now.

One possibly good piece of advice for anyone looking into Linux audio (or Linux in general) is "don't buy a laptop model that's too new!" or you will need a load of patience to hack around with it - sure, Ubuntu 8.10 recognizes most of my hardware, but in this case, I need to run 8.04 to get real time capabilities.

After some googling and hacking (among other things, I followed this thread about making Jack work in real time mode) I can now get sound through the Edirol FA-66. FINALLY!

Everything's not fine, though. Jack has crashed a couple of times during the last 20 minutes, Qjackctl seems to be inclined to freeze, and there is some annoying crackling and popping going on during playback in Ardour - although neither Qjackctl nor Ardour registers xruns (Ardour does, however, detect "spikes" in master output).

On one hand, I'm glad that I've gotten this far. There's definitely a sense of accomplishment, and I'm hopeful about this whole project. On the other hand, there are obviously some issues to be dealt with before I've got a stable, working setup.

Ubuntu Studio 8.10 problems

I have borrowed an Edirol FA-66 audio interface from a friend. The challenge now is to set up a working system with my newly purchased Sony laptop. My current OS is Ubuntu Studio 8.10 (Intrepid Ibex) - but, sadly, this has to change.

There are, as I have learned, a couple of serious issues with Ubuntu 8.10 making it quite hard to set up a working environment with a real time kernel and a firewire interface:

  • The real time kernel no longer works with dual core processors - apparently, this can be fixed by downgrading to an older kernel. No luck for me yet, though.

  • libfreebob, the firewire driver, drops packets and generates Xruns.

  • From what I've read on forums, running 8.04 (Hardy Heron) is a better option, so first thing in the morning I'll install that instead.

    Losing real time capabilities is quite a blow to the appeal of Ubuntu Studio. Hopefully, with Ubuntu 9.04, both of these issues will be resolved. But until April, I'll go with Hardy.

    Introduction / My goals

    Purpose
    The purpose of this blog is to document this entire process of learning and of creating music with Linux. I will write reviews of applications that I use and post solutions to problems I've managed to solve. I hope that this blog can become a motivation for me, and perhaps for others, to keep on trying and experimenting with Linux and music.

    My goals
    My first goal is to set up a working environment with my newly purchased laptop, a firewire audio interface and a Linux distribution with a real time kernel. Hopefully, this won't be too hard.

    In time, my goal is to use my computer in a live setting - for beats, processing of instruments and so on, and also in collaboration with other "laptop musicians". For this, I want to learn more about the variety of applications that exist for Linux, both for audio and for MIDI.

    Looping and loop-based sequencing is something I want to investigate especially. There is, sadly, nothing akin of Sony Acid or Ableton Live for Linux - yet! There are, however, a number of applications for live looping, as well as for sample based sequencing.

    Background
    I've been making music using GNU/Linux for a couple of years now. During this time, a lot has changed for the better. 'Mainstream' Linux distributions have gotten more and more user friendly and hardware support has improved dramatically. A number of Linux distributions for the home studio have seen daylight, notably Ubuntu Studio. Among the vast number of audio and MIDI applications available, Ardour, Rosegarden and Hydrogen have all gotten better and better, in my experience.

    My goals
    My first goal is to set up a working environment with my newly purchased laptop, a firewire audio interface and a Linux distribution with a real time kernel. Hopefully, this won't be too hard.

    In time, my goal is to use my computer in a live setting - for beats, processing of instruments and so on, and also in collaboration with other "laptop musicians". For this, I want to learn more about the variety of applications that exist for Linux, both for audio and for MIDI.

    Looping and loop-based sequencing is something I want to investigate especially. There is, sadly, nothing akin of Sony Acid or Ableton Live for Linux - yet! There are, however, a number of applications for live looping, as well as for sample based sequencing.

    It can, however, still be somewhat of an ordeal to set up a working environment for making music in Linux, at least if you're going to record, edit and sequence audio. It often takes patience, some basic "hacking" skills (in this case, meaning: using the shell, installing and customizing additional packages etc.) and a willingness to experiment and read through forum and mailing list postings in order to solve one's problems. Setting up Linux for music making is still not something I'd recommend to a fellow musician who is also an average PC user with no desire to learn the inner workings of an operating system.

    Personally, I find this entire process rewarding, even though I occasionally despair and wish that it would all just WORK already. The advantages of a Linux based system are, in my eyes, overwhelming, and I would rather not compromise for the sake of simplicity.

    My experience
    I've used Debian, DeMuDi and Ubuntu Studio for music making. The applications I've used the most are Ardour, Hydrogen, Qsynth, ZynAddSubFX, Specimen and Seq24. Earlier, still in Windows, Sony Acid and SoundForge were my primary applications.

    My hardware
    My computer is a Sony Vaio VGN-SR29VN. Specs in short:
    Intel Core 2 Duo P8600, 2.4GHz
    4GB RAM
    320GB SATA
    ATI Mobility Radeon HD 3470

    I have borrowed an Edirol FA-66 firewire audio interface from a friend. If it works well with my setup, I will probably buy it.