Tuesday, 28 December 2010

Internet TV... without the internet TV bit.

So I bought a 32" LED backlit (not LED pixel) LCD Samsung a couple of months ago.  It's hard to compare "Internet" TVs because each brand puts their own spin on exactly what "internet" means.

The Samsung series 6 has an Ethernet port, and by default Windows (Vista and higher) detect it and ask if you want to "trust" it or not.  The TV detects DLNA servers you might have easily on your network too.

But what about this "internet" claim?  When I first bought it, there were some simple internet "apps" that you can choose from and install.  Mostly boring stuff from a TV perspective like Google Maps, Picasa, Facebook, Youtube, etc.  This is all good but not exactly what I'd call internet "TV".

Wednesday, 8 December 2010

SATA disk beeping

I've never heard a hard drive beep!  Until yesterday.

I just yoinked a free second hand Inspiron 9400 laptop for a media centre, sans disk.  I purchased the cheapest SATA 2.5" disk I could find - 320Gb for about $50.  I started installing MythBuntu and then the drive started clicking and beeping, and the installation froze!  It was the usual crunch of a failing drive with an intermittent "beep" (much like the electrical interference noise you sometimes get in laptops / desktops).  The drive worked fine in a USB caddy.

At a complete loss, I turned to the oracle (Google) and found this.  Strangely, some drives are sensitive to the 5V power supply (it was the cheapest drive I could find).

Up until then I had been working on battery, so I plugged in the power, rebooted, and the drive worked flawlessly.  Hopefully it won't do the same when I loose power...

update: The problem seemed to be getting worse, so I returned the drive under warranty.  With the Christmas break I'll have to wait until they get back to me...
update: The drive was returned, and Seagate replaced it under warranty.  For the same price I purchased a 320Gb Western Digital Caviar Black 2.5".  It is infinitely quieter (I can't hear it with my head pressed to the laptop).

Live and Learn!

Wednesday, 6 October 2010

WakeOnLan from your Pocket PC

