Jan 17
Free Software I've had a Logitech QuickCam Pro 9000 for some time now, and it works well, but I did have one bizarre problem with it when I used it with my main desktop machine (running Debian (Sid)). Namely, that if I had the camera plugged in (usb) at boot time the sound on the computer did not work, if you plugged it in after boot, everything was fine.

This was pretty irritating because if I forgot I would often have dozens of windows open and ready for work before I realised.

Normally this happens because the cards are loaded in the wrong sequence by udev. But, if you listed the sound cards with

cat /proc/asound/cards
 
the main card wasn't just in the wrong order, it simply wasn't there. I tried comparing modules loaded with and without the camera (at boot) and manually loading the differences, but this did not help. I tried forcing the index to be zero on the correct card, but this also did not help.

In the end, I made the following edit to /etc/modprobe.d/alsa-base.conf

# Keep USB (webcam from being loaded as first card)
options snd_usb_audio index=-2
 
and this did the trick. So if like me you were searching for the answer to this, I hope it helps.

Posted by Colin Turner

Defined tags for this entry: ,
Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at del.icio.us Digg Boot time sound problems with QuickCam Pro 9000 webcam Mixx Boot time sound problems with QuickCam Pro 9000 webcam Bloglines Boot time sound problems with QuickCam Pro 9000 webcam Technorati Boot time sound problems with QuickCam Pro 9000 webcam Fark this: Boot time sound problems with QuickCam Pro 9000 webcam Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at YahooMyWeb Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at Furl.net Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at reddit.com Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at blinklist.com Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at Spurl.net Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at NewsVine Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at Simpy.com Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at blogmarks Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  with wists Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!
Jan 1
Michael stands in the rain, as drops fall from his brow to the ground,
He waits patiently, his steel grey eyes surveying his battlefield,
It is a strange one, strewn with grass and flowers and many a mound,
And rank and file of stones each entreating that He should yield.

Scattered here and there, his kinfolk stand, but none as Michael.
He is the soldier, with breastplate and shield, and sword by his side,
Not drawn since he came to be here; he stands as a stoic sentinel,
Patient, benevolent, the fire in his spirit not worn with boastful pride.

Michael stands in the rain, as he has stood in the blistering Sun,
And when stars wheel above him; when snow coated, but not numb,
Rather with exultant wings renewed, he stands vigilant for the One.
Waiting for his ancient foe, the firstborn seraph, who does not come.

Posted by Colin Turner

Bookmark Michael  at del.icio.us Digg Michael Mixx Michael Bloglines Michael Technorati Michael Fark this: Michael Bookmark Michael  at YahooMyWeb Bookmark Michael  at Furl.net Bookmark Michael  at reddit.com Bookmark Michael  at blinklist.com Bookmark Michael  at Spurl.net Bookmark Michael  at NewsVine Bookmark Michael  at Simpy.com Bookmark Michael  at blogmarks Bookmark Michael  with wists Bookmark Michael  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!
Dec 31
Free Software I use client side virtual folders a bit for my mail. Specifically, I tag messages with IMAP flags like todo and important, and then in Icedove / Thunderbird, I set up a special folder as a saved search which shows message that are either unseen, or marked todo in my inbox. It works rather well, and I use the same set-up on my laptop, and work and home desktop machines.

But it's not very useful on my phone, which doesn't allow such sophisticated client side behaviour. My phone mail applications shows the most recent 25 messages in a folder, but there are times when it would be really useful to look up messages that are labeled as important but rather old. It would be time consuming to look through the older messages, and difficult to find the one I want anyway.

As a result, I've been looking at the possibility of using virtual server side folders using dovecot on my Debian mail server. I was put off by the documentation which left a lot of questions unanswered.

Here's how I did it on Debian. First of all edit the config file /etc/dovecot/dovecot.conf, back up this file first, so you can restore working behaviour if something goes wrong.

