Friday, 23 April 2010

Another thing that works

In my current mellow mood, I thought I would also draw attention to Microsoft's bitlocker software. I have been using the open source Truecrypt if I need security on my USB sticks. It is useful, but it has a crappy open source licence which is non-GPL. This means that it does not automatically integrate with Ubuntu or other fully open source software. Also, you need to wipe a drive clean to encrypt it, which takes some time to get started.

Windows Vista and 7 come with bitlocker software which is Microsoft's version of drive or partition encryption. It is available in the premium versions of Windows, so you do have to pay extra to get it. It does, however, just bloody work.

If you have an external drive which you use to back up all your personal data, including password safes, personal correspondence, personal photographs of your family and so forth, then the last thing you want is some sticky oik in PC World sifting through all of that if the external drive fails. In particular if you happen to buy a Seagate Clicky Clicky Special, which then starts clicking, you may feel that a PC World trip is in the near future to arrange a repair or a replacement. Now, if you also use this external drive to transfer large video files between your HTPC and your desktop PC, you do not want to have to type in a passphrase every time you want to move the disk between the two machines. That would be a pain in the neck.

Having used Truecrypt for some time I was anticipating having to wipe the disk before creating a full encrypted partition. This was going to be a pain because there was about 650GB of material already on that disk. Not only was it going to be a pain to copy over the files again, but I was going to be without a backup while that procedure completed.

I decided to carry out a test run on a 4GB usb stick. Amazingly Windows gave me the option to simply start encrypting the disk without wiping it and starting again. This was unexpected. I agreed to the option, set up the passphrase and stored the encryption key, and left it running for a few minutes. It just bloody worked. I was stunned. The other great thing about the system was that it would let me pause the encryption procedure while it was ongoing.

With some small trepidation remaining I connected up the 1TB external drive and went through the same procedure. It worked. After about 30 hours of encryption. For obvious reasons I did not hold the cat's arse to the fire by trying to pause and unpause the encryption procedure.

As far as performance is concerned this is a fairly big hit. The sustained data rate on the drive unencrypted was about 50Mb/s. During and following encryption that rate has dropped to about 30Mb/s. A 40% hit is, as I say, significant, but when the drive is used solely to backup operating files data rate is not a mission critical feature.

Lastly, and perhaps most pleasantly, I noticed that windows has an option to dispense with the need for a passphrase on the removable drive on a per PC basis. Fan-fucking-tastic. This means that once the drive is connected once on a machine you can avoid having to re-enter the passphrase every fecking time.

All of this means that I can now use the disk in exactly the way I used to, between the two PC's, with the only negative effect of the encryption being a 40% hit on the data rate.

Having done all this, of course, the fucking click went away and there is no imminent visit to PC World on the cards.

Wednesday, 21 April 2010

Ubuntu Screen Saver Redux

IMPORTANT UPDATE: There is a solution here. Well, it worked for me anyway.

There is quite clearly some sort of bizarre fetishist working at Canonical. This individual gets their rocks off by entering into a cat and mouse game with Ubuntu users who do not want their fucking screens to go blank every 10 minutes.

The user starts by thinking that the screen is being turned off to save it from burning in. Realising that CRT's went out with Prince's last chance of decent royalties from "Let's party like it is 1999", the user will turn this option off. Especially if the user has a laptop which very rarely have a CRT displays - even in the second millennium.

(Although I did once encounter one. Some stupid bugger had bought a "Laptop" off some bloke down the pub for his child for Christmas. Turned up at my house at about 8pm on Christmas eve with something that looked like a double sized oscilloscope. You could only accurately describe this as a Laptop if you were a T100. He wanted some games for the vessel of his genes to play on their new computer of Christmas morning. I found some mouldy 5 1/4 inch disks (!) with some shareware on them and sent the man home, with a tear in my eye at the thought of the agonised disappointment that was going to be etched into the face of the little cherub that has been expecting a Sega Mega Drive from Santa and instead got a shitbox that could barely play monochrome pong. Oh, and I missed most of Hunt for Red October which was on TV trying to get the fucking thing to work).

So you turn off the screen saver and wait the requisite 10 minutes. Blank screen. Oh for fucks sake. You then think "A Ha!", maybe this is a POWER saving not a SCREEN saving option. After all I am running a Netbook where battery life is at a premium. The OS may be cutting the power to the screen not just saving it! So - into Power Management and select 'never' for "put display to sleep when inactive for" when running on AC power. Wait 10 minutes, blank screen. Oh for fuck's sake.

