Hardy slow wireless :(

July 23rd, 2008

Yet more problems with Hardy. When I unplugged the laptop from the ethernet cable and tried the wireless (which had worked perfectly on gutsy) it became very very slow.

A quick iwconfig confirmed that the rate had dropped to the slowest possible

Rate=1 Mb/s

Pages took several minutes to load.

A quick search confirmed my worst fears, it’s a bug in the rt2500 driver.

One quick work around is to force the card to work at maximum speed with the command:

iwconfig wlan0 rate 54M

This works for now. The only other solution I’ve found involves compiling the serialmonkey driver from CVS source. Normally I wouldn’t mind doing this but chances are it’ll break network-manager and probably need recompiling for every kernel update. :(

This is quite disappointing.

There is a thread about the issue here.

Sound Issue on Hardy.

July 22nd, 2008

I’ve found since upgrading this laptop to Hardy that sound sometimes stops working in all applications.

I have a feeling this is an issue related to pulseaudio.

If you try to play a sound file from the command line with something like ogg123 then there is an error message:

ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave

Anyway, the solution:

It is probabaly caused by bugs in flashplayer, installing the package libflashsupport seems to have sured it.

We’ll see…

Upgrade to Hardy

July 22nd, 2008

I decided (against my better judgment) to try and upgrade my laptop to Hardy from Gutsy via the update manager.

I have had bad experiences in my fedora days trying to upgrade from one distro version to another. That several years ago using CDs to upgrade. Surely by now this sort of upgrade should be possible without too many headaches!

Wrong.

Long story short after clicking the upgrade button every thing seemed fine until the installer stopped dead and the CPU usage jumped to 100%.

I waited half an hour or so and nothing happened.

Dropping down the “details” window I found that the install process seemed to have stalled at:

Generating locales…
en_AU.UTF-8…

I tracked it down to this bug.

The fix that worked for me was to:

  • reboot
  • At the grub menu choose kernel 2.6.22-14 (not -15)
  • When at the login screen press ctrl-alt-F1 to bring up a terminal
  • log in
  • run “sudo dpkg –configure -a” (this takes ages)
  • type “sudo shutdown -r now”

This seems to have worked and I am now running Hardy on this machine.

Ubuntu Gutsy on the eee PC (alternate install from USB key)

April 3rd, 2008

I decided to install ubuntu to the hard drive (solid state drive) on my eee for several reasons

  1. I like ubuntu
  2. I like the massive community support
  3. I like the extensive repos full of debs.

…and I decided to use the alternate install CD image because the installer fits nicely on the eeePC screen…

fit, brighter

There are many ways to install ubuntu on the eeePC and a some are detailed on the eeePC user wiki.

I did it using a USB stick (2GB but 1GB would be enough) which I prepared on another linux computer but it should be possible to do this on the eee it’s self. (Note, to do it on the eee you’d need to install syslinux and mtools packages.)

An easy way to create the USB installation key is to use the hd-media kernel (downloadable from ubuntu archive)

Instructions:

Make fat16 partition on USB stick (at least 750MB, 1GB recommended)
Make partition bootable.
Download http://archive.ubuntu.com/ubuntu/dists/gutsy/main/installer-i386/current/images/hd-media/vmlinuz
Download http://archive.ubuntu.com/ubuntu/dists/gutsy/main/installer-i386/current/images/hd-media/initrd.gz
(both to root dir)

Something like this from the terminal:
$ cd /media/usb_disk
$ wget http://archive.ubuntu.com/ubuntu/dists/gutsy/main/installer-i386/current/images/hd-media/vmlinuz
$ wget http://archive.ubuntu.com/ubuntu/dists/gutsy/main/installer-i386/current/images/hd-media/initrd.gz

(Important note: hd-media kernel image must match the kernel version on the install CD image so that it can use the same compiled modules from the .iso. The above kernel and initrd should match the Gutsy iso images. If you wish to install a different version of ubuntu, for instanence when Hardy Heron is released, then use the hd-media kernel in the archive for that release.)

download the iso image you wish to install to the root directory of the partition next to the kernel and initrd which have just been downloaded.

Something like this from the termainal:
$ cd /media/
$ wget http://archive.ubuntu.com/ubuntu/dists/gutsy/main/installer-i386/current/images/hd-media/vmlinuz
$ wget http://archive.ubuntu.com/ubuntu/dists/gutsy/main/installer-i386/current/images/hd-media/initrd.gz
$ wget http://releases.ubuntu.com/gutsy/ubuntu-7.10-alternate-i386.iso

Issue the following command in the root directory of the USB stick to create a minimal config file for the syslinux boot loader
$echo -e "DEFAULT vmlinuz\nAPPEND initrd=initrd.gz" > syslinux.cfg

First find out the device name of your usb stick, from the root directory of the partition (where the the four files should be) give the command:

mount | grep `pwd`|cut -d" " -f1 -

The command should tell you the device name of your USB stick.

To make the device bootable you need to install a master boot record and the syslinux boot loader to the usb device. To do this you should have the device plugged in but not mounted. Once you have finished copying files to the device and found it’s device file (/dev/sdXx) unmount it (right click the icon and click safely remove) but leave the stick plugged in.

Now to make the device bootable.

Install syslinux if required.

$sudo apt-get install syslinux

Install the master boot record which comes with syslinux replacing the X below with the letter identifying your USB device.

$cat usr/lib/syslinux/mbr.bin > /dev/sdX

(note there should be no partition number here. Also this step might not be necessary if the stick contains a valid mbr but won’t hurt))

Make the device bootable with sys.

$syslinux -sf /dev/sdX1

You should now have a working USB install key. Plug it into any USB port on the eee and reboot. when the boot screen shows hold down the escape key and select it from the list. The installer should now boot.

Summary

  1. Prepare an empty USB stick
  2. Download 3 files to it (vmlinuz, initrd.gz, iso install CD image)
  3. Create minimal config file (command above)
  4. Find /dev/ file (command above)
  5. Fix master boot record (command above)
  6. Make partition bootable with sys linux.
  7. Reboot hold esc and install.

Eee PC and TV

March 31st, 2008

One of the party tricks of the eeePC is that it comes with a standard 15-pin D-sub port (VGA port) and happily most new TVs being manufactured these days come with a compatible input allowing me to do this…

TV

And it works just as well in Advanced mode (Full desktop)

tv

Of course having a laptop that does this is not exactly ground breaking but the eee is so small and quite that it makes a nice portable media device especially if you want to stream content from the internet.

The eeePC OS

March 20th, 2008

When first booted the eeePC will lead you through a very simple setup and before you know it you’ll be in the machine’s default OS. It is a modified Xandros and is very simple to use. I has clearly been designed with simplicity in mind and it achieves this goal very nicely.

very simple UI

It has an “Internet” tab with some useful icons and a “Work” tab with open office and a few other handy apps.

work tab

For the internet stuff to work of course the eee must be connected to the internet. It works perfectly well wirelessly or using the wired ethernet connector. Here it is detecting my wireless network.

wireless network found

I found the wireless manager application a bit fiddly to use but got used to it pretty quickly and never had any network problems.

The default UI is very simple but has the power of the command line just a button press away. Press ctrl-shift-t and you will have a terminal window to execute commands.

As well as this simple user interface the default Xandors OS can be easily switched to a full desktop. Simple instructions can be found on the eeePC user wiki. There are several ways to enable the full desktop (advanced mode) but maybe the easiest way (assuming you have not installed any additional repositories) is to press ctrl-shift-t to bring up a terminal and type the following commands.

$sudo bash
$apt-get update
$apt-get install ksmserver kicker

Reboot and it should now be easy to switch between simple and advanced modes.

switch

gives you…

advanced

And to switch back you can use the easy mode option in the launch menu.

I’m not really a big fan of KDE and I’m told this is quite an old version but it certainly does the job. It is a far more conventional desktop environment than easy mode and will probably make your average desktop used feel more at home although I think there is a lot to be said for easy mode.

 

 

 

eeePC

February 21st, 2008

Woot!

I’ve got my hands on a eeePC from ASUS.

eeepc

These are not especially easy to get hold of here in the UK. Some places have the surf models (the lowest spec) for sale but most retailers say they are waiting for stock.

I got the 4GB model from efficeintPC here in the UK which is a small friendly Linux oriented company run by a nice bloke named Dale.

The specs of my 4G model are:

  • Intel CPU, Chipset and GPU
  • Solid state drive instead of hard disk (No moving parts)
  • 7” inch screen
  • Linux operating system. (Modified Xandros)
  • Ethernet (10/100Mbps) & Wireless (802.11b/ 802.11g) connectivity
  • 512MB (DDR2) memory (upgradeable)
  • Built-in webcam and microphone (works really well with skype)
  • Stereo speakers
  • 5200 mAh Li ion battery. (3.5 hours normal usage)
  • Weighs only 0.92KG

The package arrived and in true blog style I thought I’d document the grand opening by taking photos. Unfortunately I was too excited about my new toy to waste time finding a proper camera, so these photos were taken on my phone.

boxopen

contentscontents

The first thing I noticed about the eee is the size. It is tiny as can be seen in the last picture above with a CD for scale.

It feels really good quality, it feels well made when you hold it in your hands. Some cheaper laptops feel flimsy they creek when you pick them up and you always feel like the hinges might break. Not so with the eee. It feels well made and solid.

The other thing it feels is light. Really light. Less than 1kg (2 pounds) is so light that you don’t really notice if you put it into your bag with your other stuff and take it with you everywhere you go :)

