Bluray and DRM

I’ve always had a strenuous relationship with DRM, but up until now it has been a purely ethical loathing of the restrictions placed on technology I’m supposed to own.  Tonight, after buying a BluRay Disc and trying to play it in my computer’s BluRay Drive, my anger at DRM has taken on a technical justification.

Previously, anecdotal evidence had told me that DRM does suffer from technical difficulties – massive ones at that – but I’d never come across anything serious in my own experience.  Occasionally, playing certain formats from certain companies required some tweaking and hacking but nothing has ever been rendered completely unplayable.  Until now.

I have legitimately bought a BluRay Player.  I have legitimately bought a BluRay Disc.  I have legitimately put the BD into the BD-ROM drive.  I have legitimately installed a legitimate operating system on my legitimately owned computer.  I have not broken the law at any stage along the process.  Yet the assumption that I wish to, or already have broken copyright law precludes me from playing this now very-expensive-coaster (although in actuality it wasn’t that much more than I’d expect to pay for a decent coaster as it was preowned from blockbuster during a sale).

Here comes the hugely ironic part.  Due to the simple fact that I want to watch the film now, not after hacking and tweaking and fucking around for four hours to get the fucking thing to play on my legitimate device (did I mention that the device is 100% shop-bought, prefabricated, manufacturer-warrantied, legal shit?) which is legitimate.

Ok, ready for irony?

I’m seriously considering torrenting The Men Who Stare At Goats because of the DRM software on The Men Who Stare At Goats’ BD.

Yup, you read correctly.  The DRM software is actually ENCOURAGING me to pirate the film.  ENCOURAGING.  Its entire purpose of existence is to DISCOURAGE this behaviour, and yet it fails miserably.

Breakdown of reasons:

Pirated BD rips can be played on any device, any OS, anywhere.
BDs can only be played on computers with the right software installed, or official BluRay players.
Pirated BD rips do not need to “load” for 5-10 seconds before they do anything.
BDs have loading screens.  Loading screens for a frigging film.
Pirated BD rips are lower quality so they can be downloaded, but are still much higher quality than DVD rips and even DVD rips are generally acceptable quality.
BDs are very high quality but, due mainly to DRM, the performance overheads are enormous.  Meaning BDs will struggle to maintain smooth playback on low-end hardware.  This isn’t a direct concern for me personally, as my hardware can cope, but I worry for people who can’t afford to upgrade their entire PC just to playback BDs (considering such an upgrade could cost upwards of £500, compared to the £30 I spent buying a BD-ROM drive).

So, there you have it.  Big media companies wonder why we keep pirating their shit, but then make their product technologically limited and generally WORSE than the FREE alternative.  It’s like selling sweets for £30 a time, then arresting people who make similar sweets that taste better and are free, and getting all uppity and self-righteous about it at the same time.  And then you start telling people who buy sweets from you, rather than getting them for free, that they can’t share their sweets with their friends or family, and they can’t give their sweets away or sell them, and then you start watching them eat them so you can be sure.  And all the while wondering, why are my customers breaking the law by going to the copycat sweet makers?

Linux Memory Usage

I recently became concerned about the performance of a particular application (cmatrix on the 1080p screen – it looks beautiful but it’s quite choppy) so I began some investigating and turned up some surprising statistics.

Uptime: 12:53; of that time, Chrome has been running for most of it and we all know web browsers are notorious for leaking all over your RAM.  Chrome is better than firefox but still pretty leaky.  On Windows XP, it was not uncommon for chrome to be using more than half a GB of RAM.

Now, the surprising thing is, Linux has managed to gobble up all my RAM.  But has it?  If you observe carefully, I’ll explain to you why Linux has -not- gobbled up all of my RAM (despite what ‘top’ tells me) whereas Windows, had it been given the same constraints, would’ve.

The way Linux handles memory usage differs extraordinarily to Windows.  If something leaks in Windows, that RAM is unrecoverable, especially after the application has quit.  However, in Linux, if something leaks, once the application quits, all the memory Linux allocated it is returned to Linux in the form of ‘cached’ memory.  In other words, the memory doesn’t get -deleted-, so if the application comes back and wants it again it’s entitled to the same memory (efficiency++) but if another application wants to use the memory that application -was- using, Linux isn’t gonna say no.  In other words, the memory is still ‘in use’ but it’s also still ‘available’ to new applications who request it.

