GNU/Linux Debian installing >> Linux Audio Workstation LAW

Post fully complete "how to" guides and tutorials here. This is a great place to get feedback on stuff you might put in the wiki.

Moderators: MattKingUSA, khz

Post Reply
User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

GNU/Linux Debian installing >> Linux Audio Workstation LAW

Post by khz »

      • Think for yourself! ;-) If you are unsure question in a forum.

(?Update bios?)


  • 1. Install a distribution, for example Debian:
3 - X different installation media are available: >> https://debian-handbook.info/browse/sta ... on-methods <<
  1. Netinstall https://www.debian.org/CD/netinst/,
  2. Live https://cdimage.debian.org/debian-cd/cu ... so-hybrid/
  3. Recommendation: "non-free" Firmware sources, if the hardware should cause problems during installation. e.g.
Debian Releases: Current Releases Repositories >> https://wiki.debian.org/DebianReleases# ... positories
(https://linux.die.net/man/1/cp, https://linux.die.net/man/1/dd
:!: Use FAT32 for the USB stick.

Where is my USB stick

Code: Select all

lsblk
Then, e. g. sdb

Code: Select all

cp <nameof.iso> /dev/sdb && sync
Or:
Then the desired data medium umount, e. g. sdb

Code: Select all

umount /dev/sdb
and then

Code: Select all

dd if=/home/Path/to/<nameof.iso> of=/dev/sdb bs=4M && sync
# Or: UNetbootin allows you to create bootable Live USB drives for Ubuntu and other Linux distributions without burning a CD. https://unetbootin.github.io/ - Unetbootin is not advised for Debian install USB media.)


==> In the Debian administration manual "4.2 Installing, Step by Step" >> https://debian-handbook.info/browse/sta ... steps.html << is explained in detail with pictures of the installation process. (Debian GNU/Linux - Installation Guide >> https://www.debian.org/releases/buster/amd64/)
# Always use the LAN cable connection for Internet connection during installation.
(Or: Devuan GNU+Linux is a fork of Debian without systemd https://devuan.org/ or ... .)
Tip:
  • Use a separate partition for your /home directory.
  • Select the "Advanced options" >> "expert install" installation. [*1]
##

Minimum window manager can be useful for audio. XFCE is super because it is minimal and comfortable. With the https://goodies.xfce.org/projects/panel ... enu-plugin and the https://www.xfce-look.org/ e.g. Make XFCE look Modern and Beautiful https://www.youtube.com/embed/GR2y0xOIIdI still customizable.
https://packages.debian.org/buster/xfce4-cpufreq-plugin may be useful (Desktop search utility https://packages.debian.org/buster/catfish).

You can install multiple window managers with your package manager in parallel for testing purposes. A minimal window manager does not have so many dependencies (software/services). If you want to install a large window manager, which has more dependencies, take tasksel [*2]. Installing multiple large window managers in parallel can mean a lot of software/services.

##

For the "non-free" entries after installation in the "/etc/apt/sources.list" add the 2 entries so that "main contrib non-free" is entered. >> https://wiki.debian.org/SourcesList (then a "apt-get update")

##

Install Programs via the package manager or with

Code: Select all

apt install foobar-microcode firmware-linux-nonfree
# foobar = https://wiki.debian.org/Microcode ==> https://packages.debian.org/buster/intel-microcode, https://packages.debian.org/buster/amd64-microcode.
{
Or all:
# https://packages.debian.org/de/buster/f ... ux-nonfree
}

##

If "dmesg" shows something, then install the missing packages.

Code: Select all

Yours@GNU^LAW/DAW ~ $ dmesg | grep failed
Example "dmesg" output "firmware: failed to load rtl_nic/rtl8168g-2.fw": Search with https://www.startpage.com/ / https://searx.org/ / https://lite.qwant.com/ (/ https://en.wikipedia.org/wiki/List_of_search_engines) (or Google) after it.
or ==> "apt search rtl_nic/rtl8168g-2.fw" >> "apt install firmware-realtek"

##

With the program https://packages.debian.org/de/buster/s ... erties-gtk (or software-properties-kde) you can easily and conveniently keep your system up to date.
And from time to time

Code: Select all

apt update && apt -y upgrade
perform.

##

External programs:

Code: Select all

apt install ./<package.deb>
Don't forget the "./".

Or:

Code: Select all

dpkg -i program_name.deb

(Start a program without installing: Unpack "program_name.deb", unpack "data.tar.xz" and click on "~/opt/program_name/program_name".)

Or:

Other programs that are installed differently have usually explained the installation process on their homepage.

##

Rename old settings in your ~home directory:

Code: Select all

mv .program_name .program_name-BAK
##

Multiarch Implementation: https://wiki.debian.org/Multiarch/Implementation
Multiarch lets you install library packages from multiple architectures on the same machine. This is useful in various ways, but the most common is installing both 64 and 32-bit software on the same machine and having dependencies correctly resolved automatically. In general you can have libraries of more than one architecture installed together and applications from one architecture or another installed as alternatives. Note that it does not enable multiple architecture versions of applications to be installed simultaneously.
Installing/removing packages: https://wiki.debian.org/Multiarch/HOWTO ... g_packages

##

[*2] Tasksel package provides a simple interface for users who want to configure their system to perform a specific task. https://wiki.debian.org/tasksel

##

In Debian you might change the "/etc/apt/sources.list" if you explicitly entered "buster" (release name) instead of "stable". Use the LAN cable connection for Internet connection during dist-upgrade. So you have to log off your user every 3 years, <Ctrl> & <Alt> & <F2>, log in as root in the console, (stop display manager) "/etc/init.d/gdm3 stop" and then enter a

Code: Select all

apt clean && apt update && apt -y upgrade && apt -y dist-upgrade && apt autoremove && apt -f -y install
and then the "reboot" computer to stay current.
! https://www.debian.org/releases/ !
Upgrades from Debian >> https://www.debian.org/releases/stable/ ... ng.en.html
Debian-stable dist-upgrade with the KXStudio repository >> viewtopic.php?f=47&t=18940&p=96526 ! Unfortunately the reply to the post has been deleted. A Debian-stable dist-upgrade with the KXStudio repository is safe.
KXRepos and Debian PPAs >> viewtopic.php?f=47&t=18707&p=94586 ! Unfortunately the reply to the post has been deleted. PPAs are trusted/safe.
  • Read what "apt-get autoremove" wants to uninstall. If "apt-get autoremove" wants to uninstall the 1/2 system answer the question "Do you want to continue? [Y/n]" rather with "no".
    With a Debian stable there should be no problems with this command. With Backports/Repository and/or a Debian testing/sid or *buntu could cause problems.

You should look at the backports before dist-upgrade! If elementary packages from the backports are installed (e.g. a kernel) you should uninstall them before dist-upgrade. After the dist-upgrade you can then install the packages from the (new) backports again.

##

New "su -" behavior in util-linux 2.32 >> https://lists.debian.org/debian-user/20 ... 00487.html
  • Using a repository:
    • Add a repository and then update your system.

      Code: Select all

      apt update
      And you will be prompted to accept the new Origin of the repository

      Code: Select all

      Do you want to accept these changes and continue updating from this repository? [y/N] 
      Y. And that’s it. >> https://wiki.debian.org/DebianRepository
##

?DebianTesting >> https://wiki.debian.org/DebianTesting?

##

https://upload.wikimedia.org/wikipedia/ ... meline.svg
So with Debian a lot is ~like (setup/maintain/install/...) as with *buntu since Debian is the mother.



  • 2. Linux Audio Workstation
    • GNU^LAW

If you use an AUDIO/MIDI interface deactivate the onboard soundcard in the bios - PS/2 port, Bluetooth, ... deactivate. Use a PCI network card instead of the on-board network card on the motherboard. If you use a laptop (wifi), turn off the network search. Better: For LAW and internet use a lan cable if possible.
(Turn off everything in the bios you don't need. What is not there doesn't consume any power, doesn't cause any problems.)



<< How much RT optimization is still needed? >> viewtopic.php?p=121734#p121734 >>


Install Programs via the package manager or with

Code: Select all

apt install jackd2 linux-image-rt-amd64 rtirq-init rtmidi alsa-firmware-loaders
# https://packages.debian.org/buster/jackd2, https://packages.debian.org/buster/jackd2-firewire
{
Optional:
# https://packages.debian.org/buster/linux-image-rt-amd64 (or (Backports https://backports.debian.org/Instructions/; https://wiki.debian.org/Backports) https://packages.debian.org/buster-back ... e-rt-amd64 or (DebianRepository https://wiki.debian.org/DebianRepository, DebianRepositoryUnofficial https://wiki.debian.org/DebianRepository/Unofficial) https://liquorix.net/, ...)
# https://packages.debian.org/buster/rtirq-init
# https://packages.debian.org/de/source/buster/rtmidi
# (https://packages.debian.org/buster/alsa ... re-loaders)
}

##

(
@Kernel wrote: ##

Otional: Build your own kernel:
  • apt-get install build-essential fakeroot
    apt-get build-dep linux
    apt-get install libncurses5-dev libncursesw5-dev
    apt-get install linux-source-4.2
    tar -xaf /usr/src/linux-source-4.2.tar.xz
    cd linux-source-4.2
    cp /boot/config-4.2.0-1-amd64 .config
    make menuconfig

    Code: Select all

    linuxmusicians /usr/src/linux # make menuconfig

    Code: Select all

    General setup    ---> 
        Preemption Model (Preemptible Kernel (Low-Latency Desktop))    --->
     
    ( ) No Forced Preemption (Server)
    ( ) Voluntary Kernel Preemption (Desktop)
    ( ) Preemptible Kernel (Low-Latency Desktop)
    (X) Complete Preemption (Real-Time)
    

    Code: Select all

    Processor type and features    --->
        Timer frequency (1000 HZ)    ---> 
        
    ( ) 100 HZ
    ( ) 250 HZ
    ( ) 300 HZ
    (X) 1000 HZ
    make -j4 deb-pkg LOCALVERSION=-lowlatency KDEB_PKGVERSION=$(make kernelversion)-1
    cd ..
    dpkg -i linux-headers-4.2.5-lowlatency_4.2.5-1_amd64.deb
    dpkg -i linux-image-4.2.5-lowlatency_4.2.5-1_amd64.deb
)

##


!

A) limits.conf > Must have! >> https://wiki.linuxaudio.org/wiki/system ... faudioconf
B) Debian Bullseye with KDE Audio Workstation install guide >> viewtopic.php?p=129228#p129228
C) ~Nor the http://kxstudio.linuxaudio.org/Repositories (then a "apt-get update").
C) ~LibraZiK - studio audio https://librazik.tuxfamily.org/
D) #DebianMultimedia: https://wiki.debian.org/DebianMultimedia; deb-multimedia Repository: https://www.deb-multimedia.org/
E) #Playground for deb packaging: https://build.opensuse.org/project/show ... _it:debian
F) And important: still: https://github.com/raboof/realtimeconfigquickscan or https://codeberg.org/rtcqs/rtcqs
Optional (obsolete?):
H) Disabling the irqbalance daemon >> https://access.redhat.com/documentation ... ss_binding
I) Disabling GNOME Tracker >> https://blog.larskasper.de/2017/11/23/t ... bschalten/, https://gist.github.com/vancluever/d34b41eb77e6d077887c

