Setting up Linux Mint on an XMG P304

As mentioned, last week, I got a new toy.

Yesterday evening, it’s replacement Samsung EVO 840 mSATA SSD arrived. Since I’d already added a Crucial M550 SATA SSD, and installed Windows 8.1 on it, the Samsung mSATA SSD would get Linux Mint – probably the easiest to use Linux distro.

Getting started

I first (uncharacteristically of me) have a complaint about Mint’s installer. The default installation of Mint 17.1 (Rebecca) takes an entire disk, and allows you to encrypt it without much hassle. Great, you might say, and it is! Except that there is no way to specify which disk. When you’ve just spent a few hours installing Windows 8 & updates, then upgrading to 8.1 & updates… you don’t want to accidentally overwrite that junk.

In Mint’s defence, there is a dialog that pops up later that tells you exactly which disk is going to get nuked, but you have to make a leap of faith before seeing that by clicking the “Install Now” button.

I’ll post a feature request to Linux Mint’s community about this. I think they’re aware that the installer sometimes doesn’t give enough information for a user to tell exactly what it’s going to do.

Paranoid workaround

Because I’ve buggered up enough systems in my time, resulting in a certain paranoia about future buggeration, I physically removed the Crucial M550 SSD, then ran the Mint installation on the Samsung SSD, and re-added the Crucial drive.

So far so good.

Basic setup

I have a bunch of encrypted data stored on Dropbox. Usually, I get that first before proceeding with further installation steps. This time was no different:

This got me:

  • gparted (even though this is available on the Linux Mint live image, it does not get installed on the machine)
  • Dropbox UI client for Nemo
  • KeePassx, a password manager
  • Clam Antivirus & UI
  • A Graphical frontend for a firewall, and the firewall to go with it
  • A bunch of updates not provided by the GUI updater because it typically runs apt-get upgrade, not apt-get dist-upgrade
  • A gpg package for Python – Dropbox is implemented in Python, and needs this to validate its daemon which the UI client downloads

I launched the Dropbox UI from Mint’s menu and logged in, which prompted Dropbox to download the daemon & begin syncing.

While this was happening, I carried on with other steps.

A note on physics

Despite SSD algorithms and hardware improving, the fact remains that in order to write data to a region of SSD storage, the storage must first be discharged by being flashed by high frequency light. I think these days “high frequency” means ~UV frequencies. Certainly high enough to make E=hf generate a high value of E. Anyone who’s familiar with quantum physics will know that photons that are absorbed by a molecule’s electrons cause the electrons to move to a higher energy state. In the case of flash memory, the intention here is to allow the charge to leak away, resetting the memory for fresh charge configurations. However, having energetic electrons banging around in your molecular structure is not good for said structure. Flashing memory slowly causes the memory to deteriorate.

In short, SSD writes bad; SSD reads good.

Decreasing Swappiness

To reduce SSD writes because of swapping memory pages, the swappiness tendency can be reduced:

 Other signing in and setting up

I signed into Firefox sync and set up my Thunderbird mail client.

I used this note to figure out where Thunderbird put my profile information. I do this rarely enough that I never remember this. Turns out in this case, it was in

I copied my standard msFilterRules.dat  from Dropbox to my profile folder, to get all my message filters, then restarted Thunderbird.

I noticed that my folders could do with a clean out, so I looked for a solution. This came very quickly with wangvisual‘s Awesome Auto Archive plugin. I think it’s as awesome as it’s name suggests. This buzzed through my mail folders, deleting, archiving & generally cleaning up the junk that had accumulated there. Nice!


Even though this isn’t getting security patches any more, it’s the only encryption solution getting a full 3rd party public security review. Also, I have a bunch of stuff encrypted with it that I’d like access to. For this reason, I have a copy of the binary and it’s associated keys in storage.

The binary had downloaded from Dropbox by this time, so I verified the signature:

That checked out ok, so I installed Truecrypt, and opened my 509 certificate, and installed it to Thunderbird.

Additional messing around

As mentioned, I’ve broken a lot of systems. I wanted to back up what I had at this point, and I also found a USB drive with a broken file system ;).

 Further SSD optimization

Typically, every time a file is read, it’s access time is written. Writing to an SSD should be minimized. For this reason, this guide suggests turning off the access time writing behaviour.

 Trim the SSD

Trim the SSD at every login.

And turn the weekly trimming off, since it’s happening at every login.

Limit the write access of Firefox:

Firefox menu button>Preferences>Advanced Tab Network section “Cached Web Content”: tick Override automatic cache management and set the cache to 0 MB.

Install Thunderbird beta

There’s been a lot of development since Thunderbird 31, which, at the time of writing (22-08-2015) is still the version packaged with Trusty , and I don’t want to wait for it.

I first added the Thunderbird Next PPA using “Software Sources”. It’s ppa:mozillateam/thunderbird-next .

This gets me to v40.


If I have any complaints about my laptop, it’s the audio, or rather, it’s other people’s complaints about the audio. It is a little tinny.

This adds an equalizer, allowing me to take the edge off the tin.


This music manager is perfect for automatically (or manually) editing your music metadata.

Set Up Optimus

This is the subject of my next post.

Setup for Pioneer development

I did a little development while on holiday for a FOSS game I like, called Pioneer.

I wanted to carry on when I got back, so I set about creating a dev environment for it. Here are my notes on that.


First I got Eclipse.

Then I enabled C++ development using CDT.


Pioneer is heavily Lua-driven. Since I’d be doing a lot of editing in this scripting language, I went looking for a tool. The most mature one that I could find after a short search was Koneki Lua.

Getting the code

I cloned my fork of Pioneer into a directory named ‘pioneer’. This gave me a folder structure of ‘../pioneer/pioneer/…’. I could open the parent pioneer folder as an Eclipse workspace, leaving the files inside pioneer/pioneer unpolluted by Eclipse’s files.

Building the project

I ran




to set up the code project. Building was done from within Eclipse.

The project was imported into Eclipse as a makefile project (./configure generates a bunch of makefiles).

I used the following make command to spread build between my 4 cores, leaving one to handle everything else when a build is running:

make -j 3

This was set in Eclipse in Project>C/C++ Build>Builder Settings

Linux Mint setup

For my own reference, here’s what I’ve been doing recently:

I used Abhisek‘s excellent Guide To Install Linux Mint 16 in Dual Boot With Windows to set up a new Mint installation on the same HDD as a Windows 8 installation.

I then set up my usual packages and config:

 Then I installed

 And I got Truecrypt and Dropbox, then took

 from AMD’s download site.

Seems to work ok so far. No games used yet; fine for running an Android emulator though.

A bit of fine tuning to reduce the Grub wait to 2s in /boot/grub/grub.cfg, then reduced the swappiness using

reducing the swap tendency to:

After a reboot, this could be seen by:

 Update: DoW: Soulstorm was working with Wine 64 bit 1.7.15 in XP emulation mode; now it isn’t. Switching to W8 emulation… nope.

Very nice guide on reducing mouse pointer speed beyond that which is allowed by the UI:

In my case the device ID had to be used.