This presents a difficult situation when you’re measuring RAM usage – do you count the memory as ‘in use’ or as ‘available’?  Well, ‘top’ (and some other tools) see it as ‘in use’, and ‘free’ will also tell you (on the Memory line) that it’s ‘in use’.  However, ‘free’ also has a “-/+ buffers/cache” line which basically takes the buffered memory into account, giving you a fuller picture of how much RAM is available to new applications.  So when you’re measuring RAM, you should use -that- line in your statistics.  Not the above raw figure which counts unreferenced (‘dead’) memory as ‘used’.

Windows XP, on the other hand (but don’t quote me about Vista or 7, I’m unfamiliar with the new kernel but I’m pretty sure it’s the same story in terms of memory allocation), trusts applications to free memory.  If they don’t, Windows will never reclaim the lost memory (not until a reboot anyway).  I’m unsure exactly how the kernel works (only Microsoft know) for this behaviour to be apparent, but I’m not the only one to have made that observation, and I can assure you Windows XP, if left to its own devices, will start swapping out pages like there’s no tomorrow after a couple of days (depending how much RAM you have).

Suffice it to say, if you run WinXP, you’re gonna get slowdown after a while, if you run Linux you can (in theory) continue running it forever.  Note that kernel leaks (which are rare but do happen) and certain other situations (eg video driver bugs) can cause a required reboot due to memory loss, but the situation is far rarer in the Linux world than in Windows.

It is owing mainly to this reason (and the kernel’s greater stability, owing to a better design and fewer crash-inducing bugs) that Linux servers are able to run for…

chris@w1zard:~$ uptime
20:54:58 up 125 days,  4:24,  2 users,  load average: 0.00, 0.00, 0.00

Yup, w1zard (my server) has now been running for 125 days, 4 hours and 24 minutes without a reboot.  The load average statistics being 0.00 is due to the quad core processor; the system doesn’t strain under the minute amount of traffic it’s required to handle (mail only at the moment, too).  I’m very proud.
Have fun hacking!

Ubuntu and HDMI audio

Ok, so I got the video part of the HDMI output working with a couple of deft mouseclicks and the help of my previous workings with nvidia control panel, but when it came to audio…

First off, I go internetting, ask the mighty Google how the heck it is to be done.  I happened upon a ubuntuforums.org post detailing steps to get a GT240 to work, whereupon I hit snag after snag, eventually crippling my entire audio setup.

Eventually, I found that my saving grace was “alsa-utils reset”, but the internet did not tell me this – rather, my brother pointed it out (him being an audiophile and a closet ubuntu geek).  I managed to get my speakers back, and seeing as I wanted to watch a film and had spent a good few hours troubleshooting audio things I decided HDMI audio can wait until it works ‘out of the box’.  Especially considering, as I said earlier, it’s actually a downgrade in speaker quality.

That said, it appears my tweeters have blown (muddy, muffled sounds coming from the hifi at the moment; my brother diagnosed it as blown tweeters, but he didn’t properly examine the patient so I don’t think he’d want to be quoted on that).

Those poised to criticize Ubuntu for not supporting HDMI ought remember that it is an immature technology (HDMI, that is, not Ubuntu) and is steeped in DRM.  Aside from the ethical problems I have with DRM, it also creates lots of technical hassle for projects wishing to use technologies that rely on it.  Especially if the company responsible for the DRM is uncooperative or demands financial recompense for their support in making technology work with it.  The mind boggles at why consumers put up with this kind of treatment, but I guess conglomerates preclude us from having much choice.

Have fun hacking!

Ubuntu dual-screen

Ubuntu doesn’t detect my second monitor automatically, but all it takes is a button ‘detect monitors’.  Windows XP requires multiple reboots and a painfully slow Nvidia Control Panel in order to get anywhere near dual headed graphics.  It also does not provide me with a full 1080p picture (without going too much into the ins and outs of it, Windows XP’s best resolution for the panasonic TV was 1200×950-ish, whereas Ubuntu can give me the full 1920×1080 with a little bit of tweaking).

