AVK

Dell XPS M1530 and Gentoo Linux

Posted by: Alex Koval 5 years, 6 months ago

(last updated: 2009.02.09)

Contents

  1. Introduction
  2. Why Gentoo Linux?
  3. My hardware configuration
  4. Keep Vista, but reduce the disk space occipied by it
  5. Video: setting up nvidia propertiary drivers
  6. WiFi: Dell Wireless
  7. Multimedia keys and remote control
  8. Power button
  9. CPU frequence/Power saving
  10. CardReader: SD/MMC - MS/Pro
  11. Ethernet
  12. Audio card: Intel HD Audio SigmaTel STAC9228
  13. Touchpad
  14. Thomson Microelectronics fingerprint reader
  15. Devices which I don't use(yet)
  16. Hybernate
  17. Files
  18. Links, external references

Introduction

Only half year since my latest hardware upgrade (explained here) and I am uprading again :-) The reason is bad - one of old notebooks died. But the good circumenstance is that I've got cool hardware much sooner then I expected.

Latitude goes to happy wife, and I am getting brand new powerful XPS laptop to do my work (and rest). So, the initial task is:

  1. Copy Gentoo Linux from Dell Latitude D620 to Dell XPS M1530 and fine tune it (covered by this guide).
  2. Install Windows XP on Dell Latitude D620 (not covered in this document :).

To my surprise, setting up Windows XP on Dell Latitude D620 took much longer that setting up Gentoo Linux on my 1530. Why? I've cheated a little, and just copied the files over 1:1. :-)

After day of testing, my impressions of this new laptop are great. It is powerful, very nice screen, and all hardware worked flawlessly with Linux, just as-is. I've spent almost zero time to tune it up. Partly its because I've been moving from D620 with pretty similar configuration. But all new hardware also raised no questions. I've been able to spend 30 minutes of time at morning to tune all up, and can use every component of it from Linux.

Why Gentoo Linux?

Why Linux? - More secure. Much more user friendly then most of unexperienced people would assume. Easy to administer.

The best part of Linux is that it is very transparent: source codes are open, so all bugs are fixed much faster then any commercial OS vendor will(or can) do. As result, Linux is much more robust, secure, and reliable.

Why Gentoo? - All of the above in the best possible combination for our situation: development of web applications. Developer friendly: we can configure any software package (and version) which we need for our work. Sysadmin friendly. Powerful Portage system allows easy management of software packages. Great documentation and big community where any support questions are resolved easy and fast.

My hardware configuration

Criteria of choice

At first, every hardware must be supported by Linux. Standard things are already working out of box (HDDs, keyboard, mouse), but video, wifi, Web Cam needs to be confirmed first. I think it would be waste of money, time and weight to buy and expensive laptop and use 50% of it.

Screen: XPS 1530 comes in variety of different configurations. I already tried 1280x800 and belive its too small resolution for that screen size. Also, my previos laptop resolution 1440x900 was too big for 14.4" screen. So, I decided that 1440x900 resolution makes great sense for software development jobs on 15.4" screen.

Making choice

In fact, making choice was not easy, because to do it, you first need to understand which models are available on local market.

Dell mentions all possible hardware options for M1530 on their web site, but for a local country markets only few combinations are possible. I did not (yet) found a single place, where I can review which models I can buy here, at Ukraine. The workaround: I've collected information manually from several shops, summarized it, and made a choice.

Model1530P830D2C160HP
  
CPU Intel Core 2 T8300
CPU Ghz 2.40GHz
RAM 2x1024M
HDD 160Gb
Display type WXGA+
Display size 1440x900
Battery, cells 6
Price variation 1440..1640
   

