Difference between revisions of "Dell Studio XPS 13"

From ArchWiki
Jump to: navigation, search
m (HDD important issue)
(Hybernation - Suspend: Remove duplication.)
(22 intermediate revisions by 8 users not shown)
Line 1: Line 1:
I have just bought a new Dell Studio XPS 13.  I haven't been able to find any information for installing Arch Linux on this machine.  It is a very nice looking laptop, and runs fast and smooth.  I have had a successful install (32-bit only, 64-bit).  I still have a few things to get working, like the Bluetooth, and media buttons.
+
[[Category:Dell]]
 +
I have just bought a new Dell Studio XPS 13.  I have not been able to find any information for installing Arch Linux on this machine.  It is a very nice looking laptop, and runs fast and smooth.  I have had a successful install (32-bit only, 64-bit).  I still have a few things to get working, like the Bluetooth, and media buttons.
  
 
System Specs:
 
System Specs:
Line 20: Line 21:
 
The basic installation performs normally, with the core cd, also the wireless modules ( Atheros wifi card ) were well recognised and worked out of the box.
 
The basic installation performs normally, with the core cd, also the wireless modules ( Atheros wifi card ) were well recognised and worked out of the box.
  
== Video Card ==
 
=== Nvidia 9500 M (9400+9200) ===
 
It works well with this /etc/X11/'''xorg.conf''', the really important feature is Busid "PCI:3:0:0". There are also some touchpad configuration with two-finger scrolling and tapping.
 
<pre>
 
Section "ServerLayout"
 
    Identifier    "Layout0"
 
    Screen      0  "Screen0" 0 0
 
    InputDevice    "Keyboard0" "CoreKeyboard"
 
    InputDevice    "Mouse0" "CorePointer"
 
EndSection
 
 
Section "Files"
 
EndSection
 
 
Section "Module"
 
Load "dbe"
 
Load "extmod"
 
Load "type1"
 
Load "freetype"
 
Load "glx"
 
Load "synaptics"
 
EndSection
 
 
Section "InputDevice"
 
    # generated from default
 
    Identifier    "Mouse0"
 
    Driver        "synaptics"
 
    Option        "Protocol" "auto-dev"
 
    Option        "Device" "/dev/psaux"
 
    Option        "SendCoreEvents" "true"
 
    Option        "VertScrollDelta"  "80"
 
    Option        "HorizScrollDelta"  "80"
 
    Option        "SHMConfig"  "on"
 
    Option        "Emulate3Buttons"  "on"
 
    Option        "VertTwoFingerScroll" "true"
 
    Option        "HorizTwoFingerScroll" "true"
 
    Option        "EmulateTwoFingerMinZ" "10"
 
    Option        "TapButton1" "1"
 
    Option        "TapButton2" "2"
 
    Option        "TapButton3" "3"
 
EndSection
 
 
Section "InputDevice"
 
    # generated from default
 
    Identifier    "Keyboard0"
 
    Driver        "kbd"
 
EndSection
 
 
Section "Monitor"
 
    Identifier    "Monitor0"
 
    VendorName    "Unknown"
 
    ModelName      "Unknown"
 
    HorizSync      28.0 - 33.0
 
    VertRefresh    43.0 - 72.0
 
    Option        "DPMS"
 
EndSection
 
 
Section "Device"
 
    Identifier    "Device0"
 
    Driver        "nvidia"
 
    VendorName    "NVIDIA Corporation"
 
    Option        "SLI" "Auto"
 
    Option        "NoLogo" "true"
 
    Option        "DPMS" "true"
 
    Option        "TripleBuffer" "true"
 
    # Reduces the interrupts
 
    Option        "OnDemandVBlankInterrupts" "True"
 
    #force Powermizer to a certain level at all times
 
    ## level 0x1 = highest
 
    ## level 0x2 = med
 
    ## level 0x3 = lowest
 
#    Option "RegistryDwords" "PowerMizerLevelAC=0x3"
 
#    Option "RegistryDwords" "PowerMizerLevel=0x3"
 
    # Auto powermizer option
 
#  Option        "RegistryDwords" "PerfLevelSrc=0x3333"
 
    Busid          "PCI:3:0:0"
 
    Option        "RenderAccel" "True"
 
    Option        "AllowGLXWithComposite" "True"
 
    Option        "AddARGBLXVisuals" "On"
 
EndSection
 
 
Section "Screen"
 
    Identifier    "Screen0"
 
    Device        "Device0"
 
    Monitor        "Monitor0"
 
    DefaultDepth    24
 
    Option        "TwinView" "False"
 
    SubSection    "Display"
 
        Depth      24
 
    EndSubSection
 
EndSection
 
Section "Extensions"
 
