January 02, 2022

Goodbye SpiderOak

I have been using SpiderOak One since Edward Snowden recommended it in 2013, almost a decade ago. I have over 1.5T of deduplicated data spread across 6 or so devices. This year, in 2022, I will not be renewing my subscriptions.

The main issues:

  1. Lack of updates: the last update to SpiderOak One was in 2019-09. All recent updates have been for CrossClave. It is evident that One is no longer a priority.
  2. Lack of speed: since day one (ha!) One has always been slower than competitors like Dropbox. In the beginning it wasn't so bad and one must makes some tradeoffs for the security offered. However in recent years this has not improved and setting up a new device takes days if it ever completes the initial synchronisation. Once setup the application is bloated, slow, generates massive amounts of local metadata.
  3. Lack of control: One installations will randomly stall on sync or update because _another_ device has  gone bad. This is not a great situations when I have devices spread across the city.

To replace SpiderOak One I am currently using:

  1. Kopia for backup with de-duplication and client-side encryption.  The target is backblaze b2.
  2. Sync.com for file sync. Note that Sync.com doesn't provide the same security guarantees as Kopia or SpiderOak, but I am willing to trade that for a sync solution that is fast, quick and affordable.
    1. There is no native linux client but the Sync.com client runs decently under wine and the performance on my slowest machines are acceptable.

November 24, 2021

Quick Survey of Some Lightweight Linux Distributions

On an ASUS E203M

Busenlabs Lithium

Installed fine but kernel (4.9?) would immediately shutdown after decrypting the root volume due to incorrect thermal readings. Was not able to disable this via thermal.nocrt=1 boot param


AntiX 21

Live system did not have working mouse. Did not proceed to installation as I didn't want to be stuck with having to fix the mouse issue.


bodhi linux HWE 6.0.0

Mouse works in the live system, I like the Enlightenment lineage. No GUI setting to disable tap-to-click on the touchpad, resolved via synclient MaxTapTime=0 so not a deal breaker. However despite being lightweight there was noticable GUI lag when running the installer. 


Q4OS Gemini, Trinity

I like the idea of Trinity Desktop and they are using a decently recent kernel as well (5.10). Installed fine but wifi doesn't connect to the 5G network. Worked fine on 2.4G. Had an annoying issue where Alt-Space didn't work, giving me ISO_Next_Group. Fixed it by setting via xkb options to use "both ctrl at the same time" to switch languages which then allowed alt-space to work as intended.

Systems feels really snappy and the retro look is not bad. Sticking with this one for now.

December 14, 2019

How *Not* to Play with Programmable LED Strips

You Need That Resistor

That resistor on the data line? Yeah you need it. Otherwise you might blow an LED which renders the entire rest of the strip useless. If that happens cut out the first LED and solder the power and data lines directly to the second LED.

You Want Shorter, Thicker, Wires

Using jumper wires, of the 300-for-$5 variety is fine for a few LEDs. If however you have 300 LED drawing around 1A then those thin wires have non-negligible voltage drop. For me this was on the order of 0.7V or more. This means even though my power supply was putting out 5V the LED strip was only seeing 4.3V, causing flickering of the LEDs.

For any piece of wire the voltage drops increases with current simply because of V=IR. Thicker wires have less resistance per unit length and therefore less voltage drop per unit length.

November 12, 2019

The Subtle Poison of Religion

 On the 12th of November 2019, Nationals MP Barnaby Joyce said on TV that:
 I acknowledge that the two people who died were most likely people who voted for the Green party, so I am not going to start attacking them. That's the last thing I want to do.
Why does the politics of the deceased matter and why would Mr. Joyce make such a speculation? I can't help but think that Mr. Joyce did it because, on some level, he thinks those people deserve it. I think this is the subtle poison of religion: that those who do not believe as I do deserve less than I do.

This idea is widespread across all variants of Christianity: you are saved if you believe in God and Jesus and the Holy Spirit but damned if you don't. You deserve salvation only if you Believe. It is this idea that motivates the Evangelicals: they must Save you by spreading their Belief so you, too, deserve salvation. It is this idea that underpins the prosperity gospel: those who Believe is deserving of wealth and therefore the harder you Believe, whether by praying harder or donating more to the Church, the more you deserve wealth. Conveniently if you are wealthy then obviously it is because you deserve it due to your faith.

Once learned and integrated into one's world view via religious instruction, this idea, that those who do not believe as I do deserve less, poisons the lens through which an individual interacts with the world. When a core part of your identify requires you to accept that, on the basis of belief alone, not everyone is equal, then it is a small step to thinking that those who hold different political beliefs deserve less then those whose beliefs align with yours. Maybe they deserve less sympathy. Maybe they deserve less government support. Maybe they deserve less compassion or concession. Whatever the case may be, on the basis of their political belief, they are Other and they are Undeserving -- and in politics this is a problem.