lspci

  1. 00:00.0 Host bridge: Intel Corporation Mobile Memory Controller Hub (rev 0c)
  2. 00:01.0 PCI bridge: Intel Corporation Mobile PCI Express Root Port (rev 0c)
  3. 00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Contoller #4 (rev 02)
  4. 00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 02)
  5. 00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 02)
  6. 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)
  7. 00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 02)
  8. 00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 02)
  9. 00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 02)
  10. 00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 02)
  11. 00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 02)
  12. 00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 02)
  13. 00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 02)
  14. 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f2)
  15. 00:1f.0 ISA bridge: Intel Corporation Mobile LPC Interface Controller (rev 02)
  16. 00:1f.1 IDE interface: Intel Corporation Mobile IDE Controller (rev 02)
  17. 00:1f.2 SATA controller: Intel Corporation Mobile SATA AHCI Controller (rev 02)
  18. 00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 02)
  19. 01:00.0 VGA compatible controller: nVidia Corporation Unknown device 0407 (rev a1)
  20. 03:09.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 05)
  21. 03:09.1 Generic system peripheral [0805]: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 22)
  22. 03:09.2 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 12)
  23. 03:09.3 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 12)
  24. 09:00.0 Ethernet controller: Marvell Technology Group Ltd. Unknown device 4354 (rev 12)
  25. 0b:00.0 Network controller: Broadcom Corporation BCM4312 802.11a/b/g (rev 01)

Keep Vista, but reduce the disk space occipied by it

I've decided to keep Windows Vista for one reason: we often need to test our software on different variety of platforms, so I decided that executing this system once per month makes sense for me, especially because I've already paid for it. (It is not possible to buy this notebook without Vista in Ukraine, so I had to buy it anyway).

Windows Vista have internal "partition resize" tool. But when I tried it, it refused to resize to ~25Gb which I think I can allow for Vista. It said that it needs at least 50Gb for work... What a voracious system... So, I used Partition Magick, to resize it to 25Gb. Also, it seems Vista ate all 4 primary partitions on disk (Dell utility, Dell Backup & restore, and something else). I have removed them. Vista works without them fine. Here is my final config:

  1. avk ~ # fdisk -l
  2. Disk /dev/sda: 160.0 GB, 160041885696 bytes
  3. 255 heads, 63 sectors/track, 19457 cylinders
  4. Units = cylinders of 16065 * 512 = 8225280 bytes
  5. Disk identifier: 0x40000000
  6. Device Boot Start End Blocks Id System
  7. /dev/sda1 3257 3269 104422+ 83 Linux
  8. /dev/sda3 * 1 3256 26153788+ 7 HPFS/NTFS
  9. /dev/sda4 3270 19457 130030110 5 Extended
  10. /dev/sda5 3270 3768 4008186 82 Linux swap / Solaris
  11. /dev/sda6 3769 19457 126021861 83 Linux
  12. Partition table entries are not in disk order

To make configuration easier, here is grub config for the dual boot of Windows Vista and Gentoo Linux:

  1. alex@avk ~ $ sudo cat /boot/grub/menu.lst
  2. default 0
  3. timeout 2
  4. fallback 1
  5. title Gentoo 2.6.27 (resume)
  6. root (hd0,0)
  7. kernel /bzImage-2.6.27 root=/dev/sda6 resume=/dev/sda5
  8. title Gentoo 2.6.27
  9. root (hd0,0)
  10. kernel /bzImage-2.6.27 root=/dev/sda6
  11. title Windows
  12. rootnoverify (hd0,2)
  13. chainloader +1
  14. alex@avk ~ $

Video: setting up Nvidia propertiary drivers

