You are here

hardware

More memory in a Dell Latitude E5420

"I'm amazed, Dave. My mind is returning. I can feel it."

I bought a Dell Latitude E5420 some eighteen months ago, for exclusive Linux use. I've been mostly happy with it, although it's been liable to "run hot" when there's more than a couple of applications going (especially if one of them is either update-apt-xapi or Chrome with active Flash) and at that point the disk churns a lot, the fans come on, and the load average suddenly rockets despite there being very little CPU usage.

The iotop utility didn't reveal much: commands would sometimes thrash the disk a bit, but then only sporadically and for small volumes (especially compared to how much the disk icon was itself flashing.) I wish at the time that I'd known to make more use of vmstat, to measure how much the swap space was being thrashed, because I increased the memory from 1x2GB to 2x4GB...

... and the thrashing completely went away. It seems that my machine simply didn't have enough memory for what I wanted to run, and Ubuntu would have to keep writing not-currently-used memory pages to the swap space on disk, to make room for more data actually in memory. Admittedly it was rare that I would run the 1GB VM that would sometimes bring my 2GB host laptop to a standstill, but presumably other applications were just as memory-hungry..

There's no great moral here, and I appreciate I don't particularly come out of this well ("if in doubt, take the screws out" isn't the best route to debugging resource problems) but I would say that if your machine seems to be thrashing the disk for no good reason: try increasing the memory. But maybe check iotop and vmstat first, unlike me.

Blog category: 

Buying a laptop cover without the laptop present

It's like a wonderful logic puzzle, solved by expanded plastic foam!

I need a laptop cover for my laptop. One of those close-fitting sleeves. The only problem is, my laptop's a weird shape: not only does it have a 16:9 aspect ratio, but it also has an extra-large battery sticking out at the back.

That's not the only problem; the other problem is that when I go shopping for a sleeve this weekend I don't want to have to carry my laptop around with me. So either I guess at the right dimensions, or I make sure I buy big.

... Or... I take the expanded plastic spacer that came with my wife's laptop sleeve, and cut it to size! The bits that I cut off, I can glue on the top to increase the depth (it's a chunky Dell beast, you see.) and if I arrange the bits really carefully, like this:

Magical DIY laptop spacer-cum-laptray

... then the resulting assemblage of plastic foam can be carried with minimum heaving around Oxford city centre looking at laptop bags; but afterwards it can also double as a makeshift laptop tray, for use when sitting on the sofa or in bed! The space underneath means the fans should be kept fairly clear, to do their whooshing thing when they need to.

I've looked at a few laptop trays and none of them seem amazing: I could really do with that clearance underneath. But to do that properly, you have to have a tray that's built especially for the footprint of your laptop. Well, now I have that.

What I need next is a sleeve.

Installing Ubuntu Oneiric Ocelot on a new Dell Latitude E5420

In summary: it mostly works, and it could be a lot worse.

My old Dell Precision died a few weeks ago. The graphics card seemed to die suddenly and without warning: the monitor screen is now merely backlit black; and plugging a second monitor on yields the sort of blinking gibberish you used to get when you reset a ZX Spectrum.

Despite their mediocre environmental record, Dell were my choice of replacement as they're one of the best of a bad bunch. They're rather cagey about Ubuntu support - and no longer sell preinstalls in the UK from what I can see - but we had recently bought a Latitude E5420 for the office and successfully installed Ubuntu Oneiric on it, I think. So this was a known quantity: even though it was tempting to buy a Macbook Pro and install Ubuntu on it, the installation guide was sufficiently problematic at the time of purchase for it to put me off (especially the possible temperature sensor problems.) I just wanted something that would work.

After my Latitude E5420 was delivered, I began an installation of Ubuntu Oneiric Ocelot on it. This was initially hampered by a badly burned Live CDROM: honestly, why are we still using these dreadful plastic things these days? Yet while you can jump through hoops to build "Live USB sticks", the default remains yet another Ubuntu bird-scarer. Eventually, though, it was installed and running fine:

 

  • GOOD: Wifi and Bluetooth both work out of the box.
  • GOOD: Sound and video are great, including second monitor support.
  • OK: Power management isn't brilliant, but powertop really helped configure the system.
  • POOR: The built-in webcam keeps resetting to pitch-black defaults, especially when used with Skype. Not clear why.
  • BAD: With an encrypted home directory, the machine will not recover properly froom hibernation.

 

