>>> With a rt kernel, you can setup both the hardware priorities and the >>> software >>> priorities. That mean that tasks accessing some hardware, the sound card, >>> will >>> have the priority over the other tasks, and that tasks executed by a given >>> user >>> or group [the audio group] will have priority over the other. rtirq will dot >>> that for you. Just emerge it and add it into the default run level. >> >> Is jack necessary for me then? What I want to do is use my USB DAC >> and mpd (music player app) in real time. Maybe jack is necessary if I >> want to know *how* real time it is? >> >>> Be aware that if you don't really need a rt kernel, it is best to not use >>> it, >>> because such a kernel can cause compilation failures with gcc. >>> http://bugs.gentoo.org/show_bug.cgi?id=190462 >>> http://bugs.gentoo.org/show_bug.cgi?id=20600 >>> For that raeson, if you want to use a rt kernel, it is good practice to have >>> another kernel of the same version, vanilla or gentoo sources, and reboot on >>> this non rt kernel when using emerge. >> >> I noticed this when trying to emerge nvidia-drivers. >> >> Thanks, >> Grant > > Hi Grant, > I thought we had this discussion maybe 6 months ago? Maybe I'm > wrong about that. > > For pure audio playback the real-time kernel and Jack provide > almost NO value. The real-time kernel is able to give more responsive > attention to certain drivers or apps. Jack is one of them and if your > mpd app - whatever that is - is a Jack app then it inherits the > attention. However this only matters when you need to do something in > 'real time'. There is nothing, in my opinion, 'real time' about > reading a stream of pre-recorded data off a disk, buffering it up and > then sending it to a sound card. Why does the sound card need to > receive data in 5mS vs 25mS? The only difference that the buffer time > causes is to delay the start of playback. Once playback starts as long > as there is no time the buffer runs dry there is no difference in the > sound you hear. > > I think that for your application using the real-time kernel and > Jack is adding nothing but complication and that's likely to cause > more problems than it's going to solve.
How low of a latency are you able to keep stable? The output of my jackd calculates 5.8ms. Here's the command I'm using now: jackd -R -P85 -c h -d alsa -d hw:1,0 -r44100 -p256 -n3 -S -P I've made all of the optimizations I could from these guides: http://irc.esben-stien.name/mediawiki/index.php/Setting_Up_Real_Time_Operation_on_GNU/Linux_Systems http://proaudio.tuxfamily.org/wiki/index.php?title=Howto_RT_Kernel I can't get rtirq to work though. I've emerged it and set it to start during the default runlevel, but I get the following and it doesn't look like my USB DAC has been prioritized. Any idea why it isn't working? Do you see any room for improvement in my output? # ps -Leo rtprio,cmd RTPRIO CMD - init [3] - [kthreadd] 99 [migration/0] 49 [sirq-high/0] 49 [sirq-timer/0] 49 [sirq-net-tx/0] 49 [sirq-net-rx/0] 49 [sirq-block/0] 49 [sirq-block-iopo] 49 [sirq-tasklet/0] 49 [sirq-sched/0] 49 [sirq-hrtimer/0] 49 [sirq-rcu/0] 99 [posixcputmr/0] - [desched/0] 99 [migration/1] 99 [posixcputmr/1] 49 [sirq-high/1] 49 [sirq-timer/1] 49 [sirq-net-tx/1] 49 [sirq-net-rx/1] 49 [sirq-block/1] 49 [sirq-block-iopo] 49 [sirq-tasklet/1] 49 [sirq-sched/1] 49 [sirq-hrtimer/1] 49 [sirq-rcu/1] - [desched/1] 1 [events/0] 1 [events/1] - [khelper] - [async/mgr] - [sync_supers] - [bdi-default] - [kblockd/0] - [kblockd/1] - [kacpid] - [kacpi_notify] - [kacpi_hotplug] 50 [irq/9-acpi] - [ata/0] - [ata/1] - [ata_aux] - [ksuspend_usbd] - [khubd] - [kseriod] - [cfg80211] - [rpciod/0] - [rpciod/1] - [kswapd0] - [aio/0] - [aio/1] - [crypto/0] - [crypto/1] 50 [irq/7-parport0] 50 [irq/14-ide0] 50 [irq/28-ahci] - [scsi_eh_0] - [scsi_eh_1] - [scsi_eh_2] - [scsi_eh_3] - [scsi_eh_4] - [scsi_eh_5] 50 [irq/19-ath] - [phy0] 50 [irq/21-ehci_hcd] 50 [irq/20-ehci_hcd] 50 [irq/23-ohci_hcd] 50 [irq/22-ohci_hcd] 50 [irq/12-i8042] 50 [irq/1-i8042] - [kpsmoused] 50 [irq/8-rtc0] - [edac-poller] - [usbhid_resumer] 50 [irq/21-hda_inte] - [hd-audio0] - [kjournald] - [scsi_eh_6] - [usb-storage] - /sbin/udevd --daemon - [flush-8:0] - /sbin/portmap - /sbin/rpc.statd --no-notify - /usr/sbin/rpc.mountd - [lockd] - [nfsd] - [nfsd] - [nfsd] - [nfsd] - [nfsd] - [nfsd] - [nfsd] - [nfsd] - metalog [MASTER] - metalog [KERNEL] - /usr/sbin/acpid - /usr/bin/dbus-daemon --system - /sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -C/var/run - /bin/wpa_cli -a/etc/wpa_supplicant/wpa_cli.sh -p/var/run/wpa_supplicant - - /usr/sbin/cupsd -C /etc/cups/cupsd.conf - /usr/sbin/hald --use-syslog --verbose=no - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - /usr/sbin/console-kit-daemon - hald-runner - hald-addon-input: Listening on /dev/input/event4 /dev/input/event2 /dev/i - hald-addon-storage: polling /dev/sdb (every 2 sec) - hald-addon-storage: polling /dev/sr0 (every 2 sec) - hald-addon-acpi: listening on acpid socket /var/run/acpid.socket - /usr/sbin/ntpd -p /var/run/ntpd.pid -u ntp:ntp - /usr/sbin/hddtemp -d -l 127.0.0.1 /dev/sda - /usr/sbin/sshd - /usr/sbin/cron - /usr/bin/gdm - /usr/bin/gdm - /usr/bin/X :0 -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7 - /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive -reuse - /sbin/agetty 38400 tty1 linux - /sbin/agetty 38400 tty2 linux - /sbin/agetty 38400 tty3 linux - /sbin/agetty 38400 tty4 linux - /sbin/agetty 38400 tty5 linux - /sbin/agetty 38400 tty6 linux - /bin/sh /etc/xdg/xfce4/xinitrc -- /etc/X11/xinit/xserverrc - /usr/bin/dbus-launch --sh-syntax --exit-with-session - /usr/bin/dbus-daemon --fork --print-pid 6 --print-address 9 --session - /usr/bin/ssh-agent -- startxfce4 - xscreensaver -no-splash - /usr/bin/xfce4-session - /usr/libexec/xfconfd - xfwm4 --sm-client-id 117f000001000115957674100000080570000 --display :0.0 - xfsettingsd - /usr/bin/xfdesktop --sm-client-id 117f000001000121355315800000065980002 - - xfce4-panel --sm-client-id 20272b6bf-f534-4ae1-b5a5-49dce23346b1 - xfce4-settings-helper --display :0.0 --sm-client-id 2e6187381-8fc5-4b9d-9 - /usr/libexec/gam_server - /usr/lib64/mozilla-firefox/firefox --sm-config-prefix /firefox-P6PSAN/ -- - /usr/lib64/mozilla-firefox/firefox --sm-config-prefix /firefox-P6PSAN/ -- - /usr/lib64/mozilla-firefox/firefox --sm-config-prefix /firefox-P6PSAN/ -- - /usr/lib64/mozilla-firefox/firefox --sm-config-prefix /firefox-P6PSAN/ -- - /usr/lib64/mozilla-firefox/firefox --sm-config-prefix /firefox-P6PSAN/ -- - /usr/lib64/mozilla-firefox/firefox --sm-config-prefix /firefox-P6PSAN/ -- - /usr/lib64/mozilla-firefox/firefox --sm-config-prefix /firefox-P6PSAN/ -- - /usr/lib64/mozilla-firefox/firefox --sm-config-prefix /firefox-P6PSAN/ -- - /usr/lib64/mozilla-firefox/firefox --sm-config-prefix /firefox-P6PSAN/ -- - /usr/lib64/mozilla-firefox/firefox --sm-config-prefix /firefox-P6PSAN/ -- - /usr/libexec/gvfsd - /usr/libexec/xfce4/panel-plugins/xfce4-mixer-plugin socket_id 16777252 na - /usr/libexec/xfce4/panel-plugins/xfce4-mixer-plugin socket_id 16777252 na - /usr/libexec/xfce4/panel-plugins/xfce4-mixer-plugin socket_id 16777252 na - /usr/libexec/xfce4/panel-plugins/xfce4-sensors-plugin socket_id 16777253 - /usr/libexec/notification-daemon - /usr/libexec/gconfd-2 - /usr/bin/python2.6 /usr/bin/hp-systray --qt4 - /usr/bin/python2.6 /usr/bin/hp-systray --qt4 - /usr/bin/python2.6 /usr/bin/hp-systray --qt4 - Terminal - gnome-pty-helper - bash - su - root - -su - su - jackd - -su - gmpc - bash - su - root - -su - transmission - transmission - transmission - /usr/bin/xfrun4 --daemon - /usr/libexec/gvfs-hal-volume-monitor - bash - su - root - -su - jackd -R -c h -P85 -d alsa -d hw:1,0 -r44100 -p256 -n3 -S -P - jackd -R -c h -P85 -d alsa -d hw:1,0 -r44100 -p256 -n3 -S -P - jackd -R -c h -P85 -d alsa -d hw:1,0 -r44100 -p256 -n3 -S -P 95 jackd -R -c h -P85 -d alsa -d hw:1,0 -r44100 -p256 -n3 -S -P 85 jackd -R -c h -P85 -d alsa -d hw:1,0 -r44100 -p256 -n3 -S -P - /usr/bin/mpd /etc/mpd.conf - /usr/bin/mpd /etc/mpd.conf - /usr/bin/mpd /etc/mpd.conf - /usr/bin/mpd /etc/mpd.conf - /usr/bin/mpd /etc/mpd.conf - /usr/bin/mpd /etc/mpd.conf - ps -Leo rtprio,cmd - Grant