If you used previous versions of Ubuntu, then you have fought this battle before. You will recall that what you need to do, after HOURS of googling, is use your friendly neighbourhood gconf-editor to change the /apps/gnome-screensaver/idle_activation_enabled setting to false by unchecking it. So, using Karmic you uncheck this.

At this point the aforementioned fetishist giggles with glee and starts to touch themselves inappropriately.

You wait 10 minutes, and ......

Blank screen!

Fucking bastards. This worked in the previous version of Ubuntu and now you have fucked it up you bastards. Where, WHERE FOR FUCK'S SAKE, is the god damned setting which stops the fucking display going blank after 10 minutes. And why if you uncheck Activate Screensaver AND set turn off display to never does the fucking display keep going blank?

If this is not fixed in Lucid, I am going to hunt down the little pervert who is toying with me, and I am going to perform activities on them that would sicken Dr Mengele EVERY 10 MINUTES until they fix this.

Intermittent Problems

You know what I really fucking hate? If you read the post title you do. Intermittent problems. I have a logical rational and determinative approach to problem solving PC's.

Step One. Discover Something is not working.
Step Two. Make an educated guess as to the cause.
Step Three. Come up with a way to find out if that cause is actually the cause.
Step Four. Use that way to test.
Step Five. Check if the problem remains.
Step Six. If the problem remains go back to Step Two. If the problem is gone, Congratulations you have solved the problem.

Say the display shows a blank screen only. Guess it is the video card. Reason that if the video card is swapped and another one works it is the video card. Swap the video card. Display active? Yes? Then it is the video card.

This is brilliant. However, I really fucking hate it when you cannot rely on Step Five. This is the crappy situation where, for example, the VGA connector on the motherboard or the cable to the monitor has a wire or pin on the verge of breaking. Hence the simple act of jiggling all the connectors by removing one card and replacing it with another can, temporarily, solve the problem of a blank display despite the fact that the problem really was not caused by the card.

You think you have solved the problem, but give it a few hours, days or weeks, and it will reoccur. You are now back to Step One, but you now cannot rely on Step Five. Or in other words, you are fucked.

This is extremely annoying, and it turns problem diagnosis into an exercise in statistics. I feel a bit like Einstein, complaining loudly and longly about the unfairness of a universe in which matters cannot be predicted by a study of cause and effect. Instead you are left floundering in a sea of random chances and statistics.

I have an intermittent problem at the moment - a 750GB SATA HDD keeps disappearing. Not literally, obviously, but Windows from time to time just forgets it is there. I lose all my desktop shortcuts to that disk and it does not show up in My Computer. A swift restart fixes this, and the disk comes back. I have no idea why this is happening. It could be the disk on the way out. It could be a dodgy SATA cable. It could be the SATA controller on the motherboard. It could be the drivers for the SATA controller on the motherboard.

The Step 3 plan is to swap the cable, and use a different SATA port on the motherboard. I will be unable to rely on Step Five though, because the fucking thing may keep working for a week or two before the problem re-occurs.

Pain in the arse.

Something that Works

While most of what passes for intelligent comment on this blog is in the nature of complaints about the stupid way that some things seem to be designed not to work, it seems only fair that I record a recent positive experience.

I have commented on the spectacular hardware failure saga below. What I was left with during the repair period was a hard disk with the OS installed, and a video card.

Ordinarily with microsoft operating systems if you swap a hard disk from one machine to another, windows, to put it politely, shits itself. If it boots at all you get regular blue screens and no peripherals will work.

However, this hard disk had windows 7 installed on it. I thought to myself, what the hell I'll try and plug it into another motherboard. I already had a spare machine so I dragged the new machine's case over to the old machine. I ran the power cables from the new machine to the motherboard on the old machine. The SATA data cables were run between the motherboard in the old case to the disks bolted into the new case.

On firing the machine up I was stunned, nay astonished, to discover that against all previous experience windows did not shit itself.

Instead the OS loaded up drivers for the changed wireless card, and sound card and started working perfectly well.

The only problem was with fucking stupid DRM in iTunes. Despite purchasing upgrades to DRM free mp3 files as and when they become available I still have several protected files in my iTunes database. Of course iTunes thinks I have copied the files to a shiny new machine. This is despite the actual physical files on the disk being identical. iTunes says new motherboard and CPU = new machine so you have to re-authorise the files. Of course because of the catastrophic failure of the new board, that means I have to use up one of my 5 authorised machines.

All my other software, including Steam games, worked fine.

So, thumbs up to windows 7. It doesn't shit itself if you swap motherboards. They can put that on the box.

Of course, linux is perfectly happy to run on whatever machines you throw it at (even from a USB key) as long as you enable the appropriate kernel parameters. Which stuff like Ubuntu does by default.