!

##


##

Audio (Jack/Pulseaudio/...) configurations:
# https://linuxaudio.github.io/libremusic ... -jack.html; https://web.archive.org/web/20200811001 ... -jack.html;
https://github.com/jackaudio/jackaudio. ... -and-jack2, https://github.com/jackaudio/jackaudio.github.com/wiki
# http://bandshed.net/pdf/ AVL2018UserManual.pdf >> AUDIO & MIDI IN AV LINUX
# (https://linux.die.net/man/1/jackd, https://manpages.debian.org/buster/jackd2/, https://man.archlinux.org/man/a2jmidid.1.en, https://www.freedesktop.org/wiki/Softwa ... itymodules, #https://wiki.debian.org/PipeWire#For_JACK
==> Install "a2jmidid" https://github.com/jackaudio/a2jmidid and "pulseaudio-module-jack" https://www.freedesktop.org/wiki/Softwa ... itymodules.
In qjackctl Setup:
Jack with a2jmidid and pulseaudio:
  • Setup >> Settings > Parameters > MIDI Drivers "seq" or "none"
  • Setup >> Settings > Advanced > "Server Prefix" select "jackd" https://github.com/jackaudio/jack2/blob/master/README)
  • Setup >> Settings > Advanced > [X] Soft Mode
  • Setup >> Settings > Advanced > (RT) Priority (0 - 98)
  • Setup >> Options > [X] Run script after startup: "pacmd load-module module-jack-source channels=2 && pacmd load-module module-jack-sink channels=2 && sleep 5 && a2j -e -u &" (a2j enables dbus) or "sleep 5 && a2jmidid -e -u &" (without dbus)
  • Setup >> Options > [X] Execute script on Shutdown: "pulseaudio --kill"
  • Setup >> Options > [X] Execute script after Shutdown: "killall jackd"
  • Setup >> Misc > [X] Provide support for ALSA sequencer

