The Dell XPS m1330 is a lightweight 13.3″ laptop that’s surprisingly stylish – and not just for a Dell! There’s quite a bit said about it already, so this article is just going to focus on the particulars of getting Linux running happily on it. If you want to read a general review, I’d recommend at NotebookReview.
I’m not going to dwell on the fine details of repartitioning – there’s nothing special about the m1330 in this regard and there are plenty of comprehensive guides around for that. But I will say that like all Dells, the m1330 arrives with an elaborate set of partitions:
- A utility partition – this handles the initial personalisation of windows when you turn it on and hosts the diagnostic application you can launch from the BIOS.
- An OS restore partition – this works in conjunction with Vista’s recovery system to reset the OS to the factory state.
- The main system partition – comes with Vista installed. Joy.
- Media-Direct – this is a specially customized installation of XP embedded that is supposed to let you view DVDs and listen to music without booting all the way into Vista.
I orignally intended to just remove Vista (and the recovery partition which is useless without Vista) and then install Slackware and XP (for gaming). I had thought Media-Direct would continue to work, but after I junked Vista and installed XP, Media-Direct reported it couldn’t find its media partition – so I guess it was more closely tied to Vista than I thought. I didn’t try and fight with this, so I got rid of Media-Direct as well. If you want to keep it, it seems you’ll need to keep the Vista partition around.
Installing XP was quite the challenge (certainly much harder than Slackware), particularly due to the need for the AHCI storage driver, but that’s not the subject of this article.
In contrast to the problems with XP, Slackware 12.0 installed with no problems at all. It ships with a 220.127.116.11 kernel that supports all the essential hardware. You just boot off the CD and follow the usual Slackware installation steps. However, once you get it installed, you’ll probably want to upgrade to a 2.6.22 kernel. I just grab new kernels from kernel.org – slackware doesn’t include any private patches, so you won’t have any problems doing this.
I ordered a 2.2GHz T7500, but m1330s always include some sort of Core 2 Duo processor, so the handling is always the same. The main CPU specific driver is the ‘coretemp’ sensor driver that reports the temperatures from the on-die CPU sensors.
There isn’t too much to say here, but as I put 4GB in my laptop, it was important to use a 64bit kernel to get the most out of it. There is no official 64bit slackware, but there are two unofficial 64bit ports – slamd64 and bluewhite64. While both seem functional enough, I still prefer to use the official slackware binaries and a 64bit kernel. This is an unusual configuration and can cause problems due to missing 32bit compatibility support in some drivers. I wouldn’t recommend it for anyone who isn’t happy doing a lot of fiddling around to make things work.
The m1330 can be built with either Intel X3100 integrated graphics or a discrete nVidia 8600M GS. I ordered mine with the nVidia chip, so I’ll focus on that – but Slackware 12.0 includes XServer 1.3 and the 2.x Intel driver with XRandr 1.2 support. This means there’s full support for external display hotplug and it will do 3D as well as it can. On the nVidia side, Slackware obviously does not come with the proprietary nvidia driver, and Slackware 12.0 does not include a new enough version of the nv to handle this particular chip. There’s an update on the Slackware site to the 2.1.2 driver which does include that support – as well as XRandr 1.2. But as this driver doesn’t do 3D, I use the proprietary driver. It doesn’t have XRandr 1.2, but a new version should add that in the coming months.
The latest nvidia driver (100.14.11) works just fine, with a small caveat about power management that I will get to later.
For non-X console mode, I use the vesafb driver. Dell were nice enough to include the native 1280×800 mode in the vesa mode list, as mode 865 – so if you configure lilo or grub (depending on your preference) to pass that to the kernel at boot time, you’ll get a native mode console.
The m1330 has the usual Intel HDA audio with a Sigmetal STAC9228 codec. There’s nothing unusual about this, but the codec is hooked up in an unusual way that confuses the driver in 2.6.22. A small patch is needed to un-confuse it, which is available here. After applying the patch, it’s also necessary to force the model parameter to be 5stack. This doesn’t quite match the hardware configuration but it’s close enough and provides a digital audio output (which is routed through the HDMI connector). Apparently 6 channel analog output is also possible by reusing the two headphone jacks and the mic input. I have not verified this, however.
I ordered the 200GB 7200rpm drive, but I think that all of the available options are SATA 3.0Gbps with NCQ (Native Command Queuing) support. The AHCI controller also supports NCQ, so performance should be maximised. It is supported by the ahci driver.
The DVD drive is a Matsushita UJ-857G. It’s a super slim (9.5mm high) slot loading drive – which is a rare form factor. This is most unfortunate as Matsushita drives are exceptionally evil from a DVD region-free point of view. They not only preclude rpc1 firmware modifications with encryption and signing but the drives refuse to even provide access to the encrypted sectors on the disk, so brute force CSS breaking is out too. The only known alternative in this form factor is the LG-HT-DS GSA-S10N. It’s a brand new model that’s shown up in some MacBook Pros (my work laptop has one, for example) and Dell have a manual for it on their website. From this, I can hope that some m1330s will ship with it instead of the Matsushita drive – and that leaves the option open to get a replacement from Dell. Right now, the GSA-S10N is too new to have an rpc1 firmware out in the wild, but it’s at least possible – unlike with the Matsushita drive.
The DVD drive is Parallel ATA and not connected to the AHCI controller. The legacy PATA controller is supported by the ata_piix driver, but only in 18.104.22.168 or later. If your kernel is older, you have to use the old-style IDE piix driver.
There are four different wireless options for the m1330. Two are Dell branded and uses Broadcom chips. I don’t know if the bcm43xx driver supports these, but perhaps it does. The other two options are the Intel 3945abg and 4965agn. The 3945 has been around for a while and has two driver options – the more stable one with the strange ‘regulatory compliance daemon’ and the newer iwlwifi driver where the firmware handles that work. This new driver also supports the 4965agn – and it is the only driver for this newest chip. I chose the 4965, so I didn’t have to decide which driver to use. The iwlwifi driver uses the new mac80211 driver stack, but fortunately the version in the 2.6.22 kernel is new enough to support the driver – so using an external version of the stack is not required.
All the main encryption protocols are supported – including WPA and WPA2 using wpa_supplicant and the wext interface. Slackware 12.0 has the infrastructure to use wpa_supplicant built in.
The wired ethernet is provided by a Broadcom BCM5906M chip. Surprisingly, in this day and age, it’s only a 10/100 chip with no gigabit ethernet support. It’s supported by the tg3 driver in the kernel.
Memory cards and Fireware
Memory card and firewire support is provided by a multi-function Ricoh R5C832 chip. The firewire is completely standard and is supported by the usual driver. The memory card situation is less simple. There are four separate controllers – one for each of SD, MMC, MemoryStick and xD. Only the SD controller is supported – by the sdhci driver. This driver additionally supports MMC cards through the SD controller. Unfortunately, the chip is configured to automatically detect and redirect MMC cards to the MMC controller – preventing the SD controller from seeing them – so even though the driver supports them, it cannot control these cards by default. Fortunately, there is a way to disable the MMC controller, and I have to thank Matt Domsch and Rezwanul Kabir at Dell for investigating and finding the solution.
To disable the MMC controller, we need to manipulate a couple of PCI config registers on the firewire device. We do that with the setpci tool.
Run the following commands from the command line:
- /sbin/setpci -s ’03:01.0′ 0xCA=0×57 (Write Enable)
- /sbin/setpci -s ’03:01.0′ 0xCB=0×02 (MMC Disable)
- /sbin/setpci -s ’03:01.0′ 0xCA=0×00 (Write Disable)
if you do this correctly, the SD controller will now be able to see and control MMC cards. As a bonus, if you already have an MMC card inserted, it will immediately get detected without having to eject and re-insert.
Once you’re happy that the commands are working, you should put them in your /etc/rc.d/rc.local so they run at startup. We may eventually see the kernel able to do this automatically but it needs some thought to do in a clean way.
Bluetooth is provided by Dell’s Wireless 355 module – which contains a Broadcom BCM2045 chip. It’s a standard USB bluetooth adapter supported by the standard hci_usb driver. Interestingly, the device appears as a bluetooth adapter and a USB keyboard and mouse. I believe this is because it supports using paired keyboards and mice before the OS loads. Other devices with this capability usually require a mode switch (using hid2hci) but this chip does not.
The m1330 can be configured with a webcam. If you chose the LED backlit display, it’s a 640×480 camera, or if you chose the CCFL backlit display, it’s a 1280×960 camera. This is apparently due to the contraints in the thinner LED panel. I chose the LED backlight but I understand that both cameras are driven in exactly the same way. They are supported by an out-of-kernel driver – the linux-uvc driver.
Finger print reader
The m1330 can also be configured with a fingerprint reader. This is supported by the thinkfinger program. If you use thinkfinger and PAM, you can configure your system to log in with a finger swipe instead of a password. Slackware doesn’t ship with PAM by default, but it is included with Dropline GNOME and that works pretty well. The instructions that ship with thinkfinger are reasonably clear – the only thing to note is that Dropline uses /etc/pam.d/system-auth instead of /etc/pam.d/common-auth.
IR Remote and Media keys
The m1330 includes an infrared remote that stores in the express card slot – this is pretty neat. But note that it doesn’t charge from the slot – it uses a clock battery instead. The remote button presses appear as standard key events on the main keyboard device – so no additional drivers are necessary.
Similarly, the media keys also appear as keyboard events – these should automatically get mapped to useful scancodes.
There are also a number of other buttons and key combinations that generate new events, and these all seem not to be mapped correctly, and you will need to use
setkeycodes to do that.
- Fn-F1 (e00a) – Supposed to be the sleep shortcut. Map to 142.
- Fn-F3 (e007) – Supposed to request battery status. Map to 236. gnome-power-manager will pop up the battery level when pressed.
- MediaDirect/Home button (e012) – I use this to launch my web browser and map it to 172.
Less useful buttons
- Fn -Down (e005) – Automatically decreases brightness and generates a key event.
- Fn -Up (e006) – Automatically increases brightness and generates a key event.
- Hardware kill switch (e008) – Turns off wireless/bluetooth/wwan and generates a key event.
- Fn-F8 (e00b) – Internel/external display toggle and generates a key event.
- Wifi detector (e011) – At least this one doesn’t do anything automatically, so you could map it to do something useful.
If you want to map these keys to some other event, check out /usr/include/linux/input.h to see the keycodes and their symbolic names. Most of the time, the actual key code you use doesn’t really matter because the application you want to control can be configured to expect any keycode.
The eject button looks like a media key but is directly tied to the DVD drive and generates no key event. This is in contrast to the MacBook Pro where it’s a normal keyevent that the OS must tie to the DVD drive.
There is a hardware RFKill switch can be configured in the BIOS to control some or all of the wireless components in the system (wifi, bluetooth, wwan). Each device also has a software kill switch that can be manipulated with the dellWirelessCtl tool that ships with libsmbios. This tool can also reconfigure the hardware kill switch. The kernel rfkill driver is not needed.
As mentioned earlier, the on-die CPU temperature sensors are supported by the coretemp driver. As is usual with Dells, there is no ‘typical’ hardware sensor. Instead, temperature and fan readings are exposed by the i8k driver. You need to load it with the force=1 parameter however. Also note that the i8k driver doesn’t work for 64bit kernels. Fortunately, the temperate reported by i8k is also reported through ACPI.
The touchpad is a standard Synaptics touchpad supported by the X synaptics driver.
The m1330 is very well behaved from a power management point of view. It is possible to suspend or hibernate it without any quirks, and it will resume correctly, for the most part. I have observed two problems:
- The graphics come up in a very slow mode. It’s so slow that even 2D graphics are painful. You have to restart the X server to get it back to normal. This apparently only affects 8xxx chips, and will hopefully be fixed in future driver releases. In the past, a similar bug affected older graphics chips and it was fixed.
- After suspending and resuming, it is no longer possible to power off through acpi. The kernel reports that it sends the acpi request to power off and then nothing happens. You have to use the power button to turn it off. I don’t know if this is a kernel issue or a Dell ACPI quirk. Hopefully it will get fixed in due course.
Power consumption is most impressive. With the 9-cell battery, I get almost 6 hours while idle, and about 3 1/2 hours with the 6-cell battery.
In testing with powertop (and a 32bit kernel), I was able to get down to 3.5 wakeups per second. Unfortunately, this doesn’t translate to much power saving because you need the nvidia driver running to put the graphics chip into low power mode. So, even though it generates a lot of wakeups, the net result is still longer battery life.
Overall, the m1330 is a great laptop, and more importantly, a great Linux laptop. Despite being brand new, all the hardware is supported to some extent and the problems that exist are very minor. I’m really impressed by it, and I’m confident that Dell will sort out what minor problems do exist.