Improving Ubuntu 12.10 Performance

Unity 2D was retired in Ubuntu 12.10. The new fallback desktop for low spec machines is Unity 3D with software rendering (the LLVM pipe). I’m do not know why anyone thought this would be a good idea as old machines without 3D capable video cards are somewhat unlikely to be powerful enough to perform 3D rendering on the CPU, but that’s for another day.

In order to make Ubuntu 12.10 work well in a VM, you need to ensure that the guest additions are installed and 3D rendering is enabled. This is trivial in VirtualBox, but there is a snag. You have to manually load the VirtualBox video driver. To do this, add `vboxvideo` without the quotes to /etc/modules. Restart the machine and everything feels faster.

Advertisements

Making Ubuntu default to using the USB sound card

The nVidia video card in my machine also gets registered as a sound card. There appears to be a high definition audio (HDA) chip on it that gets automatically detected and made default.

To get sound through my USB sound card, I’ve had to add the following to /etc/udev/rules.d/00_local.rules:

# Default to using additional (USB) sound cards when they are available.
KERNEL==”pcmC[D0-9cp]*”, ACTION==”add”, PROGRAM=”/bin/sh -c ‘K=%k; K=$${K#pcmC}; K=$${K%%D*}; echo defaults.ctl.card $$K > /etc/asound.conf; echo defaults.pcm.card $$K >>/etc/asound.conf'”
KERNEL==”pcmC[D0-9cp]*”, ACTION==”remove”, PROGRAM=”/bin/sh -c ‘echo defaults.ctl.card 0 > /etc/asound.conf; echo defaults.pcm.card 0 >>/etc/asound.conf'” 

Any new applications that launch will default to using the USB sound card.

Why can’t anything be simple?

nVidia driver on Ubuntu 12.04

For whatever reason, the “Additional Drivers” tool on Ubuntu refuses to install the binary nVidia driver on my machine. Thus I have to do it manually via the following commands.

sudo apt-get install nvidia-current-updates nvidia-settings-updates

 

Tightening Up EC2 Security

An EC2 instance is configured with very tight firewall rules out of the box, allowing access only to port 22 (SSH) and forcing you to log-in using your RSA private key. Nevertheless, I discovered that my instance was subject to a brute force attack from someone in the U.A.E.

They didn’t manage to log in, but it make me think of locking down my EC2 instance. The easiest thing to do is to install Fail2Ban

  1. sudo apt-get install fail2ban
  2. Edit /etc/fail2ban/jail.conf and modify the destemail line to point to your email address.
  3. Restart the fail2ban service. sudo service fail2ban restart

You could always tweak the parameters to your liking but I was satisfied with the default fail2ban parameters.