Installing Roon with minimal Arch Linux and running Roon with real time kernel parameters

Hi! I would like to share my new setup :slight_smile:

New Install= DELL Optiplex 7040 with 32G memory ,i7 6700 4 cores 4Ghz - overkill resources maybe, but fun!

Why? something to do a boring Sunday :wink:

Technical result: Configuration with only Roon Server processes running, increased resource headroom, low latency and more predictable response time (1–5 ms). So less stressed buffering in all components PC/Network/Steamer due to packets is delivered with consistent timing. So is it real time? no, but kind of ok anyway!

Audio result: I leave it up to you, talking about i makes people going crazy!

Anyway, I Think it’s Worth a try for an optimal setup if you have a computer to spare. Maybe your brain can tell a difference of satisfaction at least. Some skills in Linux is required!

Current Audio setup: Auralic Vega S1 + PSU, Genelec 8361a

Best is to read instructions first, I have taken out what applied for me and added some stuff for running real time parameters:

Good to know is that Arch Linux is very minimal and vi,shh etc. is not installed by default. But it’s easy to add, I tried to keep installation as simple as possible avoiding other running processes. Since Linux 6.12 real time is included but it’s needed to be configured correctly. Nothing of it is enabled by default.

Disable Secure Boot and RAID config in BIOS

Make sure BIOS can boot from USB

– My installation, change device, locale etc.
#localectl list-keymaps
#loadkeys sv-latin1
#cat /sys/firmware/efi/fw_platform_size ← check 32/64
#ip link ← note device name
#ping ping.archlinux.org
#timedatectl
#fdisk -l ← note disk to be used

Erase any existing partitions and create:

Mount point Partition Partition type Suggested size
/boot1 /dev/nvme0n1p1 EFI system partition 1G
[SWAP] /dev/nvme0n1p2 Linux swap At least 4G
/ /dev/nvme0n1p3 Linux x86-64 root (/) Remainder of the device. At least 23–32 G.

#mkfs.ext4 /dev/nvme0n1p3
#mkswap /dev/nvme0n1p2
#mkfs.fat -F 32 /dev/nvme0n1p1
#mount /dev/root_partition /mnt
#mount --mkdir /dev/efi_system_partition /mnt/boot
#swapon /dev/swap_partition
#pacstrap -K /mnt base linux linux-firmware ← install base and drivers
#genfstab -U /mnt >> /mnt/etc/fstab
#arch-chroot /mnt
#ln -sf /usr/share/zoneinfo/Europe/Stockholm /etc/localtime
#hwclock --systohc
#locale-gen
#echo β€œLANG=sv_SE.UTF-8” > /etc/locale.conf
#echo β€œKEYMAP=sv-latin1” > /etc/vconsole.conf
#echo β€œroonserver” > /etc/hostname
#passwd

– fix bootloader GRUB
#pacman -S grub efibootmgr
#grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
#mkdir -r /boot/EFI/BOOT/
#cp /boot/EFI/GRUB/grubx64.efi /boot/EFI/BOOT/BOOTX64.EFI ← extra fix, not booting GRUB
#grub-mkconfig -o /boot/grub/grub.cfg

– fix network DHCP wired
#ip link ← note device name
#echo β€œ[Match]” > /etc/systemd/network/20-wired.network
#echo β€œName=enp0s31f6” >> /etc/systemd/network/20-wired.network
#echo β€œβ€ >> /etc/systemd/network/20-wired.network
#echo β€œ[Network]” >> /etc/systemd/network/20-wired.network
#echo β€œDHCP=yes” >> /etc/systemd/network/20-wired.network
#more /etc/systemd/network/20-wired.network
#systemctl enable systemd-resolved
#systemctl start systemd-resolved
#ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
#systemctl enable systemd-networkd
#systemctl restart systemd-networkd
#networkctl status enp0s31f6
#ip link
#ping www.google.com