The Xandros OS is nice too they have made a nice job of it and it does what you want it to do. I’ll blog about the OS later.

The WiFi reception is fantastic. I’ve found that sitting in my front room (which is quite far from my dd-wrt router) I get better signal and more speed than I got with any of the three more expensive laptops I’ve tried in the same spot.

Other great features include three USB2.0 ports and a built-in card reader (SD, SDHC and MMC), important for two reasons: (a) You’ll need extra storage (b) The eee can boot from SD cards and USB storage devices! This means you can put an OSs on removable media and switch them in and out! Members of the eecPC forum have installed all sorts of OSs including ubuntu (just about every other flavour of Linux), windows XP and even Vista. I intend to install some distros and post about it in the next week or so.

It seems a large community has already grown up around the eeePC and the website eeeuser.com has a great forum and an extensive wiki with articles covering everything you could think of and many things you couldn’t.

I’m really impressed with my eee. I’m trying to think of anything I don’t like about it. The only two minor niggles I have is that the keyboard is a bit fiddly and given the choice I’d have probably have sacrificed some battery life for and extra inch of screen but these are design choices which I’m sure were made to keep the price down.

I am amazed that such a fully featured ultra portable device can be sold for such a low price.

Worth every penny.

 

Homeplug

February 15th, 2008

