At Home With AV Linux
My studio computer collection includes two custom-built desktop machines and a Hewlett-Packard G60 laptop. As described in my previous article, the primary desktop box has been running an old but rock-steady 64 Studio 2.1 that has recently been replaced by a shiny new 64-bit Arch system. The secondary desktop machine and the laptop are both running the 32-bit version of Ubuntu 10.04. However, while I like and enjoy using Ubuntu I hardly require two identical installations of the same Linux distribution, so I decided to replace one of them with AV Linux.
What It Is
AV Linux is a complete Debian-based Linux distribution that includes optimized audio and video subsystems along with the expected wealth of system utilities and productivity software. A live version can be tested and used without disturbing your installed system, and an installer is provided if/when you decide to permanently add AV Linux to your boot menu.
Figure 1. AV Linux 5.0.1, at your service. (Full-size)
The AV Linux Web site tells us that the system is based on the stable "Squeeze" release from Debian Linux, the LXDE desktop and Openbox window manager, and the Remastersys utility. That last item is of particular interest - Remastersys can make a distributable copy of a personalized Debian or Ubuntu system, which is how AV Linux came into existence. At some point in 2007 Glen Macarthur recognized that his custom Debian-based audio/video production system could be useful to more users, so he spruced it up with some neat extras, pulled it all together with Remastersys, and voila, he created a new Debian-based media-optimized Linux distribution.
You can read the full story of the growth of AV Linux in its excellent manual. It's enough here to note that AV Linux has become a popular and recommended audio-centric Linux distribution. For good reasons, too, as we shall see.
I downloaded the AV Linux 5.0.1 ISO and burned it to a DVD. I tend to use disc-based installers, but my habitual way isn't always the best way to go, as I learned when I tested my first burned disc. On Day 1 it worked without incident, but on Day 2 it opened to a login dialog that should not have been there (this was a live session). Worse, for some reason the dialog rejected all my attempts at logging in. I checked Google, and sure enough I wasn't the first user to experience the problem. I thought I had verified the MD5 checksum for the ISO before I burned the disc, but I figured that starting over might give a clue to solving the problem. I retrieved a fresh copy of the ISO image, verified the checksum, and burned it to disc at a lower speed (8x). Alas, the same problem occurred, so I decided to try a Live USB stick instead. Still no joy, the problem persisted, until at last I realized that I needed to boot into AV Linux in its Failsafe mode. At once, the login problem was resolved and the system's performance was more responsive - and thus more enjoyable - thanks to the use of the USB key instead of the DVD. The DVD works, but use the USB method if you can.
By default AV Linux boots into its standard live mode, which should work well for most users. However, if you experience the problem I've described try the Failsafe mode. I would have tried it sooner, but I mistook "failsafe" for "recovery", i.e. the single-user boot mode used for system maintenance and repair. In fact, the Failsafe mode simply starts a live session that bypasses certain boot-time options that can conflict with some hardware (such as mine, evidently).
After the system boots and passes its basic configuration you should see a screen similar to the display in Figure 1. You're now in the LXDE/Openbox environment, from which you can launch applications and perform further system modifications. You'll probably want to change certain system defaults, especially the settings for JACK. AV Linux has pre-configured JACK with rather conservative values that you'll need to change if you want the lowest possible latency from your hardware. You may also need to add yourself to certain groups to ensure that you have the correct permissions to access requested devices (e.g. a Webcam or an external drive).
Using AV Linux
In the lower left corner of the opening display you'll see a row of icons. The icon at far left summons the main menu for the AV Linux applications stack and system maintenance tools. As mentioned, you'll find all the major players in the Linux audio applications arena, from Ardour to ZynAddSubFX, along with a generous helping of video applications and utilities. System administration tools can be found in the main menu, or you can simply click on the AV Linux Control Panel (Figure 2), the icon just to the right of the main menu's icon. The Control Panel provides easy access to tools and utilities for system management, administration, and customization. Its amenities include an installer for ATI/nVidia binary video drivers and a very useful tool that scans and analyzes your system for its readiness for realtime performance.
Figure 2. The AV Linux Control Panel.
The other icons invoke the system's default file manager, an always-handy terminal window, the Iceweasel Web browser, the QJackCtl utility, and the WBar Dock, a neat "rolling" collection of program launchers. By default, the Dock includes launchers for the system's selected applications, but the user is free to add and delete items in the Dock.
The audio applications stack includes some unique selections. The stable Ardour2 is there, of course, but so is ArdourVST, a build of Ardour2 with support for Windows VST plugins (with some free VSTs to get you started). Demo versions of some commercial packages are included, making AV Linux a handy way to try Pianoteq or Renoise or the Loomer and linuxDSP plugins in an optimal system. Definitely a cool attraction.
Of course the stack includes the usual wonderful variety of free plugins in LADSPA, LV2, and native Linux VST formats, along with the variety of plugin-savvy hosts, e.g. Ardour, Rosegarden, Qtractor, Audacity, Guitarix, et cetera (see the manual for the complete list (PDF)). Csound5, Pd (any flavor), and SuperCollider3 are missing, but the first two are available from the default repos via Synaptic. I built SuperCollider 3.5 from its git sources, but only after searching for some Qt4 headers inexplicably missing from the Squeeze repos.
The Live Sessions
Some random observations made during my initial live sessions :
The system recognized my dual-core CPU, and by default set the CPU scaling governor's mode to "on-demand". Ardour doesn't particularly like that setting, so I switched the governor to its "performance" mode. The default mode runs my laptop's AMD Turion X2 CPU at 500 MHz, the performance mode set it to 2 GHz, the processor's maximum speed.
As noted earlier, AV Linux sets up JACK with conservative values that should work with most hardware. However, you'll definitely want to change those values for the best performance from your equipment. Here's what the system started with :
44.1 kHz sampling rate, 1024 frames/period, 2 periods/buffer
These values yielded a latency of 46.4 milliseconds, not useful for professional work. I changed those settings to these values :
48 kHz sampling rate, 256 frames/period, 2 periods/buffer
Latency dropped to 10.7 milliseconds with those values. Not a super-low figure, but that's probably about as good as I'll get from my laptop's audio hardware, nVidia's spin on the ubiquitous Intel HDA chipset. It performs well enough for lightweight realtime Csound output or for auditioning pre-recorded tracks in Ardour. Of course, better external hardware should handle heavier loads without xruns or shutdowns.
I ran uname -a and discovered this information about the default AV Linux kernel :
Linux 220.127.116.11.avl.1 #1 SMP PREEMPT Thu June 2 23:59:52 EDT 2011 i686 GNU/Linux
As I mentioned, the Control Panel includes a neat audio system analysis utility to help determine where you can optimize your system for best audio/video performance. I noticed that the tool indicated that the default AV Linux kernel is not patched for realtime with Ingo Molnar's revisions. A patched realtime kernel can be installed if you feel the need, but it seems that for most normal work the default PREEMPT-enabled kernel will perform adequately in realtime with JACK.
The Hard Decision
After working with the Live mode for a while I decided to install AV Linux on my laptop. The system's installer worked well, I had no troubles during the installation process, but during the basic configuration I discovered that the installer had ignored the settings for its failsafe mode, which meant that I faced again the previous problem at the log-in. Fortunately that was easily dealt with by adding the nomodeset option to my boot command.
Unfortunately I also discovered a new problem while configuring the video driver (version 270.40.19, for those who must know). Its installation was no problem, but performance was unreliable - the entire system would lock up after a while and required a manual shutdown (I had to hold down the power button until the system closed). Eventually I found the cause of this rather serious problem - the laptop's nVidia 8200M video chipset is incompatible with an MSI-enabled kernel. Again, a simple addition of pci=nomsi to my boot command has resolved that issue.
I have a single remaining problem, minor but annoying, and I welcome any advice for its resolution. After settling the video issues I found that shutdown occasionally didn't, i.e. the system wouldn't power down until I pressed the laptop's on/off button. On advice from "somewhere on Google" I added the acpi=off option to my boot command parameters. Alas, the system randomly powered off until I removed the option. Apparently something in the machine wants the option activated. I no longer have the random shutdowns, but I still have the occasional hang-up when I close the system. As I said, suggestions for fixture are welcome.
Here's the current options collection for my boot command :
threadirqs quiet nomodeset pci=nomsi
With these settings - and the settings for JACK shown above - I now have a stable and smooth-running system. I'm able to run AVSynthesis, my personal benchmark application for testing the system's graphics and sound capabilities. The latest incarnation of AVSynthesis requires JOGL2, the most recent development of the Java/OpenGL software, which in turn requires the hardware accelerated graphics provided by the nVidia chipset and driver. Realtime audio in AVSynthesis is handled by Csound 5.13, built for double-precision numerics and support for a Csound/Java interface wrapper (among other useful options). The combination of high-quality realtime audio I/O and 3D graphics transformation hits the system resources heavily, and I'm pleased to report that AV Linux bears the stress with ease.
The AV Linux Web page notes that the system is also developer-friendly. The autotools software is all there, along with scons, git, and many other utilities for retrieving and building from source code. Python 2.6 is there, and an up-to-date Java JRE (from Sun) is installed. Alas, I needed the full SDK, but hey, no problem - the Synaptic package manager helped me find the right package, and after a few keystrokes I had my up-to-date complete Java 1.6 SDK.
On Quirks And Quiddities
I want to emphasize that the problems I encountered during my tests were due to a conflicting combination of hardware peculiarities and system defaults. AV Linux is configured to fit most use-cases, but no Linux distribution can guarantee flawless performance on any and all hardware. Motherboards vary in the quality of their manufacture, and of course proprietary binaries are always suspect (though I remain a satisfied user of nVidia products). Nevertheless, all significant problems have been solved, and AV Linux is humming along nicely here now. I haven't been tempted to boot into the Ubuntu partition on the same box for a while, so it looks like AV Linux has a new home here at Studio Dave (Figure 3).
Figure 3. My AV Linux at work ("Rui at large"). (Full-size)
Now that I'm satisfied that my personal requirements can be met by the system I plan to look further into its installed goodies. The audio and video applications menus are filled with well-known and not-so-well-known items, and the demos include some packages I've heard about but haven't had the time to look into. I've little excuse for ignoring them now.
As I surf various Linux audio-related blogs, forums, and mail-lists I see many recommendations for AV Linux, especially to newbies who want to sample the variety of audio/video software packages available to Linux-based sound & music people. The system is stable, and I suspect that most hardware avoids the issues I encountered. If you have problems, check out the manual and/or head for the excellent AV Linux forum. You'll find project designer/maintainer Glen Macarthur, a.k.a. Gmaq, along with other developers and users who can help you out of your troubles.
I look forward to future releases of AV Linux. According to the grapevine, version 5.0.2 will expand the system's video support and resolves a few issues nagging 5.0.1, and I suspect I'll see some new audio softs in the apps stack. By the way, AV Linux is a labor of love, but love alone won't put food on the table. Donations are welcome, and I urge all AV Linux users to show a little pecuniary affection for the project. Glen is committed to producing the highest quality Linux distribution optimized for audio and video production, his efforts are surely worth some community coin.
Next up, a look at what's happening these days in the world of Pd. Exciting stuff, don't miss it.
Limited Time Offer
Take Linux Journal for a test drive. Download our September issue for FREE.
Topic of the Week
The cloud has become synonymous with all things data storage. It additionally equates to the many web-centric services accessing that same back-end data storage, but the term also has evolved to mean so much more.