Archive for the author ·



DIY passive audio mixer

no comments

In previous posts, I’ve mentioned my TB-03 synthesizer and TR-8 drum machine. While both offer analog audio input and output to chain the sound, it gets tricky when trying to record since there are multiple volume nobs essentially daisy-chained. Adding even more devices breaks down the whole setup.

So I needed a simple audio mixer, and decided to put together something myself. The only requirement was to adjust the volume of the stereo out of each device, and mix it together into one signal. A simple solution adds a potentiometer on each input line (right and left), and combines each line down to one output. I used 10k ohm dual logarithmic rotary potentiometers (which I found at a local electronics shop – which means they’re probably quite old). The input and output connectors are all stereo mini-jack.

As the pictures show, it’s a simple small box, with four inputs, four rotary knobs, and one output. I liked the knobs, however, had wished they could be flush with the surface of the box. They were not made for the potentiometers I got, and it took some Dremel work to make them fit at all. The wiring got a bit messy, and combined dual or even three wire would have made it look better on the inside.

The mixer and volume adjustment work, however, I’m not sure if 10k ohm is enough to adjust the devices. It is not enough to mute the sound. This article suggest adding a 1k resistor in series, which I might try later. It would also be interesting to see at what resistance level the sound is completely muted. Other implementations connects the third pin of the potentiometer to ground from the input. In my box, all ground wires from all inputs and output are combined directly, which I’m not sure if is correct.

Oh, and as can be seen, there’s no scale to indicate the setting of each knob. These can all go to 11 if you like!

Hello World with Qt 5

Comments Off

Getting started with Qt development is rather easy. As with other C++ development discussed earlier, all tools and libraries are native in the Debian / Ubuntu repositories. The following packages should take care of the basic setup:

apt-get install gcc g++ gdb cmake make build-essential qtcreator qt5-default qtdeclarative5-dev qt5-doc qt5-doc-html qtbase5-doc-html qtbase5-examples

Once installed, this small “Hello World” example, inspired by this tutorial but updated for Qt 5, will verify that everything is setup correctly.

Notice that it is important that this file has the extension .cpp, e.g. helloworld.cpp.

#include <QtWidgets/QApplication>
#include <QtWidgets/QPushButton>