Optional:
  • Setup >> Settings > Advanced > [X] H/W Monitor
  • Setup >> Settings > Advanced > [X] H/W Meter

Jack without pulseaudio:
  • Setup >> Options > [X] Execute script at startup: "systemctl --user stop pulseaudio.socket && systemctl --user stop pulseaudio.service"
  • Setup >> Options > [X] Run script after shutdown: "killall -9 jackd && systemctl --user start pulseaudio.socket && systemctl --user start pulseaudio.service")


=> In System sounds select the "pulseaudio-module-jack". https://www.freedesktop.org/wiki/Software/PulseAudio/

##

: Stop Pulseaudio/Pipewire temporarily >> viewtopic.php?p=103154#p103154 ::

##

# Timers, rtmidi, raw ALSA, jack MIDI viewtopic.php?p=99769#p99769

##
  • Alsa2jack (MIDI):
    install:

    Code: Select all

    apt install a2jmidid
    In qjackctl setting: Setup >> Options >> [X] Run script after startup

    Code: Select all

    sleep 5 && a2jmidid -e -u &
    You only need "a2j -e -u" (dbus) or "a2jmidid -e -u" if you want to use ALSA and jack (MIDI (Five-pin DIN connector or USB)) at the same time.
    If you don't care if one part is listed on ALSA, the other on Jack (MIDI) - and of course you can't connect them - you don't need "a2j -e -u" or "a2jmidid -e -u".