My initial impression of the much-maligned Unity was that it was simply a different way of doing things from Gnome: more like OSX plus Quicksilver than Gnome's kind-of souped-up WinXP. However, as I tried to use it further, I kept coming up against quite nasty software failures. The CompizConfig Settings Manager (you're meant to know what ccsm stands for, by the way) frequently crashes when I turn certain plugins on and off; and Unity's about:config causes my entire display to hang under a still-moveable mouse, which ironically happened while I was writing this blogpost.

For some time Unity also flatly refused to start properly (launcher and menu bar would never appear) and I had to make do with Unity 2D. Eventually, with no intervention on my part, it just started working again. Who knows what was going on? And what fixed it? There are a few things I have been able to fix, though, with varying levels of success:

  • The launcher icons, too big on a 14" display, can be resized with ccsm using experimental features. This setting is unfortunately ignored when you fall back to Unity 2D.
  • Third-mouse-button emulation doesn't work out of the box, but it's quick to fix with a legacy Gnome program. However, the fix doesn't always appear to manifest itself in Unity itself. So not much of a success story, then.
  • After using a second monitor, my display suddenly behaved very odd indeed: there was a two or three second delay between moving my mouse or pressing a key, and having it appear on the screen. At the same time, my system would run "hot", with kworker processes taking up at least a couple of CPU threads almost full time. A lot of hunting around  led to me adding the following line in /etc/modprobe.d/local.conf:

options drm_kms_helper poll=N

In fact, if you google for that kernel module (drm_kms_helper) you essentially get a long list of people complaining about its effect on system load, plus a rather swamped explanatory page that it's something to do with being able to set display parameters in kernel space rather than user space.

Generally speaking, I'm happy with my machine and broadly happy with Unity: I think some of the criticisms of it are misplaced. Certainly in the whole of this long rant by esr, there's only one objectively valid point, that binary config files have no place in a Linux distribution. The rest can just be considered a write up of a single round of user-testing: informative as far as it goes, but in no way definitive.

I would say, though, that I don't "trust my weight" to this machine the way I've done with previous ones. Unity is still not what one would call full-release code: while not alpha, it's certainly not much beyond beta; about:config should never crash your display, ever, and other glitches make it possible to entirely lose your work, unless you're in a Google doc or at the command line.

While I'm not yet planning to jump ship to Linux Mint, I'm certainly hoping that April 2012's Precise Pangolin, as an LTS release, will fix a number of these quite serious stability issues. Graphical stability over graphical fanciness every day; and with that in mind I'd advise anyone who wants their machine to be ridiculously stable, yet still with a Debian-based and graphically pleasant OS, to stick with the previous LTS, Lucid Lynx.

Blog category: 

Ubuntu Linux on a Macbook

'Cause baby, if it feels so right. How can it be wrong? 

Feast your eyes on this:

Ubuntu Linux on a white Macbook

No, it's not photoshopped. What you see is indeed one of Torchbox's white Macbooks, running Ubuntu "Lucid Lynx" Linux. A few years ago, when I was looking for a new work laptop, Tom suggested in a moment of madness that I could get a Mac and run Linux on it. At the time I thought it was the silliest thing I'd heard of. Imagine!

Fast forward two and a half years, and the enormous Dell brick that I bought has started to become more of an annoyance than anything else - too big, too heavy, built-in mouse's buttons broken, battery frequently flickers down to 50% capacity - and it's time to decide whether I want to switch to another existing office laptop before some of our new hires arrive. That idea of Tom's (yes, Tom, if Stewart asks then it's your idea) strikes me again. Could it be possible?

In the end, it was almost ridiculously easy: after a fair bit of hassle resizing partitions; I managed to find relevant documentation online; the Ubuntu 64-bit Lucid Lynx "Live CD" booted the machine straight away so I could confirm (a) it worked and (b) the things nobody expected to work, didn't work; the install sequence took about ten minutes; and the solutions to post-install issues were exactly as documented.