Some would claim that it is possible to separate one's religious beliefs from one's political actions. I reject such claims in the same way I reject any claims one can be racist and still be a fair judge. Some would claim that some people think thusly even without religion and I would agree. However some religions requires such thinking. Some would say not all religions features undeserving unbelievers and claim my title is inaccurate and I would concede their point but also point out that the major religions do not fall within this category.

June 24, 2019

3D Printing at Home

FlashForge Creator Pro

I finally got my own 3D printer, a FlashForge Creator Pro, during the EOFY sale. My choices were between the Creator Pro or the Up Mini 2 ES with the build volume of the Creator Pro being the deciding factor.

Had bit of a rocky start with bed leveling but nothing a bit of patience won't fix. It prints reliably now though I have plans for a semi-assisted bed leveling jig.


Over the past week I have worked on and off on an iPad mini holder to position it above my monitor so I can use it as a status screen or as a monitor to watch twitch while I am doing menial tasks.

I also made a small headphone hanger to save a bit of space.

Both of these designs were made in Fusion360, my first with the software. Normally I use blender because that's what I comfortable with but the Fusion brings a lot to the table and I will be using it going forward. It doesn't hurt that experience and skills with Fusion will be useful in an industrial setting.

Next on the list is some replacement end-stops for a wall hanging and a keypad bruteforcer.

August 21, 2018

T102HAAS.303 Considered Harmful For Linux

T102HAAS.303 Breaks Suspend

After upgrading my Asus Transformer Mini's BIOS to T102HAAS.303 suspend was completely broken. Closing the "lid" would cause some kind of suspend that cannot be disabled in software and from which Linux 4.15.0 cannot successfully resume from (actually it does resume but the display will stay blank).

This behaviour cannot be disabled in software by editing logind.conf or acpi-support or any of the solutions found on the web about disabling lid action. Messing about with acpi_osi didn't help either.

Downgrading from T102HAAS.303

If you are reading this after upgrading to T102HAAS.303 you probably want to downgrade. Unfortunately the firmware that ships with the computers, version 202, cannot be found on the Asus website. You can however find the 300 firmware if you click on "View all downloads" under the BIOS section. Download this file and put it on a FAT32 formatted USB drive then:

  1. Reboot, hold then ESC to enter Setup
  2. Find the Easy Update entry and press ENTER, starting the easy update program
  3. Navigate to your USB drive, it will be FS0 or FS1
  4. Locate the T102HAAS.303 file and press ENTER
  5. When the dialogue complains that the build date is too old type the word risky on the keyboard
  6. Select Yes on the dialogue that appears after
  7. Wait for the computer to reboot

The key to this process is the word risky which is an undocumented feature that by-passes the build date check, allowing you to downgrade. You just type this in when the error dialogue appears, there will be no text box or anything.

Re-enabling Hibernation

Downgrading will re-enable Secure Boot, which disables hibernation on Linux. Just disable it and hibernation will work again.

August 06, 2018

Ubuntu 18.04 on Asus Transformer Mini (T102H)


Create a USB drive with a single FAT32 partition then extract the installation ISO into it using 7z:

7z x /path/to/ISO -o/path/to/usb

Note that there is no space between -o and the following path.

Plug in the USB drive then turn on the T102H while pressing the ESC key. This will allow you to enter the settings menu and allow you to boot from USB. Select installation and follow the instructions until asked to reboot.

Xorg Setup

An immediate problem is that the display is portrait by default. Additionally the modesetting driver is used which has worse performance than the intel driver. Fix both of these issue by placing the following file in /usr/share/X11/xorg.conf.d/99-transformer.conf:

Section "Device"
 Identifier "i915"
 Driver "intel"
 Option "TearFree" "true"
 Option "DRI" "2"
 Option "Backlight" "intel_backlight"

Section "Screen"
 Identifier "Screen0"
 Monitor "BuiltInLCD"

Section "Monitor"
 Identifier "BuiltInLCD"
 Option "Rotate" "right"

Section "InputClass"
 Identifier "BuiltInTouchscreen"
 MatchProduct "ELAN22A6:00 04F3:22A6"
 Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1"

This sets the display driver to intel, rotates the monitor, and also transforms touchscreen inputs to match the landscape orientation.


To further improve performance place the following into /etc/modprobe.d/i915.conf
options i915 enable_fbc=1 enable_guc=3 enable_psr=1 disable_power_well=0 semaphores=1


