Low spec notebooks can’t handle large amounts of RAM

Cathy and I are seeing increasing contention for the grunty computer in the house not dedicated to playing computer games. It’s used for a combination of recreational programming, web surfing and media encoding tasks. We decided to acquire a second, and after comparing the costs decided that the premium for laptop portability wasn’t too great (about $100; in fact that seems to be about the price of the OS we were forced to buy with the hardware). In out usage profile, “grunty” isn’t defined by CPU, but responsiveness which really comes down to how often an arm has to venture out across a spinning sheet of rust. Unfortunately, bottom-end systems (i3 class CPUs) can’t handle our base-level RAM requirement of 16Gb, so yet again a portable computer is the most powerful thing in the house – the new system’s specs are:

Processor: AMD Quad-Core Processor A6-5200 (2.0GHz, 2MB L2 Cache)

25W of power consumption right there. Existing grunty computer pegs its CPU for about ten hours a year, in sustained encoding runs. We weren’t CPU bound, and yet the only way to get that RAM in an i3 lappy was to spend an extra $100 on a Toshiba with worse specs – so we got a quad core.

Memory: 4GB DDR3 1600MHz (max support 16GB)

That 4GB came straight out and was replaced by the most RAM that could be stuffed in there. Existing grunty machine had 8Gb and was paging a lot. Why are web browsers so memory hungry? This upgrade cost $160.

Storage: 500GB (5400RPM) Hard Drive

This came straight out before the machine was even powered up once. It was replaced by a Plextor M5-Pro 128GB SSD; this unit was selected for its fast random write speed, and the common-for-all-SSDs 0.1ms seek time. Back in the day (about ten years ago) I advocated that when building a machine, you should get drives with the fastest seek times and screw everything else, plus all the RAM you could afford – to use as disk cache. How little things change. This upgrade cost $129.

After Linux Mint 12.04 Maya (LTS) was installed (consuming 6Gb) there was 110Gb free on the replacement device. Paging has been disabled due to the SSD write limitations, and tmpfs is used for various directories to further minimise our impact on the longevity of the drive.

Graphics Card: Onboard (Integrated)

The contention for the memory bus is troubling, but at least there’s no extra juice being sucked down to power a fancy-pants GPU. This is not a gaming machine, 2D acceleration is useful, 3D not.

Operating System: Windows 8 64 Bit

That went with the rotating media. We’re going to see if we can boot a desktop machine off of it and still have the OS believe everything is okay. The laptop didn’t like the new OS, saying “Selected boot image did not Authenticate. Press Enter to Continue”, but the solution was to disable Secure Boot.

Screen: 15.6-inch diagonal HD BrightView LED-backlit Display (1366×768)

It took some fiddling for Cathy to figure out how to dim the damn thing under Mint. Turned out the answer was to install the proprietary AMD drivers.

Audio: Dual Speakers Stereo DTS Sound+

If you’re using a laptop for A/V reproduction, you’re doing it wrong.

Connectivity: Gigabit LAN (RJ-45 connector), 802.11b/g/n WLAN, Bluetooth

The Toshiba only had 100Mb, in this day and age! The Ralink wireless adapator wasn’t picked up automatically by the installer, so Cathy got down and followed the instructions off AskUbuntu

Built-In Devices: 1x USB 2.0, 2x USB 3.0, HDMI, RJ45 Ethernet, Headphone-out/microphone-in combo jack, SD/SDHC/SDxC Card reader

USB3 was important in picking the unit, as I’ve seem just how much faster it is. HDMI is necessary for twin-monitor development; MSY had a 21.5″ Full HD IPS on sale for $118.

Webcam: HP TrueVision HD Webcam with integrated dual array digital microphone

I’d just paint over it, but there’s a chance that we’ll have a use for videoconferencing. It stays, but it better mind it’s Ps and Qs or else it’s black electrical tape for it.

Optical Drive: DVD Burner

Yeah, like that’s ever getting used.

Weight: 2.33 Kg

I’m more used to computers that weigh 1Kg, not two and a half.

Dimensions: 56cm (L) x 13cm (W) x 34.5cm (D)

This thing has a widescreen display, it’s freaky big compared by my 10” netbook.

