HARDWARE Dell Latitude X1

From Gentoo Linux Wiki

This article is part of the Hardware series.
Laptops TV Tuner Cards Wireless Servers Storage Other Hardware Motherboards Related

Contents

[hide]

General

Dell Latitude X1
Enlarge
Dell Latitude X1

This is a very nice sub-notebook! Even though the CPU has only 1.1Ghz, it shows good performance. It is nearly noiseless since it doesn't have a fan. While this is good for working, compiling a complete system creates a lot of heat. I recommend either using a stage 3 install, or compile own binaries on a workstation (e.g. using TIP_Faketoo and/or HOWTO_Create_A_Build_Host). The notebook is known to be identical with the Samsung Q30 series.
This document will point out and solve some basic hardware/configuration issues. For an installation guide, please refer to the Gentoo Handbook http://www.gentoo.org/doc/en/handbook/2005.0/index.xml. Note: Some parts of this document might be hints for more advanced linux users, if you are not sure about what you are doing, take some further advice.

Booting the Gentoo LiveCD

The 2004.3 worked without any problems. The device is plugged as powered USB drive, but when booting from it, it shows up as IDE device.

Using the 2005.0 Live CD you may get this error:

Determining root device...
The root block device is unspecified or not detected.
Please specify a device to boot, or "shell" for a shell...
boot() :: 

Enter shell to enter the shell.

Now try to find the USB CD-ROM drive:

cat /proc/scsi/scsi
cat /proc/scsi/usb-storage/0 [your number here may vary]
cat /proc/sys/dev/cdrom/info [I found my drive name was "sr0"]
ls -l /dev/sr0 [shows that the device doesn't exist]
cat /proc/devices | grep sr [shows me the major node (?), mine is "11 sr"]
mknod /dev/sr0 b 11 0
exit

The LiveCD will prompt again for the boot device ("boot() ::"), enter /dev/ram0 to boot into the liveCD.

CFLAGs

For Pentium-M, the CHOST is the standard 686 one:

CHOST="i686-pc-linux-gnu"

If you use GCC <3.4.3, there is no pentium-m arch, you need to use pentium3. Using GCC 3.4.3 or later, you might want to try -march=pentium-m. Those CFLAGS are known to be safe:

CFLAGS="-O2 -march=pentium3 -pipe -mfpmath=sse"
CXXFLAGS="${CFLAGS}"

X Configuration

Graphics controller

There are two major issues with the graphics controller:

  • The video BIOS doesn't know about the display's native resolution.
  • Hardware acceleration will be available with X.org 6.9, which has not been released yet.

Getting the right resolution

Since the video BIOS of the Intel Mobile 915GMS doesn't support the display's resolution of 1280x768, you need to patch it using a tool called 855resolution. The has been developed for the 855 chipset, but the latest version supports the new 915 chipset as well. There is also a tool called 915resolution which has an ebuild on bugs, but the other tool seems to work better on the Latitude X1. Additionally, the 855resolution tool is already in portage.

  • Unmask the package and emerge it:
echo "sys-apps/855resolution ~x86" >> /etc/portage/package.keywords}}
emerge 855resolution
  • List the modes, pick one and patch the BIOS: 855resolution <Mode Nr> <X res> <Y res>
Code: # 855resolution -l
855resolution version 0.4, by Alain Poirier

Chipset: Unknown (id=0x25908086)
VBIOS type: 2
VBIOS Version: 1205