Option "Composite" "Enable"
 
EndSection
 
</pre>
 
 
== Power Management ==
 
== Power Management ==
 
=== HDD '''important issue''' ===
 
=== HDD '''important issue''' ===
Line 148: Line 54:
 
Setting the spin-down feature (it parks the heads away from disk) however can save hdd in case of fall.
 
Setting the spin-down feature (it parks the heads away from disk) however can save hdd in case of fall.
  
 +
=== Hybernation - Suspend  ===
 +
This feature works very well, See [[pm-utils]]
  
Also to help preserve the HDD life you can add 'noatime' to / and /home in your /etc/fstab to save writing access time on reads
+
Make sure acpid is installed and running.  You can add it to the DAEMONS array in /etc/rc.conf.
Looks like this:
+
<pre>
+
[phr0zn@ragnarok ~]$ cat /etc/fstab
+
#
+
# /etc/fstab: static file system information
+
#
+
# <file system>        <dir>        <type>    <options>          <dump> <pass>
+
none                  /dev/pts      devpts    defaults            0      0
+
none                  /dev/shm      tmpfs    defaults            0      0
+
  
#/dev/cdrom            /media/cd  auto    ro,user,noauto,unhide  0      0
+
Then edit these files...
#/dev/dvd              /media/dvd  auto    ro,user,noauto,unhide  0      0
+
#/dev/fd0              /media/fl  auto    user,noauto            0      0
+
  
UUID=1ca6603c-889c-454c-bd31-a176892ae9c9 / ext4 defaults,noatime 0 1
+
/etc/acpi/actions/lm_lid.sh:
UUID=6154c07d-ff8c-4f90-b476-d792e2c165f3 /boot ext2 defaults 0 1
+
UUID=fb1b6490-c07f-42d5-ad70-92c8eb13ca15 /home ext4 defaults,noatime 0 1
+
UUID=fdac6506-5249-4f80-a880-b4aa17ad984c swap swap defaults 0 0
+
</pre>
+
 
+
=== [[pm-utils|Hybernation - Suspend]]  ===
+
This feature works very well, the only thing you have to set is your /boot/grub/menu.lst , if you don't set the option "resume" your computer doesn't resume after hybernation, so add resume=/your/swap/partition like in this example:
+
 
<pre>
 
<pre>
title  Arch Linux
+
sh ~/bin/suspend
root  (hd0,4) # It depends on your device
+
kernel /boot/vmlinuz26 root=/your/root/device ro resume=/your/swap/partition
+
initrd /boot/kernel26.img
+
 
</pre>
 
</pre>
  
