Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
wiki:system_configuration [2017/05/29 17:05] – [limits.conf/audio.conf] autostaticwiki:system_configuration [2020/03/17 21:15] – [The kernel] autostatic
Line 30: Line 30:
 === Note about kernels === === Note about kernels ===
  
-  * Kernels >= 2.6.31 seem to work pretty good without RT patch, also for real-time pro audio usage. It's not strictly necessary anymore to install a real-time ('rt') kernel to get good results. Although the best results are still expected when using a real-time kernel. Try it, test it and decide for yourself. +  * Kernels >= 2.6.31 seem to work pretty well without RT patch, also for real-time pro audio usage. It's not strictly necessary anymore to install a real-time ('rt') kernel to get good results. Although the best results are still expected when using a real-time kernel. Try it, test it and decide for yourself. 
   * In the pre-2.6.39 kernel era rt kernels were indeed necessary in some cases where sound devices were sharing IRQ's with other peripherals. With the rt kernel and the rtirq script you could prioritize IRQ threads but since 2.6.39 it is possible to use the rtirq kernel with a generic kernel and the ''threadirqs'' kernel option.   * In the pre-2.6.39 kernel era rt kernels were indeed necessary in some cases where sound devices were sharing IRQ's with other peripherals. With the rt kernel and the rtirq script you could prioritize IRQ threads but since 2.6.39 it is possible to use the rtirq kernel with a generic kernel and the ''threadirqs'' kernel option.
   * Many distro kernels, and many third-party-provided real-time kernels, are configured without the 1000 Hz setting.  This is not significant for recording, but it can be an issue for live MIDI work if the application you're using does not rely on the ''snd-hrtimer'' kernel module.  If your application is live MIDI, using ALSA MIDI and relies on ''/dev/rtc'' (so it doesn't rely on the ''snd-hrtimer'' kernel module), you may well want real-time, but you certainly need 1000 Hz.   * Many distro kernels, and many third-party-provided real-time kernels, are configured without the 1000 Hz setting.  This is not significant for recording, but it can be an issue for live MIDI work if the application you're using does not rely on the ''snd-hrtimer'' kernel module.  If your application is live MIDI, using ALSA MIDI and relies on ''/dev/rtc'' (so it doesn't rely on the ''snd-hrtimer'' kernel module), you may well want real-time, but you certainly need 1000 Hz.
Line 38: Line 38:
 Run ''uname -a'' to find out which kernel you're running: Run ''uname -a'' to find out which kernel you're running:
  
-  Linux xps13 4.8.15-core2-rt10 #1 SMP PREEMPT RT Sun May 28 10:43:44 CEST 2017 x86_64 x86_64 x86_64 GNU/Linux+  Linux XPS-13-9360 5.4.24-core2-rt15 #1~bionic1 SMP PREEMPT_RT Tue Mar 17 18:00:29 CET 2020 x86_64 x86_64 x86_64 GNU/Linux
  
-4.8.15-core2-rt10 is the version number of the currently running kernel. The configuration file with which this kernel was created can be found in ''/boot/config-4.8.15-core2-rt10''. Open it, and check if it has the following characteristics:+5.4.24-core2-rt15 is the version number of the currently running kernel. The configuration file with which this kernel was created can be found in ''/boot/config-5.4.24-core2-rt15''. Open it, and check if it has the following characteristics:
  
   CONFIG_HZ_1000=y   CONFIG_HZ_1000=y
Line 85: Line 85:
 == Debian == == Debian ==
  
-Since Debian Wheezy an RT variant is also available in the [[https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=names&keywords=linux-image-rt|stock repositories]]; unfortunately its system timer is set to 250 Hz instead of 1000 Hz, so you'll probably want to recompile your own kernel anyway, especially if you use ALSA MIDI. These kernels incorporate [[http://pengutronix.de/software/linux-rt/debian_en.html|Pengutronix]] patches (see [[https://wiki.debian.org/DebianMultimedia#Realtime_kernel|DebianMultimedia Wiki]]). The [[http://www.64studio.com/|64 Studio]] real-time kernels are in the backports apt repository, so for Debian Squeeze you will have to add the following line to your apt sources list: +Since Debian Wheezy an RT variant is also available in the [[https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=names&keywords=linux-image-rt|stock repositories]]; unfortunately its system timer is set to 250 Hz instead of 1000 Hz, so you'll probably want to recompile your own kernel anyway, especially if you use ALSA MIDI. These kernels incorporate [[http://pengutronix.de/software/linux-rt/debian_en.html|Pengutronix]] patches (see [[https://wiki.debian.org/DebianMultimedia#Realtime_kernel|DebianMultimedia Wiki]]).
- +
-  deb http://apt.64studio.com/backports squeeze-backports main+
  
 == Arch == == Arch ==
Line 95: Line 93:
 == Gentoo == == Gentoo ==
  
-RT kernels are vailable in the pro-audio overlay (http://proaudio.tuxfamily.org/wiki/index.php?title=Main_Page).+RT kernels are available in the pro-audio overlay (http://proaudio.tuxfamily.org/wiki/index.php?title=Main_Page).
  
 === Build your own real-time kernel === === Build your own real-time kernel ===
Line 104: Line 102:
   sudo apt-get install kernel-package fakeroot build-essential   sudo apt-get install kernel-package fakeroot build-essential
  
-Download the kernel sources and the RT patchset (this example uses the 3.18 branch, you're free to use another kernel branch for which there is a RT patch set available):+Download the kernel sources and the RT patchset (this example uses the 4.branch, you're free to use another kernel branch for which there is a RT patch set available):
   mkdir -p ~/tmp/linux-rt   mkdir -p ~/tmp/linux-rt
   cd ~/tmp/linux-rt   cd ~/tmp/linux-rt
Line 280: Line 278:
 === DBus-controlled services === === DBus-controlled services ===
  
-DBus is a solid standard used for a wide variety of services which need to be started automatically, but on demand only, in the background, not specifically at boot.  One set of DBus services used extensively in Ubuntu is 'gvfs', the virtual filesystem for the Gnome desktop; if these are permitted to run, polling of hardware including the USB bus will occur, which is likely to interfere with USB MIDI interfaces, eat CPU power, and cause xruns in general.  To disable gvfs, become root and run the follwing two commands:+DBus is a solid standard used for a wide variety of services which need to be started automatically, but on demand only, in the background, not specifically at boot.  One set of DBus services used extensively in Ubuntu is 'gvfs', the virtual filesystem for the Gnome desktop; if these are permitted to run, polling of hardware including the USB bus will occur, which is likely to interfere with USB MIDI interfaces, eat CPU power, and cause xruns in general.  To disable gvfs, become root and run the following two commands:
   mv /usr/share/dbus-1/servicesgvfs-daemon.service /usr/share/dbus-1/servicesgvfs-daemon.service.disabled   mv /usr/share/dbus-1/servicesgvfs-daemon.service /usr/share/dbus-1/servicesgvfs-daemon.service.disabled
   mv /usr/share/dbus-1/services/gvfs-metadata.service /usr/share/dbus-1/servicesgvfs-metadata.service.disabled   mv /usr/share/dbus-1/services/gvfs-metadata.service /usr/share/dbus-1/servicesgvfs-metadata.service.disabled
wiki/system_configuration.txt · Last modified: 2024/01/13 15:00 by autostatic