Mode 30 : 640x480, 8 bits/pixel
Mode 32 : 800x600, 8 bits/pixel
Mode 34 : 1024x768, 8 bits/pixel
Mode 38 : 1280x1024, 8 bits/pixel
Mode 3a : 1600x1200, 8 bits/pixel
Mode 3c : 1280x768, 8 bits/pixel
Mode 41 : 640x480, 16 bits/pixel
Mode 43 : 800x600, 16 bits/pixel
Mode 45 : 1024x768, 16 bits/pixel
Mode 49 : 1280x1024, 16 bits/pixel
Mode 4b : 1600x1200, 16 bits/pixel
Mode 4d : 1280x768, 16 bits/pixel
Mode 50 : 640x480, 32 bits/pixel
Mode 52 : 800x600, 32 bits/pixel
Mode 54 : 1024x768, 32 bits/pixel
Mode 58 : 1280x1024, 32 bits/pixel
Mode 5a : 1600x1200, 32 bits/pixel
Mode 5c : 1280x768, 32 bits/pixel

# 855resolution 5c 1280 768
855resolution version 0.4, by Alain Poirier

Chipset: Unknown (id=0x25908086)
VBIOS type: 2
VBIOS Version: 1205

** Patch mode 5c to resolution 1280x768 complete

Note: This only patches the RAM version of the BIOS, so you need to apply it on each reboot, and when resuming from disk as well. Since you need to patch in different places, it is better to have a small script. While emerging 855resolution, a small init script has been installed. You can configure the script in /etc/conf.d/855resolution. The mode number 5c is the last one in the list, and works quite well. The drawback of using the tool is, that it will make some other modes unavailable in our case. Using 5c, you will at least keep the 1024x768 mode, e.g. for presentations.

  • Change /etc/conf.d/855resolution to read those lines:
 replace[0]="5c"
 with[0]="1280 768"
  • Patch the BIOS while booting:
 rc-update add 855resolution default

As already mentioned, you need to patch the BIOS while resuming from software suspend2. This can be done by calling the init-script from hibernate.conf. The line "OnResume <number> <command>" allows for exection of commands at specific moments. According to the suspend2 wiki, the best for patching the video BIOS is with number 86.

  • Add this line to /etc/hibernate/hibernate.conf:
 OnResume 86 /etc/init.d/855resolution restart

If you will use the ACPI disk state instead of hibernate, you might want to try to restart the script on various ACPI events. Patching the video BIOS with the same values again, doesn't seem to be a problem.

Hardware Acceleration / DRI

The kernel modules for hardware acceleartion are available since kernel version 2.6.12, it is fine to use the recent gentoo-sources. But this module will only be supported by X.org versions 6.9 and above. Since this version is still in development, you will need to use the release snapshots 6.8.99.*.
Note: This can make your system unstable, even though it probably will work for most people.

  • Unmask the development version of X.org and install it:
 echo "x11-base/xorg-x11 ~x86" >> /etc/portage/package.keywords
 emerge -va xorg-x11
  • Configure the kernel for i915 DRI support:
Linux Kernel Configuration: AGP & DRI
Device Drivers  --->
  Character devices  --->
    <*> /dev/agpgart (AGP Support)
    <*>   Intel 440LX/BX/GX, I8xx and E7x05 chipset support
    <M> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
    <M>   Intel 830M, 845G, 852GM, 855GM, 865G
    <M>     i915 driver
  • Add the modules to /etc/modules.autoload.d/kernel-2.6:
 echo "drm" >> /etc/modules.autoload.d/kernel-2.6
 echo "i915" >> /etc/modules.autoload.d/kernel-2.6
  • Device section of xorg.conf:
File: /etc/X11/xorg.conf
Section "Device" 
  Identifier "Card0" 
  Driver "i810" # if it doesn't work, fall back to "vesa"
  BusID "PCI:0:2:0" 
  Screen 0 
  # increase the RAM, available for the controller
  VideoRam      131072
  # you will need this option to restore the console when using vesa-tng / fbsplash
  Option        "VBERestore" "true"
EndSection 

Patching X.org, as suggested in the i915 Sonoma thread in the Gentoo forums doesn't seem to be necessary, in our case.
Another gentoo forums discussion on running Xorg with i915: [1].

Dual Head / Xinerama / External Monitor

Attaching a monitor doesn't work yet reliably. However, what you need to do, is add a line to the device section, like:

MonitorLayout "CRT+DFP,LFP"

