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: khz, MattKingUSA

User avatar
khz
Established Member
Posts: 1154
Joined: Thu Apr 17, 2008 6:29 am
Location: German

GNU/Linux Debian installing >> Linux Audio Workstation LAW

Postby khz » Fri Apr 20, 2018 10:07 am

        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/stable/installation.html#sect.installation-methods <<
  1. Netinstall https://www.debian.org/CD/netinst/,
  2. Live https://cdimage.debian.org/debian-cd/current-live/amd64/iso-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#Current_Releases.2FRepositories
(# UNetbootin allows you to create bootable Live USB drives for Ubuntu and other Linux distributions without burning a CD. https://unetbootin.github.io/)

==> In the Debian administration manual >> https://debian-handbook.info/browse/stable/sect.installation-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 ... .)

##

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-plugins/xfce4-whiskermenu-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/stretch/xfce4-cpufreq-plugin may be useful (Desktop search utility https://packages.debian.org/stretch/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. 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-get install foobar-microcode firmware-linux-nonfree

# foobar = https://wiki.debian.org/Microcode ==> https://packages.debian.org/stretch/intel-microcode, https://packages.debian.org/stretch/amd64-microcode.
# https://packages.debian.org/de/stretch/firmware-linux-nonfree

##

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

Code: Select all

Yours@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.me/ (or Google) after it. >> "apt-get install firmware-realtek"

##

With the program https://packages.debian.org/de/stretch/software-properties-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-get update && apt-get -y upgrade

perform.

##

External programs:

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".)
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#Installing.2Fremoving_packages

##

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 "stretch" (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-get clean && apt-get update && apt-get -y upgrade && apt-get -y dist-upgrade && apt-get autoremove && apt-get -f -y install

and then the "reboot" computer to stay current.
Upgrades from Debian >> https://www.debian.org/releases/stable/arm64/release-notes/ch-upgrading.en.html
Debian-stable dist-upgrade with the KXStudio repository >> https://linuxmusicians.com/viewtopic.php?p=96528#p96528
KXRepos and Debian PPAs >> https://linuxmusicians.com/viewtopic.php?p=94589#p94589
    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/2018/08/msg00487.html

    If after a dist-upgrade you get the error message

    Code: Select all

    E: For the Repository "http://security.debian.org/debian-security buster/updates InRelease" the "Suite" value was changed from "testing" to "stable".
    N: You must explicitly confirm this before updates from this repository can be applied. See the apt-secure(8) manual page for more information.
    ...

    Well, backstory apart, there’s an easy fix. Just run

    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]

    And that’s it.

##

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


  • 2. Linux Audio Workstation 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. (Turn off everything in the bios you don't need. What is not there doesn't consume any power, doesn't cause any problems.)

Install Programs via the package manager or with

Code: Select all

apt-get install jackd2 linux-image-rt-amd64 rtirq-init rtmidi alsa-firmware-loaders

# https://packages.debian.org/stretch/jackd2, https://packages.debian.org/stretch/jackd2-firewire
# https://packages.debian.org/stretch/linux-image-rt-amd64 (or (Backports https://backports.debian.org/Instructions/) https://packages.debian.org/stretch-backports/linux-image-rt-amd64 or (DebianRepository https://wiki.debian.org/DebianRepository, DebianRepositoryUnofficial https://wiki.debian.org/DebianRepository/Unofficial) https://liquorix.net/, ...)
# https://packages.debian.org/stretch/rtirq-init
# https://packages.debian.org/de/source/stretch/rtmidi
# (https://packages.debian.org/stretch/alsa-firmware-loaders)
@Kernel
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

>> Replace "linux-source-4.2" with the kernel you want to build. <<
http://www.friendlyvirus.org/miguelnegrao/2016/04/12/debian-getting-a-lowlatency-kernel/

!
A) limits.conf > Must have! >> https://wiki.linuxaudio.org/wiki/system_configuration#limitsconfaudioconf
B) Nor the http://kxstudio.linuxaudio.org/Repositories (then a "apt-get update").
C) And important: still: https://wiki.linuxaudio.org/wiki/system_configuration#quickscan
Optional:
E) Disabling the irqbalance daemon >> https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_for_real_time/7/html/tuning_guide/interrupt_and_process_binding
F) Disabling GNOME Tracker >> https://blog.larskasper.de/2017/11/23/tracker-miner-fs-abschalten/, https://gist.github.com/vancluever/d34b41eb77e6d077887c
!

