Archives/Shop 3.0/Ctag computer notes

From Makers Local 256
< Archives‎ | Shop 3.0(Redirected from User:Ctag/bns notes)
Jump to: navigation, search
Archival Notice
This page is archived and may not be up to date.


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

Naming Schemes

bns stands for Bero Network Service; it's a cute way to reference computers I personally own that I came up with in middle school.

All of my real computers (loosely defined as ones running GNU/Linux) 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

ip a # No dummy0 device
sudo modprobe dummy
ip a # 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.


Installing Archlinux

Migrating from Debian Testing Dec 2014.

Migration notes:

  • Backing up rootfs to bns-readynas
    • Script in archtools
  • Backing up home to 16G flash drive
    • rsync -avz . /media/berocs/DTM30/
    • Scratch the above, flash drive is 16G, need 33G. rsync-ing to nfs:/bkup.

Fixing the Thinklight

Ever since I bought this laptop, the Thinklight hasn't worked, and I just assumed it was a casualty of having libreboot on the system. Today, however, an irc member on #libreboot pointed me to a German forum post which discussed a hardware issue and solution with X200 Thinklights.

I set out to make the same changes to my X200, and found that it worked! My Thinklight now operates nominally, with two tiny wires run behind the ribbon cable and soldered to the connector and LED.

Resurfacing the keyboard

--> This process isn't permanent. For me, the new surface lasted about two months before wearing away.

This laptop isn't exactly new, and one of the most obvious signs of wear has been the "slick spots" where the texturing on individual keys has worn down. Once again, an irc user came to my aid, and informed me of this German wiki page, where the issue is tackled.

I.. can't read German, so the page was loosely translated mechanically, and I tried to put the pieces together. Here's what I got:

  • Clean the keyboard really well (dish soap, microfiber cloth, isopropyl)
  • Get some clear coat matte finish wheel spraypaint (duplicolor brand)
  • Paint the keyboard?

I wound up buying "Dupli-Color wheel matte clearcoat" which is product "HWP106"

I only washed the keyboard with a toothbrush and hand soap, drying with a microfiber towel. I didn't clean the keyboard as well as I should have, it would get perfectly clean, and then immediately some dust would settle on it. Oh well, the result still turned out OK.


I added layers until the glossy spots were just barely visible, with 10 minutes between layers.

Now to find out how well it holds up!

Firefox doesn't play nice with GTK Themes

What's happening is that lxappearance sets the gtk2 theme, and firefox uses the gtk3 theme. You have to look at both.

GTK2 is ~/.gtkrc-2.0

GTK3 is ~/.config/gtk-3.0/

Using a Brother DS-620

Forum post read it all the way through.

Libreoffice keeps segfaulting

Libreoffice would crash almost as soon as it lost focus as the main window in i3.

to fix this I had to edit the version of gtk being used in some configuration files.

qtcreator crash on help

Delete the helpcollection folder and .qhc file.

r600 driver on steam


[berocs@bns-kharselim ~]$ env LIBGL_DEBUG=verbose steam
Running Steam on arch rolling 64-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(0)
libGL: OpenDriver: trying /usr/lib32/xorg/modules/dri/tls/
libGL: OpenDriver: trying /usr/lib32/xorg/modules/dri/
libGL: dlopen /usr/lib32/xorg/modules/dri/ failed (/home/berocs/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/ version `GLIBCXX_3.4.20' not found (required by /usr/lib32/xorg/modules/dri/
libGL error: unable to load driver:
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL: OpenDriver: trying /usr/lib32/xorg/modules/dri/tls/
libGL: OpenDriver: trying /usr/lib32/xorg/modules/dri/
libGL: dlopen /usr/lib32/xorg/modules/dri/ failed (/home/berocs/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/ version `GLIBCXX_3.4.20' not found (required by /usr/lib32/xorg/modules/dri/
libGL error: unable to load driver:
libGL error: failed to load driver: swrast


mv /home/berocs/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/ /home/berocs/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/

sudo ln -s /usr/lib32/ /home/berocs/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/

sudo pacmatic -S ttf-liberation

ttf-liberation is to fix garbled text on the login screen.

intel video

(1/1) installing xf86-video-intel                                                               [########################################################] 100%
>>> This driver now uses DRI3 as the default Direct Rendering
    Infrastructure. You can try falling back to DRI2 if you run
    into trouble. To do so, save a file with the following 
    content as /etc/X11/xorg.conf.d/20-intel.conf :
      Section "Device"
        Identifier  "Intel Graphics"
        Driver      "intel"
        Option      "DRI" "2"             # DRI3 is now default 
        #Option      "AccelMethod"  "sna" # default
        #Option      "AccelMethod"  "uxa" # fallback

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.