Other observations: the keyboard sucks balls, with the trackpad positioned such that you physically can’t touch-type on it because doing so places your palms on the trackpad, moving the mouse and screwing up your input (I think this is happening because gestures have been turned on; they might find themselves getting turned off again). For some messed up reason they’ve included a numeric keypad, so touch-typing is doubly hard – again with the palms. This thing’s going to find itself plugged into a USB hub with a real keyboard and mouse quite a lot I think.

Anyways, the HP Pavilion 15-E001AU was purchased from MLN for the low, low price of $500. Total system cost was $907, and at the end we had a 4GB lappy stick and a 500GB lappy drive laying around.

Grumpy Duck has a nothing

There was some massacre in the US (again) and the pundits are trying to explain why the perp did it. Closest they got is “well, he did like violent video games. Said it was like he was actually there, doing it”. I predict calls to ban violent video games. I’ve reached the point where I’ve given up caring about massacres in the USA; I’ve researched why they can’t make laws controlling gun ownership and it turns out the Supreme Court has taken a very pro-gun interpretation of the US Constitution in some recent key cases. The decisions made have cast gun availability in stone, so to alter that in any way now it’s a simple matter of changing the constitution if they want safety. Which they’re not going to do, so screw ’em. Massacres are the price the USA pays for having those laws of its land.

If you’re not going to change your laws, quit whining.  Either you love gun massacres and stay in The Greatest Country On Earth, or you sod off to a proper country. Why not celebrate these massacres as a beacon to the rest of the world, a sign that your country loves freedom – and that the occasional mass killing is just a timely reminder of how valuable those freedoms are?  Besides which, those shot in mass killings deserved it – they failed to exercise their constitutional right to bear arms. Increase your personal safety and that of those around you – go buy a gun, right now!  Buy two: one for each hand.

Kids in the USA get Grumpy Duck has a gun.

Aussie kids get Grumpy Duck has a nothing.

The Roast can be seen on ABC2 at 19:30 three weeks out of four.

“Microsoft account”. One product, 6 names.

Hahaha, what a classic:

Microsoft account (previously Microsoft Wallet,[1] Microsoft Passport,[2] .NET Passport, Microsoft Passport Network, and most recently Windows Live ID) is a single sign-on web service developed and provided by Microsoft that allows users to log into many websites using one account.

Wikipedia

So over the years it’s had 6 names!

Nice work, Microsoft.

Mac Pro: RAM Red light

We got a second secondhand Mac Pro recently, and I was mucking about over the weekend with it. At one point, after taking out the RAM to clean inside, I noticed it seemed to think it only had 2Gb instead of 4Gb. (I’ve got another 4Gb on order.)

Then I noticed the flashing red light from where the RAM is plugged-in. PANIC TIME!

No, wait, calm down. But a quick Google found the solution, and I stopped panicking: Switch off, pull out the RAM, unplug the modules and plug them back in, push it back in. Reboot.

All good.

Of course, if it had still been flashing after that, then I’d definitely start panicking.

By the way, I still love the Mac Pro build, and how easily accessible the components are. I wonder if the new Mac Pro will be as good?

Summer 2013/2014 starts

The current 7-day forecast for Melbourne:

Friday   30 August           Max 20 Shower or two.
Saturday 31 August    Min 12 Max 23 Sunny.
Sunday    1 September Min 15 Max 25 Partly cloudy.
Monday    2 September Min 12 Max 23 Partly cloudy.
Tuesday   3 September Min 11 Max 25 Partly cloudy.
Wednesday 4 September Min 16 Max 26 Shower or two developing.
Thursday  5 September Min 16 Max 20 Shower or two.

I declare summer whenever there’s going to be 7 consecutive days in a row above 19 degrees.  Previously, the earliest Summer has started was mid-September, but typically it’s been moving forward from October or November.

Remember we’ve got an election coming up in a week’s time, and that’s your opportunity to repeal the carbon tax.  Which we need to do, to keep lovely balmy weather happening in winter-time and to keep the cost-of-living down.  Remember: carbon-dioxide is food for plants, and as such good for the environment, which is made out of plants. That’s just science.