Just a little note.

Part of my house was not well covered by Wi-Fi. I considered several different solutions to get an internet connection into the room in question and then plumped for power line networking.

I bought two of these things from Solwise in the uk

Homeplug

…and I was pleasantly surprised by just how good they are.

They do exactly what it says on the tin… err box.

You just plug one into a power socket somewhere in your house and another into any other plug socket in your house and it’s as if you had run an Ethernet cable between the two.

The one minor gripe I have is that they come with some windows only software but they work fine without using it.

Moving to WPA, Windows XP Problems and Network-manager

February 7th, 2008

My original wireless router did not support WPA so I used WEP. I know WEP in insecure but I had little choice. I did some testing and managed to crack my own WEP key using a linux laptop and all the normal tools within about half an hour. This was not good as my security model was basically to relying on my neighbours being too lazy or stupid to want to use my Internet connection for free.

When I got my shiny new router and flashed it with dd-wrt I decided that this was a good time to go to WPA.

I logged in to the router and set a new ssid in the “basic” tab. From the wireless security settings dialog I had several choices:

ddwrt

I chose “WPA2 Pre-Shared Key Only”, set algorithm to AES (I read that this performs better) and entered a key.

Next I tried to connect and my Ubuntu laptop and everything worked flawlessly.

Unfortunately several windows XP clients use my network and they wouldn’t work. Windows XP just kept telling me it couldn’t connect to the network…

After some research I discovered a startling fact. Windows XP cannot connect to WPA2 networks!

If you want windows XP to connect to a WPA2 network you have to go and find, download and install a special patch (KB893357). Presumably Vista works better.

Patching all the XP machines didn’t seem like a fun way to spend Sunday afternoon so I decided to just use WPA instead.

Back into the dd-wrt set up and this time I chose “WPA Pre-Shared Key”. All the windows clients sputter into life and connect. Great…. oh but now my Ubuntu laptop won’t connect….

To cut a long story short (ish) network-manager was trying to connect to the network and failing. In the end I tracked to problem down to the fact that network-manager remember some info about wireless networks it has seen before. When it sees a network with the same ssid (and maybe MAC addess) it tries to connect with the key which it used last time.

In this case it failed because it remembered (and was expecting) a WPA2 network and instead of noticing that it was now WPA network it just sits there for ever trying, unsuccessfully to connect.

The solution (work around) is to delete the information Network-manager has about the network and allow it to rediscover the network as if it had not been seen before.

To do this I used a tool called gonf-editor which is a horribly opaque mess of meaningless undocumented settings presumably modeled on the windows registry editor.

gconf

The info is under system>networking>wireless>networks. As the image above shows network-manager remembers all the info a set of “keys”. The important key is the bottom one called wpa_psk_wpa_version and it has the value “4″. This signifies that the wireless network is WPA2. If a network is detected as WPA this value is set to “2″.