There are various programs and tips around for those of us who still use Windows Mobile (yes, I don't have an iPhone nor and Android phone...)

I've gathered some tips to set up "Wake on Lan" so you can wake any computer in your house from your mobile/PPC.

Wednesday, 8 September 2010

nvidia, opengl, compositing: play nice!

I was pleased to see this in the ChangeLog for the nvidia drivers 256.53:
"Fixed a bug that caused extremely slow rendering of OpenGL applications on X screens other than screen 0 when using a compositing manager."
Well that sounds nice.  Hands up who runs compiz on an nvidia card with two screens using xinerama?  You might notice your GL screensavers run incredibly slow.  Here's some examples, for testing I used glmatrix which you might be able to run directly via /usr/lib/misc/xscreensaver/glmatrix.

I have a Core(TM)2 Duo CPU T9500 @ 2.60GHz laptop with an nVidia Quadro FX 1600M, 1920x1200 screen and a second 1920x1200 LCD.  I've loaded the new 256.53 nvidia module.  Here are the results:

Tuesday, 24 August 2010

The Principle of Least Surprise

An oldie but a goodie.

When you write / design / create, be it a building, a program, a document or something else, try and think what reaction would cause the least amount of surprise to some input (eg. if you walked down a hallway and came to a dead-end, you would probably be surprised, ergo don't design dead-ends into hallways for no reason).

Why then, does the Windows XP "ctrl + alt + del, u" always shutdown straight away, unless there happen to be 50 updates waiting to be installed?  Now I'm stuck waiting for half an hour with a dead computer, because the shortcut I always use to shut down has changed from "shut down now" to "install updates and then shut down".

Tuesday, 4 May 2010

Unable to mount USB

We learn from history that we learn nothing from history.  (You may have noticed my cynical side already).

Xorg is currently going through some changes (again).  hal has been deprecated, with some small amount of confusion about what's coming next, especially if you're not running *nix, but some form of BSD for example, since udev is not for BSD'ers, unless I'm mistaken.

Also watch out for your USB media not mounting again in Gnome.  If you get the error message "Unable to mount USB. Not Authorized" it may be because of the way you log in (gdm, xdm, nodm, startx) or some other random reason.  Here's where to start looking to check it:

Thursday, 25 March 2010

Why Power Monitoring for the Home is (partly) Flawed

It's Earth Hour again this Saturday, and it's a worthy cause, why not?!  Now that I have my Wattson monitoring my power consumption, I'm watching between 2 and 5kW being consumed by my house!  (two air-cons, dishwasher, fans, TV, lights...).

It struck me recently however that these for-the-home power monitors are targeted at both reducing costs AND saving the environment, and that second argument is where I find fault.  Effective monitoring is a pre-requisite for effective change - you can't be sure that you've done anything without first knowing what you're measuring AND (reasonably accurately) measuring it before AND after you've made some change.

"Good then" you say, "monitor your power first with a home power monitor, and then make changes."  And herein lies the problem: you think you know what you're measuring and you've set about to measure it (albeit accurately to, say, 4%).  But if you're trying to save the environment (which is good) then you're only measuring part of your actual energy consumption.

First of all, as a general rule of thumb, only one third of energy converted makes it to your appliance.  One third is lost in heat at the generation source (ie. a gas turbine, heavy oil generator, coal fire, etc).  Some of this heat can be recovered and used to heat or cool water, air, etc.

Secondly, your generic power meter only measures REAL power.  AC power is made of a sign-wave looking voltage and current, at 50 or 60Hz depending on where you live.  A pure sign wave would be ideal, but is rarely the case due to generator design, transformers, motors, etc. (but I digress).  When the peaks of the voltage and current sign wave align (positive with positive, negative with negative, or "in phase") you have pure real power.  When the peak of the voltage sign wave aligns with the trough of the current sign wave (or out of phase) you have all REACTIVE power.  And any position in between causes a ratio of real to reactive power (or POWER FACTOR).  Using some maths, imaginary numbers, transforms, and so on you can calculate all sorts of useful things about power, this is in fact Electrical Engineering and Power Electronics, which wasn't understood fully until we had the maths and knew how to apply it.

So that long winded paragraph was to tell you one thing: You pay for REAL power, you don't pay for reactive power.  Reactive loads increase the size of cables, generate heat, and put certain strain on power generation equipment, but you don't pay for it, nor do you measure it at home.  (The utility does of course, but you probably don't).

So back to "effective monitoring".  To effectively reduce your environmental impact, you need to consider the "total cost" of your power consumption.  Consider both your real and reactive demand, transmission losses, heat losses and so on.

[Disclaimer: I Am Not An Engineer!  This post is probably a work in progress, and I put it together while watching (ahem) Stargate Atlantis ;)  Please send any comments, corrections, links, etc.  This is just a blog of my thoughts, not a technical paper!]

Gentoo... improving?!

There's been lots of talk in the past about Gentoo dying.  I won't provide the links - they're (usually) useless and uneducated non-Gentooers trying to play fortune teller.  From the "inside" perspective of a user, I still use Gentoo and it still works.

So following on from the comments on a previous post about some network control tools, a user commented on a Summer of Code project to improve Network Manager integration in Gentoo.

Sunday, 21 March 2010

Western Digital Passport - now with 50% less hackability!

I have a Western Digital My Passport here from a friend.  It's been dropped, and it's making clicking noises (uh-oh).  I'm trying to see if it's recoverable, so I thought I'd remove the disk and plug it directly onto the motherboard.

Saturday, 20 March 2010

NetworkManager vs wicd vs wpa_gui

Due to some idle time* a couple of weeks ago, here's a quick comparison between a few network control tools for Linux.

These tools all give you some sort of network control from the Desktop - a service traditionally provided by daemons and initialisation scripts.  The problem with that is roaming - it's much more common nowadays to have a laptop travel between multiple access points (Ethernet, 802.11, wireless broadband...) and many of the tasks can be automated.  So what better way to use a point-and-click approach.

The three competitors, and here's how they compare by features:

Tool 802.11 (wireless) control ethernet control mobile broadband control VPN controldbus notification
NetworkManager yes yes yes yes yes
wicd yes yes no planned for 2.0 no
wpa_gui yes no no no no

Electronically, my dear Wattson

I just borrowed a Wattson Power Meter from a friend at work, and while there's nothing special about power meters, the good folks at DIY Kyoto have put a nice touch on this one.  [Standard disclaimer: I don't work for them and I haven't received any incentives  from them either!]

There has been a trend of wireless power meters for the home, so they can be easily adapted to the consumer market.  They solve the problem of running wires around your house - you put the sensor (or current transducer or CT) in your meter box or on a specific appliance, and the display goes somewhere convenient.  Wattson has the opportunity to connect 4 CTs: 3 for 3 phases and one for renewable monitoring, or in any other configuration.

But Why?  Well there were numerous reasons for me, everyone is different:

Friday, 5 February 2010

Syslinux from Linux!

This post tells you how to launch syslinux from a Master Boot Record (MBR).

Recently I was locked out of a customer-provided laptop with their development environment, and access to their source code repository via vpn.  I suspect their domain controller propagated an update last time I was on the vpn which has locked me out.

They're overseas and about 12 hours flight time away, so with their permission I used ntpasswd to reset the Administrator password.  The boot CD (downloadable as an iso) uses syslinux, which is fine, except that instead of wasting CD-Rs I like to use USB keys.

I copied the contents to a blank FAT32-formatted usb key, but it has no boot sector yet.  I installed grub and tried to make a grub menu file from the syslinux.cfg with these tips for converting a syslinux .cfg file to a grub .conf file.  I failed because the syslinux.cfg has the line:
 append rw vga=1 initrd=initrd.cgz,scsi.cgz

And I don't know how to append the two cgz's into one grub initrd line.  Normally grub uses an initrd like this:
 initrd /initrd.cgz

So I decided to install syslinux from linux.  The man page makes it look easy:
 syslinux [-sfr] [-d directory] [-o offset] device

When I ran "syslinux /dev/sdd1" and booted the laptop with this usb key, it just gave me a blank cursor blink.  This is because the laptop is looking in the MBR of the usb key and finding nothing.  The syslinux man page shows some hints:
Booting from a FAT partition on a hard disk
SYSLINUX  can  boot  from  a  FAT  filesystem  partition on a hard disk
(including FAT32). The installation procedure is identical to the  pro-
cedure  for installing it on a floppy, and should work under either DOS
or Linux. To boot from a partition, SYSLINUX needs to be launched  from
a  Master  Boot  Record  or  another  boot loader, just like DOS itself
would. A sample master boot sector (mbr.bin) is included with SYSLINUX.
Well, that's nice to know, but how do I put that on my usb key?  Follow these steps:

1. Start with a FAT32 formatted usb key (it can have other data on it) and some syslinux-based boot image.  I'm using the latest ntpasswd iso cd080802.  Unpack the contents to the root of the usb key.

2. Copy a boot sector to the code image of the MBR of your to-be-booted usb key:
sudo dd if=/usr/share/syslinux/mbr.bin of=/dev/sdd bs=440 count=1
  • /dev/sdd is my usb key
  • Look at Wikipedia for an explanation of the MBR layout
  • your mbr.bin might be in a different location.  It should come installed with syslinux

3. Run syslinux to make the partition bootable:
 sudo syslinux /dev/sdd1

4. Mark the partition as bootable (may not be necessary)
 sudo fdisk /dev/sdd

Select a, 1, w to make the first partition bootable.  CHECK THESE OPTIONS FIRST!

5. Insert USB key to your PC / laptop and boot (so long as your BIOS is setup and capable!)

Friday, 29 January 2010

How dumb is Slashdot?

OK that title is a bit provocative.  I enjoy reading Slashdot as much as the next guy, and I'd always laughed at the comments about Slashdot readers being dumb, but this post got me rolling my eyes in frustration: "2 Displays and 2 Workspaces With Linux and X?"

The OP asks about buying a second monitor and setting up two screens - one large desktop or separate X screens.  Firstly, I would expect a question like this from an Ubuntu noob, followed by lots of answers like RTFM, Google it, see this FAQ, etc.

However on Slashdot, there are so many people who still don't realise that one large desktop doesn't mean windows have to maximise to two screens.  So few people seem to know about xinerama and yet they're still giving advice!  Someone said that "Windows 7's easy dual monitor setup lets you maximise to one window - can Linux do that?" (sheesh, only for years now...)

Slashdot users have some fantastic, intersting, and informative posts.  Unfortunately, unlike a regular email list where only the people who might actually know the answer reply, everybody on Slashdot wants to reply.

Quad Erat Rant-astrandum!

Firefox Personas

Firefox Persona's - inevitable Bling Bling or worthwhile (but still Bling Bling)?

If you don't know what I'm talking about, I just upgraded Mozilla Firefox to version 3.6.  The what's new? page is different this time.  Instead of the usual congratulations, security notes and links, I'm greeted with "Thanks for supporting Mozilla’s mission of encouraging openness, innovation and opportunity on the Web!" and "Choose Your Persona".

If you mouse-over any of the "persona" thumbnails, Firefox's theme changes dynamically. Cool.  Note only that but there's been quite a bit of design effort into making these personas look sleek, integrated, and elegant.

From This

To This!

I would be happy with the old Netscape look for years to come (why did they need to keep changing the logo anyway?) but I guess the iPod yungun's of today are attracted to shiny silver objects, and that goes for the software world too.  In the age of "I'll buy anything new from Apple just  because it's cool" it's inevitable that Firefox adds some chrome!

Thursday, 28 January 2010

Emerge multiple packages at once

You may or may not already know about this feature, but you can emerge multiple packages at once in Gentoo.  If you have any semi-recent machine (2 years old or newer) you should definitely be using it.

Being source based - and hence compiling everything before you install it - any build time speed improvements are welcome.  We already have the -j option which can be passed to make via make.conf:
Various sources say to set this number j = N(CPU) + 1 or j = 2N(CPU) + 1.  I find the former is sufficient.

But what about configure?  Before you compile a package, you have to configure it, which typically can only use one CPU.  In addition there are other operations that are disk-intensive while not being CPU intensive (for instance, unpacking source code).  And finally some packages are just "broken" and internally set -j1.

So it would be nice to build (unrelated) packages simultaneously.  While one configure script is running, another could be compiling, further utilising those MeGaHurTz you paid so dearly for!  Recently I tested this for the first time.  I ran emerge like so:
$ emerge -vauDN --jobs=2 world

After looking through the output, this is how it proceeds:
Total: 70 packages (66 upgrades, 1 new, 3 reinstalls, 3 uninstalls), Size of downloads: 0 kB
Conflict: 23 blocks
Portage tree and overlays:
 [0] /usr/portage
 [1] /usr/local/portage

>>> Verifying ebuild manifests
>>> Starting parallel fetch
>>> Emerging (1 of 70) x11-libs/qt-xmlpatterns-4.6.1
>>> Emerging (2 of 70) sys-devel/binutils-2.20
>>> Jobs: 0 of 70 complete, 2 running               Load avg: 5.56, 2.53, 1.67

And just to prove that two packages are emerging:
$ genlop -c

 Currently merging 2 out of 70

 * sys-devel/binutils-2.20 

       current merge time: 1 minute and 27 seconds.
       ETA: less than a minute.

 Currently merging 1 out of 70

 * x11-libs/qt-xmlpatterns-4.6.1 

       current merge time: 1 minute and 28 seconds.
       ETA: less than a minute.

A little while later, my load average settles down around 4.8:
>>> Installing (18 of 70) dev-python/pytz-2010b
>>> Installing (16 of 70) x11-libs/qt-script-4.6.1
>>> Emerging (19 of 70) dev-util/subversion-1.6.9
>>> Emerging (20 of 70) dev-lang/python-2.6.4-r1
>>> Jobs: 17 of 70 complete, 1 running              Load avg: 4.84, 4.84, 3.94

You may come across some packages that are interactive, such as skype, which forces you to view and accept their EULA.  In that case the concurrent jobs are disabled.  If you wish to go ahead with all non-interactive jobs (a good idea!) run emerge like so:

$ emerge -vauDN --jobs=2 --accept-properties=-interactive world

Note this feature is not supported in older versions of portage.  I tested with sys-apps/portage-

Listing packages installed from overlays

Gentoo provides an official package repository, and the mechanism for creating third-party repositories, called overlays.  Overlays can be home-made, developer-made, community-made, you name it!

It occurred to me that I wanted to list all installed packages that come from overlays.  (I'm doing some house cleaning, so I'm removing overlays I don't need anymore).  There appears to be no way to generate this list via equery (the "gentoolkit" method of doing various package queries).

This one-liner should do the trick.

$ for i in /var/db/pkg/*/*; do if ! grep gentoo $i/repository >/dev/null; then echo -e "`basename $i`\t`cat $i/repository`"; fi; done

The output of which looks (only slightly messy) like:
revoco-0.5    Orpheus Local Overlay
synce-gvfs-0.3.1    SynCE
synce-serial-9999    SynCE
synce-trayicon-0.14    SynCE
nautilussvn-0.12_beta1-r2    Orpheus Local Overlay
evolution-data-server-2.28.2    Orpheus Local Overlay
gnome-hearts-0.3    Orpheus Local Overlay
nautilus-python-0.5.1    rion
nautilussvn-0.12_beta1_p2    Orpheus Local Overlay
mozilla-thunderbird-bin-3.0_beta2    Orpheus Local Overlay
libgii-1.0.2    Orpheus Local Overlay
grub-0.97-r9    rion
usb-rndis-lite-0.11    SynCE
xorg-server-1.7.4    Orpheus Local Overlay

You can see here that I have various packages installed from the SynCE overlay, the rion overlay and my homespun "Orpheus" overlay.

It assumes your overlay was set up correctly with the file profiles/repo_name containing the overlay name, at the time of install (not available in earlier versions of portage).

Wednesday, 27 January 2010

When Dell Doesn't Deliver

I've never had a "bad" experience from Dell (Australia) with the exception of the outsourced sometimes hard-to-understand technical support.  So it is interesting to watch what happens when Dell doesn't deliver the way they promise.

Here's the sequence of events.  For the record, I do not and have never worked for Dell, nor do I receive any free or discounted goods or services from them.

14 April 2008

Ordered Dell Precision M6300 laptop including a Logitech MX Revolution cordless laser mouse with CompleteCover Guard and Next Business Day Onsite warranty.

November 2009

The mouse stopped charging (charging light flashes red when placed on charger).  I didn't do anything at the time since I was busy.

12 January 2010

My first contact with Dell about the mouse.  Was transferred from their usual warranty number (Indian speaker) to the "premium" warranty area (Australian speaker).  Was told a new mouse would be here in 2 days.

18 January 2010

Received email from TNS requesting I complete a survey regarding my recent call.
Completed the survey on the same day.  I noted in one of the survey questions that the issue was "unresolved" since I had not received the replacement part

<= 22 January 2010

Decided to call Dell again to find out about the mouse.  Warranty told me that the part had not been sent, and it would have to be handled by Logitech.  They transferred me to Logitech who took details of the mouse and told me to expect a new one up to two weeks later.

27 January 2010

Received a call from Dell regarding the survey I completed.  The caller asked if I had received the part, and offered to get the original person ("Nick") to look into it.  He asked if I had a mouse to use in the mean time (I said yes).

27 January 2010

Received a call from Nick from Dell.  He asked about the part and said he would check with Logitech and get back to me.

27 January 2010

The mouse arrived in the afternoon!  I called Dell to let them know they could stop looking for it!

So it took 9 days to respond to the survey.  The replacement mouse was here in around one week, although not in the next business day as the warranty implied.  But then, it was an accessory and not a typical spare component of the laptop.

And in case you're wondering about the Gold Phone Technical Support, apparently it's the difference between speaking to someone in India vs someone in Austrlia.  The "Pro" warranty personnel even answers the phone "This is <name> in Sydney".

Tuesday, 12 January 2010

Unlocking Zimbra Advanced Searches

Hi and welcome to 2010!  This year I plan to blog more, read more, do more, learn more, and have more time left over...

This is a quick post to tell you how to do some nice advanced searching in Zimbra - the webmail client.
  1. In your Zimbra interface, select Preferences then General.
  2. Under the Searches heading, select Show advanced search language in search toolbar.
  3. Save and go back to Mail.
  4. In the Search box, select the Advanced link
  5. Choose some options (my favourite is status:unread; status:flagged; and time is today)
  6. By default this ORs some and ANDs the result with others, giving you a very small set of results:
    ((is:flagged) OR (is:unread)) date:-0day
    Edit the search string and replace everything with OR, and change 0day to 1day:
    (is:unread) OR (is:flagged) OR (date:-1day)

    You will now have a very powerful search, that gives you a quick summary of all todays messages, plus any unread or marked message from the beginning of time!

  7. Save the search, and you can access it at any later time.  Note that other preferences such as the sorted-by column is also saved with this search.

Well that sounds easy enough!  Why can't other email clients do the same thing?  Evolution's advanced search folders were unmatched until I discovered this..

Claws has no advanced cross-folder search that is persistent across instances of the application.

Thunderbird 3.0b2 (the last I played with) has persistent search folders, but they can't pull in related emails (up or down the thread) like evolution can.

Evolution is equipped to handle my business and personal email accounts:
  • I have thousands of emails in multiple pop and imap accounts.  I have no choice but to separate my multiple work and home accounts like this.
  • I have some folders with thousands of emails each, dating back years, which helps with long projects, contracts, and a bad memory!
  • I need some way to keep track of important emails, and at the same time see and sort new emails

Evolution can handle large folders with thousands of emails each.  It can of course filter messages based on mailing lists, subjects, sender and even run an external application test over an email.  I've mentioned it's search folder goodness, and it has powerful quick-searches too that can search the current folder or account.
Copyright 2009 Another Blog. Powered by Blogger Blogger Templates create by Deluxe Templates. WP by Masterplan