This means that there is a CRT or Digital Flat Panel at pipe A, and the laptop's own screen (Local Flat Panel) at pipe B. The LFP always is on pipe B, trying something like "LFP,CRT+DFP" will fail! For setting xorg.conf up for two monitors, have a look at HOWTO_Dual_Monitors. Dual head mode is still unstable on this notebook. For further options for the i810 driver refer to "man i810". Have a look on the example xorg.conf in the appendices, you will find an example configuration for xinerama as well.

You might want to try the i855crt tool, which tries to enable the other pipe for VGA out (didn't work for my tft, but might be worth a try). http://i855crt.sourceforge.net/ You will need this patch from the sourceforge page, and recompile the tool (otherwise the graphics board wont be recognized).

PCI data

lspci output of the graphics controller:

0000:00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
0000:00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)

Note: The controller apears two times. This is a feature and might be used in the future for some performance gain.

Synaptics Touchpad

The touchpad is from synaptics, you may follow the instructions from HARDWARE_Synaptics_Touchpad

If you like to have a more 'stable' configuration (no fancy mouse button emulations), you can use this as InputDevice section in xorg.conf:

File: /etc/X11/xorg.conf
Section "InputDevice" 
 Driver "synaptics"  
 Identifier "Touchpad" 
 Option        "Device"        "/dev/input/mouse0"
 Option        "Protocol"      "auto-dev"
 Option        "LeftEdge"      "1700"
 Option        "RightEdge"     "5300"
 Option        "TopEdge"       "1700"
 Option        "BottomEdge"    "4200"
 Option        "FingerLow"     "25"
 Option        "FingerHigh"    "40"
 Option        "MaxTapTime"    "180"
 Option        "MaxTapMove"    "220"
 Option        "VertScrollDelta" "100"
 Option        "MinSpeed"      "0.06"
 Option        "MaxSpeed"      "0.15"
 Option        "AccelFactor"   "0.0015"
 Option        "SHMConfig"     "on"
 Option        "TapButton1"	"1"
 Option        "TapButton2"	"1"
 Option        "TapButton3"	"1"
 Option        "LTCornerButton"	"2"
EndSection

Keyboard / special keys

There is a Dell notebook keyboard model for X, which works for most of the special keys. For using it, add this line to the input device section of your keyboard in /etc/X11/xorg.conf:

Option          "XkbModel"      "inspiron"

Alternativley you can set it using the control center of KDE. In the keyboard layout part, change the keyboard model to "Laptop/notebook Dell Inspiron 8xxx".

Have a look at HOWTO_Use_Multimedia_Keys for more info on mapping still unknown special keys and using them in a desktop environment.

Network

Ethernet

It's a Broadcom NetXtreme BCM5751 which is supported by the Broadcom Tigon3 kernel driver:

Linux Kernel Configuration: Ethernet
 Device Drivers  --->
   Networking support  --->
     [*] Networking support
     Ethernet (1000 Mbit)  ---> 
       <*> Broadcom Tigon3 support

If you build it as a module, it will be called "tg3".

Wireless

Nothing special to mention here, just follow the instructions of HARDWARE_ipw2200 and HOWTO_Wireless_Configuration_and_Startup.

Sound

AC97 compatible, using ALSA (enable the alsa USE flag):

Linux Kernel Configuration: Sound & Modem
 Device Drivers  --->
  Sound  ---> 
    <*> Sound card support
    Advanced Linux Sound Architecture  ---> 
       <M> Advanced Linux Sound Architecture
       PCI devices  --->
         <M> Intel/SiS/nVidia/AMD/ALi AC97 Controller
         <M> Intel/SiS/nVidia/AMD MC97 Modem (EXPERIMENTAL)