There were only two major problems that dogged me much of the way. Each of them is somewhat stereotypical of the respective community or technology involved:

  1. As mentioned above, OSX/Boot Camp steadfastly refused to change partition sizes on the machine. A graphical interface took me through some cute wizard with progress bars, then summarily told me I'd have to back up the machine and reinstall OSX. Then the OSX install disks said that I couldn't install OSX on this machine. What they both should have said was "Use GParted: it might not be as pretty as they make Mac apps, but you'll be able to work your way through using granular controls we won't let you touch." This is evidence of the standard internet trope OSX as a tamper-proof sealed unit.
  2. Ubuntu's documentation is an absolute rat's nest. I can't even find the comparison matrix of Macbook and Macbook Pro machine types that leads you off into the relevant documentation pages. What I can tell you is that you'll need the catchily named "MactelSupportTeamAppleIntelInstallation" for most of your initial setup and installation, and "MacBookPro" for Macbook Pros or, er, "MacBook" for Macbooks, or Mac Books as the wiki would have them. This is evidence of the standard internet trope Linux as an unnavigably documented hobbyist's pursuit.

But really, if I were to make too much of either of those problems in this context then it would be cavilling. Partition resizing is easy to get horribly wrong; and that ridiculously complete level of documentation didn't even exist two years ago.

This has been a trial installation really, as I hope to eventually get a hand-me-down Macbook Pro to run it on. But this finished article has functioning wifi and a working webcam (both of which are proprietary monsters), great sound and the most beautiful DVI-powered second display I have ever seen. After coding on two huge LCD displays for nearly two years, I would still gladly switch to a wee Macbook monitor, typically closed and connected to just one of those large LCD displays. DVI seems to make all the difference over VGA, although I would have never believed it.

Now, of course, I want a Macbook for home use. Running Linux, of course: but maybe this was Tom's idea all along. Mactel Linux as a gateway drug. I can hold out, though; at least, I can wait for them to sort out package management first.

Hardy Heron and the Dell Precision M4300

Summary: it just works.

In brief: the problems discussed here and here go away under the most recent Ubuntu release, Hardy Heron, which I can generally recommend.

Alsa seems stable and graphics support is present from installation onwards. Enabling fancier 3D compiz effects requires the nvidia-glx-new package; compiz spots this, however and prompts for installation. All very smooth. Wireless works; my VoIP headset works; but I haven't yet tested Bluetooth.

The only problem was in upgrading from Gutsy: my previous peregrinations had rendered my hybrid distribution shafted and incapable of upgrade. This isn't a problem, though, if one has installed the /home directory (and in my case the /music one too) on a separate partition: the Ubuntu Live CD will blat the root partition with Heron, but leave the other partitions alone if you so require. Don't resize any of your partitions during installation, though, or you'll lose everything. Everything!

The full sensory experience of Linux on a Dell M4300: sound, vision and tinfoil-hat microwaves

Gutsy Gibbon on a Dell: almost everything has been fixed (edit: see Hardy Heron for absolutely everything being fixed).

Now that Gutsy Gibbon is fairly mature, I’ve managed to upgrade my machine to it and am now running the 2.6.22-14-386 kernel. More importantly, with a minimum of fuss I now have video, wireless and sound!

Long-term readers of Graceful Exits might remember that the too-new hardware in my Dell Precision M4300 needed some rather nasty hacks just to get both display and wireless card working. One of those left me with a weird hybrid Gutsy/Feisty installation of Ubuntu, which worked for a while. I could get both video and wifi (by compiling both myself) as far as the 2.6.22-9 kernel, but no further. I needed to upgrade fully to Gutsy.

From hybrid to Gutsy Ubuntu

Upgrading from the hybrid version required me first to comment out the two Gutsy repositories I’d sneaked into my /etc/apt/sources.list. Then gksudo update-manager -c presented me with the necessary upgrade button. An hour or so later all the packages had been downloaded, but it took a whole day to have to keep going back and clicking on “OK to replace this configuration file” popups in between sleeping, showering and going to work. There must be a better way for Ubuntu to do that during mass package installations such as an upgrade.

What worked and what didn’t

When it comes to display drivers, Gutsy is very forgiving. My nVidia drivers didn’t work straight away, but the machine realised this and presented me with a low-res VESA mode, which in turn led to a low-graphics mode that was still more than adequate for the mean time. When Gnome finally finished starting, I noticed with joy that wireless works in Gutsy out of the box. I didn’t need to download the iwlwifi package and compile it. Lovely.

If I were going to nVidia, I wouldn’t start from here

Envy is an easy way to install the right nVidia drivers for your machine. However, if you’ve already tried to install the drivers using nVidia’s own packages (as I had, back when I had a hybrid system), you need to find and delete these files. modprobe -l nvidia will tell you where they are: run envy -t and uninstall everything, then delete whatever’s remaining in, oh, something like /lib/modules/2.6.22-14-386/kernel/drivers/video/nvidia.ko. Then reinstall the drivers with Envy. That should be enough.