Admittedly, my experience in the past with Ubuntu has been slightly different when it comes to dual monitors, but for Ubuntu to reach this level of desktop usability within 6 years from their first release (compared to WinXP having 16 years to get from Win 1.0 to WinXP); I’d say that’s pretty gosh-darned impressive.

What’s more, Ubuntu doesn’t route audio through my TV unless I ask it to.  Windows detects the TV’s speakers as an audio device and then PREFERS it to my hifi.  I’d rather have MSN go through the hifi and only films and whatnot that I’m gonna be watching with MSN turned off to go through the TV.  If that, ’cause frankly my hifi’s speakers are gonna be better than my TV’s – they’re just in slightly the wrong place, is all.

Every day I get happier and happier that I’m home.  ❤ ubuntu.  So much.

Have fun hacking!

Followup: Installing Ubuntu from Windows

Ok, so I got unetbootin installed and rebooted.  But I’m hit with a Windows error message saying it can’t boot.

I’ve edited boot.ini thusly:

9c9
< F:\ubnldr.mbr="UNetbootin"
---
> multi(0)disk(0)rdisk(0)partition(2)\ubnldr.mbr="UNetbootin"
9c9< F:\ubnldr.mbr="UNetbootin"---> multi(0)disk(0)rdisk(0)partition(2)\ubnldr.mbr="UNetbootin"

This -should- allow me to boot into ubuntu.  Fingers crossed.  Will edit if not.

EDIT1: This did not work.  Windows’ bootloader thought unetbootin was a Windows operating system, and was therefore expecting files which are clearly not present.  I’m therefore re-installing unetbootin in the vain hope that it will work.  Will edit again when it doesn’t.

EDIT2: This did not work.  Windows’ bootloader STILL thinks unetbootin is a Windows operating system despite several variations in my installation procedure.  I think the only way to convince my computer otherwise is to take the decision out of Windows’ hands.  That requires waiting for Mike to wake up and give me a blank CD though (his LiveCD of Ubuntu is 64bit and my processor is somewhat deficient in bits.  It only has 32, bless it…)  Another edit will follow with tales of my success once I have a CD in my hands…

EDIT3: Day 2 of using Ubuntu again and I can honestly say I couldn’t be happier.  Windows XP is probably never going to see the light of day again.  I’m home!!! SO happy!

Installing Ubuntu from Windows

I recently ran into the problem of using wubi.exe (Ubuntu’s Windows installer) to install Ubuntu 10.10 and hitting a “try (hd0,0): EXT2:” hang.  Information on the internet is sporadic and confusing at best so I thought I’d post a run-down of what steps I took, what worked and what didn’t.

Note that this whole procedure would’ve been a lot easier if I had a blank CD or a LiveCD of Ubuntu to hand, but I don’t, so never mind.

Ok, so when I hit the error I gave it time to complete what it was doing, it was definitely hung.  So I rebooted back into Windows and tried a different .iso image.  Same issue.  So I tried a different wubi.exe (specifically, the one on the 10.10 i386 iso rather than the one you get if you choose to download it from ubuntu.com).  Same issue.  At this point I ran around the net in circles for about an hour getting nowhere fast but eventually stumbling upon some people reporting the issue affecting EasyBCD.  So I looked into what exactly EasyBCD was, it turns out it’s a way to modify the Windows Vista/7 bootloader.  Since the SP3 bootloader is nigh-identical to the Vista/7 one, I thought EasyBCD might help.  Unfortunately, it’s only superficially identical, and despite following a “howto use EasyBCD on Windows XP” tutorial, I managed to completely remove the Windows XP bootloader menu, replacing it with a black screen that flashes for a second then boots into windows.  Great.  So now I can’t even -try- to boot wubi.

It was at this point I hit the ‘net again, and after another hour or two of circular google-forum-google work I eventually hit upon “Unetbootin”.  I knew of Unetbootin before but only very vaguely, had once used it to try out a few OSes.  It turns out that Unetbootin can mimick wubi, almost, but in a much more sane way.  What Unetbootin does is perform a ‘frugal install’, in other words using your hard disk as a LiveCD.  Sort of a LiveHDD idea.  Perfect!  Once you’re in the Live environment, performing an install to an already-prepped Ubuntu partition (which I just so happen to have) is trivial.  I’ll post a follow-up detailing my success with this (it’s currently halfway through installing).

Check back later!