To be able to meet real-time requirements the host must be running a preempt-RT kernel.
For Ubuntu, get the Xanmod RT or RT-edge kernel. Follow the installation instructions at the Xanmod homepage.
For Fedora, follow the instruction at Fedora copr for setting up the copr. Install the kernel by running sudo dnf install kernel-rt-mao.