New wiki article on installing a Linux audio system

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

runiq
Established Member
Posts: 47
Joined: Fri Jun 09, 2023 9:55 am
Has thanked: 61 times
Been thanked: 13 times
Contact:

Re: New wiki article on installing a Linux audio system

Post by runiq »

autostatic wrote: Tue Oct 17, 2023 9:55 am
sunrat wrote: Tue Oct 17, 2023 2:45 am

Bottom line is it doesn't hurt to have swap so there's no point in not doing so. If you run rtcqs it recommends to set swappiness at 10 (I settled for 15) but I investigated that some time ago and don't think it matters much, and is also widely misunderstood as to what it actually does.

As the author of rtcqs I will look into that option too. The default of 60 is probably OK in most cases and setting it to 10 is a remnant of a past where everyone was still using spinning disks.

With the advent of zram (=compressed swap in RAM), maybe that will make a resurgence. I've not done benchmarks, though.

User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: New wiki article on installing a Linux audio system

Post by autostatic »

Linuxmusician01 wrote: Tue Oct 17, 2023 9:46 am

At the moment I'm (finally) KXStudio repository "free". I do have 'Carla' installed, but via the regular Ubuntu 20.04 repo's. KXStudio in the past was the repo for a lot of audio stuff. But - as with a lot of one person projects - it got to be less after a few years. Certain apps disappeared and it couldn't be installed as a complete distro anymore. And for some reason it became more than a single repo over time, etc.

So for a minimal audio setup I would not recommend activating the KXStudio repo even though the app 'Carla' is absolutely obligatory for Linux Audio. ;)

That's someting to take into consideration. But what are the alternatives? Or are most plugins and software available in the default Debian repositories in the meanwhile?

runiq
Established Member
Posts: 47
Joined: Fri Jun 09, 2023 9:55 am
Has thanked: 61 times
Been thanked: 13 times
Contact:

Re: New wiki article on installing a Linux audio system

Post by runiq »

autostatic wrote: Tue Oct 17, 2023 9:59 am
Linuxmusician01 wrote: Tue Oct 17, 2023 9:46 am

At the moment I'm (finally) KXStudio repository "free". I do have 'Carla' installed, but via the regular Ubuntu 20.04 repo's. KXStudio in the past was the repo for a lot of audio stuff. But - as with a lot of one person projects - it got to be less after a few years. Certain apps disappeared and it couldn't be installed as a complete distro anymore. And for some reason it became more than a single repo over time, etc.

So for a minimal audio setup I would not recommend activating the KXStudio repo even though the app 'Carla' is absolutely obligatory for Linux Audio. ;)

That's someting to take into consideration. But what are the alternatives? Or are most plugins and software available in the default Debian repositories in the meanwhile?

For what it's worth, I'm doing everything from Flatpak. When I encounter stuff that's not yet there, I try to build it and submit it to Flathub. So far I only had to build and submit Neural Amp Modeler, but YMMV.

User avatar
Linuxmusician01
Established Member
Posts: 1547
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland (Europe)
Has thanked: 784 times
Been thanked: 144 times

Re: New wiki article on installing a Linux audio system

Post by Linuxmusician01 »

autostatic wrote: Tue Oct 17, 2023 9:59 am
Linuxmusician01 wrote: Tue Oct 17, 2023 9:46 am

At the moment I'm (finally) KXStudio repository "free". I do have 'Carla' installed, but via the regular Ubuntu 20.04 repo's. KXStudio in the past was the repo for a lot of audio stuff. But - as with a lot of one person projects - it got to be less after a few years. Certain apps disappeared and it couldn't be installed as a complete distro anymore. And for some reason it became more than a single repo over time, etc.

So for a minimal audio setup I would not recommend activating the KXStudio repo even though the app 'Carla' is absolutely obligatory for Linux Audio. ;)

That's someting to take into consideration. But what are the alternatives? Or are most plugins and software available in the default Debian repositories in the meanwhile?

What plugins do you mean specifically? Maybe I don't even use 'm....

GuntherT
Established Member
Posts: 169
Joined: Sun Jun 07, 2015 2:15 am
Has thanked: 9 times
Been thanked: 28 times

Re: New wiki article on installing a Linux audio system

