From ArchWiki
< User:Ctag
Revision as of 16:20, 30 July 2019 by Ctag (talk | contribs) (→‎Manually: Updated dummy nic instructions)
Jump to navigation Jump to search


My notes for installing and maintaining GNU/Linux instances, working with personal computer hardware, etc.

Naming Schemes

My computers are named after fictional spacecraft. I do this because I think it sounds nice, like USS-Alabama is the naming scheme for United States Ships. The one exception to this rule is my main desktop, which isn't named after anything else.

General Program Notes

SVG path to OpenSCAD

Make everything a path. Go to extensions > modify path > flatten bezier. Save as DXG R14.

Import in openscad and be done.

Also covers the warning "WARNING: Unsupported DXF Entity `SPLINE'"

General Archlinux Notes

Systemctl Timed Out


$systemctl enable whatever.service
Failed to execute operation: Connection timed out

Cause: lvm2 is broken.

Fix: I just uninstalled lvm2 on this machine, as it was unneeded.

GPG and Duplicity

If you get an error about not being able to use the signing keys or ioctl, make sure you've got something set up in .bashrc like this:

# For duplicity
export GPG_TTY=$(tty)
echo "UPDATESTARTUPTTY" | gpg-connect-agent > /dev/null 2&>1

For some reason the pinentry dialog won't show up without it.


2013 Installation Notes

Notes copied as they were found from an old piece of paper.

Install date: 15-12-2013

  • Followed Beginner Guide on archwiki.
  • Network: Default dhcpcd.service, IP set by MAC on router.
  • Disk:
    • 1Gig 'ef' (ef00) partition for /boot
    • 110Gig ext4
  • NFS:
    • Installed nfs-utils
    • Enable rpc-statd.service
    • fstab won't mount on boot without x-systemd.automount flag
    • rpc-gssd.service totally kills NFS!
  • Yeti USB:
    • Must not be plugged into USB 3.0 port!
    • To list modules: 'aplay -l'
    • Set Yeti as default device, edit /etc/modprobe.d/alsa.conf
options snd slots=snd_usb_audio,snd_hda_intel
options snd_usb_audio index=0
options snd_hda_intel index=1
  • nVidia Driver:
    • Packages: nvidia, nvidia_libgl, nvidia-utils, opencl-nvidia, nvidia-cg-*, libcl, lib32-opencl-nvidia, libvdpau
    • libvdpau is needed for 'flashplugin' and lib32-flashplugin
    • Setup xorg.conf for a new X screen on each monitor.
  • BIOS
    • Turn on IOMMU, turn off XHCI
  • VPN
    • /etc/dhcpcd.conf: nooption domain_name_servers, domain_name
    • Add DNS to /etc/resolv.conf.head

Thinkpad fan control

I haven't found a good solution for fan control on the x120e, but tpfanco-svn from the AUR works reasonably well. Both lm-sensors and fancontrol were totally awful to configure/use.

Configuration on ArchWiki

youtube-dl stacktrace

youtube-dl fails after I made the python symlinks sane again.

to fix it, edit /usr/bin/youtube-dl and change the first line to use /usr/bin/python3.4

HP J4580 Unrecognized

Symptoms: HP printer that's only good for flatbed scanning is suddenly unrecognized even though hplip is installed.

Steps to reproduce: Try scanning in homework with less than half an hour left on the clock.

It fucking works, just uncomment 'hpaio' at the end of /etc/sane.d/dll.conf


Received this error in Slic3r when connecting to octoprint via HTTPS only:

I wasn't able to connect to OctoPrint (501 Protocol scheme 'https' is not supported (LWP::Protocol::https not installed)). Check hostname and OctoPrint version (at least 1.1.0 is required).

Solution: install perl-lwp-protocol-https from the official repos.


To make the icons appear, you have to set the icon theme name in ReText.conf


To install, I had to go get the following packages:



#!/usr/bin/env xdg-open
[Desktop Entry]
Comment=Start MATLAB - The Language of Technical Computing
Exec=cd /home/berocs/Documents/uah && wmname LG3D && env MATLAB_JAVA=/usr/lib32/jvm/java32-6-jre/jre matlab -desktop -nosplash -glnx86