int main( int argc, char **argv ) {
  QApplication a( argc, argv );

  QPushButton hello( "Hello world!", 0 );
  hello.resize( 100, 30 );;
  return a.exec();

Once this file is in place, a Qt .pro project must be generated. (This should only be executed once, to generate the file).

qmake -project

It will create a file based on the name of the current directory, with the extension .pro. Edit the file to include the following two lines:

QT += core gui
QT += widgets

If backwards compatibility with older Qt versions is a concern, change the last line to:

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

Now, the application can be compiled and linked into a binary:

qmake && make && ./helloworld

It should generate a Makefile, make or compile the source code, and start the binary. If everything works out, a new application window with a small button like below will appear.

Comments Off

Review: “The New Tsar: The Rise and Reign of Vladimir Putin”, Steven Lee Myers

Comments Off

Lee Myers’ book is a fascinating and detailed biography of Putin’s life; from early childhood in a poor family in St. Petersburg; as a low level KGB officer; a loyal adviser of the St. Petersburg major Sobchak in the early 90s; and then suddenly and unexpectedly as first prime minister and then president of Russia at the turn of the century. The story includes detailed political and personal events up until the annexation of Crimea in 2014. Lee Myers balances the personal anecdotes, which give glimpses of Putin’s character, with overall political history and background. Throughout, all is very well researched and referenced, with the list of references taking up some fifty pages of a five hundred pages book.

Although some of the sources are clearly biased, as they come from stories told by Putin himself, his wife, or other loyal to Putin, Lee Myers paints a picture of Putin as extremely hard working, determined and goal oriented. Clearly, his unquestioning loyalty was something which got him forward in his early political career in the 1990s. Later on, and especially as president, he has expected the same unquestioning loyalty and servitude from his subordinates and even business interests. Where there has been opposition and resistance, it has been crushed decisively and sometimes brutally, including assassinations and other KGB style methods.

Putin’s upbringing and early life in Soviet Russia and background in the KGB, and also briefly as director of its reincarnation FSB, is a central part of his character, and still shapes his presidency and politics today. The US and the West is still seen as the enemy or at least opposition of Russia, and the politics and wars in Eastern Europe, Yugoslavia; Chechnya; Ukraine; Crimea, as well as the Middle East; Iraq; Afghanistan; Syria must be seen in this light. Thus it becomes clear why Russia is against the Americans in Syria: It is not to support Bashar al-Assad, but rather to avoid American forces on the footsteps of Russia, and furthermore to keep their naval base in the Mediterranean sea at Tartus at the east coast of Syria.

Lee Myers’ book ends in 2014, but hints at the next milestone in Russian politics: The upcoming presidential election in 2018, where Putin legally can sit a second term (which overall would be his fourth term). If he does, it means he will rule until 2024, since he extended the presidential term from four to six years while prime minister under Medvedev in 2011.

Most interesting

As mentioned, Lee Myers’ book is fascinating and a page turner, which is a good achievement when writing about politics. The blend between political and historical events, and personal anecdotes make it entertaining, and also something to quote. Personal favorites include the story from the business meeting between Putin and US business leaders, among them Robert Kraft, owner of the New England Patriots football team. He showed Putin his Super Bowl ring, who understood it as a gift, and put it in his pocket. Mr. Kraft was forced to announce it as a gift to avoid at diplomatic embarrassment.

Understanding Putin’s Russia goes a long way to explain many key world events and decisions over the last decades. Given that it looks like he will be at the head for another seven years, for almost quarter of a century in total, his reign will shape world affairs for decades to come.

Comments Off

C++ and gtest setup

Comments Off

The neat thing about C and C++ on Linux, is that it’s very much a native language. It means that compilers, tools and libraries are part of the core repositories, and easily installed. The following includes the basic setup to get started with C++ development.

apt-get install gcc g++ gdb cmake make libgtest-dev

Unit tests are great, and the Google Test (gtest) framework makes it straight forward to write and run. The gtest Debian / Ubuntu package requires a bit of manual installation as well, as described here. The crux of it:

cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make
sudo cp *.a /usr/lib

The following is a minimal example, which includes the test code and method under test in the same file for the sake of simplicity. Normally, the tests and code would of course be split.

#include "gtest/gtest.h"
int multiply(int a, int b) {
  return a * b;
TEST(HelloTest, Multiply) {
  EXPECT_EQ(2, multiply(1, 2));	
int main(int argc, char **argv) {
  testing::InitGoogleTest(&argc, argv);
  return RUN_ALL_TESTS();

To compile the code above, take care to include all required arguments. The default executable binary output is “a.out” (or use the -o option to set a custom name), which can be executed, and the test result output should show.

g++ -pthread hello_test.c -lgtest_main -lgtest

Comments Off

QNAP compatible encrypted disks

Comments Off

I’ve previously written about encryption on the QNAP TS-431P NAS and basic cryptsetup usage. Since then, encryption standards and defaults have changed, and it is now easy to create an external encrypted disk which cannot be mounted by a QNAP NAS. The following shows how to work around the issues with cipher and ext4 journaling settings.

The first issue has to do with the default cipher algorithms on Ubuntu and QNAP. As of Ubuntu 16.10, the default cipher is Advanced Encryption Standard (AES) in xts-plain64 mode with a SHA256 hash. The default and supported encryption on the QNAP NAS is also AES, using “128-bit block size, with key sizes of 128, 192 or 256 bits”. However, the supported mode is cbc-essiv:sha256 with hash spec SHA1, as with older Ubuntu and Debian distributions. When trying to decrypt the drive on the NAS, you might see errors like “Failed to setup dm-crypt key mapping for device /dev/sdc1. Check that kernel supports aes-xts-plain64 cipher (check syslog for more info)” and in /var/log/storage_lib.log an error like “crypt: IV mechanism required”.

It should be noted that this is most likely not an issue with volumes created by the NAS itself on its internal drives, unless you start moving drives from one NAS box to another, which is probably not recommended in the first place.

To see the supported ciphers, both on a normal GNU/Linux distribution and the QNAP, use the following commands:

cat /proc/crypto
cryptsetup --help

Also, to see the currently used cipher and LUKS formatted volume, use the luksDump command:

cryptsetup luksDump /dev/sdX1


If you start from scratch, it’s easy to work around the incompatibility. Follow the instructions in the cryptsetup basics article, but add the following options for cipher and hash function to the luksFormat command. Note that this will format and erase all data on the partition.

cryptsetup luksFormat --cipher aes-cbc-essiv:sha256 --hash sha1 /dev/sdX1

You might also consider ext3 over ext4, since the former seems better supported by the QNAP NAS at the time of writing. See below for further details.

Changing the cipher

If on the other hand, you discover the incompatibility a bit too late, and have already filled up the external disk with a lot of content, you’re not all out of luck. You’ll just have to decide which way you’d like to waste your time: You can transfer it all over to another disk, reformat, and then transfer back. It will take a few hours, and a bit of work. Or, you can change the encryption cipher on the existing volume, using the cryptsetup-reencrypt tool. However, you’ll probably have to wait multiple days while the whole disk is re-encrypted. On a 2 TB external disk over USB 2.0, it took about 35 hours to complete.

cryptsetup-reencrypt --cipher aes-cbc-essiv:sha256 --hash sha1 --key-file /tmp/keyfile --key-slot 0 /dev/sdX1

Notice that the command uses the same cipher and hash arguments above. However, it adds arguments for the key file to unlock the volume, and which key slot that file is linked to. This is necessary to avoid being asked about each and every password for each of the key slots. Of course, if you have only added a single password based key slot, these arguments can be skipped, and you’ll have to type the password once.

ext4 journaling compatibility

Once the encrypted volume can be opened, there might still be hurdles. The default settings for the ext4 journaling might also not be compatible with the QNAP NAS. At this point, I have to admit I lost interest in researching exactly what the cause was, and fired off multiple changes at once. The error when using the mount command was “mount: wrong fs type, bad option, bad superblock on /dev/mapper/sdc1, missing codepage or other error”.

The default features set from the Ubuntu 16.10 created ext4 formatted partition was:

dumpe2fs /dev/mapper/sdc1
Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum

The following commands removed a few of them, changed to 32 bits, finished with a check:

tune2fs -O ^huge_file /dev/mapper/sdc1
tune2fs -O ^dir_nlink /dev/mapper/sdc1
tune2fs -O ^extra_isize /dev/mapper/sdc1
tune2fs -O ^metadata_csum /dev/mapper/sdc1
e2fsck -f /dev/mapper/sdc1
tune2fs -O ^64bit /dev/mapper/sdc1
resize2fs -s /dev/mapper/sdc1

In the end, the following features remained, and the volume mounted.

Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file uninit_bg

Comments Off

Review: “Dreaming in Code”, Scott Rosenberg

Comments Off

What makes software so hard? Why does it take so long to develop? Why is it always late, always full of bugs, always over budget? In “Dreaming in Code” by Scott Rosenberg, he explores these questions from a historical perspective, and through anecdotes from the Open Source Applications Foundation (OSAF) project “Chandler“. The story of the Chandler project, founded and funded by Mitch Kapor in 2002, serves as an anchor to which Rosenberg attaches the history of software development and management. It turned out to be an interesting choice, since the Chandler project came without a deadline, with “unlimited” funding from Kapor’s pocket, and with very enthusiastic collaborators. Nevertheless, they hit the same hurdles as pretty much any large complex software project have, including being stuck in “software time”, communication overhead, planning and time estimate problems, delayed releases, and thousands of bugs.

Between the project anecdotes, Rosenberg surveys the software development and management literature, and gives a brief glimpse into its history. He frequently comes back to Fred Brooks’ “The Mythical Man-Month” and concludes that the communication overhead grows exponentially, even with today’s online always-connected tools. And there is still no silver bullet to solve it. He touches on various methodologies and processes, including the Capability Maturity Model (CMM); Team Software Process (TSP); Rapid Application Development (RAD); Agile Software Development; Extreme Programming. All of which were supposed to assist a software project and guarantee some kind of success, but which in the end come with their own short-comings and pitfalls.

Given that Chandler is already history, it is not a spoiler for the book to mention that the project failed. It was designed and planned as a native application, right before AJAX and Web 2.0 become buzzwords, and much of the functionality it tried to deliver have now been covered by large web services like Google’s Apps suite, Microsoft’s Office365 and similar. Still, there is plenty to learn from its story.

Learn from it

Rosenberg himself, as well as authors he quote lament the fact that many developers do not take the time to read and study their own profession and history. I have no basis to say whether this is holds or not, however, if it is the case, this book is a good entertaining pick. Despite its age, it is just as relevant today.

If you are or have ever been part of a software project, either as a developer, designer, tester or manager, this book will come with a lot of deja vu moments. Every team believes to some extent that their project, their company, or their goal is special. And because it is special, conventional rules and wisdom does not hold. Usually, history tends to get the last laugh as it repeats itself over and over.

Comments Off

Ubuntu 16.10 on Asus ZenBook UX330

Comments Off

As mentioned in a previous post, I recently got the Asus ZenBook UX330 (UX330CA-FC020T, to be specific). It’s a very light weight 14″ decent spec’ed laptop which runs Ubuntu flawlessly. Here are some notes on installing, and first impressions.

UEFI boot and install

As far as I’ve seen, there are at least two versions of the BIOS around for these machines: The display model had an “old fashioned” ASCII text based BIOS, while the one which got delivered had a new UEFI based GUI. Both can boot the Ubuntu 16.10 64-bit live image, but the Secure Boot just needs some tweaking.

Before getting to boot, it’s important that the partition of the USB stick which holds the image is marked as bootable. In GParted, this can be done with the option seen below. Once that is taken care of, transferring the ISO is easily done with UNetbootin.

Once ready, plug in the USB stick, restart the machine, and hold F2 to enter the BIOS / UEFI setup. (Holding ESC will show the temporary boot selection menu). The “easy” mode can be seen below.

From here, press F7 to enter “Advanced” mode, and use the arrow keys or mouse to tab over to the Security options. Towards the bottom of that tab, there’s a sub-menu for Secure Boot. Enter that menu, and disable Secure Boot.

Use F10 to save and exit, and got back into the UEFI setup with F2 to verify that the Ubuntu live portion shows up as “1100, Partition 1″. From here you can change the Boot settings to select the USB portion first, or use F8 to boot from that only once, which should be all you need to get the installation going.

Ubuntu compatibility

Here’s a list of features I’ve personally tried and confirmed to be working. In summary, this machine looks very well prepared for Ubuntu, with no major draw-backs. The only additional setup which might be worth-while is configuring the touchpad to temporarily disable while typing, as described here.

USB ports Work
SD card reader Works, mounts.
Wifi Detects all networks; connects.
Fast re-connect after suspend.
Bluetooth Not tried
Web cam Works with “Cheese”
Suspend Works; resumes quickly.
From Ubuntu menu, lid close, or Fn + F1
Flight mode
(Fn + F2)
Work, reconnects quickly.
Keyboard brightness
(Fn + F3/F4)
Screen brightness
(Fn + F5/F6)
External display
(Fn + F7/F8)
Not tried
Volume buttons
(Fn + F10/F11/F12)
CPU throttling Not tried


The UX330CA is a decent spec’ed laptop, and there’s a few variations should you want more power. Here’s the selection as it looks in early 2017, comparing to the slightly more expensive UX330UA line.

Price range €750 €930 – €1300
CPU Core M3-7Y30 1 (2.6) Ghz Core i5 7200U 2.5 (3.5) GHz -
Core i7 7500U 2.9 (3.5) GHz -
Max TDP 4.5 W 15 W
RAM 8 GB 8 / 16 GB
SSD 128 GB 256 / 512 GB
GPU Intel HD Graphics 615 Intel HD Graphics 620
Display 1920 x 1080 pixels; 13.30″
anti-glare; no-touch
1920 x 1080 pixels; 13.30″
anti-glare; no-touch
USB 2x USB 3.0 A
1x USB 3.1 C
2x USB 3.0 A
1x USB 3.1 C
SD card reader SD, SDHC, SDXC SD, SDHC, SDXC
RJ45 / LAN No,
comes with USB adapter.
comes with USB adapter.
3.5mm mini-jack 1x 1x
Web cam 1280 x 720 pixel 1368 x 768 pixel
Bluetooth version 4.1 4.1
Wifi version 802.11 ac 802.11 ac
Weight 1.20 kg 1.20 kg
Dimensions (W x L x H) 32.20 x 22.10 x 1.23 cm 32.20 x 22.10 x 1.35 cm
Comments Off

Review: “Amusing Ourselves to Death”, Neil Postman

Comments Off

In “Amusing Ourselves to Death” by Neil Postman, he warns against the perils of television as a communication channel for serious content, and explores why typographic media should be preferred over visual in public discourse, especially in politics, education and religion. He gives examples of how “the medium is the message”, that is, how the channel a message is sent through shapes the message itself. He worries that visual media, television in particular, transforms every message into entertainment, void of context, serious content, or troubling information. He references the fiction in the dystopian worlds of “1984″ and “Brave New World”, to point out “the possibility that Huxley, not Orwell, was right”. (The original foreword and the last chapter argues this eloquently). In other words, we are not suppressed by a surveillance state and dictatorship, but instead distracted by bread and circuses.

Postman’s argument has two main parts: The historical value and importance of the written word as a medium of communication for serious content and public discourse; and the distractions and lack of context in visual communication, especially with television tending to morph every message into brief bits of entertainment.

From typographic to visual media
In the first part of the book, he considers how politics in colonial and 19th century America was mostly conducted and presented through long public letters, or by today’s standards, very long public debates, stretching over many hours in front of local audiences. He is amazed by the attention-span the citizens at that time commanded, and how engaged they were in the politics and arguments of the various politicians. He claims many people at the time would have recognized famous politicians by their writing, but not necessarily by appearance, which is of course the opposite of today’s situation.

In further chapters, Postman looks at how first the telegraph and later the photography changed the media landscape, and how those media shaped the content they channeled through. He traces the beginning of the irrelevant and out-of-context news bits to the telegraph, where snippets from afar could awake as much emotion, if not insight, as local business and news. He continues with discussion about the photograph, and asserts that a picture contains no context but itself. Any additional context is from information surrounding it, or prior knowledge we inject into it.

The medium is the message
To illustrate how the medium shapes and constrains the message, he uses the example of smoke rings for communication: Although they can be used to send very brief messages, it is not possible to conduct a philosophical discussion through that medium. Similarly, Postman argues, television cannot be used to convey serious content, since the visual presentation demands most of the viewer’s attention, and the narration or discussion will tend towards short sound-bites. (As an example of this, look at a site like, which transcribes the audio of most of their short video clips. It is surprising how little text, read in 10 to 20 seconds, which goes with a minute of video).

In addition, most public television is of course funded by advertisement. This directly interrupts and distracts any and all programming, but also dictates the content. The message must be optimized to maximize the number of viewers, and thus eyeballs on their ads. The result can only be one thing: entertainment. Thus, whether the content is news, politics, education or religion, the viewer can never be allowed to get bored, challenged nor offended, lest he skips to another channel.


Postman’s book was first published in 1985. In the 2006 edition, his son, Andrew Postman, points out why his father’s book is even more relevant now. Today, we are surrounded by visual content and entertainment, through the Internet; mobile phones; computers; never-ending TV station streams. Had Neil lived to see our world, he would probably have been even more shocked than he was back then, when an actor was elected US president in 1980.

What makes the book so approachable and readable, is its timeless message about the relevance of the written word for serious communication. Thirty-two years ago, the strongest opposing force was television, while today the Internet brings the same visual entertainment to large parts of the Western population. In fact, the lack of context have gone even further, with services like Facebook, Instagram, Reddit centered around streams of completely random pictures of irrelevant content, often from people we hardly know.

Recent political communication has taken this to a sinister level, when messages are now tailor-made based on a user’s profile. As a result, we might vote for the same party and candidate, but based on different promises automatically designed to appeal to our emotions. The choice of policy is based on the entertainment value of the candidate, or whether he seems like a guy we’d like to sit down for a drink with.

Today, “Amusing Ourselves to Death” is a must-read.

Comments Off

How to disable the touchpad while typing

Comments Off

Most modern laptops come with a touchpad for cursor control. It is typically located below the space-bar, which means it’s easy to rest your palms on it while typing and send the cursor flying. There are two ways to get around the problem: Disable it altogether and use another pointing device, like the red “TrackPoint” or an external mouse; or temporarily turn it off while typing. Here’s how to do both.

First, make sure the these packages are installed:

apt-get install usbutils xinput xserver-xorg-input-synaptics

Permanently disable

Any input device can be configured through the xinput tool. However, as machine configurations will be different, we’ll need to look at what is connected first. This will list internal and connected devices:

xinput list

The first command will list connected USB devices, which might be relevant. The second command will output a list like the following, where each device has an ID, but which will change based on the machine and what is connected. The example below is from a Lenovo Thinkpad with an external mouse, so three hardware pointing devices are listed: The touchpad; the trackpoint; and the external Logitech mouse. Notice the ID for the touchpad, which is 12 here.

⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad              	id=12	[slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                   	id=13	[slave  pointer  (2)]
⎜   ↳ Logitech M570                           	id=9	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Video Bus                               	id=7	[slave  keyboard (3)]
    ↳ Sleep Button                            	id=8	[slave  keyboard (3)]
    ↳ Integrated Camera                       	id=10	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=11	[slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                  	id=14	[slave  keyboard (3)]

We can query details about a specific device:

xinput list-props 12
xinput list-props 12 | grep Enabled

There are two ways to enable and disable a device: By setting the “Device Enabled” property, or with the xinput command shortcut which does the same:

xinput set-prop 12 "Device Enabled" 0
xinput disable 12
xinput set-prop 12 "Device Enabled" 1
xinput enable 12

Temporarily turn off while typing

You might want to use the touchpad though, and only avoid the “fat fingers” problem while typing. Here the syndaemon tool comes to the rescue. It’s a “a program that monitors keyboard activity and disables the touchpad when the keyboard is being used”. It means, you’ll have to make sure it’s running in the background, typically through the start-scripts of your desktop.

There’s a few settings to play around with and also a CLI client “synclient“. See also the synaptics driver documentation for more options.

Having this in a startup script will cover most common use cases:

/usr/bin/syndaemon -i 1 -t -d

Comments Off

Linux compatible notebooks and laptops

Comments Off

You’d think that there would be a sizable market for a Linux based laptop, but Microsoft maintains its stronghold, and if anything it’s getting harder to buy random hardware and expect it to just work. Due to the UEFI bootloader; Secure Boot; various proprietary buttons solutions; touch screens; and no or little support from the hardware vendors. After doing a bit of research in small and mid-range notebooks and laptops that works with Linux, here’s a brief summary.

Most of the newer devices were evaluated with a USB live version of Ubuntu 16.10 64-bit.

(Disclaimer: This is not meant to be an exhaustive list of all available brands or Linux compatible devices. Please take it as a snapshot in time of the laptops which happened to be available in my local market. Also note, beyond being a consumer of some of the mentioned laptops, I’m not affiliated with any of them).


The Lenovo Thinkpad is still top of the line when it comes to business laptops. After using the Carbon X1 2016 4th generation edition for about half a year, it’s a sure all-time favorite. It’s available with Intel’s 7th generation Skylake CPU at various speeds, it does not get warm and uses little battery, which again makes for long battery life. A full working day without carrying a charger is usually not a problem.

Any Lenovo Thinkpad you’ll pick up will support Linux easily. It has a huge community and following, which means drivers, special buttons, sensors etc. get support quickly. The exception might be some of the more exotic variants of the Yoga Book (which run Android). In general, booting and installing any version of any GNU/Linux distribution is not a problem.

The downside is of course the price. At 1500 to 2500 Euros, it can be a tough pill to swallow if you’re buying new. However, there is also a healthy used-marked, so if you’re willing to wait a bit longer to get the latest tech, it’s a good compromise.


In hardware circles, ASUS is perhaps more famous for their high quality motherboards, but they also have a healthy range of laptops, many of which support Linux. I looked at a few models, with the ZenBook as the clear winner.

ZenBook UX330

These are nice! In fact, there’s a wide range of configurations colors and prices, most with 13.30″ full 1080HD screens, some with touch screens or larger screens. The cheapest version is now around €750 for an Intel m3-7Y30 dual core (4 threads). At only 4.5 W TDP, it does not get warm and is fan-less. It comes with 8 GB RAM and 128 GB SSD which is decent. Best of all, it’s only 1.3 kg, so just as light as the Lenovo Carbon.

There seems to be a few different BIOS versions on these models. The traditional text-based BIOS had no problems booting the Live USB. However, with the UEFI version, a bit of fiddling with Secure Boot and Boot Priority was required. Turning off Secure Boot and making sure USB partition was marked with a “boot” flag fixed it. (Spoiler alert: I’ll get back to this in a another post, as I already bought this machine).

Furthermore, on Ubuntu 16.10, everything works out of the box: Wifi; suspend; all function buttons: volume; screen dimming; flight mode; touch pad enable/disable. Battery life looks promising at around 10 hours.

The higher end versions, with i7 CPUs; 16 GB RAM; 256/512 GB SSD are probably the closest competitors to Lenovo’s light weight laptops at the moment. At about 25% lower price, they might certainly be worth considering.


The Eee line from a few years back were nice super-small “ultrabooks”, albeit somewhat under-powered by today’s standards. A more recent edition, the R105HA is a €240 2-in-1 11″ detachable table and keyboard. It has a USB A slot; it booted to the GRUB menu, but failed to load the Live UI. It could be that it’s not a x64 based CPU at all; not sure.


A bit further up the range, but at similar price there’s the E402SA. It’s a 14″ laptop, with full sized keyboard, but only 2 GB RAM and 32 GB SSD. Still not bad for €280. It booted the Ubuntu live stick fine. Wifi; volume buttons; suspend works. Screen dimming works, but not through the function-buttons. The main downside is the cheap keyboard, where the SPACE-key is hinged in the middle, so it might not register a thumb-click in its corners.


I’m not familiar with this brand, and it could be only a label on generic OEM devices of some kind. However, I thought it was worth including, since they had the cheapest smallest notebook I came across.

PNB C111

This is an 11″ but full 1080HD laptop with a tiny keyboard; think early Asus Eee. The €180 version comes with an Intel Celeron N3060 CPU; 2 GB RAM; 32 GB SSD. It is light, but feels plasticy. And as mentioned, the keyboard is cramped, even for small fingers.

It booted the Ubuntu 16.10 64-bit live image fine, and wifi; volume function keys and suspend all work out of the box. Screen dimming also works, but not through the function buttons (this seems to be a common problem).


HP and Dell

There were a few HP and Dell laptops in the shops I went to, but where I tried, none of them would boot the USB image. This could be down to bad luck; the Asus Zenbook was also difficult in UEFI mode, however, I’m not sure they are good options at higher prices than the Zenbook range.

System 76

This is one of the long time dedicated Ubuntu Linux hardware retailers. They don’t make their own hardware though, and instead merely put their name on OEM devices. The problem is, as much as I’d like to support a Linux hardware vendor, it comes at a very high price for mid-tier hardware. Of course, they put extra effort into making sure the drives are all available for their products, including keeping their own driver package repository running, but I’m not sure it’s worth it.

The version I have experience with and bought was the “Gazelle Professional” for some $1300. (New edition here). It works and has been running for five years, it’s nice, but extremely heavy even for its time. At some 4 kg with the charger, it can no longer be considered portable. The newer version in the picture above is the Lemur, at 1.6 kg and starting price of $700.

Comments Off

Asus Thinker Board

Comments Off

Asus recently released their single board computer “Thinker Board”, modeled on the same form-factor and pin layout as the Raspberry Pi 2 and 3, and at the same price point. It comes with some interesting upgrades over the RPi 3: 2 GB RAM (over 1 GB); 1.8 GHz quad core (over 1.2 GHz quad) dedicated Realtek 1 Gb/s Ethernet; Realtek audio codec; and support for 4k HDMI out. It could make both a good media player platform, as well as a usable desktop box.

In their early review, Hackaday laments the lack of website and community. The former has since been addressed, and Asus’ official site is actually rather slick fun and informative, and includes a Debian based OS ISO and other downloads. They have also put up a Facebook page, but it’s mostly linked product reviews and blog post for now.

Comments Off

Linus: Hash function as identifier vs. crypto security

Comments Off

Linus had an interesting observation last week, after it was announced that collisions could be found for the SHA1 hash algorithm. On the “Shattered” page, they declare that everything is broken, from cryptographic signatures to backup systems, and git. Linus however, refutes this, noting that the use of SHA1 in git is not for security, but rather as an identifier for the commit.

In fact, as is pointed out in the comments section of Linus’ post, git could probably have gone with a CRC 160-bit function (the default SHA1 is 160 bits). Or, if there was no need to relate the ID directly to the submitted code, an UUID would also have been fine.

The point is, security does not exist for itself, but rather as a reaction or mitigation to a threat. If the threat is cosmic rays or disk corruption, assuming no other intentional attack, and all that is required is to detect when there is a bit-flip, CRC, MD5, SHA1 are all fine alternatives. However, for dealing with encrypted messages, keys and signatures, other algorithms are needed. As for git, the biggest threat there is not bit-flips, accidental or malicious. Rather, it is the incorrect behaviour and functioning of the code in the repository. And for that, the solution is not hash functions, but unit tests. As Linus points out, you will definitely notice if characters and code is flipped around.

Comments Off

Expanding police and surveillance powers across Europe

Comments Off

In January, two interesting and thorough reports on expanding police and surveillance powers across Europe were published: Amnesty International published a 70 page report which summarizes its research into expanding police laws across EU and the troubling consequences to innocent citizens. It was followed up by an opinion piece in The Guardian by one of its authors, John Dalhuisen.

The second report was by Privacy International (original), and analysed the expanded surveillance and data retention powers in UK, Germany and France.

Each report paints a grim picture of the state of human rights and privacy across the EU. Overall a somber picture emerges: The liberty and freedom we have enjoyed over the last quarter of a century is eroding. Add to that the sweeping wind of right-wing nationalist politics across the continent, and the alarm bells should be ringing.

Too often, the counter-argument in this debate is “if you’ve got nothing to hide, you’ve got nothing to fear”, or the corollary “I’m too boring for the state to be interested in”. Glenn Greenwald does a good job of dispelling that argument in his book “No Place to Hide”. He points out that surveillance stifles self-expression, creativity and experimentation. On a state level, its very purpose is to hinder deviant and radical thought and action. As such, surveillance and lack of privacy is an obstacle to political and cultural progress.

Given that mass state surveillance harms us all, our individual relation with the state authority, and whether we personally feel we have anything to hide or not, is nonessential to the debate. It is irrelevant if you yourself is involved in politics, opposition groups, and protests. Surveillance harms everybody, depriving us of freedom, and hindering political, cultural, and human progress. It makes us complacent, unable or unwilling to question authority.

Dangerously disproportionate

In their report, titled “Dangerously disproportionate”, Amnesty International analyses events and laws passed in 2015 and 2016 in multiple EU member countries, including UK, Germany, France, Holland, Spain, Poland, Hungary and Austria. They look at new emergency powers; legality of laws and powers; the right to privacy; freedom of expression; right to liberty; freedom of movement; and stripping of nationality. In each section, Amnesty International specifically calls on EU member states to respect established Human Rights and the rule of law. They provide multiple examples from the various states where it is questionable whether the police and the executive branches have acted legally, against their countries laws or against basic human rights.

The report is well written, and comes with several insightful and well placed warnings. Amnesty International is ringing the alarm bells, and points out that the governments of Europe are now the biggest threats to their own nations and freedom of their people:

“Ultimately, however, the threat to the life of a nation – to social cohesion, to the functioning of democratic institutions, to respect for human rights and the rule of law – does not come from the isolated acts of a violent criminal fringe (…), but from governments and societies that are prepared to abandon their own values in confronting them.”

Terms like “the enemy” and “terrorism” have always been deliberately vague. This is now causing real problems when such vague and undefined terms are used as part of laws:

Because there is no universally agreed definition of “terrorism” under international law, states and international bodies have created their own. In that process, over the years, definitions of terrorism have become ever more vague and overly broad. This lack of clarity in many counter-terrorism laws has led, in turn, to a lack of certainty regarding what precisely constitutes an act of terrorism. If people can’t tell whether their conduct would amount to a crime, they cannot adjust their behaviour to avoid criminality. The consequences can be significant, ranging from the profiling of members of certain groups thought to be more inclined toward “radicalization”, “extremism”, or criminality based on stereotypes – i.e. guilt by association – to the outright misuse by states of laws that define terrorism loosely to deliberately target political opponents, human rights defenders, journalists, environmental activists, artists, and labour leaders.

Mass surveillance is still illegal and against Human Rights:

Any communications surveillance measure used must be strictly necessary and, to the extent that it interferes with people’s rights, must be proportionate in the particular circumstances of each case. The cornerstone of lawful communications surveillance is that it is individualized and based on reasonable suspicion of wrongdoing.

Indiscriminate mass surveillance, in effect a fishing expedition and “just-in-case” retention of people’s communications and data, is the antithesis of this. States may refer to indiscriminate mass surveillance practices by other names – “bulk” rather than “mass”, “collection” or “interception” rather than “surveillance” – but linguistic gymnastics do not make the practices conform to human rights standards.

When laws are vaguely defined and the state can monitor everybody all the time, this is causing a chilling effect on freedom of speech, thought and expression. Simply clicking on the wrong link can be enough to land somebody in trouble. The report points out how musicians and other artists have already been the target of discrimination and “terrorist” laws.

The right to freedom of expression has been under direct and sustained assault across Europe in recent years. Measures that seek to curb speech and other forms of expression, taken cumulatively, reflect a landscape where freedom to access information, offer opinions, exchange ideas, and engage in robust and challenging debate – publicly or online – is in rapid decline. The risk that a person could be labelled a security threat or “extremist” has had very real consequences for some people as the examples below illustrate, while the “chilling effect” that such measures creates has left the public space for free expression smaller and more impoverished than it has been in decades.

Finally, the report discusses freedom of movement, and the dangerous trend towards “preventive measures” and “pre-crime” initiatives without the rule of law:

Indeed the extent of the remove can be seen from the fact that states are criminalizing not just the preparatory act of travelling abroad with the purpose of committing a terrorist offence, but also acts preparatory to the preparatory act of travelling abroad with this purpose. The problem here is that acts such as browsing “extremist” websites and looking up the price of flights to Istanbul can all render people liable to prosecution, long before individuals may have made up their minds to commit a terrorist offence, or without their ever even having contemplated it in the first place.

Mass Surveillance in Europe

The Privacy International report is shorter, but just as interesting and worrying. It covers the British “Snoopers Charter” or Investigatory Powers Act (IPA); the German Communications Intelligence Gathering Act (“Ausland-Fernmeldeaufklärung des Bundes-nachrichtendienstes”); and the French International Electronic Communications Law (“mesures de surveillance des communications électroniques internationales”). For each law, the authorized powers, oversight, and power over privileged communication is examined.

Although the terrorist attacks in these countries over the last years are driving forces, many of the laws being passed now seems to have at least some relation to the EU Data Retention Directive, issued a decade ago, in 2006. Although that was annulled by the EU Court of Justice in 2014 for “violating fundamental rights”. Still, similar and broader laws are now in place in many EU member states.

The report concludes:

The leaders of Germany, France and the UK are setting a dangerous precedent which echoes within the European Community and far beyond it: Mass surveillance by governments has become the new normal.

No sanctuary in Switzerland?

Upon till recently, Switzerland was a sanctuary of privacy and secrecy of private information and financial information. The latter was shattered a few years back, when the US threatened to throw out the Swiss banks if they did not disclose account details on what US citizens held. The former came under attack in 2015 and 2016 when two separate data retention and surveillance laws were enacted and passed. The BÜPF – “Überwachung des Post und Fernmeldeverkehrs” (“Monitoring of post and telecommunications”) and the NDG – “Nachrichtendienstgesetz”, an extension to the existing national intelligence law. There’s a discussion of both here, and more details by ProtonMail.

The laws call for all communication channels and services to retain certain metadata about the communication for a year, which apparently includes any open wifi hotspots; IRC chat rooms; email and chat services; message boards and so on. Again, similar laws which were declared illegal for violating fundamental rights by EU Court of Justice in 2014 have become national law. Furthermore, the laws make state hacking and wiretapping legal.

Even though Switzerland is neutral, they maintain close ties to the US, including data sharing agreements through the Privacy Shield Framework, like the other EU countries. (The double-speak has really gone far when “privacy shield” is a name for business and government information sharing). Furthermore, regarding financial details, Switzerland is taking part in the Automatic exchange of information (AEOI) program, under the guise of detecting tax evasion.

An interesting note about the “Nachrichtendienstgesetz” extension is that it met strong resistance, and ProtonMail were amongst activists who gathered enough signatures for the 2015 proposal to go through a national referendum, as is required in Switzerland. The only problem: they lost. On 25 September 2016, the vast majority at 65.5% voted in favour of the law. Although only about 43% of eligible voters cast their vote, the outcome was similar across all cantons, and therefore we must assume representative of the opinion of the population as a whole. It goes to show, that even in Switzerland when the choice stands between privacy and security, people will give up their privacy.

Comments Off

808 documentary

Comments Off

As a follow-up to the TR-8 post, here’s an interesting and entertaining documentary about the original drum machine TR-808. Featuring plenty of colorful characters, from Afrika Bambaataa with a knife as a hairpin to Goldie with his mouth full of gold, it’s a fun watch. There’s other famous artists as well, including Norman Cook (aka. Fatboy Slim); Phil Collins; Felix Da Housecat; Tiga; Armand Van Helden and many more.


Comments Off

Roland TR-8: Techno beats!

Comments Off

The Roland TR-8 drum machine is the prefect complement to the TB-03 synthesizer. In the TR-8, you can find the old school beats of the TR-808 and TR-909, plus more. There’s a smooth heavy bass drum; a snare; toms; claps; hiats; and cymbals. The ride-cymbal in particular gives a nice spacey sound when used in combination with some delay, and perhaps one of the scatter effects.

There are multiple input and output options, including analog connectors, MIDI and USB. The TR-8 syncs fine over MIDI with the TR-03, as slave or master. However, I was surprised to find that connecting the USB to an old computer did not go so well; it somehow interferes with the clock, so notes are skipping, even when nothing is connecting to MIDI nor audio on the computer.

Roland has a somewhat cheesy tutorial here, while this guys talks about the “hidden” features in the “boot mode”.

Finally, my own MIDI monitor is starting to come along, and can now understand both TB-03 and TR-8 messages, including all special controllers. The PatternHistory is already useful to see which notes and patterns are playing. So far only one instrument at a time is supported, but more is coming.

Comments Off