corner linux corner

registered linux user 239379 Here you can find a collection of useful Linux stuff. There some manuals and config files (mainly for me, but maybe useful for others). For all things that are listed here applies „USE AT YOUR OWN RISK”. I do not take any responsibility for damaging your system.
If there are some things wrong or something useful is missing, just drop me a mail

My personal stuff
Howto build a Debian GNU/Linux Digital Audio Workstation

Personal GNU/Linux setup

I am always interested in which application is used by which developer or user, that i can find good new tools. Hopefully you too find some great applications to use...

the whole systems:

2008 | Athlon X2 4200 3GB RAM kernel2.6.30 debain unstable
2006 | Pentium III 1Ghz 512MB RAM kernel 2.6.15rc6 debian sid

daily used applications:

windowmaker - My window manager
vimperator - Browsing the Internet
claws mail - E-mail reading that bites
xterm - The X terimanal emulator
emacs - my editor of choice
xfe - graphical file manager
brasero - Burning tool
banshee - playing ogg/mp3
mplayer - playing videos
rubyripper - ripping Audio
kvm - Virtual machine
gftp - Graphical ftp-client
geeqie - Image viewer
gimp - Manipulating images
inkscape - SVG editing (vector)


applications for music:

jack - Low-latency audio server
ardour - a digital audio workstation
JAMin - the JACK audio mastering interface
hydrogen - an advanced drum machine for GNU/Linux
mhwavedit - wave editor

back to top

openmoko freerunner SHR links

taken from:
http://wiki.openmoko.org/wiki/SwapSpace
$ dd if=/dev/zero of=/media/card/swapfile bs=1024 count=65536
$ echo "/media/card/swapfile swap swap defaults 0 0" >> /etc/fstab
Make swap | mkswap swapfile | swapon swapfile
back to top

How to build a Debian GNU/Linux Digital Audio Workstation (DAW)

This part of my page is a collection of all pages i have visited, to build my own digital audio workstation (DAW). Hopefully you don't have to search the web for finding out everything you must attend to build a DAW. I spend nights and days to install my multimedia Linux, but now everything works great like it should.
The hardware on my machine

  • AMD Athlon 1800/ 512 MB RAM
  • ATI Radeon 9250 graphic card (open source 3D accelerated)
  • Terratec EWS 88 MT sound card (8 analog in/out an midi)

First you have to install a Debian base system. Recommended is the unstable distribution. Edit your /etc/apt/sources.list file to a near mirror to your country and then do a

$ apt-get update
$ apt-get dist-upgrade

Now you should have the newest packages installed.

building a low latency 2.6 kernel

First go to kernel.org and download kernel 2.6.16. Last you need the low latency patches from Ingo Molnar (at this time it is patch-2.6.16-rt25).
The next steps should all be done as root.
Unpack kernel 2.6.16 into /usr/src/ and then unpack the patch into /usr/src/linux-2.6.16/
change into this directory and patch the source:

$ patch -p1 < realtime-preempt-YourPatch

If everything went fine you can configure your kernel with

$ make menuconfig

At configuring the Kernel a few parameters should be set:

Processor type and features ---> Preemption Model --> Complete Preemption (Real-Time)
CONFIG_MODULES=y
CONFIG_SECURITY=y
CONFIG_SECURITY_CAPABILITIES=m
CONFIG_SECURITY_SELINUX=y

The rest depends on your hardware. You can use my kernel conf and change only the drivers that fit on your machine.
To build the kernel just type:

$ make
$ make modules_install
$ make install

Do not forget to edit your /boot/grub/menu.lst (or if you have chosen lilo as boot manager its config file) that you can boot your old kernel, if the new one won't work.
You need to point your kernel source to be the actually used kernel source. To do this you can simply make a symbolic link on it:

$ ln -s /usr/src/YourRealtimeKernel /usr/src/linux
back to top

Real-time privileges for a normal user

There are two ways of getting real-time privileges. before Kernel 2.6.14 i used the real-time-lsm module. Now i use a patched version of pam.

using lsm-module

To get real-time privileges using the real-time-lsm module. Download and unpack it into any directory you like and change as root into it.
Your Kernel sources must be right linked (described above).

$ make
$ make install

To load the module you have different options (taken from the README file):

Once the LSM has been installed and the kernel for which it was built is running, the root user can load it and pass parameters as follows:

$ modprobe realtime any=1

Any program can request realtime privileges. This allows any local user to crash the system by hogging the CPU in a tight loop or locking down too much memory. But, it is simple to administer. :-)

$ modprobe realtime gid=29

All users belonging to group 29 and programs that are setgid to that group have realtime privileges. Use any group number you like.

$ modprobe realtime mlock=0

Grants realtime scheduling privileges without the ability to lock memory using mlock() or mlockall() system calls. This option can be used in conjunction with any of the other options.

$ modprobe realtime allcaps=1

Enables all capabilities, including CAP_SETPCAP. This is equivalent to the 2.4 kernel capabilities patch. It is needed for root programs to assign realtime capabilities to other processes. This option can be used in conjunction with any of the other options

using patched libpam

Download the the patched Debian package and install it with this command:

$ dpkg -i PackageName

Some links that describes this more detailed:
real-time-lsm module. Download and unpack it into any directory you like and change as root into it.

back to top

Tuning the hardware

Giving your audio card the highest priority in your system. This is a little complicated so i try to complain it in headwords and give some links if you want to go deeper in this.

This is the priority list of the IRQ's on non-APIC machines:

0, 1, 8, 9, 10, 11, 12, 13, 14, 15, 3, 4, 5, 6, 7
0 is the lowest
7 is the highest

To see your interrupts just do:

$ cat /proc/interrupts

Try to put your sound card into a pci slot with high priority and make clear that it is not sharing any other IRQ with any other device.
Changing the latency of your audio device:

$ lspci -vvv

This shows you a list of your devices including the latency. Standard i think is 32 and in my case the nvidia card got 248. To change this value you have to do following:

$ setpci -v -d *:* latency_timer=b0
$ setpci -v -s YourDevice latency_timer=ff
For example in my machine it is:
$ setpci -v -s 00:0f.0 latency_timer=ff
To control that everything went fine do a:
$ lspci -vvv

Your audio device should have latency of 248. This article by Daniel Robbins describes this more detailed. To do this automatically put the string in your file /etc/init.d/bootmisc.sh. For me it is:

$ setpci -v -d *:* latency_timer=b0
$ setpci -v -s 00:0f.0 latency_timer=ff
back to top

Where i found all the stuff

patched version of pam
real-time-lsm module
Daniel Robbins Hardware IRQ
Realtime patches from Ingo Molnar
Some Linux audio links:
http://linux-sound.org/ - no longer maintained so better go to http://apps.linuxaudio.org/
back to top
Last modified: 2011 Jan 20 @ 21:14
corner border corner