The 'cd /home/berocs/Documents/uah' portion of the .desktop file makes MATLAB use my uah directory as its default, which makes navigating class project files much easier.

I recently had to use 'fdatool' for a class, and the sub-windows wouldn't render any contents. To fix this I migrated from jre8 to jre6.


Matlab checks the mac address of "eth0" for license validation. There isn't an eth0 on Archlinux, so we'll have to spoof it.


To create a dummy0 device, load the 'dummy' module

sudo modprobe dummy
sudo ip link add dummy0 type dummy
ip link list # dummy0@NONE should exist

Next, we need to turn the dummy device into a fake eth0 and assign it the MAC address that matlab is looking for.

sudo ip link set dev dummy0 name eth0
sudo ip link set dev eth0 address e8:9a:8f:00:00:00

Edit /etc/modules-load.d/dummy.conf to have


Now the dummy0 device will appear on boot.

Next we need to create a systemd service that will assign the eth0 name to the dummy device.


Description=Dummy network interface for MATLAB

ExecStart=/usr/bin/ip link set dev dummy0 name eth0
ExecStart=/usr/bin/ip link set dev eth0 address e8:9a:8f:8d:79:84



Upon receiving the error

libGL error: unable to load driver:

I found [1] and ran the command

rm ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/

to solve the problem.

Battle of Wesnoth

From the installation package:

==> If you experience sound problems try setting your SDL_AUDIODRIVER environment variable to "dma"
==> eg. export SDL_AUDIODRIVER="dma" ; wesnoth
==> If "dma" doesn't work,other options are: dsp,alsa,artsc,esd,nas try to find the right output.

Coyote Raspberry Pi's

Wireless AP

Set up a network for SSH access or webserving.

Just network: wpa_supplicant, dnsmasq, hostapd.

Webservice: nodejs, authbind, rpi-monitor.

Set wlan0 to a static IP:

# /etc/dhcpcd.conf
# Append to file:
interface wlan0
static ip_address=
static routers=

Setup /etc/dnsmasq.conf:

# Append to end of /etc/dnsmasq.conf
# disables dnsmasq reading any other files like /etc/resolv.conf for nameservers
# Interface to bind to
# Specify starting_range,end_range,lease_time
# dns addresses to send to the clients
# Route all requests to this machine

You may have to create /etc/hostapd/hostapd.conf:

# /etc/hostapd/hostapd.conf

Serving site on port 80:

Configure authbind:

# touch /etc/authbind/byport/80
# chown user /etc/authbind/byport/80
# chmod 755 /etc/authbind/byport/80

To run a site:

$ authbind --deep node app.js




Non critical computers are those with unencrypted hard disks. These are things like 3d print servers or irc clients. If I take the time to encrypt a system, then I'll also encrypt the backups.

Backup Script in /opt/

# Backup either home or root
duplicity --no-encryption /home/berocs file:///mnt/bkup/${BNS-SYSTEM}/duplicity

Systemd Service /etc/systemd/system/backup-{root,home}.service

Description=Backs up /home/berocs to bns-readynas:/bkup/bns-daedalus/duplicity


Systemd Timer in /etc/systemd/sytem/backup-{root,home}.timer

Description=Timer for backup-{home,root}.service



cron line

RPi Notes

Failed to start Load Kernel Modules

On a Raspberry Pi.


Failed to start Load Kernel Modules.

Fix: edit /etc/modules-load.d/raspberrypi.conf and remove "bcm2708-rng" because it has changed to bcm2835-rng.

Debian Notes

On the servers I kept receiving the following error and bootup took almost 15 minutes.

Fri May  1 11:52:20 2015: Starting NFS common utilities: statd idmapd.
Fri May  1 11:56:33 2015: mount.nfs: Connection timed out
Fri May  1 12:00:46 2015: mount.nfs: Connection timed out
Fri May  1 12:04:58 2015: mount.nfs: Connection timed out
Fri May  1 12:09:11 2015: mount.nfs: Connection timed out

The problem ended up being nonexistant IP addresses in /etc/fstab due to the move from 10.10.x.x at Nick's house to 192.168.x.x at home. Fixing the fstab returns the servers to a fast boot.