Alsa is a known problem, to put it mildly

A comment on Ubuntu bug 131133 describes the Alsa codebase as “mercurial”. Apparently the snd_hda_intel support is fixed and broken on alternate releases, and Ubuntu High Command are doing all they can. In the interim there’s a workaround: method A worked just fine for me.

I’m terribly, terribly happy. K’s even happier, as now she’ll be able to prise me away from frequent driver recompilation messes.

Blog category: 

Distributed FM radio from a single digital signal

There’s currently no plan to switch off FM stations. In fact, many radio bosses have said oh, for heaven’s sake to the very idea. There is, astonishingly, less of a plan for radio switchover than there is desire among the general public for TV switchover. So that must be some sort of record for nothingness.

Seriously: who among us is just itchy and fidgety, waiting for analogue TV signals to be switched off? Who wakes up of a morning thinking, ooh, Whitehaven have to buy Freeview boxes now! with a frisson of glee? Radio switchover would be even more disastrous, of course: whereas TVs normally have a gap between themselves and an aerial into which to insert a Freeview box and convert digital to analogue, most radios are monolithic: receiver, “decoder” and audio equipment all together. That means that the average of five radios per household would be simply landfill material, useless fizzing boxes capable of picking up nothing but static. Future generations will already find a sliver in the geological strata that they can classify as “analogue to digital”; FM switchoff would add a shiny, plasticky laminate to that layer.

Here’s a thought, though: how about a little digital-to-analogue converter for radio? It could be the size and construction of, say, a Fon, and configurable over USB. It would transmit FM in the style of an iTrip to fill perhaps the room it’s kept in, plus neighbouring rooms. It could transmit multiple FM stations at the same time, and even mimic the frequencies of the analogue stations (if they were ever, say, switched off without anyone wanting them to be: God forbid!)

But what if your converter’s chosen frequencies conflict with next door? FM transmission depends on phase coherence, so even if your two boxes were within an electronic ace of each other frequency-wise, they’d still interfere with each other and cause all sorts of beating, flangeing and other dirtily-named auditory confusion. At least when someone passes you on the motorway and their phat BMW iPod transmitter briefly swamps yours then they’re gone quickly, hopefully to come to some sort of messy grief on the next bend. But if you’re stuck near someone who permanently foxes your radio listening—and it would only take maybe three or four such converters for a conflict to be inevitable in the narrow FM band—then what do you do?

Answer: let the converter boxes know how to talk to each other. Let them negotiate their frequency spreads. Let them, moreover, report back to you over what sort of understandings you and your neighbour’s radios can come to. Let them synchronize, if possible, on stations you both want to listen to, strengthening the signal and meaning both of your houses are entirely covered by the FM cloud. Exploit, don’t squash, the wisdom of the group.

Barcamp left me with a sticky keyboard

The inevitable keyboard accident happened at Barcamp, although not as badly as I think Tristan Roddis suffered. A few teaspoons of a particularly sugary branded drink ended up under my arrow keys, which meant that pressing up became an unpleasant feedback experience. I should’ve asked people for advice at the time, to be honest: I had to hand a gathering of like-minded, caffeine-addicted typing machines, some or most of whom had probably done the same thing in the past. But it only became an obvious issue after a few days, and so I had to work out myself how to clean the keys.

There’s lots of help out there, but most advice begins with unscrewing the laptop case, something I was unwilling to do owing to its youth. With hindsight I’ve been able to Google a similar suggestion to the method I followed, but at the time I wass just making small, non-destructive steps towards getting rid of the stickiness.

I started by, of course, switching off the laptop and removing the battery. The latter bit may or may not be important, but I was taking no chances. On this keyboard (yours may vary!) I found I could prise the keys off if I pull them either on their top or bottom edge: they have four plastic connections to the base, and removing them this way unclicks two connections at once. Pulling them up from the left or right would put stress on the connections opposite instead, and I’ve had key mountings break before doing that, so be warned. With the plastic head of the key removed, the board reveals the rubbery underlay nipples (say that out loud, I dare you) that each key squashes when it’s pressed down.

With my up-key nipple thus revealed (!) I found some cotton buds and a can of WD40. I sprayed the WD40 at the bud—not at the keyboard, as it can go everywhere—and then rubbed the sticky fizzy drink off the exposed internals with the bud. Two buds to clean and one to dry up the WD40, although WD40 shouldn’t do too much harm in small amounts: I think keyboards ship with a gentle frosting of some specially mixed lubricant anyway, so the WD40 was only replacing that. But still I dried off the nipple, replaced the key gently—again watching out for the four delicate plastic connections under the key—and superstitiously left it all to dry for a minute or two before reconnecting the battery and starting it up.

