Linux On Laptops Valid HTML 4.0 Transitional

Experiences With a
Dell Inspiron 6400: Details

James F. Carter <jimc@math.ucla.edu>, 2007-05-27

Section index, approximately in order of appearance in the main table:

Obtaining and Compiling the ATI FGLRX Driver

To use all the accelerated graphic features of the ATI Mobility Radeon X1400 graphics chip, you need to obtain ATI's proprietary fglrx driver.

Default Mouse Configuration

Here is a stanza for xorg.conf that treats the touchpad as a generic mouse.

# DEBUG to get the touchpad sort of working...  Take all defaults.
Section "InputDevice"
  Driver	"synaptics"
  Identifier	"Mouse[3]"
  Option	"InputFashion" "Mouse"
  Option	"Name" "SynPS/2 Synaptics TouchPad"
  Option	"Vendor" "Synaptics"
EndSection

Hard Disc Specifications

The following excerpt is from Samsung's spec page on their website.
Capacity 80 Gb
Buffer 8 Mb
Interface SATA II (up to 1.5 Gb/sec)
Seek times: min. 2 msec, average 12 msec, max 22 msec
Latency 5.6 msec (average)
Rotation 5400 rpm
Non-recoverable read errors 1 sector in 1e14 bits (2.5e10 sectors)
Start-stop 6e5 cycles
Temperature 5 .. 55 deg C (operating)
Power 0.2 W (sleep), 0.6 W (idle), 2.0 W (read/write)
Mass 99 grams

Features include:

The start-stop spec of 6e5 cycles can't be achieved by drives that let the heads land on the platters; this must be a modern ramp-loading system, although Samsung doesn't say so in cold print. If you started and stopped the drive every 10 minutes, then 6e5 cycles would happen after 100,000 hours or 11 years. This lifetime is very hard to measure and likely the given spec is a lower bound.

Hard Disc Partitions

Here are the disc partitions that I used:
Device Format Size
Gbytes
In Use
Gbytes
Description
Old machine
/dev/sda1 vfat 0.058 Dell Diagnostics
/dev/sda2 ntfs 5.7 5.4 Windows XP
/dev/sda3 ext3 7.5 4.9 Root
/dev/sda4 Extended Partitions
/dev/sda5 swap 1.0 Swap
/dev/sda6 ext3 26 9.4 Home
New machine as delivered, with Windows
/dev/sda1 vfat 0.055 Dell Diagnostics
/dev/sda2 ntfs 69.4 4.9 Windows XP
/dev/sda3 Extended Partitions
/dev/sda5 CP/M 3.0 Dell Restore
/dev/sda6 unknown 1.9 Dell Media Direct
New machine, Linux partitions
/dev/sda1 vfat 0.055 Dell Diagnostics
/dev/sda2 ext3 15.5 12.2 Special Projects
/dev/sda3 ext3 15.5 4.6 Root
/dev/sda4 Extended Partitions
/dev/sda6 swap 2.0 Swap
/dev/sda5 ext3 42.4 10.2 Home

Hard Disc Speed

I compared the speed of the internal hard disc with an IBM-Hitachi Deathstar 180Gb desktop drive in a Prolific Technology external enclosure, which has both Firewire and USB-2.0 ports. Times given are elapsed. The CPU time was less than 0.1 of elapsed, that is, I/O was the limiting factor. In all cases 4.7 Gb of data (4.85e9 bytes) was handled; mbuf caching was irrelevant since the data size exceeded memory size by almost 5x. But unknown factors caused as much as ±12% variation on repeated measurements. The Deathstar clearly is at least twice as fast as the laptop drive. Since the original data was recently copied onto the /home partition by a similar pair of tar commands, the pattern of seeking must have been nearly identical on both drives.
Command Time
seconds
Speed
byte/sec
Speed
bit/sec
Description
Internal disc
tar cfC /dev/null / home 27.4 Read directories only?
tar cfC - / home | sum 430.4 1.13e7 9.02e7 Read all
tar cfC - / home | sum 570.2 8.51e6 6.81e7 Same after reboot
Firewire
tar cfC - / home | tar xpfC - /mnt 551.5 Copy to drive
tar cfC - /mnt home | sum 228.3 2.13e7 1.70e8 Read all
USB-2.0
tar cfC - / home | tar xpfC - /mnt 471.8 Copy to drive
tar cfC - /mnt home | sum 277.9 1.75e7 1.40e8 Read all

The hotplug system successfully mounted the external drive, giving permission to the logged-in user, both when it had an ext2 filesystem and NTFS (readonly), and communicating with both Firewire and USB-2.0.

Bluetooth Hacking

To get Bluetooth working required quite a bit of digging in forums. Here are my notes. Starting point: the Dell 355 card is based on the Broadcom BCM2045 chipset.

First problem: set it up, start daemons, any I/O just times out.

Hype probably from Broadcom reprinted in this industry rag. The BCM2045 is the next generation in their "Blutonium" line. It has more integration and lower external component count. It includes a scheme to (partially?) avoid transmitting at the same time/frequency as 802.11 competitors using the spectrum. Supports Bluetooth 1.2 with EDR (in 2004; I think this ended up as version 2.0).

This patch in drivers/bluetooth/hci_usb.c (dated 2007-04-11) adds the HCI_WRONG_SCO_MTU flag to 0a5c:2101 Broadcom BCM2045. Interesting if you're using a HSP/HFP headset for voice phone calls, but that isn't my issue.

This Ubuntu bug has a link to a forum thread which allegedly fixes the problem. You need to do hciconfig hci0 reset after boot, or after resuming from RAM or disc. (Note, USB is unloaded on suspend and reloaded on resume, so it will happen.) Some people report that it doesn't help, others are good. (Suspicion that non-help people aren't doing pairing right; their timeout or I/O error is gone.) Kernel patch added (for Ubuntu Feisty, kernel 2.6.20) to do the reset when the device is initially probed. [This was the last reference on the 4th page of a Google search.]

To cure this problem I hacked /etc/init.d/bluetooth to do the reset (and to be more modular and to run a2dpd). It needs to have that name since (in SuSE) /lib/udev/bluetooth.sh execs it upon coldplug (boot time) or if a non-built-in dongle is hotplugged. My script wants parameters in /etc/sysconfig/bluetooth.J, which is where configuration parameters are normally stored in SuSE.

Second problem: How do you pair a device?

The Bluetooth device contacts the laptop, but communication is not established. Why? Syslogs and hcidump revealed that the device was requesting a passkey. The prior version would either use the default code (typically 0000) configured in /etc/bluetooth/hcid.conf, or would exec bluepincat which would take it from /etc/bluetooth/pin.

This scheme clearly gives less than optimum security. In the version on SuSE 10.2, bluez-utils-3.7, hcid has been improved to always use dbus to request a passkey. The bluetooth control GUI of one's Desktop Environment should be listening for the dbus message, assuming that one has a Desktop Environment and that it includes such a GUI and that the GUI is up to date on the messaging. None of which are true for me.

Here's the procedure that worked for me:

Modem Driver

For me the modem is only a fallback if I'm stuck in a hotel with no broadband, so I normally keep the driver unloaded, and I haven't put a lot of effort into setting it up on the new machine, but I did do a little investigation.

I used this modem detector to get support recommendations. It is a softmodem, meaning that the driver, executing on the main CPU, creates or interprets the sound stream which represents the bits being transferred. The modem should be controlled by the Linuxant hsfmodem driver. It can be downloaded for free, but it will only go up to 14.4 kbaud until you purchase a license key, at which point it will do 56 Kbaud with FAX.

Dell has recently started offering Linux (Ubuntu) on their machines, including decent support, including the Linuxant modem, not requiring a license key for full feature operation including FAX. This forum posting has a URL for getting the driver. It is a Debian package (since Ubuntu is based on Debian), and SuSE users will need to do some fiddling to get it onto the machine -- which I haven't actually done yet.

USB Hotplug: External Mouse

Here is the xorg.conf section for the external mouse. You may need to adjust the protocol and buttons if you have a different kind of mouse.

# External USB or PS/2 mouse, or wireless Karaoke controller used as mouse.
Section "InputDevice"
  Identifier   "Mouse[2]"
  Driver       "mouse"
  Option       "Buttons" "7"
  Option       "Device" "/dev/input/mice"
  Option       "InputFashion" "Mouse"
  Option       "Name" "USB-Mouse;ExplorerPS/2 on USB"
  Option       "Protocol" "ExplorerPS/2"
  Option       "ZAxisMapping" "4 5"
EndSection
You will also need to add these lines in the respective sections (only the one added line is shown):
Section "ServerFlags"
  Option	"AllowMouseOpenFail"
Section "ServerLayout"
  InputDevice	"Mouse[2]" "SendCoreEvents"

Power Usage

I borrowed a Kill-a-Watt power meter from a co-worker. You plug it into the wall outlet and plug the equipment into it, and it continuously displays the power being drawn. Here are my measurements; all powers in watts:
Activity Laptop Desktop
Power off 0 2
Off, charging battery 43 --
Doing nothing 32 76
100% of 1 CPU 45 95
100% of both CPUs 54 107
Graphics test 48 98
Monitor 11 est'd 42

The desktop machine is a Dell Dimension E520, Intel Core 2 Duo T6300 at 1.86 GHz (very similar to what's on the laptop). Its monitor is a Dell 2007WFP flat panel, and the power for the monitor is not included in the CPU measurements. For the laptop, of course the monitor power was included. In all cases the screen was set to full brightness. Its power was estimated by subtracting from the idle power (32 watts) the power with the lamp off in screensaver mode (25 watts).

Steps When Machine is Received

Issues Installing SuSE 10.2

The SuSE installer knows that an Intel Core 2 Duo CPU can address over 4 Gb of memory (64 Gb, I believe), and therefore needs the x86_64 architecture. But this machine has only 1 Gb memory. While some specialized software may or may not get a speed boost from the 64 bit instructions, my own testing on scientific computation (matrices) shows that, comparing a complete x86_64 vs. i586 installation on the same dual-processor Xeon machine, and with the test software compiled and optimized natively on each one, x86_64 is about 1% slower than i586, probably because 64 bit addresses have to be stacked and restored to registers, versus 32 bits on i586. Thus it's my policy to install the i586 architecture unless the machine has over 4 GB of memory.

The SuSE 10.2 installer lets you choose the architecture: hit the F6 key on the initial screen. The gray background indicates which of the two choices you are going with. SuSE 10.1 did not do this. To force it to install i586 the trick was to boot from the CD, which only has i586, rather than from the DVD which has both.

You will also want to use the F3 key to choose a bigger screen than the default 800x600px. The closest choice is 1400x1050px, although you really want the native resolution of 1680x1050px.

For me, the installation took about 30 minutes. Key installation choices:

The last step is to copy the home directories from the old machine using wired Ethernet.

Open Issues