#
# You have to add the default namespace
# which is normally NOT added explicitly before
#
namespace private {
  prefix =
  separator = /
  # the next line is very specific to where you keep your mail
  location = mbox:~/Mail/:INBOX=/var/mail/%u
  list = yes
  inbox = yes
  subscriptions = yes
  hidden = no
}

#
# Then add the virtual namespace
#
namespace private {
    prefix = virtual/
    separator = /
    # pick where the virtual folders will be
    location = virtual:~/Mail/virtual
    list = yes
    inbox = no
    subscriptions = yes
    hidden = no
}
 


You must also add the virtual folder plugin.

##
## IMAP specific settings
##

protocol imap {

  # ... you need to enable the plugin
  mail_plugins = virtual
 


Now restart dovecot and check your normal folders are working.

/etc/init.d/dovecot restart
 
Note that I found dovecot will generally not serve physical folders correctly if the virtual mail folder (even if empty) does not exist. I consider this a bug, but one that needs to be worked around, at least for me.

If that's all done and working you can begin to create virtual folders. I created two directories within my ~/Mail/virtual folders; which were inbox-todo and inbox-important respectively. Inside each I put the following files.


# ~/Mail/virtual/inbox-todo/dovecot-virtual
INBOX
  OR (OR (OR KEYWORD $TODO KEYWORD todo) KEYWORD $label4) unseen
 
which shows all unseen and mail labelled todo in my inbox and

# ~/Mail/virtual/inbox-important/dovecot-virtual
INBOX
  OR (OR KEYWORD $IMPORTANT KEYWORD important) KEYWORD $label1
 
which shows only important mail in my inbox.

It seems to be working, my normal folders appear to be working perfectly correctly (but I'll know better in a couple more hours/days); my phone has successfully subscribed to the two virtual folders, though the folder list shows a number of files which I'm certain it should not, again, this looks like a dovecot bug to be honest.

Posted by Colin Turner

Defined tags for this entry: , , ,
Bookmark Virtual folders with Dovecot and Debian  at del.icio.us Digg Virtual folders with Dovecot and Debian Mixx Virtual folders with Dovecot and Debian Bloglines Virtual folders with Dovecot and Debian Technorati Virtual folders with Dovecot and Debian Fark this: Virtual folders with Dovecot and Debian Bookmark Virtual folders with Dovecot and Debian  at YahooMyWeb Bookmark Virtual folders with Dovecot and Debian  at Furl.net Bookmark Virtual folders with Dovecot and Debian  at reddit.com Bookmark Virtual folders with Dovecot and Debian  at blinklist.com Bookmark Virtual folders with Dovecot and Debian  at Spurl.net Bookmark Virtual folders with Dovecot and Debian  at NewsVine Bookmark Virtual folders with Dovecot and Debian  at Simpy.com Bookmark Virtual folders with Dovecot and Debian  at blogmarks Bookmark Virtual folders with Dovecot and Debian  with wists Bookmark Virtual folders with Dovecot and Debian  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!
Dec 22
hardware I had noted before that my accelerometer had broken on my Android g1 phone, so that one axis was out by about 40 degrees. Despite lots of "helpful" suggestions from my friends on how to fix it (you know who you are), nothing worked. This did.

Connect to the phone with adb (from the Android SDK), in the following way.


./adb start-server
./adb shell
# cd /data/misc/
# mv amkd_set.txt amkd_old.txt
# killall amkd
 
Now it works.

Posted by Colin Turner

Defined tags for this entry: , ,
Bookmark Fixing g1 Accelerometer  at del.icio.us Digg Fixing g1 Accelerometer Mixx Fixing g1 Accelerometer Bloglines Fixing g1 Accelerometer Technorati Fixing g1 Accelerometer Fark this: Fixing g1 Accelerometer Bookmark Fixing g1 Accelerometer  at YahooMyWeb Bookmark Fixing g1 Accelerometer  at Furl.net Bookmark Fixing g1 Accelerometer  at reddit.com Bookmark Fixing g1 Accelerometer  at blinklist.com Bookmark Fixing g1 Accelerometer  at Spurl.net Bookmark Fixing g1 Accelerometer  at NewsVine Bookmark Fixing g1 Accelerometer  at Simpy.com Bookmark Fixing g1 Accelerometer  at blogmarks Bookmark Fixing g1 Accelerometer  with wists Bookmark Fixing g1 Accelerometer  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!
Dec 15
Free Software hardware I've had my Google development phone, the g1, for some time now. I haven't had the luxury of time to write anything for it, but I mainly wanted it to try out Android anyway. I've reviewed the phone before, and again after some canonical firmware upgrades.

I use the truly excellent K9 application for mail, it has good support for self signed certificates, now has IMAP push support and is generally excellent. However, it stores all the mail on the shockingly limited internal memory on the device. That, and upgrades to things like Google Maps, adding truly excellent new functionality, left me constantly looking for applications to remove.

This is why in the end I decided to try Cyanogen's ROMs. Since I have a development phone, I didn't need to root it, and just followed the relevant instructions (in truth, I couldn't be bothered to downgrade the OS to root it first).

Here are some observations about the new ROM:

  • Apps2sd is amazing.
    I have the whole pleasure of trying different apps all over again, without sweating about every byte. I don't have to worry about how much data is in my contacts (whether I assign them icons), my emails, and so on. I have plenty of room. I was delighted to be able to install DocumentsToGo. Which makes the phone much more useful for work emails. Loads of great apps I had to remove have been reinstated, and I can play with others, like the awesome Google Googles.
  • Extra workspaces
    There are five workspaces, making for more widget playroom. I now have a calendar app taking up a whole workspace with the events to come. Excellent.
  • It fixes several problems I had with MMS functionality.
    • It fakes a variety of user agents, meaning that a test video message I sent myself on o2 finally worked, for the first time ever.
    • The stock ROM allows you to prevent data access when roaming, which is good. But it also doesn't fetch MMS when roaming, which is (for me) a nuisance, and these are usually on a different tariff system. So when you receive an MMS on roaming, you end up enabling all data access to quickly receive the MMS, and then turn it off again. The Cyanogen ROM has an option to retrieve MMS on roaming.
  • UI feels snappier
  • USB tethering
    can be enabled, which JustWorks (TM) with Debian. Excellent.
On the downside, I have had some reset problems, but admittedly I have sometimes been pushing the phone very hard indeed to test it. And the battery life on the g1 is still awful. I know Noodles has solved the problem by not actually using his phone :-), but I want to use mine.

Another minor problem I encountered some weeks ago was the accelerometer suddenly starting serious misreporting on one axis. This problem seems to be becoming less severe, but even reinstalling the stock and then cyanogen ROM did not fix it. However, note I did not wipe the user data.

Cyanogen has made my phone fun to have again. And I will still replace it when a new Android handset comes out that I really like, but a lot of the urgency has gone. I'll certainly buy him a beer for Christmas.

Posted by Colin Turner

Defined tags for this entry: , , , , , ,
Bookmark Cyanogen Android ROM on the g1  at del.icio.us Digg Cyanogen Android ROM on the g1 Mixx Cyanogen Android ROM on the g1 Bloglines Cyanogen Android ROM on the g1 Technorati Cyanogen Android ROM on the g1 Fark this: Cyanogen Android ROM on the g1 Bookmark Cyanogen Android ROM on the g1  at YahooMyWeb Bookmark Cyanogen Android ROM on the g1  at Furl.net Bookmark Cyanogen Android ROM on the g1  at reddit.com Bookmark Cyanogen Android ROM on the g1  at blinklist.com Bookmark Cyanogen Android ROM on the g1  at Spurl.net Bookmark Cyanogen Android ROM on the g1  at NewsVine Bookmark Cyanogen Android ROM on the g1  at Simpy.com Bookmark Cyanogen Android ROM on the g1  at blogmarks Bookmark Cyanogen Android ROM on the g1  with wists Bookmark Cyanogen Android ROM on the g1  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!
Nov 15
STEM Last week I wrote a little about the size of black holes, and incidentally discussed very primitive calculations I did on the lifespan of any black hole created by the LHC.

A few days later, this interesting article showed the results of professional physicists on just how little such little black holes could grow, in some cases even if their lifetime was not restricted. Enjoy.

Posted by Colin Turner

Defined tags for this entry: , , , ,
Bookmark More about LHC black holes  at del.icio.us Digg More about LHC black holes Mixx More about LHC black holes Bloglines More about LHC black holes Technorati More about LHC black holes Fark this: More about LHC black holes Bookmark More about LHC black holes  at YahooMyWeb Bookmark More about LHC black holes  at Furl.net Bookmark More about LHC black holes  at reddit.com Bookmark More about LHC black holes  at blinklist.com Bookmark More about LHC black holes  at Spurl.net Bookmark More about LHC black holes  at NewsVine Bookmark More about LHC black holes  at Simpy.com Bookmark More about LHC black holes  at blogmarks Bookmark More about LHC black holes  with wists Bookmark More about LHC black holes  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!
Nov 9
STEM I allowed myself to become rather distracted by my second years last week as the class was finishing. They were talking about an episode of Horizon that discussed General Relativity and theories of Quantum Gravity. What followed was a free ranging discussion on the nature of infinity, mentioned briefly in the program. But we also talked about the nature of a black hole and its size.

It's surprisingly easy to calculate this with reasonably elementary maths and physics. I first did this when I was about 17 (how very sad) using classical physics equations, and was astounded to discover that even so, the answer was correct (I checked it in the Encyclopedia Britannica in the library at the time).

Here is Newton's universal law of gravitation, between two bodies. It describes the force F between two bodies that are r metres apart. Let's take the one with mass M to be the black hole. G is a small (though mysterious) constant.

F = \frac{GMm}{r^2}

You can work out the energy needed to escape the black hole using the old stand by equation that work done is the force times distance traveled against that force, but that only works with a constant force, this force will change as we move, so we need to use the big daddy of multiplication, integration.

 WD = \int_a^b F dr

Specifically, we will work out the energy needed to escape from the event horizon, the surface at which the escape velocity is the speed of light, which is c (299,792,458 m/s). So the energy will be given by moving my little mass m from the radius of the event horizon, let's call is R to infinity, to show we have broken away.

 WD = \int_{R}^{\infty} \frac{GMm}{r^2} dr = \left [ -\frac{GMm}{r} \right ]_{R}^{\infty} = \frac{GMm}{R}

Now, this should just balance the kinetic energy possessed by my little mass m traveling at the speed of light.

 \frac{1}{2} mc^2 = \frac{GMm}{R}

and if we rearrange for R we get that

 R = \frac{2GM}{c^2}

In other words, the radius of the event horizon, the bit we think of as the "hole" is dependent entirely upon the mass of the object. Please note this is based on a very simple model of a non rotating black hole. Nevertheless we can do some nice calculations from this.

The Sun, would have to be compressed from its diameter of about 700 million kilometres into a radius of just under 3 kilometres. The Earth's mass would need to be compressed so much to form a black hole you would need to squeeze its radius of over 6 thousand kilometres into a radius of around 9 millimetres. That's how dense we're talking here.

We can also consider the radius as described by the contained energy of the black hole, since we know that

E=mc^2

and so, replacing our M in our above equation we get

 R = \frac{2GE}{c^4}

Wow. Remember c is a big number, taking it to the power of four is a lot. So why do this? There's been a lot of speculation about the possibility the Large Hadron Collider (LHC) could create a black hole. This has caused a fair degree of panic, and at least one suicide. It's a physicist's dream that a black hole might be created. I just looked up the "high" energies used by the LHC, and high is a relative term. It plans to bash protons together with 7 TeV (Tera electron volts) of energy each, or lead nucleii with 574 TeV each, let's take the latter. Just how much energy is that in a collision? Well, doubling and converting to good old Joules gives 184 micro Joules. That's really not a lot, 184 millionth's of a Joule. A 100W light bulb uses 100 Joules each and every second. How big would the radius of such a black hole that might form be, from that energy? Check the maths, because so far I haven't but I get.

R = 3.040 \times 10^{-48} metres

which is 0.000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,003 metres wide (I hope, I didn't double check the zeros either), which is probably not the planet swallower of people's imagination (but this is fun). But the problem is people think this tiddler will grow very rapidly, but that's because they don't know about Hawking Radiation. This is an interesting quantum effect that means black holes aren't really black, they do emit a little radiation. Large holes would gather surrounding matter faster than their low radiation rate, but small holes have the opposite situation, they radiate more rapidly. The maths for all that is pretty complex, and you need to make lots of assumptions, but the time taken for our little black hole to "evaporate" is (hurriedly calculated by me)

t = 7.21 \times 10^{-79} s

a tiny, tiny fraction of a second. Even allowing for the ambient temperature and some fall in of matter, this little baby is not in equilibrium, it's not getting mass fast enough to accumulate more. It's safe*.


* All disclaimers apply. No liability is assumed for foolish unvalidated experiments done by you or other members of your species. Do not attempt to create black holes in your garage. Any subsequent destruction of your civilization, planet or solar system is at your own risk, and any "EPIC FAIL" signs placed by aliens on the remains is not due to me or my calculation. No calculations have been done on the matter of strange matter either. If you break the planet / system / galaxy or universe you own all the parts.

Posted by Colin Turner

Bookmark Black Hole Radius, or How I came to love the LHC  at del.icio.us Digg Black Hole Radius, or How I came to love the LHC Mixx Black Hole Radius, or How I came to love the LHC Bloglines Black Hole Radius, or How I came to love the LHC Technorati Black Hole Radius, or How I came to love the LHC Fark this: Black Hole Radius, or How I came to love the LHC Bookmark Black Hole Radius, or How I came to love the LHC  at YahooMyWeb Bookmark Black Hole Radius, or How I came to love the LHC  at Furl.net Bookmark Black Hole Radius, or How I came to love the LHC  at reddit.com Bookmark Black Hole Radius, or How I came to love the LHC  at blinklist.com Bookmark Black Hole Radius, or How I came to love the LHC  at Spurl.net Bookmark Black Hole Radius, or How I came to love the LHC  at NewsVine Bookmark Black Hole Radius, or How I came to love the LHC  at Simpy.com Bookmark Black Hole Radius, or How I came to love the LHC  at blogmarks Bookmark Black Hole Radius, or How I came to love the LHC  with wists Bookmark Black Hole Radius, or How I came to love the LHC  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!
Oct 20
Success at last. I've written before about my problems getting vidzone working, and tonight while taking a breather from some work I tried the Oracle of Google again, and I found a solution. As I suspected, it wasn't a network problem at all.

Kudos to lyonix, who suggested that deleting a corrupt cache for Vidzone from the game data utility often works. It worked perfectly for me, (note even removing and reinstalling the software doesn't affect that).

Posted by Colin Turner

Defined tags for this entry: ,
Bookmark Vidzone working at last!  at del.icio.us Digg Vidzone working at last! Mixx Vidzone working at last! Bloglines Vidzone working at last! Technorati Vidzone working at last! Fark this: Vidzone working at last! Bookmark Vidzone working at last!  at YahooMyWeb Bookmark Vidzone working at last!  at Furl.net Bookmark Vidzone working at last!  at reddit.com Bookmark Vidzone working at last!  at blinklist.com Bookmark Vidzone working at last!  at Spurl.net Bookmark Vidzone working at last!  at NewsVine Bookmark Vidzone working at last!  at Simpy.com Bookmark Vidzone working at last!  at blogmarks Bookmark Vidzone working at last!  with wists Bookmark Vidzone working at last!  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!

(Page 1 of 12, totaling 93 entries)