Tag Archives: Linux

Brother Scanner not Found on Linux Mint 18.1 and Ubuntu 16.04 – Fixed!

I’ve previously posted about my Brother MFC-7840N printing slowly, but since then Brother updated their driver package for Linux and everything was going quite smoothly. Unfortunately, after I upgraded from Linux Mint 17.3 to Linux Mint 18.1 today, the Brother Linux drivers failed to activate the scanner. When I started XSane it said there was no scanner found.

After a lot of re-installing of drivers and scanner configurations I found the problem was simply some missing files. It seems sane must be looking for information in the standard directories and not where the 64-bit libraries are.

Anyway, here are the commands to run to make your Brother scanner work with Linux Mint and Ubuntu.

sudo mkdir /usr/lib/sane
sudo ln -s /usr/lib64/sane/libsane-brother3.so /usr/lib/sane/libsane-brother3.so
sudo ln -s /usr/lib64/sane/libsane-brother3.so.1 /usr/lib/sane/libsane-brother3.so.1
sudo ln -s /usr/lib64/sane/libsane-brother3.so.1.0.7 /usr/lib/sane/libsane-brother3.so.1.0.7
sudo ln -s /usr/lib64/libbrscandec3.so /usr/lib/libbrscandec3.so
sudo ln -s /usr/lib64/libbrscandec3.so.1 /usr/lib/libbrscandec3.so.1
sudo ln -s /usr/lib64/libbrscandec3.so.1.0.0 /usr/lib/libbrscandec3.so.1.0.0

If you are already logged in as root (naughty you!) then just use the same commands without sudo.

mkdir /usr/lib/sane
ln -s /usr/lib64/sane/libsane-brother3.so /usr/lib/sane/libsane-brother3.so
ln -s /usr/lib64/sane/libsane-brother3.so.1 /usr/lib/sane/libsane-brother3.so.1
ln -s /usr/lib64/sane/libsane-brother3.so.1.0.7 /usr/lib/sane/libsane-brother3.so.1.0.7
ln -s /usr/lib64/libbrscandec3.so /usr/lib/libbrscandec3.so
ln -s /usr/lib64/libbrscandec3.so.1 /usr/lib/libbrscandec3.so.1
ln -s /usr/lib64/libbrscandec3.so.1.0.0 /usr/lib/libbrscandec3.so.1.0.0

Hopefully this post saves some time for a few people and will remind me what to do when I hit the same problem with my Brother MFC-7840N scanner not being found!

Brother Laser Printers – Slow Printing on Linux

I’ve had my Brother MFC-7840N print very slowly each time I update my Linux Mint system to the latest release and configure the printer. Instead of trying to hit my head against the wall repeatedly I’ve decided it’s time to put the solution on my blog to help me and hopefully you the next time it happens.

The Brother drivers from the Brother website involve a bit of messing around to get everything installed with specific pre-requisites for different Linux distributions and a few files to download and install, especially if you are enabling scanning too. That’s not too bad, as the documentation is reasonably straight forward to follow and, hey, it’s better than no support!

The problem arises when you go through the process and select one of the drivers already provided in the Linux Mint distribution. The drivers do work, but they are painfully slow.

Here is what you probably saw when adding the printer in CUPS.

Brother Printer Driver Selection - Slow

If you were like me, you decided that one of those drivers with the right model name looks pretty good and you click on that. However, what you should have done is scrolled further down until you saw the following driver:


Once you have selected the above CUPS driver and finished the “adding a printer” process you should get something that looks like this in CUPS:


I don’t know why there are two drivers that look the same, but I just selected the first driver and it worked like a charm.

I’ve seen plenty of posts on forums about slow printing with Brother printers, but none seemed to point to this rather simple answer. Hopefully you have found this useful and now have your printer zooming along at full speed. If this post has helped you, please drop a comment below and tell everyone else what printer model you have so they know the same process will work for them.

Adding Swap Space to an AWS EC2 Micro Instance

I recently moved some of the WordPress sites on an EC2 m1.small instance in Amazon Web Services (AWS) Singapore data centre to a m1.micro instance in the new Sydney data centre. Unfortunately the new t1.micro instance has run out of memory a couple of times, resulting in the websites being unavailable. After I was notified I had to find out what process/service was killed and restart it.

To stop this happening I could either upgrade to a m1.small instance with 1.7 GiB instead of the 613 MiB, or I could add swap space to the existing server.

I decided to try and save some money by adding swap space to my existing server. There are two main options to do this:

  1. Create an EBS volume and dedicate it to swap space.
  2. Create a swap file on the existing file system (also an EBS volume if you are using an EBS based AMI).

If you decide to add an EBS volume then the smallest size is 1 GB, for which you will have to pay the prevailing monthly rate in the AWS region of your instance. Make sure you put the EBS volume in the same availability zone as your instance or you will not be able to attach it! You will also be charged the I/O costs as data is written to and from the swap space.

With a swap file you only get charged the I/O costs, since you are already paying for the empty space. I still had quite a bit of space available and thought that 512 MB of swap space would be sufficient, so I chose this method.

I’ll describe what I did first and then outline the option using a dedicated EBS volume.

Adding a Swap File

First of I needed to decide where to put the swap file and what to call it. I chose /mnt/swap_512.swap and created it with the following command:

dd if=/dev/zero of=/mnt/swap_512.swap bs=1M count=512

Next I needed to let Linux prepare the file for use as a swap file by using the mkswap command:

mkswap /mnt/swap_512.swap

Finally, I activated the swap file with the swapon command:

swapon /mnt/swap_512.swap

You can check to see if your swap file is being used with top or free. Here is the output from free on my machine:

             total       used       free     shared    buffers     cached
Mem:        615664     592288      23376          0       8548     144448
-/+ buffers/cache:     439292     176372
Swap:       524284        348     523936

You should edit your /etc/fstab file to add the swap file information so that it is available if you restart the instance. This is what my fstab looks like on my t1.micro instance:

LABEL=/     /           ext4    defaults,noatime  1   1
tmpfs       /dev/shm    tmpfs   defaults        0   0
devpts      /dev/pts    devpts  gid=5,mode=620  0   0
sysfs       /sys        sysfs   defaults        0   0
proc        /proc       proc    defaults        0   0
/dev/sdf    /u01        ext4    defaults        0   0
/mnt/swap_512.swap swap swap    defaults        0   0

Note that I have another EBS volume attached for backup purposes that is mounted at /u01.

Adding a Dedicated EBS Volume for Swap Space

First you’ll need to create a new EBS volume in the same region and availability zone as your t1.micro instance. The smallest size is 1GB, which should be more than enough for your swap space.

Once the volume is available you need to attach it to your instance and then note the device so that you can refer to it later. For example, my backup volume is /dev/xvdf with a link to that called /dev/sdf.

There is no need to create the file like the previous example, so you can go straight to preparing the device for use as swap space with the following command:

mkswap -f /dev/xvdf

The -f will force the use of the whole disk, which is what you want.

You can then activate the swap space with:

swapon /dev/xvdf

Again you should edit your /etc/fstab to make sure the swap space is available upon a reboot. Just use my example above, replacing the /mnt/swap_512.swap with /dev/xvdf or your assigned device.


Adding swap space to your AWS EC2 micro instance is quite a simple process that can bring much needed stability (random process kills to keep the machine running are not fun). It can also give you time to catch a memory hogging process before it brings the machine to a halt. However, you do need to monitor your swap usage. If you find that your system is constantly reading and writing to swap then your system’s response time can slow down dramatically. In this case you are truly memory bound and need to upgrade to an m1.small instance.