=== CPU Frequency Scaling ===
+
(Taken from http://www.linux.com/news/hardware/laptops/8253-how-to-suspend-and-hibernate-a-laptop-under-linux [+] with a little modification)
This has helped me greatly reduce the heat of my studio XPS (unless running anything flash of course).
+
 
This works really well for me, and has been for some time.
+
~/bin/suspend:
To install necessary packages issue this command:
+
 
<pre>
 
<pre>
pacman -Sy cpufrequtils pm-utils laptop-mode-tools
+
#!/bin/sh
</pre>
+
Then to activate kernel modules issue this set of commands:
+
<pre>
+
modprobe acpi_cpufreq
+
modprobe cpufreq_powersave
+
modprobe cpufreq_ondemand
+
</pre>
+
Also make sure you add those modules to the MODULES array in your /etc/rc.conf
+
  
Now we need to see what the processor can do.  Most likely yours will be the same as mine, but check just to be sure, we don't want you burning out your processor.
+
# discover video card's ID
 +
ME=`whoami`
 +
if [ "$ME" != "root" ]; then
 +
    echo "You must be root!"
 +
    exit 1
 +
fi
  
Issue this command to check out the specs:
+
ID=`lspci | grep VGA | awk '{ print $1 }' | sed -e 's@0000:@@' -e 's@:@/@'`
<pre>
+
cpufreq-info
+
</pre>
+
  
Then you should make your /etc/conf.d/cpufreq file look like this:
+
# securely create a temporary file
<pre>
+
[phr0zn@ragnarok ~]$ cat /etc/conf.d/cpufreq
+
#configuration for cpufreq control
+
  
# valid governors:
+
TMP_FILE=`mktemp /var/tmp/video_state.XXXXXX`trap 'rm -f $TMP_FILE' 0 1 15
#  ondemand, performance, powersave,
+
#  conservative, userspace
+
governor="ondemand"
+
  
# valid suffixes: Hz, kHz (default), MHz, GHz, THz
+
# switch to virtual terminal 1 to avoid graphics
min_freq="1.6GHz"
+
# corruption in X
max_freq="2.4GHz"
+
 
</pre>
+
chvt 1
 +
 
 +
# write all unwritten data (just in case)
 +
 
 +
sync
  
Now you can start cpu frequency scaling by issuing this command:
+
# dump current data from the video card to the
<pre>
+
# temporary filecat
/etc/rc.d/cpufreq start
+
 
 +
/proc/bus/pci/$ID > $TMP_FILE
 +
 
 +
# suspend
 +
 
 +
echo -n mem > /sys/power/state
 +
 
 +
# restore video card data from the temporary file
 +
# on resume
 +
 
 +
cat $TMP_FILE > /proc/bus/pci/$ID
 +
 
 +
# switch back to virtual terminal 7 (running X)
 +
chvt 7
 +
 
 +
# remove temporary file
 +
rm -f $TMP_FILE
 
</pre>
 
</pre>
  
You also want to add 'cpufreq' to your DAEMONS array in the /etc/rc.conf
+
This should suspend your laptop to RAM when the lid is closed.

Revision as of 03:27, 18 April 2013

I have just bought a new Dell Studio XPS 13. I have not been able to find any information for installing Arch Linux on this machine. It is a very nice looking laptop, and runs fast and smooth. I have had a successful install (32-bit only, 64-bit). I still have a few things to get working, like the Bluetooth, and media buttons.

System Specs:

  • Processor
    • Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz
  • RAM Memory
    • 4 GB DDR3
  • Webcam
    • 2.0 Megapixel Webcam
  • Hard Disk
    • 320GB SATA 7200 rpm HDD
    • 500GB SATA 7200 rpm HDD
  • Video Card
    • NVIDIA 9400M
    • NVIDIA 9500M (9400M G + 9200M GS)
  • Wireless
    • Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller
    • Atheros Communications Inc. AR928X Wireless Network Adapter

The basic installation performs normally, with the core cd, also the wireless modules ( Atheros wifi card ) were well recognised and worked out of the box.

Power Management

HDD important issue

With the Western Digital hard drive (not SSD), there is an important issue: using the APM (Advanced Power Management) there are too nomerous spin-down, that can damage the hard drive [1]. To confirm this issue you have to install smartmontools:

# pacman -S smartmontools

And you have to run multiple times this command (once in a minute for like 5 minutes):

# smartctl -a /dev/sda|grep Load_Cycle_Count

If the number under Load_Cycle_Count is increasing in a small amount of time (1 or 2 in a minute) you have this issue.

The problem is easily solvable using laptop-mode-tools. In your /etc/laptop-mode/laptop-mode.conf you have to set:

#
# Should laptop mode tools control the hard drive power management settings?
#
CONTROL_HD_POWERMGMT=1


#
# Power management for HD (hdparm -B values)
#
BATT_HD_POWERMGMT=255
LM_AC_HD_POWERMGMT=255
NOLM_AC_HD_POWERMGMT=255

This disable all power management systems of the hard drive cause a light heat up (maybe). The same behaviour can be obtained running this command:

# hdparm -B 255 /dev/sda

the 255 number is the power-management level, in a range of 1-255 where 1 is maximum powersaving and 255 powersaving disabled. However setting the value to 253 causes a lot of spin-down. Setting the spin-down feature (it parks the heads away from disk) however can save hdd in case of fall.

Hybernation - Suspend

This feature works very well, See pm-utils

Make sure acpid is installed and running. You can add it to the DAEMONS array in /etc/rc.conf.

Then edit these files...

/etc/acpi/actions/lm_lid.sh:

sh ~/bin/suspend

(Taken from http://www.linux.com/news/hardware/laptops/8253-how-to-suspend-and-hibernate-a-laptop-under-linux [+] with a little modification)

~/bin/suspend:

#!/bin/sh

# discover video card's ID
ME=`whoami`
if [ "$ME" != "root" ]; then
    echo "You must be root!"
    exit 1
fi

ID=`lspci | grep VGA | awk '{ print $1 }' | sed -e 's@0000:@@' -e 's@:@/@'`

# securely create a temporary file

TMP_FILE=`mktemp /var/tmp/video_state.XXXXXX`trap 'rm -f $TMP_FILE' 0 1 15

# switch to virtual terminal 1 to avoid graphics
# corruption in X

chvt 1

# write all unwritten data (just in case)

sync

# dump current data from the video card to the
# temporary filecat 

/proc/bus/pci/$ID > $TMP_FILE

# suspend

echo -n mem > /sys/power/state

# restore video card data from the temporary file
# on resume

cat $TMP_FILE > /proc/bus/pci/$ID

# switch back to virtual terminal 7 (running X)
chvt 7

# remove temporary file
rm -f $TMP_FILE

This should suspend your laptop to RAM when the lid is closed.