TROUBLESHOOTING: Static IP


# TS7

# Static IP not working
# assign IP to eth0 interface

# configure a static IP address by adding the following to /etc/dhcpcd.conf:

  1. $  ip link show

# ON RASPBERRY PI

  1. 1: lo:  mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
  2. 2: eth0:  mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
  3. 3: wlan0:  mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000

# eth0 is your default interface (Ethernet connection), do not use wifi for your audio server

# ON AMD64 PC

  1. 1: lo:  mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
  2. 2: enp3s0:  mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
  3. 3: wlp2s0:  mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000

# enp3s0 is your default interface (Ethernet connection), do not use wifi for your audio server

# type:

  1. $ sudo nano /etc/network/interface

# add those lines at end:

  1. auto lo eth0
  2. iface lo inet loopback
  3.  
  4. iface eth0 inet static
  5.     address 192.168.x.x
  6.     netmask 255.255.255.0
  7.     network 192.168.x.x
  8.     gateway 192.168.x.x

# CTRL+O to save
# CTRL+X to exit

  1. $ sudo nano /etc/resolv.conf

# add one or 2 lines (change IP to your DNS address or your router)

  1. nameserver 192.168.x.x
  2. nameserver x.x.x.x

# CTRL+O to save
# CTRL+X to exit

  1. $ sudo reboot

# OPTIONAL AND NOT RECOMMENDED
# stop dhcpcd service when the static ip is valid and reachable only

  1. $ sudo systemctl stop dhcpcd

# restart network

  1. $ sudo systemctl restart networking

# get the status (you may lose your ssh session see below)

  1. $ sudo systemctl status networking

# if everything okay reboot your system

  1. $ sudo reboot

# or type this cmd below with interface name (eth0 or enp3s0 ) and reboot manually

  1. $ sudo ifdown enp3s0

# here you’re loosing your SSH session obviously
# see troubbleshooting if static IP not working
# reboot system
# and start the NEW SSH SESSION WITH YOUR NEW STATIC IP! đŸ˜‰

TROUBLESHOOTING: GENERAL


# TS6

# if MPD doesn’t start type this to get its status

  1. $ sudo systemctl status mpd

# if the error is related to /libavcodec.so.58: undefined symbol: bcm_host_is_fkms_active
# reinstall libraspberrypi0 pkg

  1. $ sudo apt install --reinstall libraspberrypi0
  1. $ sudo reboot

# NANO return this error (on Armbian / Debian):

Unable to create directory /root/.local/share/nano/: No such file or directory It is required for saving/loading search history or cursor positions.

# check if nano cmd is available using:

  1. sudo /bin/nano .bashrc

# if nano opens the file then you simply need to create the /root/.local/share/nano/ directories
# you can confirm the issue by using:

  1. sudo ls -l /root/.local/

# UPGRADE or DOWNGRADE YOUR KERNEL


# IMPORTANT:
# All information below is for Raspberry PI platform only, does not apply to other devices


# go to
https://github.com/Hexxeh/rpi-firmware/commits/master

# get the sha1 of the kernel
# for example: 4.19.118-v7 e1050e94821a70b2e4c72b318d6c6c968552e9a2

# then to install this old kernel 4.19.118-v7+ enter:

  1. $ sudo rpi-install e1050e94821a70b2e4c72b318d6c6c968552e9a2
  1. $ sudo reboot

TROUBLESHOOTING: Raspberry PI 3B+


# IMPORTANT FOR RASPBERRY PI OWNERS:
# It’s strongly recommended to create your audio server on Raspberry PI 4 2Go
# The raspberry pi 3 share the same controller with USB and Ethernet which is not good for an audiophile server
# do not expect to use native DSD with RPI 3 using an usb dac…


# ALL INFORMATION BELOW ARE FOR RPI 3B + ONLY, does not apply to other devices


# Apply patch one by one in this order, reboot and check before


# TS1

# APPLY IF NEEDED ONLY (sound drop/loss)

# Ethernet drops Fix (Recommended for Raspberry PI 3B+ only do not apply to RPI 4)
# identify the name of your Ethernet connection (usually eth0 or enp3s0)

  1. $ ip a

# edit rc.local to run a cmd at startup

  1. $ sudo nano /etc/rc.local

# enter this cmd below to optimize your ethernet connection
# see the Tips & Tricks section to install ethtool (sudo apt-get install ethtool) if needed
# add this line at end of rc.local

  1. $ sudo ethtool -s eth0 speed 100 duplex full

# CTRL+O to save
# CTRL+X to exit

  1. $ sudo reboot

# TS2

# APPLY IF NEEDED ONLY

# optimize perf for Raspberry PI 3B+ – cpu gouvernor (not recommended for PI4)

# check cpu governor

  1. $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

# set to “performance” at startup

  1. $ sudo mv /etc/init.d/raspi-config /etc/init.d/raspi-config.bak
  1. $ sudo nano /etc/init.d/raspi-config

# copy/paste this script

#!/bin/sh
### BEGIN INIT INFO
# Provides: raspi-config
# Required-Start: udev mountkernfs $remote_fs
# Required-Stop:
# Default-Start: S 2 3 4 5
# Default-Stop:
# Short-Description: Switch to performance/ondemand cpu governor based on shift key pressed.
# Description:
### END INIT INFO
 
# . /lib/lsb/init-functions
 
case "$1" in
start)
log_daemon_msg "Checking if shift key is held down..."
SYS_CPUFREQ_GOVERNOR=/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
if [ -x /usr/sbin/thd ] && timeout 1 thd --dump /dev/input/event* | grep -q "LEFTSHIFT\|RIGHTSHIFT"; then
printf "Yes. Switching to ondemand scaling governor."
if [ -e $SYS_CPUFREQ_GOVERNOR ]; then
echo "ondemand" > $SYS_CPUFREQ_GOVERNOR
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo 100000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
fi
log_end_msg 0
else
printf "No. Switching to performance scaling governor."
if [ -e $SYS_CPUFREQ_GOVERNOR ]; then
echo "performance" > $SYS_CPUFREQ_GOVERNOR
fi
log_end_msg 0
fi
;;
stop)
;;
restart)
;;
force-reload)
;;
*)
echo "Usage: $0 start" >&2
exit 3
;;
esac

# CTRL+O to save
# CTRL+X to exit

# set permission to exec

  1. $ sudo chmod 755 /etc/init.d/raspi-config
  1. $ sudo reboot

# type to check:

  1. $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

# result must be:

# performance


# TS3

# APPLY IF NEEDED ONLY

# USB dropped frames Fix (not recommended for PI 4)

  1. $ sudo nano /etc/rc.local

# # USB fix

  1. $ sudo sed -i "s/console=serial0,115200/net.ifnames=0 dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0xF dwc_otg.nak_holdoff=1 console=serial0,115200/" /boot/cmdline.txt

# # revert value

  1. $ sudo sed -i "s/net.ifnames=0 dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0xF dwc_otg.nak_holdoff=1 //" /boot/cmdline.txt

# CTRL+O to save
# CTRL+X to exit

  1. $ sudo reboot