At first, tune up your portage:

  1. alex@avk ~ $ grep nvidia /etc/portage/*
  2. /etc/portage/package.keywords:x11-drivers/nvidia-drivers ~x86
  3. /etc/portage/package.unmask:x11-drivers/nvidia-drivers

Then, emerge propertiary video drivers:

  1. alex@avk ~ $ sudo emerge -av x11-drivers/nvidia-drivers
  2. These are the packages that would be merged, in order:
  3. Calculating dependencies... done!
  4. [ebuild U ] x11-drivers/nvidia-drivers-180.22 [177.80] USE="gtk -acpi -custom-cflags (-multilib)" 12,897 kB
  5. Total: 1 package (1 upgrade), Size of downloads: 12,897 kB
  6. Would you like to merge these packages? [Yes/No]

To make X config file, you can use nvidia-xconfig tool.

Here is part of my config, which relates to Nvidia. Please note, that I use this laptop with external monitor, so I configured additonal modes for it.

  1. Section "Device"
  2. Option "TwinView"
  3. Option "CursorShadow" "on"
  4. Option "TwinViewOrientation" "LeftOf"
  5. Option "MetaModes" "1280x1024, 1440x900; 1680x1050, 1440x900; NULL, 1440x900;"
  6. Identifier "Card0"
  7. Driver "nvidia"
  8. VendorName "nVidia Corporation"
  9. BoardName "Quadro NVS 110M / GeForce Go 7300"
  10. BusID "PCI:1:0:0"
  11. Option "UseEdidDpi" "FALSE"
  12. EndSection

P.S. nvidia-drivers version 180.22 brake kuickshow image viewer. If you intend to use it, use 177.82 of nvidia-drivers instead, until kuicshow team resolved their problem.

.

WiFi: Dell Wireless

It was one of my greatest worries about this laptop. After looking all possible configurations, I've found, that despite it is possible to get XPS M1530 with Intel WiFi at US, same is not true for Ukraine. Neither of models with Intel WiFi are shipped to this region.

This was also good surprise that Dell Wireless (Broadcom Corporation BCM4312 802.11a/b/g) worked flawlessly, and even better then Intel. It finds wifi spot nicely after hybernate, and automatically switches to it.

To configure it, first, lets configure kernel first

  1. Device Drivers --->
  2. Network device support --->
  3. Wireless LAN --->
  4. [*] Wireless LAN (IEEE 802.11)
  5. <M> Broadcom 43xx wireless support (mac80211 stack)
  6. Networking support --->
  7. Wireless --->
  8. {*} Improved wireless configuration API
  9. [*] nl80211 new netlink interface support
  10. -*- Wireless extensions
  11. [*] Wireless extensions sysfs files
  12. <M> Generic IEEE 802.11 Networking Stack (mac80211)
  13. Rate control algorithm selection
  14. [ ] Enable mac80211 mesh networking (pre-802.11s) support
  15. -*- Enable LED triggers
  16. [ ] Export mac80211 internals in DebugFS
  17. [ ] Select mac80211 debugging features
  18. <*> Generic IEEE 802.11 Networking Stack (DEPRECATED
  19. [ ] Enable full debugging output
  20. <*> IEEE 802.11 WEP encryption (802.1x
  21. <M> IEEE 802.11i CCMP support
  22. <M> IEEE 802.11i TKIP encryption

But the kernel driver is not enough. This driver requires firmware loaded during booting. Firmware is under some commercial end user license, so you have to download it manually. I've followed guide from wireless.kernel.org to get and install it. Here is history of my commands:

  1. export FIRMWARE_INSTALL_DIR="/lib/firmware"
  2. emerge net-wireless/b43-fwcutter
  3. wget http://mirror2.openwrt.org/sources/broadcom-wl-4.150.10.5.tar.bz2
  4. tar xjf broadcom-wl-4.150.10.5.tar.bz2
  5. cd broadcom-wl-4.150.10.5/driver
  6. b43-fwcutter -w "$FIRMWARE_INSTALL_DIR" wl_apsta_mimo.o
  7. lsmod
  8. rmmod b43
  9. modprobe b43
  10. dmesg
  11. /etc/init.d/net.wlan1 restart

As you can guess, it worked without any additional configuration steps. For those, who configure it on clean environment, I have to say that I have installed net-wireless/wpa_supplicant package to access WPA/WPA2 protected networks.

Multimedia keys and remote control

  1. # /etc/conf.d/local.start
  2. # This is a good place to load any misc programs
  3. # on startup (use &>/dev/null to hide output)
  4. # -------------------------- DELL keys
  5. /usr/bin/setkeycodes e005 122
  6. /usr/bin/setkeycodes e006 122
  7. /usr/bin/setkeycodes e007 122 # Battery key
  8. /usr/bin/setkeycodes e008 122 # Wireless on/off key: do nothing (prevent extraneous kernel logs)
  9. /usr/bin/setkeycodes e009 122 # Eject media key:
  10. /usr/bin/setkeycodes e00a 123 # Dell Latitude X1 "Fn-F1/Hibernate" button:
  11. /usr/bin/setkeycodes e012 124 # Dell Home
  12. # --------------------------

Power button

I prefer that my laptop shuts down when I press on "power" button. Installed acpi daemon:

  1. alex@avk ~ $ sudo emerge -av acpid
  2. Password or swipe finger:
  3. These are the packages that would be merged, in order:
  4. Calculating dependencies... done!
  5. [ebuild R ] sys-power/acpid-1.0.6-r1 24 kB
  6. Total: 1 package (1 reinstall), Size of downloads: 24 kB
  7. Would you like to merge these packages? [Yes/No]
  8. ...
  9. alex@avk ~ $ sudo rc-update add acpid default

CPU frequence/Power saving

Kernel configuration

  1. Power management options --->
  2. CPU
  3. [*] CPU Frequency scaling
  4. [*] Enable CPUfreq debugging
  5. <*> CPU frequency translation statistics
  6. [*] CPU frequency translation statistics details
  7. Default CPUFreq governor (userspace)
  8. <*> 'performance' governor
  9. <*> 'powersave' governor
  10. -*- 'userspace' governor for userspace frequency scaling
  11. <*> 'ondemand' cpufreq policy governor
  12. <*> 'conservative' cpufreq governor
  13. *** CPUFreq processor drivers --->
  14. <*> ACPI Processor P-States driver
  15. <*> AMD Opteron/Athlon64 PowerNow
  16. [*] ACPI Support
  17. <*> Intel Enhanced SpeedStep (deprecated
  18. -*- Built-in tables for Banias CPUs
  19. <*> Intel Speedstep on ICH-M chipsets (ioport interface)
  20. <*> Intel SpeedStep on 440BX/ZX/MX chipsets (SMI interface)
  21. <*> Intel Pentium 4 clock modulation
  22. [*] /proc/acpi/processor/../performance interface (deprecated)

By default, CPU works in most performance mode, 2.4Ghz, 100%. In this configuration it will ate all resources of 6-cell battery in around 3Hrs. To achieve better results, some politics of power saving must be introduced. The most popular Linux software is cpufreqd, but when I tried to install it, it had a problem of reading own config file. So, instead, I emerged package sys-power/cpufrequtils and uncommented following lines in /etc/acpi/default.sh:

  1. ac_adapter)
  2. case "$value" in
  3. *0)
  4. cpufreq-set -g ondemand
  5. ;;
  6. *1)
  7. cpufreq-set -g performance
  8. ;;
  9. *) log_unhandled $* ;;
  10. esac
  11. ;;

Another popular choice is to use KDE internal klaptop_check which also can control some of power saving aspects.

CardReader: SD/MMC - MS/Pro

Kernel configuration

  1. Device drivers --->
  2. <M> MMC/SD card support --->
  3. --- MMC/SD card support
  4. *** MMC/SD Card Drivers
  5. <M> MMC block device driver
  6. [*] Use bounce buffer for simple hosts
  7. *** MMC/SD Host Controller Drivers
  8. <M> Secure Digital Host Controller Interface support
  9. <M> SDHCI support on PCI bus
  10. <M> Ricoh MMC Controller Disabler (EXPERIMENTAL)

Ethernet

  1. Device drivers --->
  2. [*] Network device support
  3. [*] Ethernet (1000 Mbit
  4. <M> SysKonnect Yukon2 support

Audio card: Intel HD Audio SigmaTel STAC9228

  1. Device drivers --->
  2. Sound card support --->
  3. <*> Advanced Linux Sound Architecture --->
  4. --- Advanced Linux Sound Architecture
  5. <*> Sequencer support
  6. <*> OSS Mixer API
  7. <*> OSS PCM (digital audio) API
  8. [*] OSS PCM (digital audio) API - Include plugin system
  9. [*] OSS Sequencer API
  10. <*> RTC Timer support
  11. [*] Use RTC as default sequencer timer
  12. [*] Support old ALSA API
  13. [*] Verbose procfs contents
  14. --- PCI sound devices
  15. <*> Intel HD Audio
  16. [*] Build Realtek HD-audio codec support
  17. [*] Build Analog Device HD-audio codec support
  18. [*] Build IDT/Sigmatel HD-audio codec support
  19. [*] Build VIA HD-audio codec support
  20. [*] Build ATI HDMI HD-audio codec support
  21. [*] Build Conexant HD-audio codec support
  22. [*] Build C-Media HD-audio codec support
  23. [*] Build Silicon Labs 3054 HD-modem codec support
  24. [*] Enable generic HD-audio codec parser

At first I tried to compile it as module, but got strange result, when front digital microphones not working. Compiling it into kernel solved the problem.

Devices which I don't use(yet)

Did not yet tested:

  • HDMI
  • S-Video
  • ExpressCard

 

Thomson Microelectronics fingerprint reader

All you need to do is to enable this option in kernel:

  1. Symbol: INPUT_UINPUT [=y]
  2. Prompt: User level driver support
  3. Defined at drivers/input/misc/Kconfig:183
  4. Depends on: !S390 && INPUT && INPUT_MISC
  5. Location:
  6. -> Device Drivers
  7. -> Input device support
  8. -> Generic input layer (needed for keyboard, mouse, ...) (INPUT [=y])
  9. -> Miscellaneous devices (INPUT_MISC [=y])

Compile kernel, and when done, install the following package:

  1. emerge sys-auth/thinkfinger

Please follow the instructions after installation to alter your PAM configuration to use tf-tool. Adding new user is easy:

  1. tf-tool --add-user "alex"

Touchpad

  1. emerge x11-drivers/synaptics
  2. configure it as input device in xorg.conf
  1. Section "InputDevice"
  2. Identifier "Touchpad"
  3. Driver "synaptics"
  4. Option "SendCoreEvents"
  5. Option "Device" "/devices/platform/i8042/serio2/input/input5"
  6. Option "SHMConfig" "on"
  7. Option "Emulate3Buttons" "on"
  8. Option "LeftEdge" "130"
  9. Option "RightEdge" "840"
  10. Option "TopEdge" "130"
  11. Option "BottomEdge" "640"
  12. Option "FingerLow" "7"
  13. Option "FingerHigh" "8"
  14. Option "MaxTapTime" "180"
  15. Option "MinTapTime" "110"
  16. Option "ClickTime" "0"
  17. Option "EmulateMidButtonTime" "75"
  18. Option "VertScrollDelta" "20"
  19. Option "HorizScrollDelta" "20"
  20. Option "MinSpeed" "0.35"
  21. Option "MaxSpeed" "0.8"
  22. Option "AccelFactor" "1"
  23. Option "EdgeMotionMinSpeed" "200"
  24. Option "EdgeMotionMaxSpeed" "200"
  25. Option "UpDownScrolling" "1"
  26. Option "CircularScrolling" "1"
  27. Option "CircScrollDelta" "0.1"
  28. Option "CircScrollTrigger" "3"
  29. Option "VertEdgeScroll" "on"
  30. EndSection
  31. Section "ServerLayout"
  32. Identifier "X.org Configured"
  33. Screen 0 "Screen0" 0 0
  34. <strong>InputDevice "TouchPad" "CorePointer"</strong>
  35. InputDevice "Keyboard0" "CoreKeyboard"
  36. EndSection

Optionally, you can use synclient program to fine-tune the panel.

Update 2009.01.27: I've added i8042.nomux=1 to the kernel boot options so touchpad restores OK after lid close.

Update 2009.02.09: Added multimedia keys config.

Update 2010.01.09: One thing is missing in this notebook: the indicator of AC in. Sometimes I forget to enable it until battery fully discharges.

 

 

Hibernate

I am using standard Linux hibernation and pretty happy with it:

  1. Power management options --->
  2. [*] Hibernation (aka 'suspend to disk')
  3. (/dev/sda5) Default resume partition

P.S. Tell me if you find that other hibernation options work as well.

Files

  1. Linux 2.6.27: full Kernel .config
  2. xorg.conf
  3. /etc/acpi/default.sh

Links, external references

  1. Picture Gallery of my copy of Dell XPS M1530
  2. Gentoo Linux DELL XPS M1530
  3. WiFi on a Dell M1530 running RHEL 4 - Linux Forums
  4. Dell XPS M1530 [Linux Laptop Wiki]
  5. Dell XPS M1530 - Gentoo Linux Wiki
  6. Gentoo Linux DELL XPS M1530
  7. SourceForge.net Repository - [thinkfinger] View of /README.in
  8. Gentoo Linux nVidia Guide — Gentoo Linux Documentation


Rating: Currently unrated