[ Content | Sidebar ]

Archives for July, 2009

Space cheese

July 30th, 2009

Rejoice! The cheese launched into space has successfully returned to Earth!!

Cheese! Cheese! Cheese on the moon!

UPDATE: Exciting news! El Reg are going to launch a balsa wood/paper plane into the upper atmosphere!

Another weather balloon space flight project by some students at Cambridge. How awesome is this?! I wonder how hard it would be to build my own…

Important sock-related developments

July 24th, 2009

For many years people have debated a great question: do socks come in left and right versions or are both socks the same? I have been much maligned for adhering to the heterogeneous sock philosophy. But recently NEW EVIDENCE has come to light! Behold!

Observe both socks are differently shaped!

Observe both socks are differently shaped!

Observe the LEFT and RIGHT markings!!!

Observe the LEFT and RIGHT markings!!!

Conclusive evidence! Sadly the manufacturer feels it necessary to label them as L and R since many people have forgotten a FUNDAMENTAL PROPERTY of socks.


July 18th, 2009

Went on an exploratory bike ride to the hitherto uncharted area south east of York. Discovered a village called Elvington. The route I went on had about a mile over a bumpy gravel/mud track which was not fun: my poor bum! Anyway, these are the things a real adventurer must go through when travelling out into the wilderness. Onwards!

Here are some things I saw:

Bridge over the river Derwent at Elvington

Bridge over the river Derwent at Elvington

The curch at Newton-upon-Derwent Sutton-upon-Derwent (thanks to Ade for pointing that out)

Nice sunset

July 13th, 2009

It was a really nice evening yesterday. Went up on the hill near my parents’ house to take some pictures. I think they came out quite well!

Linux on a Samsung Q320: Part 7

July 13th, 2009

Argh! Another problem! Over the last couple of days I’ve being trying to figure out why the brightness fn-keys on my laptop don’t seem to work: they either set the brightness to maximum-bright or maximum-dim. (Although they inexplicably sometimes work.) At first I thought it was a problem with my earlier HAL hackery, but this isn’t the case as the HAL brightness scripts work fine when not using the fn-keys.

After a while I discovered the problem was that some of the fn-keys weren’t sending key release events (easy to see in xev or with lshal -m). Turns out this is a problem with lots of laptop keyboards: look at the thousands of lines of hacks in drivers/input/keyboard/atkbd.c in the Linux kernel source. The good news is that this is easy to fix: the Q320 uses exactly the same scancodes as an earlier Samsung laptop. The bad news is that you have to compile your own kernel. Ho hum.

Apply this patch to a 2.6.30 kernel and rebuild. Voila! And the problem is gone!

--- drivers/input/keyboard/atkbd.c.old  2009-07-13 00:34:14.000000000 +0100
+++ drivers/input/keyboard/atkbd.c      2009-07-13 00:35:19.000000000 +0100
@@ -1550,6 +1550,15 @@
                .driver_data = atkbd_samsung_forced_release_keys,
+               .ident = "Samsung Q320/P320",
+               .matches = {
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Q320/P320"),
+               },
+               .callback = atkbd_setup_forced_release,
+               .driver_data = atkbd_samsung_forced_release_keys,
+       },
+       {
                .ident = "Samsung SQ45S70S",
                .matches = {

I found the DMI_PRODUCT_NAME using dmidecode if you were wondering.

Will test it for a few days and if nothing is borked maybe I shall try to get it merged into the kernel. It would certainly be annoying to have to compile my own kernel for every release.

Shutting down and rebooting via HAL

July 12th, 2009

You know how GNOME/KDE have “shutdown” and “reboot” buttons that normal users can use to turn off the computer? Rather than using sudo or making /sbin/shutdown setuid, they use HAL which provides a nice power management interface. Turns out this is pretty easy to call from the command line so you can use it in Fluxbox, etc.

The DBus object is /org/freedesktop/Hal/devices/computer which has lots of interesting methods including Shutdown(), Reboot(), and Suspend(). For example, you can reboot the computer using:

qdbus --system org.freedesktop.Hal /org/freedesktop/Hal/devices/computer \

This is using the qdbus tool which is distributed with QT. If you get permission errors you may have to configure PolicyKit to let you call this interface. Here’s my PolicyKit.conf which works for me on Arch Linux. (You’ll also need to add your user to the power group.)

Here’s a simple script to wrap this up: hal-power. Usage example: hal-power reboot to reboot the computer.

The Fish

July 11th, 2009

I first became aware of The Fish when I was a small child. At first it terrified me, but now I have come to admire its fishy nature. It is located at the Enterprise Centre in Eastbourne. You should visit it. Here are some photos:


And another one showing the fish in full:


Also, “modern” art is weird and a bit silly.

Linux on a Samsung Q320: Part 6

July 9th, 2009

I’ve been playing around with powertop trying to reduce power usage. I’m using laptop-mode to spin down the disk when its not needed (it automatically activates when on battery power). I’ve also added these two powertop suggestions to /etc/rc.local

# Reduce the frequency of disk flushes
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
# Turn off the SATA link whenever possible
echo min_power > /sys/class/scsi_host/host0/link_power_management_policy

I’ve also enabled CPU frequency scaling. If I dim the brightness, the laptop uses around 16W of power under light usage: amarok playing in the background and browsing the tubes. It guesses this will give around 3 hours battery life. Not sure if I can make it better…

Addictive game

July 9th, 2009

I wasted today playing UFO: Alien Invasion. It’s unusually polished for an open source game. The graphics are very nice, especially in the battle mode. The storyline is also quite engrossing and surprisingly well written – I like the non-linearity of it too. Recommended.

Going to stop now and do something useful like add scenery to Train Game.

Garden ponds

July 9th, 2009

Some interest has been expressed in the number of ponds we have in our garden. A comprehensive survey has revealed that there are just four. A fifth having been removed to make room for the garden train. Here they are:

This one is just a hole in the ground. Strange statue lady.

This one is just a hole in the ground. Strange statue lady.

Used to be the wood shed. Also should have a moving submarine but has been inexplicably removed...

Used to be the wood shed. Also should have a moving submarine but has been inexplicably removed...

This is the submarine. It has been temporarily replaced by Captain Cook's Endeavour

This is the submarine. It has been temporarily replaced by Captain Cook's Endeavour

The first pond. This used to be the coal shed.

The first pond. This used to be the coal shed.

And another concealed one.

And another concealed one.

I hope this answers all your pond-related queries.