##

(
To control jack with a GUI you need either the program qjackctl https://qjackctl.sourceforge.io/ or Cadence https://kx.studio/Applications:Cadence.
There set your AUDIO/MIDI interface (

Code: Select all

cat /proc/asound/cards

Code: Select all

arecord -l

Code: Select all

aplay -l

Code: Select all

amidi -l
).

##

Alsamixer - a console software which is installed by default - is your mixer. The settings of the audio/MIDI interface are done via the alsamixer https://linux.die.net/man/1/alsamixer, with "alsactl store" (as root) https://linux.die.net/man/1/alsactl you save your settings. As long as you can/will configure the audio/MIDI interface or there is no extra software for the audio/MIDI interface.

##

To route:
Pulseaudio has a poorer latency.
Jack has a better latency.
)

##

==> If "timidity" (https://packages.debian.org/de/buster/timidity) is installed, (uninstall "timidity" or) stop "timidity". "timidity" occupies the MIDI port and therefore no other program can use MIDI.

##

Graphic:
# firmware-linux-nonfree
# http://bandshed.net/pdf/ AVL2018UserManual.pdf >> PROPRIETARY VIDEO DRIVERS IN AV LINUX
# Check the XFCE settings.
Is it possible to use only one lowlatency kernel with an Nvidia graphics card / "non-free" driver? Nvidia is torture IMHO.

\ Nvidia RT Solution: viewtopic.php?p=132676#p132676 /

##


##

(I think one of many good possibilities of all this is that everyone is individual, depending on LAW focus(s), ... and hardware, the combinations of optimizations, distribution desktop selection,... relatively easy to implement.
Since there are - advantages and disadvantages at the same time - relatively many possible combinations, this can be tested out....:pcsuxx: ....
How well all the optimizations are coordinated with each other (or not)... .

Test individually and take what works best for you. Everything - amongst other things 100 % RT - does not have to be better.
It is good to go step by step. Then one recognizes the possible problem originator and can undo thereby the last made.
All audio optimizations are optional. There are several possibilities. It's about understanding and learning. Use the distribution that you personally like best and supports your hardware best as well as providing the software dependencies/needs best.
https://en.wikipedia.org/wiki/KISS_principle)

##

GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info >> viewtopic.php?p=30105#p30105


  • ########################################

# For example: DeepL develops artificial intelligence for understanding and translating texts. >> https://www.deepl.com/translate

##

Firefox:

- about:config:

Code: Select all

browser.search.suggest.enabled: 	false
browser.urlbar.suggest.bookmark: 	false  
browser.urlbar.suggest.history: 	false  
browser.urlbar.suggest.openpage: 	false  
browser.urlbar.suggest.searches: 	false  
browser.urlbar.suggest.topsites: 	false
browser.fixup.alternate.enabled: 	false
keyword.enabled: 			false
- Add-ons:
  1. :: https://github.com/gorhill/uBlock/ ::
    or
    :: http://winhelp2002.mvps.org/hosts.htm ::
  2. :: https://noscript.net/ ::
  3. :: https://www.eff.org/https-everywhere ::
##

(For Backports if you want them installed later: https://wiki.debian.org/Backports.
Or:
[*1] Select the "Advanced options" >> "expert install" installation. If exotic questions come up - not described in the Debian administration manual "Install, step by step" - you can press "enter" because it is always the ~normal way. At 1 or 2 questions/points you change what: Choose
non-free
(Backports if you want them)
off. So yes, I want to.
Backports are only needed if you want to install programs from the "Debian-testing" branch. This is not absolutely necessary and may cause problems because dependencies have to be disbanded. A dist-upgrade can cause problems. IMHO
)



####


Bla Info:
~* After installation, Linux took up about 5 GB of disk space. With a large number of programs, including audio programs, installed at a later date, approx. 20 - 30 GB or more hard disk space can be used.
~* Possibly 2 - 5 (?) GB SWAP, depending upon built in RAM. When 16/32/64/... GB RAM is available you don't need a SWAP.?

~* For a new system with an old "/home" directory on another partition, you should move the old settings (all hidden files https://wiki.debian.org/home_directory? ... t=(hidden)) "yo@moi ~ $./." in your "/home" directory) to a ".Backup-Bla" folder. Thus all personal settings are reset, Tabula Rasa.
Problems may occur when using a new/different system with the old hidden files "yo@moi ~ $ ./.". E.g. copy mails (Thunderbird folder) etc. in your ".Backup-Bla" folder back to the "/home" directory because they may be important.
. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
User avatar
langoring_composer
Established Member
Posts: 12
Joined: Fri May 24, 2019 10:32 pm

Re: GNU/Linux Debian installing >> Linux Audio Workstation LAW

Post by langoring_composer »

Thanks for this!!!

I still use some of these older advices.
They tend to have some reliable chunks mixed in with the other parts.
The reliable parts tend to be very worth it.

Take care.
--L_C
User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

Re: GNU/Linux Debian installing >> Linux Audio Workstation LAW

Post by khz »

langoring_composer wrote:Thanks for this!!!

I still use some of these older advices.
You're welcome.
Are these no longer necessary or obsolete in 2019, since ~28 years of Linux and ~36 years of GNU exist?
langoring_composer wrote:They tend to have some reliable chunks mixed in with the other parts.
The reliable parts tend to be very worth it.
Can you please specify and technically explain what the "reliable parts" and the "other parts" are? Thank you.
langoring_composer wrote: Take care.
?What is that related to?
. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
User avatar
Linuxmusician01
Established Member
Posts: 1524
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland
Has thanked: 756 times
Been thanked: 137 times

Re: GNU/Linux Debian installing >> Linux Audio Workstation LAW

Post by Linuxmusician01 »

khz wrote:
langoring_composer wrote: Take care.
?What is that related to?
That's a compliment/greeting I think. :)
User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

Re: GNU/Linux Debian installing >> Linux Audio Workstation LAW

Post by khz »

khz wrote:Different cultures, language misunderstandings, technical misunderstandings, ... . And we musicians may think too perfectly in the realization. ;-)
:-D
. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
Post Reply