Audio (Jack/Pulseaudio/...) configurations:
# http://libremusicproduction.com/articles/ JACK – A Beginners Guide to Getting Started with JACK; https://github.com/jackaudio/jackaudio.github.com/wiki/Q_difference_jack1_jack2
# http://bandshed.net/pdf/ AVL2018UserManual.pdf >> AUDIO & MIDI IN AV LINUX
# (https://linux.die.net/man/1/jackd
==> Install "a2jmidid" and "pulseaudio-module-jack".
In qjackctl Setup:
Jack with a2jmidid and pulseaudio:
  • Setup >> Settings > Parameters > MIDI Drivers [none]
  • Setup >> Settings > Advanced > "Server Prefix" select "jackdmp" (multi-processor machines 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: "sleep 5 && a2j -e &" (a2j enables dbus) or "sleep 5 && a2jmidid -e &" (without dbus)
  • Setup >> Misc > [ ] ([none]) Provide support for ALSA sequencer
  • Setup >> Misc > [X] D-Bus interface Activation
  • Setup >> Misc > [X] Enable JACK D-Bus Interface
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 jackdbus && systemctl --user start pulseaudio.socket && systemctl --user start pulseaudio.service")

# Timers, rtmidi, raw ALSA, jack MIDI https://linuxmusicians.com/viewtopic.php?p=99769#p99769
    Alsa2jack (MIDI):
    install:

    Code: Select all

    a2jmidid

    Setup >> Options >> [X] Run script after startup

    Code: Select all

    sleep 5 && a2jmidid -e &


    You only need "a2j -e" (jack2/dbus(?)) or "a2jmidid -e" (jack1(?)) 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" (jack2) or "a2jmidid -e" (jack1).

(
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

amidi -l

Code: Select all

arecord -l

Code: Select all

aplay -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 is poorer latency and audio quality.
Jack is better latency and audio quality.
)

# Pulseaudio and JACK >> https://linuxmusicians.com/viewtopic.php?p=103154#p103154

==> If "timidity" (https://packages.debian.org/de/stretch/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.


##

DebianMultimedia: https://wiki.debian.org/DebianMultimedia
deb-multimedia Repository: https://www.deb-multimedia.org/

##

(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 >> https://linuxmusicians.com/viewtopic.php?p=30105#p30105


    ########################################

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

Add-ons:
  1. :: https://github.com/gorhill/uBlock/ ::
    or
    :: http://winhelp2002.mvps.org/hosts.htm ::
  2. :: https://github.com/gorhill/uMatrix ::
    JavaScript blocking can be enabled by manually setting the rule once (adding "* * script block" under Settings, My Rules).
    or
    :: https://noscript.net/ ::
  3. :: https://www.eff.org/https-everywhere ::


(For Backports if you want them installed later: https://wiki.debian.org/Backports.
Or:
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 "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

Postby langoring_composer » Fri Jun 07, 2019 9:04 pm

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: 1154
Joined: Thu Apr 17, 2008 6:29 am
Location: German

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

Postby khz » Mon Jun 10, 2019 7:44 am

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: 632
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland

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

Postby Linuxmusician01 » Mon Jun 10, 2019 11:03 am

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: 1154
Joined: Thu Apr 17, 2008 6:29 am
Location: German

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

Postby khz » Mon Jun 10, 2019 11:17 am

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.


Return to “HOW TOs, Tips & Tricks”

Who is online

Users browsing this forum: No registered users and 1 guest