Post by GuntherT »

My two cents on swap and some questions about the recommended packages...

It is really easy to setup ZRAM in Debian 12 to handle swap duties if you don't want a swap partition for whatever reason, which will prevent edge-case performance problems that could perhaps occur if no swap is present at all. Maybe edit that bullet point to something like:

"Modern systems with enough memory (>= 16GB) can live without a swap partition. ZRAM can be used as an alternative to dedicated disk space. See https://wiki.debian.org/ZRam for installation instructions."

The Debian wiki article throws in an example of editing the default configuration between these two lines, but essentially it is just two commands in a terminal to set it up:

Code: Select all

sudo apt install zram-tools
sudo service zramswap reload

I was curious about this:

"Recommended packages
Install the following packages from the default Debian repositories:

rtirq-init
vlc
a2jmidid
htop
usbutils (when using an USB audio interface)"

I have never installed vlc on a system I have dedicated for audio before. You are talking about the media player whose icon is a traffic cone, right? I am curious why this is recommended.
Is it an easy way to handle multimedia codec installation on Debian? Likewise, I am curious what the package usbutils adds to an audio system. I have used USB audio devices on Linux for years and don't recall ever installing this to get them performing well, but perhaps I am missing out on something that would improve my system?

User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: New wiki article on installing a Linux audio system

Post by autostatic »

GuntherT wrote: Mon Oct 23, 2023 7:27 am

It is really easy to setup ZRAM in Debian 12 to handle swap duties if you don't want a swap partition for whatever reason, which will prevent edge-case performance problems that could perhaps occur if no swap is present at all. Maybe edit that bullet point to something like:

"Modern systems with enough memory (>= 16GB) can live without a swap partition. ZRAM can be used as an alternative to dedicated disk space. See https://wiki.debian.org/ZRam for installation instructions."

The Debian wiki article throws in an example of editing the default configuration between these two lines, but essentially it is just two commands in a terminal to set it up:

Code: Select all

sudo apt install zram-tools
sudo service zramswap reload

Thanks, will definitely look into ZRAM!

GuntherT wrote: Mon Oct 23, 2023 7:27 am

I was curious about this:

"Recommended packages
Install the following packages from the default Debian repositories:

rtirq-init
vlc
a2jmidid
htop
usbutils (when using an USB audio interface)"

I have never installed vlc on a system I have dedicated for audio before. You are talking about the media player whose icon is a traffic cone, right? I am curious why this is recommended.
Is it an easy way to handle multimedia codec installation on Debian?

Yes. If there are better ways or alternative options then please share those.

GuntherT wrote: Mon Oct 23, 2023 7:27 am

Likewise, I am curious what the package usbutils adds to an audio system. I have used USB audio devices on Linux for years and don't recall ever installing this to get them performing well, but perhaps I am missing out on something that would improve my system?

It can come in handy when troubleshooting flaky USB audio interfaces. Same goes for htop, could come in handy to check what consumes all your CPU or RAM. But I've removed those, they're indeed more like nice to haves instead of recommended.

User avatar
sunrat
Established Member
Posts: 925
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 152 times
Been thanked: 247 times

Re: New wiki article on installing a Linux audio system

Post by sunrat »

Generally, codecs in Debian (and probably most other Linux) are covered by the ffmpeg libraries libavcodec and libavformat. These are pulled in as dependencies by most media players. It's been years since I had to think about codec support, it just happens.

I gave up on VLC a long time ago too, preferring MPV which is a media player with very simple interface but comprehensive support for most media; it plays virtually any video or audio media. There are several frontends available (for libmpv1) for it such as Celluloid, Haruna, SMplayer but it has support for most functions by keyboard shortcuts so I just use MPV by itself.

runiq
Established Member
Posts: 47
Joined: Fri Jun 09, 2023 9:55 am
Has thanked: 61 times
Been thanked: 13 times
Contact:

Re: New wiki article on installing a Linux audio system

Post by runiq »

Something to take into consideration when using ZRAM is to set the following sysctl:

Code: Select all

vm.page-cluster = 0

It disables swap readahead. While useful when using swap on a physical block device, it's probably less useful when you can access swap at pretty much RAM speed.

The default is 3, which reads 8 pages.

Post Reply