Now the key works just great. And in one fell swoop I’ve written a post that’s almost guaranteed to get hordes of entirely the wrong sort of visitors to my blog.

Blog category: 

DO NOT BEEP!

On both my work and home Dell laptops, the computer beeps at full volume when you change the sound settings. This has come close to shattering my eardrums on several occasions these past few days.

Bizarrely, if you open “Control Panel > System > Hardware > Device Manager”, and click on “View > Show hidden devices,” then there’s a Non-Plug and Play Driver for a service called “Beep”. And, unlike most XP services, this one does exactly what it says. It beeps. And beeps. Whenever a system beep is needed, Beep is there, with its full-volume flava and rich, screeching aroma! Disable it and reboot, or do something more clever if you need to.

Blog category: 

Laptop and Linux: the fixes for a Dell Precision M4300

Getting a Dell Precision M4300 to work with a weird Feisty/Gutsy hybrid Ubuntu (edit: upgrading to Hardy Heron eventually fixed everything).

The Ubuntu Live CD worked straight away for the laptop: I was able to boot into a temporary copy of Linux using the VESA display drivers, and test sound, CD and other peripherals (obviously) and wired networking. However, optimising the system wasn’t so easy, and as I say Nick practically installed Ubuntu for me, fixing all that he could.

Below is a list of the main fixes and workarounds that Nick employed, for my reference as much as anything else.

Kernel

Gusty Gibbon kernel, headers etc. on a Feisty Fawn installation, mixed with apt-pinning; necessary to get the wireless to work.

Wireless

Bleeding-edge Intel wireless drivers were needed for the IPW 4965 chipset (they in turn need most recent kernel). Download the following:

  • mac80211 8.x driver
  • ipw4965 latest driver source
  • ipw4965 latest firmware

The 4695 is a firmware-less card, so you need a copy of the firmware in /lib/firmware/: it gets automagically flashed to the card on boot.

Then, the nastier bit,

  • install Gutsy kernel headers
  • patch kernel headers for mac80211
  • build ipw4965 module

Three lines, detailing so much pain. At least the kernel itself didn’t need recompiling.

Sound

Although ALSA is configured correctly, there’s some bug in the handling of this version of the 82801H chipset. I’m looking into it: there’s nothing more embarrassing than making your users choose between good networking and audio playback…!

Display

The most recent version of the linux-restricted-modules for Gutsy now makes this fix redundant, but initially we needed a bleeding-edge 100.14.09 version of the NVidia drivers to get the display working properly.

The hack to install that was originally accomplished by downloading a non-standard installer and crossing one’s fingers; it worked pretty well but the restricted modules kept trying to do their bit and had to be removed. If you’re sure you have a compatible, hacked-in NVidia module on your system but the restricted version keeps butting in, then sudo modprobe -r nvidia and then restarting X works: Xorg looks in the right place, whereas the kernel gets it wrong.

Edit (2.6.22-10): doesn’t seem to support 100.14.09, so back to the NVidia downloads again.

CDROM

There seems to be a recurring bug with the Linux kernel and SATA CDROM drives, frequently whacked but never fully squashed, that the Gutsy kernel has fallen prey to: my CD drive was not at /dev/scd0 by default. Running sudo lshw produced no details under “*-cdrom” There are a lot of solutions out there, but the one that seemed to work for me was to load the ide_cd module using modprobe.

This does seem to have put my CDROM at /dev/hda, which took a bit of finding, but at least as soon as I ran modprobe Sound Juicer spotted the audio CD in the drive. I’ve not yet tested CD writing, nor DVD writing, so I don’t know yet whether or not I actually need ide_scsi instead; Nick assures me that as most devices support ATAPI these days then the SCSI support shouldn’t be necessary.

Bluetooth

The Precision seems to have an internal USB bluetooth dongle! hcitool finds it with no trouble. I’ve not used it yet and might need to add hci_usb to /etc/modules.

Firewire/1394

As I don’t have any Firewire devices, I still have to have a poke around for this; might need the firewire host controller driver, or sbp2 (SCSI over firewire). Watch this space.

Blog category: 

Pages

Subscribe to RSS - hardware