You will need this .asoundrc in your homedir, otherwise you might hear some click sounds (at least with headphones, the built-in speaker isn't good enough to hear them).

Modem

This is adapted and taken from: HARDWARE_Gentoo_Acer_Travelmate_803LCi_Manual#Internal_modem

Make sure, you have the alsa MC97 Modem module selected (like shown in the Sound section).
This will create an ALSA module for the modem.

Simply add ALSA support to your make.conf and emerge slmodem which is in portage with

File: /etc/make.conf
SUPPORT_ALSA=1

Now run emerge slmodem.

After a successfull emerge add the following line to /etc/modules.d/alsa. If the doesn't exist, just create it:

File: /etc/modules.d/alsa
alias snd-card-1 snd-intel8x0m

Load the module (and set it to load at boot):

# modprobe snd_intel8x0m
# echo "snd_intel8x0m" >> /etc/modules.autoload.d/kernel-2.6

For the first time run the driver with (replace <country> with an appropriate value, usually the english name of your country in capital letters):

# slmodemd -a hw:1 -c <country>

If everything is fine, a device /dev/ttySL0 has been created, otherwise you will see an error message. Press Ctrl-C to exit. To start the smartlink modem using the init script, you need to edit /etc/conf.d/slmodem . Set the variable COUNTRY to an appropriate value, and change the HW_SLOT line:

HW_SLOT=hw:1

Note: You need to be in the dialout group to use the modem, or set the variable GROUP to a different value. A symlink /dev/modem will be created to the device.

Now try to start the init script and ensure the device has been created:

# /etc/init.d/slmodem start
# ls /dev/ttySL0

Add the modem to the default runlevel:

# rc-update add slmodem default

The hardware part is done now. If you want to set up a dial up connection, refer to HOWTO_Setup_a_Dialup_Connection. In KDE you might want to use the tool kppp. In anycase, you will need the package net-dialup/ppp to be emerged:

# emerge net-dialup/ppp

Remember: Your modem device is /dev/modem (or w/o symlink /dev/ttySL0).

Compact Flash

Compact flash readers are similar to PCMCIA devices, the CF slot is recognized by the kernel as CardBus socket. You might want to enable the pcmcia USE flag.

Kernel Options for PCMCIA:

Linux Kernel Configuration: Compact Flash: PCMCIA
Bus options (PCI, PCMCIA, EISA, MCA, ISA)  ---> 
  PCCARD (PCMCIA/CardBus) support  --->
    <*> PCCard (PCMCIA/CardBus) support
    [ ]   Enable PCCARD debugging
    <*>   16-bit PCMCIA support
    [*]   32-bit CardBus support
    --- PC-card bridges
    <*> CardBus yenta-compatible bridge support

To mount the card, you need to enable ide-cs support:

Linux Kernel Configuration: Compact Flash: IDE-CS

Kernel Options:

Device Drivers ---> 
 ATA/ATAPI/MFM/RLL support ---> 
  <*> PCMCIA IDE support

Emerge the PCMCIA tools and start them at boot time:

emerge pcmcia-cs
/etc/init.d/pcmcia start
rc-update add pcmcia boot

This is not tested, but seems to be working.

SD / MMC

The device shows up as:

0000:02:01.2 Class 0805: Ricoh Co Ltd SD Card reader (rev 17)

Sadly, the device is probably completely unsopported by the kernel.

Any Idea where we can find technical documentation ?

ACPI / Software Suspend 2

ACPI:


  • The 'sleep' state works, but with the CVS version of X.org and the i915 it might get stuck in the state.
  • 'standby' doesn't do anything.
  • 'disk' has problems awaking (you can get it awake by put it via e.g. the lid/power-button to the 'sleep' state and back on).

Using the vesa driver for X, it also resumed from the disk state. The general problem is, that you would need to flash the video BIOS while resuming. Maybe it would be possible to do this by catching an ACPI event (even though there is no special wake-up event sent, e.g. battery/ac-adapter events occur while resuming). However, the vesa performance is quite poor, so I rather stick to the i810 driver.

Basic configuration for ACPI, including scripts and configs to catch power button and lid events: TIP_ACPI_basic_configuration.

Software Suspend 2 is working (gentoo-sources-2.6.12-r6, swsusp 2.1.9.5). Some issues you need to know, to get it working:

  • You only need to install >=ipw2200-1.0.4 for the wireless card.
  • Once resumed, you might need to switch to console and back to X, to wake up your display. You can add a line to hibernate.conf, with an xset command line to wake it up while resuming (OnResume 00 xset -display :0 dpms force on).
  • The CPU frequency might get stuck when resuming from disk. Solution:
    • Compile speedstep and governors as modules, set the userspace as default governors.
    • On suspend, change to the userspace governor, set the frequency to 1100000 and unload the modules
    • On resume, load the modules (just put them into /etc/modules.autoload.d/kernel-2.6) and set e.g. the ondemand governor.

Have a look at the hibernate.conf in the appendices.

Linux Kernel Configuration: Power Management
Power management options (ACPI, APM)  --->
  CPU Frequency scaling  --->
    [*] CPU Frequency scaling
    [ ]   Enable CPUfreq debugging
    <M>   CPU frequency translation statistics
    [ ]     CPU frequency translation statistics details
     Default CPUFreq governor (userspace)  --->
    <M>   'performance' governor
    <M>   'powersave' governor
    ---   'userspace' governor for userspace frequency scaling 
    <M>   'ondemand' cpufreq policy governor
    <M>   CPU frequency table helpers
    ---   CPUFreq processor drivers
    <M> Intel Enhanced SpeedStep
    [*]   Use ACPI tables to decode valid frequency/voltage pairs
    [*]   Built-in tables for Banias CPUs

Temperature

It is possible to read the temperature from proc, if you have ACPI / thermal zone activated in the kernel:

cat /proc/acpi/thermal_zone/THM/temperature

Some tools require the i8k kernel driver to show the temperature:

Linux Kernel Configuration: Dell Laptop Support
Processor type and features  --->
  <*> Dell laptop support

The i8k driver was actually designed for for Inspiron 8xxx notebooks, so it is unwilling to be loaded. It is possible to force it by passing "force=1" as parameter when loading it as module, or, if compiled-in, by writing "i8k.force" in the kernel line.
Since the X1 neither has special buttons nor fans, the i8kutils are useless.

Misc

  • If you hear a high-pitched beeping while the system is idle, try to add 'idle=halt pci=bios' to your kernel line.
    • idle=halt is not a good solution to this problem, since it disables all less power consuming ACPI c states. It is better just to disallow the higher c states which cause the noise (C3 and C4). Using sysfs it is easy to achieve that: echo 2 > /sys/module/processor/parameters/max_cstate.
    • Another solution is patching the kernel to use a lower timer interrupt (have a look at the link for more info).
    • Credits and patch how-to: Thinkpad-Wiki: high pitched noises.
  • It looks like there are problems with the cdemu/loop kernel modules, and the DVD burner (at least starting k3b completely locks the system, if they are loaded). Used: kernel 2.6.11-gentoo-r9, cdemu 0.7.
  • BIOS update available! Dell offers now BIOS version A03 on their page. There is a BIOS upgrade of the graphics board included. If you upgraded your BIOS, please share your experiences at the discussion page.
  • The graphics driver seems to have a problem with contrast/brightness of xvideo overlays. The default value of the contrast attribute should be 64, but most applications will set it to 128. Install xvattr (emerge xvattr) with the gtk useflag enabled, which offers a commandline tool and graphical frontend to change Xvideo attributes. For the frontend, run gxvattr; for setting the value via shell, run xvattr -a XV_CONTRAST -v 64.

Appendix

Some files, lspci output: HARDWARE_Dell_Latitude_X1_Appendices

Other Resources

http://www.stud.ntnu.no/~gronslet/blog/linux-on-a-dell-x1-aka-samsung-q30
http://www.linux-on-laptops.com/dell.html

--Kottlett 10:53, 12 Jun 2005 (GMT)