You are not logged in.

#1 2024-02-15 16:22:16

gabtram
Member
Registered: 2023-04-11
Posts: 54

Pro audio Tweaks: Realtime kernel patchset and other tweaks

Hi to all,

in order to achieve my goal, have a realtime kernel pc with aproximately zero latance, i'm makins some changess to my archlinux machine.
I opened a thread forum here https://bbs.archlinux.org/viewtopic.php?id=292846 about the first step of the proaudio wiki page: https://wiki.archlinux.org/title/Professional_audio about the the scale governor.
This second post is instead dedicated to the other changing to obtain proaudio powers smile 

- Configuring pam_limits (e.g. by installing realtime-privileges and adding your user to the realtime group).
This is easy installing the aur package from extra repo and configuring the group.

Actually i have this. Maybe one of the two it's wrong. Which is the best configuration?

Installed realtime privilegies

/etc/security/limits.d/99-realtime-privileges.conf
@realtime - rtprio 98
@realtime - memlock unlimited
@realtime - nice -11

/etc/security/limits.conf 
@pipewire - memlock 4194304
@pipewire - nice -19
@pipewire - rtprio 95

- Realtime kernel patchset
Now really this is the part where i'm feeling stuck. I read this many times: https://wiki.archlinux.org/title/Realti … l_patchset
Now surely i will install the lts package, i think this is more stable.
but what can i really don't understand is this part: https://wiki.archlinux.org/title/Arch_b … oot_loader
I'm using Grub

This is the directory:

/boot/grub $ ls -la
total 76
drwxr-xr-x 6 root root  4096 Apr 27  2023 .
drwxr-xr-x 4 root root  4096 Jan  1  1970 ..
drwxr-xr-x 2 root root  4096 Apr 11  2023 fonts
-rwxr-xr-x 1 root root  5156 Apr 27  2023 grub.cfg
-rwxr-xr-x 1 root root  1024 Apr 11  2023 grubenv
drwxr-xr-x 2 root root  8192 Apr 11  2023 locale
drwxr-xr-x 3 root root  4096 Apr 11  2023 themes
drwxr-xr-x 2 root root 40960 Apr 11  2023 x86_64-efi

Where can i add the new bootloader? Is this the chance to have at uefi menu the chance to load the realtime kernel with all the proaudio features? 