Out of the box backlight doesn't work because of a module loading order issue [96571]. The easiest fix, found in the bug report thread, is to use dracut to remove the i915 module from initramfs so it loads after the PWM modules.

sudo apt install dracut
sudo dracut -f --omit-drivers="i915"
sudo update-grub

This issue may be fixed in a later release as the issue has been reported to Ubuntu.

After rebooting /sys/class/backlight/intel_backlight/ should exist, indicating that backlight control is available.

Keyboard Backlight Control

Unfortunately while we can now control the backlight using programs like xbacklight, the screen brightness keys (fn+F5 and fn+F6) don't work. We can get around this by binding control-F5 and control-F6 to trigger xbacklight -dec 20 and xbacklight -inc 20 respectively to decrement/increment screen brightness by 20% per keyboard press.

Airplane Mode

Similar to the backlight control buttons the airplane mode button also doesn't work. The following script uses rfkill to toggle bluetooth and wifi on/off, effectively implementing airplane mode in software. I haven't found a way to disable bluetooth and wifi in hardware.



n_devices="$(rfkill -n | wc -l)"
n_blocked="$(rfkill -n | grep -w blocked | wc -l)"

echo "$n_devices devices, $n_blocked blocked"

if [ "$n_blocked" == "$n_devices" ]; then
  rfkill unblock bluetooth wlan

  if [ "$BLUETOOTH_OFF_BY_DEFAULT" == "1" ]; then
    rfkill block bluetooth
  rfkill block bluetooth wlan

Power Saving

It is a good idea to install tlp to improve the running time


  • Script and keybindings to rotate the screen and touchscreen
  • Pressure level with the pen

April 28, 2016

IPython Notebook on GPS Timing and CDMA

In [1]:
%matplotlib inline

import matplotlib
import numpy as np
import matplotlib.pyplot as plt

GPS Timing

Carrier-phase detection is suppose to yield better timing information than tracking the pseudorandom code stream. The reason for this is supposedly that the higher frequency carrier allows for more accurate measurements of the mismatch between the generated pseduorandom code stream and the broadcasted one. This increase in accuracy comes from sharper peaks in the autocorrelation function.
Lets try this out:

In [2]:
def corr(npoints, repeat):
    A = np.random.randint(0, 2, npoints)
    A = np.repeat(A, repeat)

    xcor = np.correlate(A, A, mode='same')
    N = len(A)
    offvec = np.arange(0, N)-N/2
    print offvec.size, xcor.size
    plt.plot(offvec, xcor, 'x-')


# generate 5 points each repeating 20 times, a slow signal    

# a much faster signal

100 100
100 100

It is clear that if you were trying to figure out the sample delay, you are much better off with the faster signal because the it is very obvious when you have the timing right. With the slower signal, you can be a little wrong and still get within a few pc of the correct correlation value.

Code Division Multiplexing

Try out CDM for myself. It is important that -1,1 is used instead of 0,1 because multiplying by 0 is always 0.

In [3]:
def gen_code(N):
    Generatea a random array containing -1 and 1 of size N
    out = np.random.randint(0, 2, N)
    out *= 2
    out -= 1
    return out
def code_modulate(signal, stretch=5, carrier=None):
    signal = np.repeat(signal, stretch)
    if carrier is None:
        carrier = gen_code(len(signal))
    return np.multiply(signal, carrier), carrier

sig_1 = gen_code(100)
sig_2 = gen_code(100)

out_1, c_1 = code_modulate(sig_1)

# generate an orthogonal array by flipping every other element
c_2 = np.array(c_1)
c_2[::2] = -1*c_1[::2]
out_2, _ = code_modulate(sig_2, carrier=c_2)

out_comb = out_1 + out_2

def plot_sig(s, title=''):
    plt.ylim([min(s)-0.5, max(s)+0.5])
plot_sig(sig_1, 'sig_1')
plot_sig(sig_2, 'sig_2')
plot_sig(out_comb, 'combined output')

In [6]:
def code_demodulate(signal, carrier, stretch=5):
    y = np.multiply(signal, carrier)
    ysubs = np.split(y, len(y)/5)
    ysubs = map(sum, ysubs)
    ysubs = map(lambda x:max(-1, x), ysubs)
    ysubs = map(lambda x:min(1, x), ysubs)    
    return ysubs

x = code_demodulate(out_comb, c_1)
plot_sig(x, 'sig_1 recovered')
plot_sig(sig_1, 'sig_1 expected')

x = code_demodulate(out_comb, c_2)
plot_sig(x, 'sig_2 recovered')
plot_sig(sig_2, 'sig_2 expected')


In [ ]: