Getting RTXI:
You can install RTXI on any Linux distribution you like. Keep in mind that the installation scripts we use work for Ubuntu and Debian. Your distribution may name or organize packages differently, so you'll have to account for that on your own. Below are download links for generic Ubuntu GNOME live CDs.
You can use whatever DVD burner is available on your operating system. If you want a live USB, you may need additional software. For different operating systems, check out:
Boot into the live CD. When prompted, start the installation process. There are no special considerations to be made at this step. Installers are generally intuitive, but if you have issues, there is a plethora of information online for how to install various Linux distributions. You can find help for installing Ubuntu GNOME here.
When the installation is finished, reboot and log into your system. Be sure to remove the live media, or you might boot back into the live CD.
Note: You may have to edit your BIOS settings to let you boot from media other than your hard drive. When cold-booting your computer, hit the necessary keys, usually F2
or F4
, and open the menu. From the menu, look for your boot options. There you can manually override the boot order of devices on your system. If you're booting from a DVD or USB, look for your DVD drive or USB label, respectively, and set them to be first in your boot order. Save you changes and exit your BIOS menu.
Open a terminal. You can use the applications menu or enter the CTRL+ALT+t
shortcut. From the terminal, install the git package. Git is a version control system that can synchronize files over many machines. We use it for developing RTXI source code, which is hosted on GitHub.
Once git is installed, use it to download the RTXI source code and access the source code for v3.0.0.
Tip: The above code will download the source files to wherever you are in your filesystem. If you are within your own user directory, then the source files will only be accessible to your account, not anyone else's. To download the source code in a central location that all users can access, consider:
Note: Don't do this if you have a user named "rtxi". Rename the RTXI folder you cloned to something else.
Install the dependencies for RTXI and for installing the real-time (RT) kernel. Assuming you are in the cloned RTXI directory, run:
The script will run for a while, updating your current packages and installing ones needed later.
From the same directory, run:
The script will download the sources for the Linux kernel and the Xenomai EVL library. Before the kernel starts compiling, you will be prompted to edit the kernel config flags. A UI will pop up that looks as follows:
This is the config menu that allows you to edit what you want compiled into the kernel. For optimal performance, edit the following options:
Enable EVL
Hit SPACE
on all the drivers to have them built into the kernel. A "*" beside the field means that the drivers are set properly. Note that "M" means that the drivers will be built as kernel modules, not built into the kernel itself. "*" is the desired setting here, not "M".
Hit ESC
to get back to the top menu from where you started. Be careful to not exit the configuration menu.
Select your processor type.
Select the option that corresponds to your processor type. If unsure of what processor you have, open another terminal run:
This will display the CPU information needed to correctly select your configuration. Most newish computers with Intel processors usually have an i3, i5, or i7. For them, select Core 2/newer Xeon
.
Note: For 32-bit systems, Enable -fstack-protector buffer overflow detection
should also be disabled
Disable power management options (Xenomai 3).
To disable drivers, move the cursor to the item and hit SPACE
until the field the left is blank.
Once all the flags have been set properly, exit to the top menu. Hit ESC
again and choose
to save the configuration and compile the kernel. Compilation, depending on your system, can take 10 minutes to a few hours. You are free to leave the system. The install_rt_kernel_evl.sh
script will compile the kernel and install it automatically. When the script terminates successfully, reboot the system.
From the boot menu, select the "Advanced" option from the GRUB bootloader to open up a submenu that lists all the available kernels. The real-time kernel will be named x.y.z-xenomai-4
, where x.y.z is an automatically selected kernel version closes to the one already on the system. Select it and boot the system.
Install RTXI with the install_rtxi.sh
script. Again from the root directory run:
Give your password when prompted. The script will also prompt you for an installation mode.
If you want real-time performance, enter "evl" to use Xenomai EVL and wait for RTXI to be installed. If upgrading from a previous version of rtxi and you wish to keep xenomai 3 installation, then enter xenomai. When the installation script terminates, RTXI is ready for you to use. To start RTXI, run:
By default, a clean installation of RTXI only contains system modules. To use custom modules, you will need to download and install them separately. All RTXI modules are available on our GitHub repository. You can view all our modules and instructions for installing them on our modules page.
NOTE: Under the newest version of RTXI 3.0.0 some plugins may still be unavailable. Email rtxi support if there is a plugin you wish to use that is not available yet for RTXI 3.
Note: Current tested platforms are Ubuntu 20.04 and Ubuntu 22.04. RTXI is built with cross-platform support in mind so it should be possible to install in other linux distributions such as debian and fedora, but the available scripts for dependency and kernel isntallation do not work under non debian platforms. Check your distribution's package manager to install dependencies.
If you haven't already cloned our GitHub repo, run the following in the terminal.
If you already have a clone of the repository, go to it and run:
Run the install_dependencies.sh
script to download dependencies. The script is maintained for Ubuntu 22.04. but it should work for Ubuntu 20.04. If you are For old operating systems, some of these packages may not exist, and if that's the case, we strongly encourage you to upgrade.
Run the installation script, also in the scripts/
directory.
You will be prompted to select a configuration: evl, xenomai, or posix. Soon, RTXI will be compiled and installed. When finished, you can run v3.0.0 with:
Note: This will not work if you are running an RTAI-patched kernel. To compile RTXI v3.0.0 for RTAI kernels, see our relevant information on the FAQs section of the documentation page or the full documentation for configuration options.
All available core modules in v2.4 came packaged with RTXI. However, v3.0.0 introduced new plugin api, which requires migrating older custom plugins to the new architecture. If there is a plugin you wish to see migrated sooner, send an email to our help contact. for RTXI we moved to Qt5 and eliminated dependencies for a leaner development cycle and maintenance.
What this means for you is that at this point, you've installed RTXI v3.0.0, but you need to recompile your modules to use updated dependencies. If you are using the DefaultGUI framework, this will require a redisign of your plugin to use the new RTXI widgets framework.
All modules on the modules page are up-to-date for v3.0.0. See the following documentation on porting to old Qt code to Qt5.
The final step of any RTXI installation is to benchmark RTXI and the real-time kernel it uses. Tests center around the built-in xenomai latency test and the RT benchmarking module within RTXI. An explanation of what exactly the tests measure is available in our documentation.
If you used the live CDs, run:
If you did a custom installation, go to the base of the RTXI directory you cloned from GitHub and run:
This script will test kernel latencies at rate of 20 kHz while under stress. The test lasts 10 minutes. If at any point you need to stop the test, you can kill the process by entering CTRL+c
in the terminal running the stress test. Then, run pkill stress
. If you forget to use pkill
, the system will stop measuring latencies, but it will still be under stress. Depending on your system, you may experience lag in your desktop during the test. Keep in mind that the stress test is designed to assess real-time performance under worst-case conditions. If your system performs well under heavy load, you can be reassured that it will perform well during your experiments.
Once completed, the script will provide the data necessary for you to generate a latencies histogram for your system.
For systems with discrete graphics cards and somewhat recent processors, latencies should consistently remain on average below 2-3 μs. Worst case latencies may get as high as 10-15 μs, but keep in mind that these spikes occur often once or twice over the 10 minute duration of the stress test, which at 20 kHz constitutes 12 million cycles. Compare your performance to what is available on our stats and benchmarks page and let us know if your performance is problematic.
RT performance during experiments can be monitored and recorded through the RT Benchmarks module. Record the RT Benchmarks module in RTXI using the Data Recorder module. RT Benchmarks displays runtime statistics for your system, such as the computation time, real-time period, and jitter. For those unfamiliar with the terms, here are brief definitions:
To record the RT Benchmarks module:
Note: You can change the frequency for your measurements via the System Control Panel. Just open the module, change the value for "Frequency," and hit "Apply" to save your changes.
Note: If you set the frequency high or record for a long time, the size of the generated files can become unwieldy. Make liberal use of the downsampling functionality in the Data Recorder.