Being somewhat addicted to Linux mini computers, I just had to lay my hands on a PC Engines APU. A lot of information about the APU is strewn all over the Internet so I wanted to consolidate it all in one single post.
Installing Ubuntu Server using the serial console
To boot the Ubuntu Server installer using the serial console, some startup config files have to be modified. See this post for instructions.
On the Mac, I’m using serial. It already contains the drivers for my PL2303 based USB serial adapter. As a free alternative, Prolific’s PL2303 OS X drivers work pretty well together with minicom
from the brew project. If output is being displayed with minicom but input doesn’t work, make sure to turn off hardware flow control. The screen command may work as well.
Show network devices as eth0, eth1, eth2 instead of p4p1, p4p2, p4p3
Edit /etc/default/grub
as follows:
GRUB_CMDLINE_LINUX_DEFAULT="biosdevname=0"
Update grub configuration
# update-grub
and
# reboot
Don’t forget to update /etc/network/interfaces
accordingly.
Show output during boot
Edit /etc/default/grub
as follows:
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8" GRUB_TERMINAL=serial GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
Update grub configuration
# update-grub
and
# reboot
Enable NMI Watchdog
# modprobe sp5100_tco && echo "sp5100_tco" >> /etc/modules
Enable temperatur sensor
apt-get install lm-sensors
# sensors k10temp-pci-00c3 Adapter: PCI adapter temp1: +52.0°C (high = +70.0°C) (crit = +100.0°C, hyst = +97.0°C)
Enable LEDs and reboot button
Check out the apu-led-button repository on Github.
Use max. cpufreq
Ubuntu will always set the CPU governor to ondemand during boot.
# cat /proc/cpuinfo vendor_id : AuthenticAMD model name : AMD G-T40E Processor cpu MHz : 800.000
For the APU this means the CPU will be run at 800 MHz instead of 1 GHz. If you prefer the CPU to run at full speed at all times:
# wget -O /usr/local/sbin https://gist.githubusercontent.com/trick77/21cfc65c769609be29e2/raw/076e21c7b844a9eeb67ca4184544ec27d11164f7/gov
Insert into /etc/rc.local
just above exit 0
:
/usr/local/sbin/gov performance
Or as an alternative, just disable the Ubuntu ondemand init script from the command line:
# update-rc.d ondemand disable
# cat /proc/cpuinfo vendor_id : AuthenticAMD model name : AMD G-T40E Processor cpu MHz : 1000.000
Enable beep
apt-get install beep modprobe pcspkr && echo pcspkr >> /etc/modules
Comment pcspkr
in /etc/modprobe.d/blacklist.conf
to unblacklist the module.
Imperial March:
beep -l 350 -f 392 -D 100 -n -l 350 -f 392 -D 100 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 700 -f 392 -D 100 -n -l 350 -f 587.32 -D 100 -n -l 350 -f 587.32 -D 100 -n -l 350 -f 587.32 -D 100 -n -l 250 -f 622.26 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 350 -f 369.99 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 700 -f 392 -D 100 -n -l 350 -f 784 -D 100 -n -l 250 -f 392 -D 100 -n -l 25 -f 392 -D 100 -n -l 350 -f 784 -D 100 -n -l 250 -f 739.98 -D 100 -n -l 25 -f 698.46 -D 100 -n -l 25 -f 659.26 -D 100 -n -l 25 -f 622.26 -D 100 -n -l 50 -f 659.26 -D 400 -n -l 25 -f 415.3 -D 200 -n -l 350 -f 554.36 -D 100 -n -l 250 -f 523.25 -D 100 -n -l 25 -f 493.88 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 25 -f 440 -D 100 -n -l 50 -f 466.16 -D 400 -n -l 25 -f 311.13 -D 200 -n -l 350 -f 369.99 -D 100 -n -l 250 -f 311.13 -D 100 -n -l 25 -f 392 -D 100 -n -l 350 -f 466.16 -D 100 -n -l 250 -f 392 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 700 -f 587.32 -D 100 -n -l 350 -f 784 -D 100 -n -l 250 -f 392 -D 100 -n -l 25 -f 392 -D 100 -n -l 350 -f 784 -D 100 -n -l 250 -f 739.98 -D 100 -n -l 25 -f 698.46 -D 100 -n -l 25 -f 659.26 -D 100 -n -l 25 -f 622.26 -D 100 -n -l 50 -f 659.26 -D 400 -n -l 25 -f 415.3 -D 200 -n -l 350 -f 554.36 -D 100 -n -l 250 -f 523.25 -D 100 -n -l 25 -f 493.88 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 25 -f 440 -D 100 -n -l 50 -f 466.16 -D 400 -n -l 25 -f 311.13 -D 200 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.13 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 300 -f 392.00 -D 150 -n -l 250 -f 311.13 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 700 -f 392