– install roon (https://help.roonlabs.com/portal/en/kb/articles/linux-install)
#pacman -S ffmpeg ← select jack2 if multiple repos
#pacman -S which ← needed by install script
#pacman -S libasound2
#pacman -S cifs-utils ← mount filesystems
#pacman -S vi ← vi editing
#curl -O -L https://download.roonlabs.com/builds/roonserver-installer-linuxx64.sh
#chmod +x roonserver-installer-linuxx64.sh
#./roonserver-installer-linuxx64.sh
#exit
#reboot ← check that network and roon starts

– restore backup if needed
Use SMB v.3 from storage for better performance to files, I don’t mount from Roon
cd /mnt
#mkdir roon_files
#mount -t cifs //192.168.x.x/roon_files /mnt/roon_files -o username=admin,password=,vers=3.0
add to /etc/fstab for mount when boot
In Roon GUI just browse to /mnt/roon_files

– to make roon use real time kernel and tune prio, nice and memory limit. Do not change values if you not know what you doing!
#zgrep PREEMPT /proc/config.gz
#cat /sys/kernel/debug/sched/preempt <β€” should return (full)
#ps -eo pid,comm,cls,rtprio,ni,pri | grep Roon ← return TS = Time Sharing as default
#systemctl edit --full roonserver
Add under [Service]:
CPUSchedulingPolicy=rr
CPUSchedulingPriority=90
Nice=-10
LimitRTPRIO=95
LimitNICE=-10
LimitMEMLOCK=infinity
#systemctl daemon-reexec
#systemctl daemon-reload
#systemctl restart roonserver
#ps -eo pid,comm,cls,rtprio,ni,pri | grep Roon ← return RR = Real Time
#top -H

3 Likes

I’m happy with a full lazy kernel, but thanks for sharing.

Incidentally, using backticks (use ` for inline commands, e.g., sudo su, and ``` for blocks) makes things easier to read.

localectl list-keymaps
loadkeys sv-latin1
# Expects 32/64
cat /sys/firmware/efi/fw_platform_size

Thaks for info mjw! tried to edit post but get β€œAn error occurred: Sorry, new users can only put 2 links in a post.”

New post with all cmds formated:

#loadkeys sv-latin1
#cat /sys/firmware/efi/fw_platform_size  	<-- check 32/64
#ip link					<-- note device name
#ping ping.archlinux.org
#timedatectl
#fdisk -l					<-- note disk to be used

Erase any existing partitions and create:
Mount point 	Partition			Partition type		Suggested size
/boot1		/dev/nvme0n1p1			EFI system partition	1G
[SWAP]		/dev/nvme0n1p2			Linux swap		At least 4G
/		/dev/nvme0n1p3			Linux x86-64 root (/)	Remainder of the device. At least 23–32 G.

#mkfs.ext4 /dev/nvme0n1p3
#mkswap /dev/nvme0n1p2
#mkfs.fat -F 32 /dev/nvme0n1p1
#mount /dev/root_partition /mnt
#mount --mkdir /dev/efi_system_partition /mnt/boot
#swapon /dev/swap_partition
#pacstrap -K /mnt base linux linux-firmware	<-- install base and drivers
#genfstab -U /mnt >> /mnt/etc/fstab
#arch-chroot /mnt
#ln -sf /usr/share/zoneinfo/Europe/Stockholm /etc/localtime
#hwclock --systohc
#locale-gen
#echo "LANG=sv_SE.UTF-8" > /etc/locale.conf
#echo "KEYMAP=sv-latin1" > /etc/vconsole.conf
#echo "roonserver" > /etc/hostname
#passwd

-- fix bootloader GRUB
#pacman -S grub efibootmgr
#grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
#mkdir -r /boot/EFI/BOOT/
#cp /boot/EFI/GRUB/grubx64.efi /boot/EFI/BOOT/BOOTX64.EFI	<-- extra fix, not booting GRUB
#grub-mkconfig -o /boot/grub/grub.cfg

-- fix network DHCP wired
#ip link 						<-- note device name
#echo "[Match]" > /etc/systemd/network/20-wired.network
#echo "Name=enp0s31f6" >> /etc/systemd/network/20-wired.network
#echo "" >> /etc/systemd/network/20-wired.network
#echo "[Network]" >> /etc/systemd/network/20-wired.network
#echo "DHCP=yes" >> /etc/systemd/network/20-wired.network
#more /etc/systemd/network/20-wired.network 
#systemctl enable systemd-resolved
#systemctl start systemd-resolved
#ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf 
#systemctl enable systemd-networkd
#systemctl restart systemd-networkd
#networkctl status enp0s31f6
#ip link
#ping www.google.com

-- install roon (https://help.roonlabs.com/portal/en/kb/articles/linux-install)
#pacman -S ffmpeg  					<-- select jack2 if multiple repos
#pacman -S which					<-- needed by install script
#pacman -S libasound2
#pacman -S cifs-utils					<-- mount filesystems
#pacman -S vi						<-- vi editing
#curl -O -L https://download.roonlabs.com/builds/roonserver-installer-linuxx64.sh
#chmod +x roonserver-installer-linuxx64.sh 
#./roonserver-installer-linuxx64.sh 
#exit
#reboot						<-- check that network and roon starts

-- restore backup if needed
Use SMB v.3 from storage for better performance to files, I don't mount from Roon
#cd /mnt
#mkdir roon_files
#mount -t cifs //192.168.1.201/roon_files /mnt/roon_files -o username=admin,password=<password>,vers=3.0
add to /etc/fstab for mount when boot
In Roon GUI just browse to /mnt/roon_files

-- to make roon use real time kernel and tune prio, nice and memory limit. Do not change values if you not know what you doing!
#zgrep PREEMPT /proc/config.gz
#cat /sys/kernel/debug/sched/preempt 			<--- should return (full)
#ps -eo pid,comm,cls,rtprio,ni,pri | grep Roon  	<-- return TS = Time Sharing as default
#systemctl edit --full roonserver
Add under [Service]:
CPUSchedulingPolicy=rr
CPUSchedulingPriority=90
Nice=-10
LimitRTPRIO=95
LimitNICE=-10
LimitMEMLOCK=infinity
#systemctl daemon-reexec
#systemctl daemon-reload
#systemctl restart roonserver
#ps -eo pid,comm,cls,rtprio,ni,pri | grep Roon  	<-- return RR = Real Time
#top -H```
1 Like