Windows Vista: Could not connect to the System Event Notification Service

M's laptop got the above error after rebooting during a Windows Update.

The error itself appears just after entering the username and password. And the big problem is it then doesn’t logon, but just freezes up.

Doing a bit of Googling finds quite a few instances of this error, but usually on Windows 7. One notable thing: the problem means non-Admin users can’t logon, but Admin users can. But the other info around the place didn’t really seem relevant.

So I logged in as an Admin user, and while looking through the Event Log to try and find out what happened, I noticed Windows Update said there were 3 more Important Updates to go.

I let them go in, and then rebooted. Fixed.

Yeah I could keep digging to better identify the cause, but the problem’s resolved for now, and I’ve got better things to do.

So my conclusion (in the absence of any other information) is that this weekend’s Windows Updates somehow require an Admin user to logon to complete… and if not, they leave the SENS service unable to start, possibly as well as other issues that prevent non-Admin users logging on.

ABC’s Labor bias: Vote Compass

I am a single issue voter. I’m not proud to admit being so shallow, but there it is.  If there was a party that wanted to cut greenhouse gas emissions by 50% by 2020 and also drown kittens, I’d be in like Flynn – and not because I dislike kittens either. Perhaps it’s because I take a root-cause view of the world.  Immigration problems?  Address climate change or it’s going to get much, much worse. Not spending enough on education? Not much point in edumacation if the climate collapses around us and we’re up to our ears in climate refugees. Wrong telecommunications plan? Choosing between having enough food and downloading porn faster than you can watch it doesn’t seem to be much of a choice to me.

So, naturally I thought that the ABC’s Vote Compass wouldn’t have much trouble pigeonholing me. Except, it tells me my views align more closely with the ALP.  Although at one stage in its questioning it allows you to weight the importance of issues (which I gave as 1-3 for most, 4 for a couple and 10 for environmental) this clearly… doesn’t carry any weight. The anemic 5% by 2020 cut embraced by the two major parties means neither will get my vote, regardless of the technique to “achieve” such a “challenging” target.

And yet Vote Compass thinks I’d make a good ALP voter.  I think not.  The ABC’s Labour bias at it again.

Banshee: please, pick a version

Banshee is a cross-platform audio player built using Mono.

If you go to the official website and install Banshee for Windows, you’re offered version 2.4.0 with warnings about it being alpha and all (as of April 16, 2013 the latest version is 2.6.1). Once you’ve downloaded it, when you then run it up, you get the following dialog:
install-then-upgrade

Infuriating.  Why wasn’t I offered that one by the website? Naturally, one selects “Hell yes, give me the current (actually, still behind the main branch, but more current than what I’ve got) release!”, which is then followed by
download-failed

and no freaking explanation of what went wrong. How am I meant to fix this? Given that the project is built for a VM, why am I offered one version, then offered the chance to update to a different version, and both of these versions are behind the current release?

Gagh!

Christmas, already?

In Coles on the weekend, I bought (from an enormous stack) this season’s Fruit Mince Pies.

At the start of August.

Only five months to go before this particular seasonal treat is only on the shelves for a couple of post-Christmas months as stocks are wound down.

This is getting ridiculous.

Mac Pro – faster booting Windows than OSX

As I mentioned, my secondhand Mac Pro might very well be the best Windows computer I’ve ever owned. The hardware is just lovely, and it runs Windows really well.

Here’s the thing: it seems to boot faster in Windows 7 than it is in OSX 10.8 Mountain Lion.

  • Boot time (from Boot Camp menu to logon): 55 secs OSX / 35 secs Win7
  • Logon to desktop (from hitting enter on password, to desktop ready): 28 secs OSX / 12 secs Win7
  • Start Chrome and click bookmark for GMail: 10 secs OSX / 7 secs Win7

Once it’s running, OSX is very responsive, but the boot just seems to take ages.

What's going on here?

Perhaps being a 2008 Mac it doesn’t run OSX 10.8 that well… though I’d have thought it is a pretty fast box (2 x 4 core Xeon 2.8 GHz, 8Gb RAM). It’s true that Win7 is not the latest version of Windows — it appears Win8 is not supported on this Mac model under Boot Camp.

