Dell XPS M1330

From Gentoo Linux Wiki

(Redirected from HARDWARE Dell XPS M1330)
Jump to: navigation, search

This computer has been sold with several different options of OS. One option comes with Ubuntu linux. If you are reading this guide, we assume that you probably want to wipe Ubuntu and replace it with Gentoo.

Contents

[edit] Partitioning for Gentoo + Vista + MediaDirect triple boot

One version of this machine comes with Vista and Dell MediaDirect. MediaDirect allows it to double as a portable CD/DVD player. Just press the Home button, insert a disk, grab the remote control, sit back and enjoy. Sometimes that's really all we want to do, so we'd like to keep this feature.

A look at the factory partitioning however tells us something's got to give:

       FAT16                    70MB    Dell Utility
       NTFS                     10GB    Recovery
       NTFS                    135GB    Vista
       extended
               unallocated       1MB    unallocated
               FAT32           2.5GB    Dell MediaDirect

(See also http://www.goodells.net/dellrestore/vista.htm)

The Recovery partition is nothing but a mothballed image serving no useful purpose, just hogging 10 GB of disk space—the obvious candidate to go.

The easiest thing to do is start from scratch, and create a smaller partition for Vista to start with. (This is probably also faster as shrinking a 135GB Vista partition takes very long. In addition, Vista will not boot after having been shrunk, so you would need to repair it using the Vista reinstallation disk, and that might take even longer.)

[edit] What you will need

[edit] Step-by-step instructions

  1. Boot off the GParted live CD, and verify that you have the same or similar configuration, just in case...
  2. Boot off the Dell MediaDirect reinstallation disk. It will ask you whether you want all available disk space for Vista, or you want to specify a smaller partition for it. Select the latter, and specify, say, 30 GB.
  3. Reinstall Vista.
  4. Boot Vista, and reinstall the Dell drivers.
  5. While still in Vista, insert the Dell MediaDirect reinstallation disk, and reinstall it.
  6. Boot off the GParted live CD, and you will see something like this:
  7.        FAT16                    47MB    Dell Utility
           NTFS                     30GB    Vista 
           extended
                   unknown         117GB
                   FAT32             2GB    Dell MediaDirect
    
  8. Shrink the extended partition by 100MB to make room for the Linux boot partition.
  9. Create a 100MB primary partition in the place you just freed up, and format it as Linux boot.
  10. In the unallocated space inside the extended partition create a swap partition, a Linux root partition and whatever other partitions you wish. You may want to create a FAT32 one that will be writable by Linux as well as Vista.

Just a note.... Vista can shrink its own disk and you might try that before doing this hassle. Open Disk manager and you can shrink the disk

NB Dell media direct is bound to the little "house" button near power button.
If the media direct partition is still in your disk it should screw up your partition table once you boot your notebook with the House button.
One way to solve the problem if you don't need media direct, is doing a low format to the drive, to do it follow the instructions on the link.
This is a low format which will write zeros on all your disk, erasing all things.
After this you can reformat your disk with partitions for vista and  gentoo, avoiding installation of Media Direct.

This is a thread on ubuntu forum about this thing,with instruction on how to recover files if Media Direct screwed up your partitions table and how to delete it, read it should help!

[edit] Installing Gentoo

As the Broadcom NetLink BCM5906M Ethernet controller is not supported by the version of the tg3 (Tigon3) driver that's on Gentoo Installation CD 2007.0 (only supported since kernel 2.6.20), you need to get the Installer LiveCD for a networkless installation. X won't work out of the box, so use installer-dialog, or edit the xorg.conf to use the vesa driver instead of the auto-detected nv, start X with startx, and then use a terminal to start installer-gtk.

If you want to perform a network installation, you can use any decent Gentoo-based LiveCD with a relatively new kernel (that is, 2.6.20 or newer). I used iloog. — Aggelos Orfanakos 03:39, 18 December 2007 (UTC) The 2000.8_beta2 Gentoo Install CD also works.

[edit] Hardware

[edit] Networking

[edit] Wired

See this guide.

[edit] Wireless

[edit] Intel Next-Gen Wireless-N
  1. Select NetworkingWirelessGeneric IEEE 802.11 Networking stack (mac80211) to be built as a module. (That's CONFIG_MAC80211=m in /usr/src/linux/.config)
  2. emerge sys-apps/pciutils (for lspci)
  3. lspci | grep -i wireless | grep --color '3945\|4965' to determine your wireless chipset.
    • For ipw3945, issue echo "net-wireless/iwlwifi ipw3945" >> /etc/portage/package.use
    • For ipw4965, issue echo "net-wireless/iwlwifi ipw4965" >> /etc/portage/package.use
  4. emerge net-wireless/iwlwifi (you may need to unmask it, as well as iwlwifi3945-ucode or iwlwifi4965-ucode in /etc/portage/package.keywords and /etc/portage/package.unmask)
    Only the ucode emerge needed with 2.6.24-gentoo-r3 as iwlwifi driver already in kernel
  5. emerge net-wireless/wireless-tools (for iwconfig, iwlist etc.)
  6. Optional: emerge net-misc/dhcpcd (for dhclient)
  7. modprobe iwl3945 or modprobe iwl4965 (depending on your wireless chipset)
  8. Switch on the wireless button. :-)
  9. Check if it works:
    1. ifconfig wlan0 up
    2. ifconfig wlan0 should list wlan0 with its parameters.
    3. iwlist wlan0 scan will list access points if any are found.
  10. Create a symlink in /etc/init.d: ln -s net.lo net.wlan0
  11. Connect: /etc/init.d/net.wlan0 start


Note:
  • If you get a kernel panic while booting with the wireless switched on, you may want to prevent udev from starting wlan0 as a "device-initiated service" by setting RC_PLUG_SERVICES="!net.wlan0" in /etc/conf.d/rc.
  • The iwlwifi drivers only support the wireless status LED in kernel 2.6.26 and greater.
  • For a deep coverage of ipw3945, see HARDWARE ipw3945.

[edit] Graphics

There are two options for this laptop; the Intel 965GM, an Integrated graphics controller, and the more expensive option, the nVIDIA 8400M GS. Look at the output of lspci in order to determine which card you have, if you do not know already:

lspci | less

[edit] nVIDIA 8400M GS

emerge nvidia-drivers At the time of writing this, one gets version 100.14.09. Then edit your xorg.conf as described in Chapter 6B of /usr/share/doc/nvidia-drivers-100.14.09/README.bz2, or generate one with nvidia-xconfig.

To tell Gentoo to use nvidia opengl implementation, run: eselect opengl set nvidia.

With an m1330 with geforce 8400m, this is the xorg.conf file I used with compiz-fusion, including a few options to fix/optimize some problems with compositing managers and nvidia:

   Section "Screen"
       Identifier     "Screen0"
       Device         "Videocard0"
       Monitor        "Monitor0"
       DefaultDepth    24
       Option         "metamodes" "1280x800 +0+0; 800x600 +0+0; 640x480 +0+0"
       Option         "RenderAccel" "True"
       Option         "NoLogo" "True"
       Option         "AddARGBGLXVisuals" "True"
       Option         "AllowGLXWithComposite" "True"
       Option         "TripleBuffer" "True"
       Option         "NvAGP" "0"
       Option         "DamageEvents" "True"
       Option         "BackingStore" "True" 
       # If you use render events, be sure to boot with the idle=poll option
       #Option "UseEvents" "True"
       SubSection     "Display"
           Depth       24
           Modes      "1280x1024" "1024x768" "800x600" "640x480"
       EndSubSection
   EndSection
   Section "Extensions"
       Option "DAMAGE"    "Enable"
       Option "Composite" "True"
       Option "RENDER"    "Enable"
   EndSection

[edit] Intel GMA X3100

lspci

00:02.0 VGA compatible controller: Intel Corporation Mobile Integrated Graphics Controller (rev 0c)
00:02.1 Display controller: Intel Corporation Mobile Integrated Graphics Controller (rev 0c)

See this guide.

Note: When using x11-drivers/xf86-video-i810 great than 2.1.1 I was unable to use direct rendering, when using glxgears from the command line I received the error:

libGL error: drmMap of framebuff

reverting to x11-drivers/xf86-video-i810-2.1.1 solved the problem

[edit] Monitor and lid

It's possible to have the monitor turn off/on automatically when the lid closes/opens. For more information, see HOWTO Automatically turn off your monitor.

[edit] Integrated WebCam

emerge linux-uvc and then issue modprobe uvcvideo.

Note: Under V4L USB devices in the kernel there is now a kernel version of the uvcvideo driver.

emerge luvcview to be able to take photos and record videos with luvcview (you may need to unmask it first).

[edit] Sound

[edit] Intel Corporation HD Audio Controller

The driver must be patched in linux-2.6.22-gentoo-r5. As it's a known bug for which there's already a patch, the fixed version should come out soon (works without patch in 2.6.24-r3), but we don't want to wait in silence. Therefore:

  1. Get the patch: wget http://intr.overt.org/m1330-files/alsa-stac.diff
  2. Apply it in /usr/src/linux-2.6.22-gentoo-r5/sound/pci/hda: patch patch_sigmatel.c alsa-stac.diff
  3. Compile Device DriversSoundAdvanced Linux Sound ArchitecturePCI devicesIntel HD Audio as a module. (Also select Device DriversSoundSound card support and Device DriversSoundAdvanced Linux Sound ArchitectureAdvanced Linux Sound Architecture).
  4. Load the driver: modprobe snd_hda_intel model=5stack
  5. Configure it: alsaconf (This will automatically detect, configure and start everything for you. No need to tweak anything.)
  6. NOTE: If you installed gnome-light, be sure to emerge the necessary gnome sound controls.
  7. NOTE 2: With a more recent kernel (I use 2.6.23-kamikaze4) the steps 1,2,3 and 5 are unnecesary. Just be sure tu unmute all the channels with alsamixer (press 'm' on each one to toggle mute status) and then save changes with alsactl store.

[edit] BlueTooth

The devices associated with the Dell 355 BlueTooth adapter in this laptop are viewable from the lsusb command:

   Bus 003 Device 013: ID 0a5c:4503 Broadcom Corp. 
   Bus 003 Device 012: ID 0a5c:4502 Broadcom Corp. 
   Bus 003 Device 011: ID 413c:8126 Dell Computer Corp. 
   Bus 003 Device 010: ID 0a5c:4500 Broadcom Corp. 

You will not see any of these if the wireless switch is set up to turn BlueTooth off and the switch is off.

If you previously disabled bluetooth in Windows and the wireless switch is turned on, the bluetooth light is not lighting up, you do not see "Bus 003 Device 011: ID 413c:8126 Dell Computer Corp." in your lsusb output and you see the three "Broadcom Corp." lines, you may have to boot into windows to enable bluetooth using the bluetooth icon in the system tray.

Technical notes: The Dell 355 Bluetooth adapter in this laptop is a Broadcom 2045B2 and uses the hci_usb driver.

[edit] Controlling Bluetooth

The Bluetooth can be controlled independently of the hardware RFkill switch using a utility called dellWirelessCtl that is available with the sys-libs/libsmbios package. What follows is a small script that you can put into /usr/sbin that allows you to toggle Bluetooth on and off without killing all wireless communication.

File: /usr/sbin/bt_toggle
 
#!/bin/sh

status=`/usr/bin/dellWirelessCtl --st_bt | grep Code | cut -d' ' -f3`

if [ ${status} -eq 0 ]
then
     `/usr/bin/dellWirelessCtl --bt 0` > /dev/null 2> /dev/null
     echo "Disabling Bluetooth Adaptor"
elif [ ${status} -eq 1 ]
then
     `/usr/bin/dellWirelessCtl --bt 1` > /dev/null 2> /dev/null
     echo "Enabling Bluetooth Adaptor"
else
     echo "No action taken"
fi

exit
  

[edit] Fingerprint Reader

Some newer M1330's are equipped with a fingerprint reader which is visible in the output of the lsusb command:

   Bus 007 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader

With the fingerprint reader you can login into your system (using pam) with your fingerprint instead of your password. The ebuild that manages your fingerprints needs the kernel option CONFIG_INPUT_UINPUT to be set. Select Device driversInput device supportMiscellaneous devicesUser level driver support. If this kernel option was not selected before, then re-compile your kernel with this option enabled and reboot.

Now you are ready to emerge the thinkfinger tools: emerge sys-auth/thinkfinger. The message at the end of the ebuild tells you how to set up fingerprint authentication using pam.

[edit] Touchpad

The touchpad is a synaptics touchpad which is well supported in Linux.

Xorg should be compiled with support for the synaptics touchpad. Simply add synpatics to your INPUT_DEVICES variable in /etc/make.conf

File: /etc/make.conf
 
INPUT_DEVICES="evdev keyboard mouse synaptics"
  

Now we need to reinstall xorg-server and get the synaptics libraries: emerge x11-base/xorg-server x11-libs/libsynaptics x11-drivers/synaptics

Both KDE and Gnome have GUI utilities for configuring the synaptics touchpad. For KDE emerge kde-misc/ksynaptics and for Gnome emerge gnome-extra/gsynaptics

[edit] Media Buttons

The Media Buttons show up as normal keyboard events in X. You can use the program xev to the X event number so you can map the keys correctly.

emerge x11-apps/xev

Now, as root, run xev. Press each of your media buttons. You should notice that the console prints out some information about the X event. There is a propery in there called "keycode". That is what we are looking for. Once you have obtained all of the keycode information for your media keys, we can map them to friendly names using xmodmap.

First emerge xmodmap:

emerge x11-apps/xmodmap

Now create a file in your users home directoy called .Xmodmap that looks like the following:

File: ~/.Xmodmap
 
keycode # = XF86AudioMute
keycode # = XF86AudioLowerVolume
keycode # = XF86AudioRaiseVolume
keycode # = XF86AudioPlay
keycode # = XF86AudioPrev
keycode # = XF86AudioNext
keycode # = XF86AudioStop
  

Remember to replace the "#" with the correct keycodes you got from the xev output. From here you can set your keys at startup by running the following command:

/usr/bin/xmodmap $HOME/.Xmodmap

You can put this command in the appropriate place for whatever window manager you are using.

[edit] Useful links


Note: This article reflects a work in progress. Please contribute, especially if your hardware configuration is different from the one described here.
Personal tools