Saturday, December 26, 2009

Ubuntu on Dell Laptops - Auto shutdown at 5% battery

If your Dell Laptop came preinstalled with Ubuntu it probably had nice
shutdown setting from Day 1.

If any of the following apply then you may not have the auto shutdown setup ideally:
  • You installed Ubuntu on your Dell Manually
  • You have upgraded your version of Ubuntu
  • The battery you are running with is not the original
(Explanations for the above are given at the end of this posting)

By default, the settings on my preinstalled Dell, were such that at 2 minutes battery life remaining, the thing should shut down.

I now show some settings which I would recommend and then comment at the end regarding the defaults.

Firstly change

so it is not checked...

(the images can be clicked to make them zoom in bigger if on your screen they blur)

...which has the effect of making your system look at percentages instead.

Now change the percentages to the following numbers:
And now your system is set to Auto shutdown at 5% battery.

Some (optional) extra reading now follows, regarding the original settings.

Ubuntu/Gnome has three thresholds which are 'action', 'critical', 'low' and in normal running your system would hit the 'low' threshold, then if still draining you would hit the 'critical' threshold.

Finally when the battery is almost out of juice entirely, the 'action' threshold (the point at which your system will shutdown) is encountered.

Here are the unchanged settings that my system had originally:

...and frankly they are less than ideal for several reasons which I now elaborate upon.

(1) Firstly by using time_action, time_critical, time_low the system is relying on estimations which are at best rough guesswork. By changing use_time_for_policy to be unchecked we are now avoiding this time based stuff.

Time based thresholds work well if you are running an unchanged system and your batteries are well know to the system*

(*Batteries in regular use which have had a couple of full charge and discharge cycles are just fine)

If however your batteries are replacements and/or the system has not got enough historic information, then any time remaining estimates are very much guesswork and using time thresholds may be unreliable.

If you have upgraded your system (and/or installed new versions of power manager) then the battery history information may have been emptied out. Without history the power manager is pretty helpless at the time based stuff.

(2) Having auto shutdown at 2% is in my opinion skirting a bit close to the edge. Alright you might have a battery that really does report it's percentage remaining very well. Even so for a 3 hour battery (pretty typical) 2% remaining is 3.6 minutes which is not a lot really.

As your battery ages it's percentage reporting might become less reliable also. Having a setting of 2 minutes (time_action = 120) is not a setting that I would like either.

Having 5% for the percentage_action and 7% for the percentage_critical gives me 3 to 4 minutes to save my work nicely before the system does an auto shutdown.

I want to be warned at 15% (around half hour to go) so that I can get to somewhere with a socket and plug in.

These settings are just my preferences, and you will have your own ideas of good percentages to use that suit your own working style.

Sunday, December 13, 2009

Virgin Broadband and Digital Photography - No good

This article is intended to make clear some limitations of the Virgin Broadband offering with regard to Digital Photography.

I recently graduated in Mathematics and the family took some good pictures, and a few short 1 or 2 minute movies.

Nothing too fancy, just handheld digital cameras, rather than camcorders or things that produce huge files.

What I discovered today is that Virgin Broadband have a throttling policy that kicks in once you upload 200 megabytes.

Now just to put the numbers in modern terms - A new £150 digital camera is probably going to give you a 10 megapixel shot, and result in a photo that takes somewhere between 5 and 10 megabytes of space on the computer.

Being conservative, and assuming they are all 5 megabytes that means that 200 megabytes of photos (40 snaps in all) is going to trigger Virgin's throttler.

Virgin Throttler - about
Here are a few bits of information that I was able to glean from talking to the call centre guy this afternoon:
  • Throttling checks are in place every day 9am->9pm
  • Once applied, any throttle will stay in place for 5 hours.
  • 200 megabytes of upload is enough to trigger throttling
  • Throttling applies in both directions, so fall foul of uploading limit, and your downloading is going to drop to snailpace also.
Summary Comment: Try and upload 40 photographs anytime between 9am and 9pm and your connection will suffer.

Now back to my particular situation....I just wanted to make those couple of minute movies available to the family so thought I would stick them on a website server...

(Click the image above for a full-size version if it appears a bit blurred)

The important information is the KB/s figures which at best show 30KB/s and at worst show - stalled - , or crummy speeds of between 10KB/s and 20KB/s.

In practical terms that 75 meg 1 or 2 minute movie is taking over an hour to upload:

Here are the files in a file manager just to confirm the amount of data I was trying to send:

As you can see the total upload is somewhere around 350 megabytes - the exact figure is not so important.

Even given the information about virgin throttling, the 30KB/s (fastest ahem) which I was getting originally is pretty poor by todays standards.

Here is an extract from the conversation with the broadband help today:

Me: "So the throttling has kicked in because it is a weekend"

Reply: "No because it is peak time - I suggest you try after 9pm"

Me: "And peak time is when?"

Reply: "9am to 9pm each day"

Me "But that is half of the day, and of the remaining half I am asleep for 8 of those hours"

Reply: "That is the traffic shaping policy that was explained when you signed your agreement"

Me: "It never said anywhere that if I upload 200 megabytes you will throttle my connection speed"

...and so on...

The message I think is clear for me anyway, if you are serious about digital photography then take the time to question your proposed broadband provider, so as to make sure that uploading is going to be workable for you.

If you have a 10 megapixel digital camera and you are thinking about switching to Virgin Media Broadband, then you might want to call them up and check what throttling will apply to your broadband package before you sign.

Monday, December 7, 2009

Twitter behaviour - rate limit message back from Flock

Twitter is pretty well behaved most of the time. Just occasionally it gives the 'Too many Tweets' or perhaps some new functionality seems a bit hit or miss (lists today)

I use 3 or 4 different browsers on my desktop, and play mostly Firefox 3.5 but do dabble in other browsers like Flock.

Here is where twitter comes in....

The install of Flock 2.5.5 is a manual install I did a couple of weeks back and I start it from a terminal like so:
...and here is todays mystery output:

...which will be too small to read until you click on the image above to enlarge it.

The key message is in the final line and says:
Rate limit exceeded. Clients may not make more than 150 requests per hour.
Now I didn't know that Twitter limited access requests this way, but I suppose the 'denial of service' attacks they suffered in mid 2009 did force their hand a bit.

Anyway if you are using Flock, then you might need to be aware that the cunning sidebar thing Flock does to show you 'following' and 'retweets' might sometimes throw you over Twitters API limit.

This is just my interpretation, and if you know different, then please comment and I'll update this post as appropriate.

Note: In Flock's output (shown in the clickable image in this post) I substituted 12345678 for my Twitter account number for obfuscation.