Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
wiki:system_configuration [2022/05/18 17:53] – [Filesystems] autostatic | wiki:system_configuration [2025/04/13 18:42] (current) – [rtcqs] autostatic | ||
---|---|---|---|
Line 12: | Line 12: | ||
After adjusting your system using the recommendations of [[system_configuration# | After adjusting your system using the recommendations of [[system_configuration# | ||
+ | |||
+ | This wiki also contains a manual on installing a Linux audio system here: [[wiki: | ||
==== Preliminary ==== | ==== Preliminary ==== | ||
Line 35: | Line 37: | ||
Run '' | Run '' | ||
- | Linux bto 5.17.1-rt17 #1~focal1 | + | Linux bto 6.5.6-1-liquorix-amd64 |
- | 5.17.1-rt17 is the version number of the currently running kernel. The configuration file with which this kernel was created can be found in ''/ | + | 6.5.6-1-liquorix-amd64 |
CONFIG_HIGH_RES_TIMERS=y | CONFIG_HIGH_RES_TIMERS=y | ||
Line 51: | Line 53: | ||
=== Do I really need a real-time kernel? === | === Do I really need a real-time kernel? === | ||
- | With the kernel boot option '' | + | With the kernel boot option '' |
See also: [[https:// | See also: [[https:// | ||
Line 57: | Line 59: | ||
=== Using the threadirqs kernel option === | === Using the threadirqs kernel option === | ||
- | This is only needed for so-called generic kernels, ie. standard kernels that are not tweaked for lowlatency performance. You can check if your kernel already includes this option with the following command: | + | This is only needed for so-called generic |
$ grep -e " | $ grep -e " | ||
Line 73: | Line 75: | ||
=== Disabling Spectre and Meltdown mitigations === | === Disabling Spectre and Meltdown mitigations === | ||
- | :!: Warning: | + | :!: Warning: |
To work around the Spectre and Meltdown vulnerabilities several mitigations were built into the kernel. These mitigations can have a negative impact on the performance of your machine. To disable those mitigations and get the most out of your CPU's again you can add the following kernel parameter to your Grub configuration, | To work around the Spectre and Meltdown vulnerabilities several mitigations were built into the kernel. These mitigations can have a negative impact on the performance of your machine. To disable those mitigations and get the most out of your CPU's again you can add the following kernel parameter to your Grub configuration, | ||
Line 81: | Line 83: | ||
=== Installing a real-time kernel === | === Installing a real-time kernel === | ||
- | This section describes installing a real-time kernel on an existing Linux distribution. Some distributions contain packages you can install to get a real-time kernel, for others you'll need to compile it yourself. You can recognize real-time kernel versions by the added ' | + | This section describes installing a real-time kernel on an existing Linux distribution. Some distributions contain packages you can install to get a real-time kernel, for others you'll need to compile it yourself. You can recognize real-time kernel versions by the added ' |
== Ubuntu == | == Ubuntu == | ||
Line 102: | Line 104: | ||
For rolling your own kernel, see [[build_your_own_real-time_kernel]]. | For rolling your own kernel, see [[build_your_own_real-time_kernel]]. | ||
+ | |||
+ | === Other alternatives === | ||
+ | Besides low-latency or real-time kernels there are also other kernel flavors available specifically tailored for multimedia usage. | ||
+ | |||
+ | == Liquorix == | ||
+ | > Liquorix is an enthusiast Linux kernel designed for uncompromised responsiveness in interactive systems, enabling low latency compute in A/V production, and reduced frame time deviations in games.((https:// | ||
+ | Especially when used in combination with the '' | ||
== Other relevant links == | == Other relevant links == | ||
Line 114: | Line 123: | ||
You should check if the following daemons, services or processes are running, and if so, consider stopping them and/or resort to alternatives: | You should check if the following daemons, services or processes are running, and if so, consider stopping them and/or resort to alternatives: | ||
- | * CPU frequency scaling | + | * CPU frequency scaling that scales |
* Desktop Environments (DE): especially on less powerful machines it is recommended to use a lighter DE than Gnome, KDE or Unity. Possible alternatives include LXDE, XFCE or IceWM. Another option is to only use a lightweight Window Manager (WM) like Openbox or Fluxbox. | * Desktop Environments (DE): especially on less powerful machines it is recommended to use a lighter DE than Gnome, KDE or Unity. Possible alternatives include LXDE, XFCE or IceWM. Another option is to only use a lightweight Window Manager (WM) like Openbox or Fluxbox. | ||
* Compositing: | * Compositing: | ||
Line 207: | Line 216: | ||
The modules and processes differ of course on a per machine basis so first figure out which modules are loaded with '' | The modules and processes differ of course on a per machine basis so first figure out which modules are loaded with '' | ||
+ | ==== Simultaneous Multithreading ==== | ||
+ | Simultaneous Multithreading (SMT) or hyper-threading can cause spikes in DSP load at higher DSP loads. In such cases it might be beneficial to disable SMT. This can be done by setting the SMT '' | ||
+ | |||
+ | echo off | sudo tee / | ||
+ | | ||
+ | See also https:// | ||
+ | |||
+ | More information on SMT/ | ||
==== Solve IRQ conflicts by unbinding devices ==== | ==== Solve IRQ conflicts by unbinding devices ==== | ||
Line 296: | Line 313: | ||
=== ext3/ext4 tuning options === | === ext3/ext4 tuning options === | ||
+ | |||
+ | Tuning shouldn' | ||
== noatime == | == noatime == | ||
Line 357: | Line 376: | ||
==== audio group ==== | ==== audio group ==== | ||
- | It is generally good practice to have an ' | + | It is generally good practice to have an ''audio'' group, and add any users that should be allowed to perform audio tasks to this group. This prevents some interference from non-audio-processes with audio tasks. To verify you're in the ''audio'' group, run the '' |
+ | sudo usermod -a -G audio < | ||
+ | |||
+ | Where ''< | ||
+ | |||
+ | Be careful when adding an ''audio'' group to your system: most systems come with a pre-configured | ||
==== Timers ==== | ==== Timers ==== | ||
Line 369: | Line 393: | ||
$ ps axHo user, | $ ps axHo user, | ||
- | $ ps -eLo pid, | + | $ ps -eLo user,pid, |
Or if you have [[system_configuration# | Or if you have [[system_configuration# | ||
Line 531: | Line 555: | ||
When using FireWire audio interfaces it is generally advised to use a real-time kernel. Of course this is not necessary, there are also users reporting success with generic kernels, but when you have trouble getting your system stable regarding xruns one of the first things besides installing [[system_configuration# | When using FireWire audio interfaces it is generally advised to use a real-time kernel. Of course this is not necessary, there are also users reporting success with generic kernels, but when you have trouble getting your system stable regarding xruns one of the first things besides installing [[system_configuration# | ||
+ | FireWire devices can be used with FFADO or ALSA, if supported. | ||
- | ==== JuJu FireWire stack ==== | ||
- | As of kernel 2.6.37 the legacy FireWire stack has been removed from the kernel sources in favor of the [[https:// | ||
- | To use JACK with your FireWire device(s), set the driver to ' | ||
===== Troubleshooting ===== | ===== Troubleshooting ===== | ||
Line 546: | Line 568: | ||
The [[https:// | The [[https:// | ||
- | rtcqs - version 0.5.0 | + | rtcqs - version 0.6.6 |
| | ||
Root User | Root User | ||
Line 552: | Line 574: | ||
[ OK ] Not running as root. | [ OK ] Not running as root. | ||
| | ||
- | | + | Group Limits |
- | =========== | + | |
- | [ OK ] User music is in the audio group. | + | [ OK ] User music is member of a group that has sufficient rtprio (95) and memlock (unlimited) limits set. |
| | ||
CPU Frequency Scaling | CPU Frequency Scaling | ||
===================== | ===================== | ||
- | [ OK ] The scaling governor of all CPU' | + | [ OK ] The scaling governor of all CPUs is set to performance. |
+ | |||
+ | Simultaneous Multithreading | ||
+ | =========================== | ||
+ | [ OK ] Simultaneous Multithreading (SMT, also called hyper-threading) is disabled. | ||
| | ||
Kernel Configuration | Kernel Configuration | ||
Line 574: | Line 600: | ||
Preempt RT | Preempt RT | ||
========== | ========== | ||
- | [ OK ] Kernel | + | [ OK ] Kernel |
| | ||
Spectre/ | Spectre/ | ||
Line 586: | Line 612: | ||
Swappiness | Swappiness | ||
========== | ========== | ||
- | [ OK ] Swappiness | + | [ OK ] Your system |
| | ||
Filesystems | Filesystems | ||
=========== | =========== | ||
- | [ OK ] The following mounts can be used for audio purposes: /, /mnt/data | + | [ OK ] The following mounts can be used for audio purposes: / |
- | [ WARNING ] The following mounts should be avoided for audio purposes: / | + | |
| | ||
IRQs | IRQs | ||
==== | ==== | ||
- | [ OK ] USB port ehci_hcd: | + | [ OK ] USB port xhci_hcd |
- | | + | |
- | USB port xhci_hcd with IRQ 25 does not share its IRQ. | + | |
- | Soundcard snd_hda_intel: | + | |
+ | [ OK ] USB port xhci_hcd with IRQ 49 does not share its IRQ. | ||
+ | [ OK ] USB port xhci_hcd | ||
| | ||
Power Management | Power Management | ||
================ | ================ | ||
- | [ OK ] Power management can be controlled from user space. This enables | + | [ OK ] Power management can be controlled from user space. This enables |
Discuss this script at the [[https:// | Discuss this script at the [[https:// | ||
Line 610: | Line 637: | ||
'' | '' | ||
- | {{:wiki:top2.png|Terminal running top}} | + | {{:wiki:top_2023-10-15.png|Terminal running top}} |
With the help of '' | With the help of '' | ||
Line 618: | Line 645: | ||
'' | '' | ||
- | {{:wiki:htop2.png|Terminal running htop}} | + | {{:wiki:htop_2023-10-15.png|Terminal running htop}} |
==== latencytop ==== | ==== latencytop ==== | ||
Line 628: | Line 655: | ||
==== cyclictest ==== | ==== cyclictest ==== | ||
- | Just as '' | + | Just as '' |
# cyclictest -t1 -p 80 -n -i 10000 -l 10000 -m | # cyclictest -t1 -p 80 -n -i 10000 -l 10000 -m | ||
One single thread ('' | One single thread ('' | ||
Other examples of the usage of '' | Other examples of the usage of '' | ||
- | * http:// | + | * https:// |
- | * https://rt.wiki.kernel.org/index.php/Cyclictest# | + | * https:// |
===== TODO ===== | ===== TODO ===== | ||
Line 643: | Line 670: | ||
* Power management | * Power management | ||
* Rewrite rtirq section or move to separate page | * Rewrite rtirq section or move to separate page | ||
+ | * Pipewire |