Does something in OSX need some optimisation perhaps? What's the OSX equivalent to running msconfig and turning off automatic startup for things you don't need?

OSX experts, any ideas?

Remote Desktop and ghost printers

For those who use RDP to reach Windows servers…

Event Viewer on the servers sometimes generates System Errors due to RDP sessions configured to try and connect printers… which don't exist on the servers.

Pretty silly, but it seems to often be the default for RDP, and it clogs up the Event Viewer with unnecessary errors, which slows you down when you go searching for actual errors.

It appears you can prevent this by configuring Remote Desktop to not try and use local printers in the session – eg under Remote Desktop, Options, Local Resources, switch off Printers.

You may need to configure this separately for each host you connect to… but those of us who have to look through Event Viewer for errors will save time, and thank you for it, if you do!

Replace a missing remote control with an Arduino and a laptop

I recently found myself without a remote for my WDTV Live media player, and limited resources to do anything about it – but I did have an Arduino, a breadboard and the local Jaycar had an IR LED.  Controlling IR devices is common practice with an Arduino. I would even be able to hack in functions that didn’t exist on the manufacturer’s remote – like creating a three minute skip by switching to 16x speed for 12 seconds.

The first port of call was to obtain Ken Shirriff’s Arduino IR remote control protocol library – as opposed to communications protocols, of which there are quite a number; did you know the first cut of WiFi included an infrared version? Without the remote, I wasn’t able to record and playback the IR signals sent to the WDTVLive, as you would with a learning remote. I had to find what to transmit from my custom remote. I little googling and I found the WD TV Live infrared remote control codes, which also helpfully reveals that the protocol is NEC.

I knocked up a quick proof of concept, installed it and watched it not work. Given I can’t see in infrared, I didn’t know if my circuit was working. I hooked a red LED up in parallel, and it didn’t light up; I thought I had cathode and anode swapped around, so flipped the red LED – and it didn’t light up. I pulled the IR LED, and then the red LED worked… I was shorting out the red LED. I couldn’t – with the bits I had lying around – confirm the device was transmitting anything. Rather than put the LEDs in series, I got a cheap camera-phone with video function, and it could see IR just fine. And it turns out the IR LED was transmitting something, but the WD TV Live media player wasn’t listening. Why?

The NEC infrared control protocol transmits 32 bits in one of two formats, one old (as in elderly) format encodes for 256 devices with 256 commands each, and the other encodes for ~64K devices with 256 commands each. The first 16 bits encode the device, and the second 16 bits encode the command. 16 bits for one of 256 commands, you ask? Well, one byte of the second 16 bits is the command, and the other is – for error checking purposes – the one’s complement of that. Further details of the pulse timing and protocol contents are available in various places, but they neglect to mention the extended addressing format. There are many IR control protocols. To use Ken’s IR library you need to know which protocol is used (which the google search revealed), and you can determine the protocol from the timing data found in the LIRC definition of a protocol, in this case the LIRC infrared control protocol for WDTV Live media player remote. The LIRC protocol defintion format is described by WinLIRC, so you can see what the timings are. In this case, the NEC protocol is revealed by the header, one and zero definitions, along with the fact that each code has 16 bits of ‘pre-data’ and 16 bits of data (a 32 bit package). Everything I could see was showing that the two, separately arrived at sets of command codes that were empirically sampled from the real world were compliant with the spec. One of the things the spec taught me was to transmit the NEC code twice, and to wait 70ms between re-transmissions.

I wasted time finding other codes for the remote, in other formats; I checked for byte ordering issues. Nothing worked.

The actual problem was the unsigned long for the command was previously an int; failing to notice this simple error led me to spend a long time trying to figure out why nothing was happening when I transmitted a command. One of the problems with the C language is the guarantees about data sizes aren’t worth much.  My entire life has been spent programming on architectures that have 32 bit data words; C compilers on these machines have all defined an int as 32 bits, but I’ve always been aware that the language spec says that an int is at least as wide as a short, which is at least as wide as a char with actual widths being up to the compiler implementation (although why you’d have different words for things of the same size is beyond me).  The AVR microcontroller in question has an 8 bit word; mathematical operands typically yield an 8 bit result (multiply is an exception) with compilers needing to implement more instructions to yield greater data widths. The defines express the codes as four byte values, which were then wrangled into a two byte int, and then again into unsigned four byte integer when passed to the IR library. Truncated bits in a protocol like this were the cause of inactivity.