- Add noatime to fstab (see Improving performance#Mount options).
Perfect where have to insert noatime here? I think on sda3 and Nas where i have my waw files to load during the recording session?

# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda3
UUID=98eefdcb-9618-480e-92f3-ce0b916af282       /               ext4            rw,relatime 0 1

# /dev/sda2
UUID=96a9d047-275c-4940-a8e1-002f7a2deae7       none            swap            defaults    0 0

# /dev/sda1
UUID=FAB9-A91C          /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro       0 1

# Nas
xxx.xxx.xxx.xxx:/Multimedia /mnt/multimedia nfs defaults 0 0

- Reducing swappiness and Increasing the maximum watches
Ok i will create the suggested files inside /etc/sysctl.d

- Maximize the PCI latency timer of the PCI sound card
It could be usefull for my internal pci card ?   
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio

- Increasing the highest requested RTC interrupt frequency
I will create a boot script to run this

# echo 2048 > /sys/class/rtc/rtc0/max_user_freq
# echo 2048 > /proc/sys/dev/hpet/max-user-freq

My aim is to have a a distinct boot with realtime kernel and all proaudio tweaks available. Pardon me i'm starting to understand now, i think, how can i think to work with Arch but i lack some knowledge about certain process.

Thanks you so much for your support.
Bye
Gabriele

Offline

#2 2024-02-20 16:51:19

gabtram
Member
Registered: 2023-04-11
Posts: 54

Re: Pro audio Tweaks: Realtime kernel patchset and other tweaks

Hi,
adjusted this:

/etc/security/limits.d/99-realtime-privileges.conf
@realtime - rtprio 98
@realtime - memlock unlimited
@realtime - nice -11
same for 
/etc/security/limits.conf 

Reading something about FSTAB
I have to subssittue relatime option with noatime, but where? In sda3 and in my nas hdd but also in the sda1 boot parttion?


updated some config here.
Insert swappines and max user watch configuration files.

Launched the command

sudo setpci -v -s00:1f:3 latency_timer=ff
setpci: Warning: No devices selected for operation group 1.

I receive this error

For the boot script i followed the structure here:https://github.com/redtide/archlinux-realtime-generic-setup

So created a generice realtime service and a script... I didn't know how to create a new service also after reading here: chttps://github.com/redtide/archlinux-realtime-generic-setup/blob/master/realtime.sh

So i lack only the realtime kernel patchset and setpci cause i don't know why the command don't works.

I will update you

Offline

#3 2024-02-20 17:03:45

gabtram
Member
Registered: 2023-04-11
Posts: 54

Re: Pro audio Tweaks: Realtime kernel patchset and other tweaks

After rebooting

i have this errors:

Feb 20 17:46:42 archmusic kernel: hpet_acpi_add: no address or irqs in _CRS

Feb 20 17:46:42 archmusic systemd-sysctl[217]: /etc/sysctl.d/90-max_user_watches.co>
Feb 20 17:46:42 archmusic systemd-sysctl[217]: /etc/sysctl.d/90-swappiness.conf:1: >
Feb 20 17:46:42 archmusic systemd[1]: Finished Load/Save OS Random Seed.
Feb 20 17:46:42 archmusic systemd[1]: systemd-sysctl.service: Main process exited, >
Feb 20 17:46:42 archmusic systemd[1]: systemd-sysctl.service: Failed with result 'e>
Feb 20 17:46:42 archmusic systemd[1]: Failed to start Apply Kernel Variables.
Feb 20 17:46:42 archmusic systemd[1]: Finished Create Static Device Nodes in /dev g>
Feb 20 17:46:42 archmusic systemd[1]: Create System Users was skipped because no tr>
Feb 20 17:46:42 archmusic systemd[1]: Starting Create Static Device Nodes in /dev...
Feb 20 17:46:42 archmusic systemd[1]: Finished Create Static Device Nodes in /dev.
Feb 20 17:46:42 archmusic systemd[1]: Finished Flush Journal to Persistent Storage.
Feb 20 17:46:42 archmusic systemd[1]: Reached target Preparation for Local File Sys>
Feb 20 17:46:42 archmusic systemd[1]: Virtual Machine and Container Storage (Compat>
Feb 20 17:46:42 archmusic systemd[1]: Starting Rule-based Manager for Device Events>
Feb 20 17:46:42 archmusic systemd-udevd[233]: Using default interface naming scheme>

Can't understand really!

Offline

#4 2024-03-31 15:40:33

gabtram
Member
Registered: 2023-04-11
Posts: 54

Re: Pro audio Tweaks: Realtime kernel patchset and other tweaks

Hi,

sorry for the "delay" in response smile
I think i've come up with this: https://wiki.archlinux.org/title/Professional_audio

1) I add the "noatime" paramter in etc/fstab on the /dev/sda3 (my entire volume with music programs) and the mounted nas with my music
2) i configured properly swappines and max user watch
3) And installed and configured my Kernel-RT pachset with grub following these steps:


pacman -Qsq 'linux' | grep -E '^linux*' mostr i kernel installati
sudo pacman -S linux-rt 
sudo nano /etc/default/grub

GRUB_DEFAULT=saved
# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
GRUB_SAVEDEFAULT=true
# Uncomment to disable submenus in boot menu
GRUB_DISABLE_SUBMENU=y

sudo grub-mkconfig -o /boot/grub/grub.cfg

I think now i can improve pipewire and wireplumber configuration.
I inserted this last response fow who will read this post in the future. I don't like half post!

Bye
Gabriele

Ps: the arch wiki is really gold but sometimes, for newbies or for some people that want to use archlinux but are not very skilled yet like me, it could be very usefull to insert some hints to help people.
Installing another kernel and configured it is not difficult but i struggled to understand what there was behind boot grub and what were the right steps.
Ps2: archlinux i think is the best linux distro to make music.  I hope the platfomr could spread toward this direction

Offline

Board footer

Powered by FluxBB