The easiest way to solve the problem was to delete the values of all the keys my network and allow network manager to detect it again (although changing the value of the wpa_psk_wpa_version key might have been good enough.)

Summary:

  • Windows XP does not support WPA2 without patching.
  • If you change a network from WPA2 to WPA (and possibly the other way round too) network manager will fail to detect the change and fail to connect to the network.
  • The problem can be solved using gconf-editor to alter “keys” in system>networking>wireless>networks

 

 

Kismet, Gutsy, Network Manager and Ralink rt2500. Part 2

February 6th, 2008

In a previous post I disgusted my unsuccessful attempts to use my favourite wireless network scanner, Ubuntu 7.10 (Gutsy).

One commenter suggested disabling network manager but even with Network Manager disabled the card would refuse to be put into monitor mode, essential for kismet.

My next plan of attack was to look at the offending driver. Kismet had worked in previous versions of ubuntu and some after some research I found that there was a new driver for the ralink card which was now included in the distro.

The rt2500 driver and other drivers for other ralink cards are provided by “serialmonkey” and I tried here first. There are two versions of the driver a legacy version and the new version.

My first thought was to compile the latest version of the “new” driver from CVS. Unfortunately the CVS version of rt2×00 driver won’t compile against current ubuntu kernel (2.6.22-14)

Here are my notes on what I did next…

Next, downloading and compiling the Enhanced Legacy Drivers from serialmonkey.com installs the older driver.

This legacy driver works reliably but breaks network manager meaning that everything has to be configured from the command line for everyday use.

When ‘make install’ is run as root from the rt2500 source package an alias is added to /etc/modprobe.d/ the file is called ralink and contains.

alias ra0 rt2500

Oddly though, the interface name is still “wlan0″

lsmod | grep rt25 reveals:

rt2500pci 19072 0
rt2x00pci 11520 1 rt2500pci
rt2x00lib 19584 2 rt2500pci,rt2x00pci
mac80211 171016 3 rt2500pci,rt2x00pci,rt2x00lib
eeprom_93cx6 3200 1 rt2500pci
rt2500 180836 1

it seems both drivers are loaded and nothing is really working.

A Better Way?

At this point a reader of this blog, Iain Cheyne, posted an interesting set of instructions which suggest that I am going about things in the wrong way. Instead of changing drivers, the poster suggests I should be upgrading to the latest version of kismet which should work with the new driver.

ok…. This is something I should try. The new version of kismet is not avaliable from ubuntu repos but I should be able to compile from source without too much trouble.

But first I have to restore my system to working order.

Module alias

I relised that I didn’t really know how ubuntu chooses which modules to load at boot.
I have found where the modules are located:

/lib/modules/2.6.22-14-generic/extra/rt2500.ko
/lib/modules/2.6.22-14-generic/ubuntu/wireless/rt2x00/rt2500pci.ko

Alias’ refering to them are found in the file:

/lib/modules/2.6.22-14-generic/modules.alias

This file is apparently built automatically by the command depmod and contains information about which drivers can be used for which hardware. Depmod looks through all the drivers under /lib/modules/ and picks out the information it needs. Not unexpectedly, I have entries for both rt2500 (the old driver) and rt2500pci (new driver) and they both specify the same hardware IDs (pci:v00001814d00000201sv*sd*bc*sc*i*)

I don’t know how the kernel decides to load modules I wonder if it uses the modules.alias file, or something else.

If it is the modules.alias file then logically if I simply remove the rt2500.ko file and run depmod then the configuration should be back to normal…

I’ll try it.

move the module to my home directory:
/lib/modules/2.6.22-14-generic/extra$ sudo mv rt2500.ko ~
$ sudo depmod

As if by magic the rt2500 entry has gone from the modules.alias file but the rt2500pci entry is still there!

The real test now is to reboot and find out which modules load.

The fisrt thing I notice after reboot is that Network Manager has already connected my wireless before my desktop loads. This can mean only one thing; the legacy driver hasn’t loaded and the new driver is being used.

lsmod confirms it.

$ lsmod | grep rt25
rt2500pci 19072 0
rt2x00pci 11520 1 rt2500pci
rt2x00lib 19584 2 rt2500pci,rt2x00pci
mac80211 171016 4 rc80211_simple,rt2500pci,rt2x00pci,rt2x00lib
eeprom_93cx6 3200 1 rt2500pci

My WiFi is restored :) Next to compile kismet…(in part 3)

Summary

  • To stop a module from loading at boot you can just delete it from the /lib/modules/<kernel> directories and run depmod.
  • The legacy rt2500 module breakes Network Manager.
  • There is a newer version of kismet than the one in the ubuntu repos.