Even with this fundamental problem solved, confusion was added by the fact that one of the memory cells in my Arduino is faulty. Once IR control code transmission was working, I noticed that sometimes it didn’t work. I decided to echo the command to the serial port, and the command being transmitted didn’t match that for the key pressed – the second byte was wrong. I added code to work around this memory corruption (not shown in the code below, because this is a pretty unusual). I’ve never come across this kind of problem before, recognising and then solving something like that is pretty old-school.

/*
Pin 3 is hard-wired into the IR library as the emitter
 */
#include <IRremote.h>
//#define DEBUG

IRsend irsend;

#define btn_enter  0x219E10EF
#define btn_right  0x219E906F
#define btn_left   0x219EE01F
#define btn_down   0x219E00FF
#define btn_up     0x219EA05F
#define btn_option 0x219E58A7
#define btn_back   0x219ED827
#define btn_stop   0x219E20DF
#define btn_rew    0x219EF807
#define btn_ff     0x219E7887
#define btn_play   0x219E50AF
#define btn_prev   0x219E40BF
#define btn_next   0x219E807F
#define btn_eject  0x219E08F7
#define btn_search 0x219EF00F
#define btn_home   0x219E609F
#define btn_power  0x219E48B7

// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
const int onboard_led = 13;
const int retransmit=2;
unsigned long play_after=0;

void setup()
{
  pinMode(3, OUTPUT);     
  pinMode(onboard_led, OUTPUT);     
  Serial.begin(9600);
  Serial.println("WDTV Live serial controlled IR remote");
  Serial.println("~ Power    Eject ^ & Search   Rew - + FF");
  Serial.println("  w         Back q e Enter   Play  P");
  Serial.println("a s d (Arrows)     x Stop    Last < > Next");
  Serial.println("3 - FastForward three minutes");
}

void loop() {
  unsigned long cmd=0;
  if (Serial.available()) {
    switch (Serial.read()) {
      case 'E':
      case 'e':
      case ')':
      case '0':
      case 'O':
      case 'o': cmd=btn_enter; break;
      case 'q':
      case 'Q': cmd=btn_back; break;
      case 'P':
      case 'p':
      case ' ': cmd=btn_play; break;
      case 'S':
      case 's': cmd=btn_down; break;
      case 'W':
      case 'w': cmd=btn_up; break;
      case 'A':
      case 'a': cmd=btn_left; break;
      case 'D':
      case 'd': cmd=btn_right; break;
      case '-':
      case '_': cmd=btn_rew; break;
      case '=':
      case '+': cmd=btn_ff; break;
      case ',':
      case '< ': cmd=btn_prev; break;
      case '.':       
      case '>': cmd=btn_next; break;
      case '/':
      case '?': cmd=btn_option; break;
      case '~': cmd=btn_power; break;
      case '!':
      case '1': cmd=btn_home; break;
      case '^':
      case '6': cmd=btn_eject; break;
      case '*':
      case '8': cmd=btn_search; break;
      case 'x':
      case 'X': cmd=btn_stop; break;
      case '3': 
        if (!play_after) play_after=4; break;
    }
  }
  if (play_after > 0) {
    if (cmd) {
      play_after=0;
    }
    else if (play_after > 5) {
      if (play_after < millis()) {
        cmd=btn_play;
        play_after=0;
      }
    }
    else {
      cmd=btn_ff;
      if (--play_after == 0) {
        play_after=millis()+12000;
      }
    }
  }
  if (cmd) {
    digitalWrite(onboard_led, HIGH);   // turn the LED on to indicate activity
    for (int i = 0; i < retransmit; i++) {
      irsend.sendNEC(cmd, 32);
      delay(70);
    }
#ifdef DEBUG
    Serial.println(cmd, HEX);
#endif
    digitalWrite(onboard_led, LOW);    // turn the LED off - we're done transmitting
  }
}

In other links, How-To: IR Remote Control your Computer