Real time for Ubuntu Studio 10.04 amd64

Ralf Mardorf ralf.mardorf at alice-dsl.net
Mon Jul 12 02:29:29 BST 2010


Hi :)

I'm new to the list. Regarding to hw MIDI jitter, I'm testing and
comparing several Linux setups.

Here is a rough summary of my latest thread on LAD.

I wonder what I need to do, to get a kernel-rt for Ubuntustudio 10.04?

........................................................................
Ubuntu Studio 10.04 amd64
$ uname -a
Linux ubuntu 2.6.32-23-preempt #37-Ubuntu SMP PREEMPT Fri Jun 11
10:19:07 UTC 2010 x86_64 GNU/Linux

$ alsa-midi-latency-test -Rrw=2 -o20:0 -i20:0
> alsa-midi-latency-test 0.0.3
> set_realtime_priority(SCHED_FIFO, 99).. done.
> clock resolution: 0.000000001 s
> SUCCESS

 best latency was 1.00 ms
 worst latency was 3.36 ms, which is great.

3.36 ms isn't great, but unusable to make music.

........................................................................
openSUSE 11.2 amd64
> uname -a
Linux suse11-2 2.6.31.6-rt19 #1 SMP PREEMPT RT Wed Nov 18 16:59:26 CET
2009 x86_64 x86_64 x86_64 GNU/Linux

> alsa-midi-latency-test -Rrw=2 -o16:0 -i16:0
> alsa-midi-latency-test 0.0.3
> set_realtime_priority(SCHED_FIFO, 99).. done.
> clock resolution: 0.000000001 s
> SUCCESS

 best latency was 0.99 ms
 worst latency was 1.05 ms, which is great.

........................................................................

PREEMPT vs PREEMPT RT and of course frequency scaling for an audio
distro should be at performance by default, anyway, the frequency
scaling isn't a big deal.

I tried to boot the kernel-rt from the Ubuntu repositories and I tried
to build a kernel-rt myself.

If I try to boot kernel 2.6.31-11-rt or kernel 2.6.31-10-rt from the
repositories I get
'mount: mounting none on /dev failed: No such device.' Regading to the
web this might be, because of CONFIG_DEVTMPFS.

# cat config-2.6.31-11-rt | grep CONFIG_DEVTMPFS
# cat config-2.6.32-23-preempt | grep CONFIG_DEVTMPFS
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y

When I try to boot kernel 2.6.33-23-realtime from the repository I get
'ACPI: Expecting a [Reference] package element, found type 0'.

At least this three kernel-rt from the repositories come with an initrd.
The kernel I tried to build the way I usually build kernels for Ubuntu
with success, is missing an initrd.

$ cd /usr/src
$ sudo synaptic
  I checked if those packages were installed:
  bin86
  build-essential
  bzip2
  fakeroot
  gcc
  kernel-package
  make
  libncurses5-dev
$ wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.33.5.tar.bz2
$ wget
http://www.kernel.org/pub/linux/kernel/projects/rt/patch-2.6.33.5-rt23.bz2
$ tar xvjf linux-2.6.33.5.tar.bz2
$ rm linux-2.6.33.5.tar.bz2
$ mv linux-2.6.33.5 linux-2.6.33.5-rt23
$ ln -s linux-2.6.33.5-rt23 linux
$ cd linux
$ bunzip2 ../patch-2.6.33.5-rt23.bz2
$ patch -p1 < ../patch-2.6.33.5-rt23
$ rm ../patch-2.6.33.5-rt23
$ cp /boot/config-2.6.32-23-preempt .config
$ make oldconfig
  81 x Enter
$ make menuconfig
  Edited from Generic-x86-64 to Opteron/Athlon64/Hammer/K8
  Save an Alternate Configuration File
$ make oldconfig
  Nothing to do
$ make-kpkg clean
$ export CONCURRENCY_LEVEL=2
  This didn't work:
  $ make-kpkg --rootcmd fakeroot --initrd kernel-image kernel-headers
kernel-source
    50 minutes later
    make[5]: *** [drivers/staging/comedi/drivers/quatech_daqp_cs.o]
Error 1
    make[4]: *** [drivers/staging/comedi/drivers] Error 2
    Hence I edited .config:
    $ cat .config | grep COMEDI
      CONFIG_COMEDI=m
      # CONFIG_COMEDI_DEBUG is not set
      CONFIG_COMEDI_PCI_DRIVERS=m
      CONFIG_COMEDI_PCMCIA_DRIVERS=m
      CONFIG_COMEDI_USB_DRIVERS=m
    $ gedit .config
    $ cat .config | grep COMEDI
      # CONFIG_COMEDI is not set
      # CONFIG_COMEDI_DEBUG is not set
      # CONFIG_COMEDI_PCI_DRIVERS is not set
      # CONFIG_COMEDI_PCMCIA_DRIVERS is not set
      # CONFIG_COMEDI_USB_DRIVERS is not set
    $ make oldconfig
      Nothing to do
    $ make-kpkg clean
  $ make-kpkg --rootcmd fakeroot --initrd kernel-image kernel-headers
kernel-source
    Another 50 minutes later
    make[4]: *** [drivers/staging/pohmelfs/inode.o] Error 1
    make[3]: *** [drivers/staging/pohmelfs] Error 2
    Hence I edited .config:
    $ cat .config | grep POHMEL
      CONFIG_POHMELFS=m
      # CONFIG_POHMELFS_DEBUG is not set
      CONFIG_POHMELFS_CRYPTO=y
    $ gedit .config
    $ cat .config | grep POHMEL
      # CONFIG_POHMELFS is not set
      # CONFIG_POHMELFS_DEBUG is not set
      # CONFIG_POHMELFS_CRYPTO is not set
    $ make oldconfig
      Nothing to do
    $ make-kpkg clean
Here it is ok:
$ make-kpkg --rootcmd fakeroot --initrd kernel-image kernel-headers
kernel-source
      80 minutes later
$ cd ..
$ sudo dpkg -i
linux-image-2.6.33.5-rt23_2.6.33.5-rt23-10.00.Custom_amd64.deb

........................................................................

When I tried to boot the kernel I got

'[    0.499322] ACPI: Expecting a [Reference] package element, found
type 0
 [    0.811991] kernel panic - not syncing: VPS: Unable to mount root fs
on unknown-block (0,0)'

Any hints are welcome!

Cheers!

Ralf




More information about the Ubuntu-Studio-users mailing list