<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kilior</id>
	<title>ThinkWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kilior"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/Kilior"/>
	<updated>2026-05-04T15:20:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Post_Installing_Arch_on_an_X200&amp;diff=49985</id>
		<title>Post Installing Arch on an X200</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Post_Installing_Arch_on_an_X200&amp;diff=49985"/>
		<updated>2010-11-11T06:52:00Z</updated>

		<summary type="html">&lt;p&gt;Kilior: /* Preface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Preface==&lt;br /&gt;
&lt;br /&gt;
If your native language is Chinese or you are good at Chinese, I recommend you read [http://184.82.2.112/wordpress/?p=283 the Chinese version of this page] &lt;br /&gt;
&lt;br /&gt;
In this page, I will NOT tell you how to install ArchLinux in X200, but something make X200 work better after ArchLinux installation.&lt;br /&gt;
&lt;br /&gt;
If you don't know how to install ArchLinux to your X200, [http://wiki.archlinux.org/index.php/Main_Page ArchWiki],and [http://www.thinkwiki.org/wiki/Installing_Arch_on_an_X200 Installing Arch on an X200]. So if you reach here, I think you have installed ArchLinux to you X200 with desktop environment. If you think the tools in this page isn't the best one, or can't use in your desktop environment, please edit the page, and show your tools to us.&lt;br /&gt;
&lt;br /&gt;
==Prepare kernel modules==&lt;br /&gt;
&lt;br /&gt;
package: [http://aur.archlinux.org/packages.php?ID=3985 tp_smapi]&lt;br /&gt;
&lt;br /&gt;
You can install this package through yaourt, but the source is not patched for X200. So we need to patch the source.&lt;br /&gt;
&lt;br /&gt;
in file hdaps.c &lt;br /&gt;
&lt;br /&gt;
Search &amp;quot;X61&amp;quot; and add following line between &amp;quot; HDAPS_DMI_MATCH_INVERT(&amp;quot;LENOVO&amp;quot;, &amp;quot;ThinkPad X61&amp;quot;, HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X),&amp;quot; and &amp;quot;};&amp;quot; &lt;br /&gt;
&lt;br /&gt;
add:&lt;br /&gt;
       HDAPS_DMI_MATCH_INVERT(&amp;quot;LENOVO&amp;quot;, &amp;quot;ThinkPad X200&amp;quot;, HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X | HDAPS_ORIENT_INVERT_Y),&lt;br /&gt;
       { .ident = NULL }&lt;br /&gt;
&lt;br /&gt;
After you patch source, you can repack the source, edit PKGBUILD, use makepkg to build the package.&lt;br /&gt;
&lt;br /&gt;
Or you can make it step by step&lt;br /&gt;
&lt;br /&gt;
     $HDAPSD=true make&lt;br /&gt;
&lt;br /&gt;
     #make install&lt;br /&gt;
     #depmod -a&lt;br /&gt;
&lt;br /&gt;
==Configure modules==&lt;br /&gt;
&lt;br /&gt;
1 fan control:&lt;br /&gt;
&lt;br /&gt;
file /etc/modprobe.d/modprobe.conf, add one line:&lt;br /&gt;
&lt;br /&gt;
      options thinkpad_acpi fan_control=1&lt;br /&gt;
&lt;br /&gt;
2 audio:&lt;br /&gt;
&lt;br /&gt;
      options snd-hda-intel model=lenovo-x200 enable_msi=1&lt;br /&gt;
&lt;br /&gt;
3 autoload modules:&lt;br /&gt;
&lt;br /&gt;
      tp_smapi hdaps acpi-cpufreq&lt;br /&gt;
&lt;br /&gt;
==Sensors==&lt;br /&gt;
&lt;br /&gt;
Package: lm_sensors, sensors-applet (gnome_applet), hddtemp&lt;br /&gt;
&lt;br /&gt;
Add hddtemp to DAEMON, run sensors-detect to detect sensors, add sensors-applet to panel.&lt;br /&gt;
&lt;br /&gt;
==Fan control==&lt;br /&gt;
&lt;br /&gt;
Package: [http://aur.archlinux.org/packages.php?ID=24120 tpfand]    [http://aur.archlinux.org/packages.php?ID=24121 tpfan-admin](This package may not work well)&lt;br /&gt;
&lt;br /&gt;
Add tpfand to DAEMON. If tpfan-admin can't work, you can write a profile yourself or install [http://aur.archlinux.org/packages.php?ID=24137 tpfand-profiles]&lt;br /&gt;
&lt;br /&gt;
After ArchLinux update Xorg to version 1.8, hal can remove from DAEMON. But this make tpfand doesn't work.&lt;br /&gt;
&lt;br /&gt;
Simply edit the source can make tpfand works well.&lt;br /&gt;
&lt;br /&gt;
File /usr/lib/python2.6/site-packages/tpfand/settings.py&lt;br /&gt;
&lt;br /&gt;
change the part of code &lt;br /&gt;
    def read_model_info(self):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;reads model info from HAL&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        try:&lt;br /&gt;
            bus = dbus.SystemBus()           &lt;br /&gt;
            computer_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')&lt;br /&gt;
            computer = dbus.Interface(computer_obj, 'org.freedesktop.Hal.Device')&lt;br /&gt;
           &lt;br /&gt;
            product_id = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.product')&lt;br /&gt;
            self.product_id = product_id.lower()&lt;br /&gt;
            product_name = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.version')&lt;br /&gt;
            self.product_name = product_name.lower().replace('/', '-').replace(' ', '_')&lt;br /&gt;
           &lt;br /&gt;
            self.product_pretty_vendor = computer.GetProperty('system.hardware.vendor')&lt;br /&gt;
            self.product_pretty_name = computer.GetProperty('system.hardware.version')&lt;br /&gt;
            self.product_pretty_id = computer.GetProperty('system.hardware.product')&lt;br /&gt;
        except:&lt;br /&gt;
            print &amp;quot;Warning: unable to get your system model from HAL.&amp;quot;&lt;br /&gt;
            self.product_id = None&lt;br /&gt;
            self.product_name = None&lt;br /&gt;
            self.product_pretty_vendor = None&lt;br /&gt;
            self.product_pretty_name = None&lt;br /&gt;
            self.product_pretty_id = None   &lt;br /&gt;
&lt;br /&gt;
TO&lt;br /&gt;
&lt;br /&gt;
     #    try:&lt;br /&gt;
     #       bus = dbus.SystemBus()           &lt;br /&gt;
     #       computer_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')&lt;br /&gt;
     #       computer = dbus.Interface(computer_obj, 'org.freedesktop.Hal.Device')&lt;br /&gt;
                &lt;br /&gt;
     #       product_id = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.product')&lt;br /&gt;
     #       self.product_id = product_id.lower()&lt;br /&gt;
     #       product_name = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.version')&lt;br /&gt;
     #       self.product_name = product_name.lower().replace('/', '-').replace(' ', '_')&lt;br /&gt;
           &lt;br /&gt;
     #       self.product_pretty_vendor = computer.GetProperty('system.hardware.vendor')&lt;br /&gt;
     #       self.product_pretty_name = computer.GetProperty('system.hardware.version')&lt;br /&gt;
     #       self.product_pretty_id = computer.GetProperty('system.hardware.product')&lt;br /&gt;
     #    except:&lt;br /&gt;
     #       print &amp;quot;Warning: unable to get your system model from HAL.&amp;quot;&lt;br /&gt;
          self.product_id = u'LENOVO_74574AC'&lt;br /&gt;
          self.product_name = u'LENOVO_ThinkPad X200'&lt;br /&gt;
          self.product_pretty_vendor = dbus.String(u'LENOVO')&lt;br /&gt;
          self.product_pretty_name = dbus.String(u'ThinkPad X200')&lt;br /&gt;
          self.product_pretty_id = dbus.String(u'74574AC')&lt;br /&gt;
&lt;br /&gt;
The last 5 lines you should replace them to yours.   You can get them by python or from the bottom side of your X200.&lt;br /&gt;
&lt;br /&gt;
==Wheel Emulation==&lt;br /&gt;
&lt;br /&gt;
New file /etc/X11/xorg.conf.d/10-wheel-emulation.conf&lt;br /&gt;
&lt;br /&gt;
    # Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable&lt;br /&gt;
    # http://bugs.freedesktop.org/show_bug.cgi?id=22442&lt;br /&gt;
    Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Trackpoint Wheel Emulation&amp;quot;&lt;br /&gt;
        MatchProduct &amp;quot;TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device&amp;quot;&lt;br /&gt;
        MatchDevicePath   &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
        Option      &amp;quot;EmulateWheel&amp;quot;      &amp;quot;true&lt;br /&gt;
        Option      &amp;quot;EmulateWheelButton&amp;quot;   &amp;quot;2&amp;quot;&lt;br /&gt;
        Option      &amp;quot;Emulate3Buttons&amp;quot;   &amp;quot;false&amp;quot;&lt;br /&gt;
        Option      &amp;quot;XAxisMapping&amp;quot;      &amp;quot;6 7&amp;quot;&lt;br /&gt;
        Option      &amp;quot;YAxisMapping&amp;quot;      &amp;quot;4 5&amp;quot;&lt;br /&gt;
    EndSection&lt;br /&gt;
&lt;br /&gt;
==HDAPS==&lt;br /&gt;
&lt;br /&gt;
Packages: [http://aur.archlinux.org/packages.php?ID=5401 hdapsd] [http://aur.archlinux.org/packages.php?ID=23485 hdaps-gl] [http://aur.archlinux.org/packages.php?ID=27398 thinkhdaps]&lt;br /&gt;
&lt;br /&gt;
Add hdapsd to DAEMON, add thinkhdaps to gnome gnome startup programs.&lt;br /&gt;
&lt;br /&gt;
==Laptop Mode==&lt;br /&gt;
&lt;br /&gt;
Package: laptop-mode-tools&lt;br /&gt;
&lt;br /&gt;
Add laptop-mode to DAEMON, add edit file /etc/laptop-mode/laptop-mode.conf, change ENABLE_AUTO_MODULES' value to 1&lt;br /&gt;
&lt;br /&gt;
==Protect Battery==&lt;br /&gt;
&lt;br /&gt;
Make battery charge cycle grows slowly, we should change some value in sysfs.&lt;br /&gt;
&lt;br /&gt;
New file: /etc/sysfs.conf&lt;br /&gt;
&lt;br /&gt;
    # Make battery live longer&lt;br /&gt;
    devices/platform/smapi/BAT0/start_charge_thresh = 50&lt;br /&gt;
    devices/platform/smapi/BAT0/stop_charge_thresh = 90&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
    # Make battery live longer&lt;br /&gt;
    devices/platform/smapi/BAT0/start_charge_thresh = 10&lt;br /&gt;
    devices/platform/smapi/BAT0/stop_charge_thresh = 100&lt;br /&gt;
&lt;br /&gt;
(choose one you like, and I use the first one)&lt;br /&gt;
&lt;br /&gt;
New file: /etc/rc.d/sysfsutils&lt;br /&gt;
&lt;br /&gt;
    #! /bin/sh -e&lt;br /&gt;
    &lt;br /&gt;
    ### BEGIN INIT INFO&lt;br /&gt;
    # Provides:          sysfsconf&lt;br /&gt;
    # Required-Start:    mountkernfs&lt;br /&gt;
    # Should-Start:      udev module-init-tools loadcpufreq&lt;br /&gt;
    # Required-Stop:&lt;br /&gt;
    # Default-Start:     2 3 4 5&lt;br /&gt;
    # Default-Stop:&lt;br /&gt;
    # Short-Description: Set sysfs variables from /etc/sysfs.conf&lt;br /&gt;
    # Description:       Similarly to /etc/init.d/procps.sh, you can configure&lt;br /&gt;
    #                    values for sysfs variables (such as power management&lt;br /&gt;
    #                    defaults) and /sys file permissions in /etc/sysfs.conf.&lt;br /&gt;
    ### END INIT INFO&lt;br /&gt;
    &lt;br /&gt;
    # /etc/rc.d/sysfsutils:&lt;br /&gt;
    #&lt;br /&gt;
    # (c) 2005 Martin Pitt &amp;lt;mpitt@debian.org&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    CONFFILE=/etc/sysfs.conf&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    [ -r &amp;quot;$CONFFILE&amp;quot; ] || exit 0&lt;br /&gt;
    &lt;br /&gt;
    . /etc/rc.conf&lt;br /&gt;
    . /etc/rc.d/functions&lt;br /&gt;
    &lt;br /&gt;
    case &amp;quot;$1&amp;quot; in&lt;br /&gt;
        start)&lt;br /&gt;
        stat_busy &amp;quot;Setting sysfs variables...&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
       sed  's/#.*$//; /^[[:space:]]*$/d;&lt;br /&gt;
              s/^[[:space:]]*\([^=[:space:]]*\)[[:space:]]*\([^=[:space:]]*\)[[:space:]]*=[[:space:]]*\(.*\)/\1 \2 \3/' \&lt;br /&gt;
                  $CONFFILE | {&lt;br /&gt;
           while read f1 f2 f3; do&lt;br /&gt;
                    if [ &amp;quot;$f1&amp;quot; = &amp;quot;mode&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -n &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f2&amp;quot; ]; then&lt;br /&gt;
                            chmod &amp;quot;$f3&amp;quot; &amp;quot;/sys/$f2&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    elif [ &amp;quot;$f1&amp;quot; = &amp;quot;owner&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -n &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f2&amp;quot; ]; then&lt;br /&gt;
                            chown &amp;quot;$f3&amp;quot; &amp;quot;/sys/$f2&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    elif [ &amp;quot;$f1&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -z &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f1&amp;quot; ]; then&lt;br /&gt;
                            # Some fields need a terminating newline, others&lt;br /&gt;
                            # need the terminating newline to be absent :-(&lt;br /&gt;
                             echo -n &amp;quot;$f2&amp;quot; &amp;gt; &amp;quot;/sys/$f1&amp;quot; 2&amp;gt;/dev/null ||&lt;br /&gt;
                             echo &amp;quot;$f2&amp;quot; &amp;gt; &amp;quot;/sys/$f1&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    else&lt;br /&gt;
                        stat_fail&lt;br /&gt;
                        exit 1&lt;br /&gt;
                    fi&lt;br /&gt;
           done&lt;br /&gt;
       }&lt;br /&gt;
    &lt;br /&gt;
       stat_done&lt;br /&gt;
       ;;&lt;br /&gt;
       stop)&lt;br /&gt;
       ;;&lt;br /&gt;
       *)&lt;br /&gt;
       echo &amp;quot;Usage: /etc/rc.d/sysfsutils {start|stop}&amp;quot;&lt;br /&gt;
       exit 1&lt;br /&gt;
       ;;&lt;br /&gt;
    esac&lt;br /&gt;
&lt;br /&gt;
{{HELP|I don't know how to use wikieditor, so the script displays wrongly.}}&lt;br /&gt;
&lt;br /&gt;
    #chmod +x /etc/rc.d/sysfsutils&lt;br /&gt;
&lt;br /&gt;
Add sysfsutils to DAEMON.&lt;br /&gt;
&lt;br /&gt;
==Profiles I am using==&lt;br /&gt;
&lt;br /&gt;
a: rc.conf&lt;br /&gt;
&lt;br /&gt;
    MODULES=(!snd_pcm_oss !snd_mixer_oss !snd_seq_oss !thinkpad_ec tp_smapi hdaps acpi-cpufreq)&lt;br /&gt;
    DAEMONS=(syslog-ng dbus acpid hdapsd tpfand networkmanager hddtemp alsa laptop-mode sysfsutils)&lt;br /&gt;
&lt;br /&gt;
b: tpfand.conf&lt;br /&gt;
&lt;br /&gt;
    enabled = True&lt;br /&gt;
    override_profile = True&lt;br /&gt;
    &lt;br /&gt;
    0. CPU = 0:0 45:3 60:6&lt;br /&gt;
    1. Mini PCI = 0:0 50:3&lt;br /&gt;
    2. Sensor 2 = 0:255&lt;br /&gt;
    3. GPU = 0:0 50:3&lt;br /&gt;
    4. Bat0 = 0:0 35:2&lt;br /&gt;
    5. Sensor 5 = 0:255&lt;br /&gt;
    6. Bat1 = 0:0 35:2&lt;br /&gt;
    7. Sensor 7 = 0:255&lt;br /&gt;
    8. MB? = 0:0 45:2 60:4&lt;br /&gt;
    9. MB? = 0:0 55:3&lt;br /&gt;
    10. Sensor 10 = 0:255&lt;br /&gt;
    11. Sensor 11 = 0:255&lt;br /&gt;
    12. Sensor 12 = 0:255&lt;br /&gt;
    13. Sensor 13 = 0:255&lt;br /&gt;
    14. Sensor 14 = 0:255&lt;br /&gt;
    15. Sensor 15 = 0:255&lt;br /&gt;
    &lt;br /&gt;
    hysteresis = 2&lt;br /&gt;
    interval_speed = 2&lt;br /&gt;
    interval_duration = 500.000000&lt;br /&gt;
    interval_delay = 5000.000000&lt;br /&gt;
&lt;br /&gt;
[[Category:X200]]&lt;/div&gt;</summary>
		<author><name>Kilior</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Post_Installing_Arch_on_an_X200&amp;diff=49644</id>
		<title>Post Installing Arch on an X200</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Post_Installing_Arch_on_an_X200&amp;diff=49644"/>
		<updated>2010-09-23T04:42:59Z</updated>

		<summary type="html">&lt;p&gt;Kilior: /* Preface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Preface==&lt;br /&gt;
&lt;br /&gt;
If your native language is Chinese or you are good at Chinese, I recommend you read [http://forum.ubuntu.org.cn/viewtopic.php?f=155&amp;amp;t=286666 the Chinese version of this page] &lt;br /&gt;
&lt;br /&gt;
In this page, I will NOT tell you how to install ArchLinux in X200, but something make X200 work better after ArchLinux installation.&lt;br /&gt;
&lt;br /&gt;
If you don't know how to install ArchLinux to your X200, [http://wiki.archlinux.org/index.php/Main_Page ArchWiki],and [http://www.thinkwiki.org/wiki/Installing_Arch_on_an_X200 Installing Arch on an X200]. So if you reach here, I think you have installed ArchLinux to you X200 with desktop environment. If you think the tools in this page isn't the best one, or can't use in your desktop environment, please edit the page, and show your tools to us.&lt;br /&gt;
&lt;br /&gt;
==Prepare kernel modules==&lt;br /&gt;
&lt;br /&gt;
package: [http://aur.archlinux.org/packages.php?ID=3985 tp_smapi]&lt;br /&gt;
&lt;br /&gt;
You can install this package through yaourt, but the source is not patched for X200. So we need to patch the source.&lt;br /&gt;
&lt;br /&gt;
in file hdaps.c &lt;br /&gt;
&lt;br /&gt;
Search &amp;quot;X61&amp;quot; and add following line between &amp;quot; HDAPS_DMI_MATCH_INVERT(&amp;quot;LENOVO&amp;quot;, &amp;quot;ThinkPad X61&amp;quot;, HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X),&amp;quot; and &amp;quot;};&amp;quot; &lt;br /&gt;
&lt;br /&gt;
add:&lt;br /&gt;
       HDAPS_DMI_MATCH_INVERT(&amp;quot;LENOVO&amp;quot;, &amp;quot;ThinkPad X200&amp;quot;, HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X | HDAPS_ORIENT_INVERT_Y),&lt;br /&gt;
       { .ident = NULL }&lt;br /&gt;
&lt;br /&gt;
After you patch source, you can repack the source, edit PKGBUILD, use makepkg to build the package.&lt;br /&gt;
&lt;br /&gt;
Or you can make it step by step&lt;br /&gt;
&lt;br /&gt;
     $HDAPSD=true make&lt;br /&gt;
&lt;br /&gt;
     #make install&lt;br /&gt;
     #depmod -a&lt;br /&gt;
&lt;br /&gt;
==Configure modules==&lt;br /&gt;
&lt;br /&gt;
1 fan control:&lt;br /&gt;
&lt;br /&gt;
file /etc/modprobe.d/modprobe.conf, add one line:&lt;br /&gt;
&lt;br /&gt;
      options thinkpad_acpi fan_control=1&lt;br /&gt;
&lt;br /&gt;
2 audio:&lt;br /&gt;
&lt;br /&gt;
      options snd-hda-intel model=lenovo-x200 enable_msi=1&lt;br /&gt;
&lt;br /&gt;
3 autoload modules:&lt;br /&gt;
&lt;br /&gt;
      tp_smapi hdaps acpi-cpufreq&lt;br /&gt;
&lt;br /&gt;
==Sensors==&lt;br /&gt;
&lt;br /&gt;
Package: lm_sensors, sensors-applet (gnome_applet), hddtemp&lt;br /&gt;
&lt;br /&gt;
Add hddtemp to DAEMON, run sensors-detect to detect sensors, add sensors-applet to panel.&lt;br /&gt;
&lt;br /&gt;
==Fan control==&lt;br /&gt;
&lt;br /&gt;
Package: [http://aur.archlinux.org/packages.php?ID=24120 tpfand]    [http://aur.archlinux.org/packages.php?ID=24121 tpfan-admin](This package may not work well)&lt;br /&gt;
&lt;br /&gt;
Add tpfand to DAEMON. If tpfan-admin can't work, you can write a profile yourself or install [http://aur.archlinux.org/packages.php?ID=24137 tpfand-profiles]&lt;br /&gt;
&lt;br /&gt;
After ArchLinux update Xorg to version 1.8, hal can remove from DAEMON. But this make tpfand doesn't work.&lt;br /&gt;
&lt;br /&gt;
Simply edit the source can make tpfand works well.&lt;br /&gt;
&lt;br /&gt;
File /usr/lib/python2.6/site-packages/tpfand/settings.py&lt;br /&gt;
&lt;br /&gt;
change the part of code &lt;br /&gt;
    def read_model_info(self):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;reads model info from HAL&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        try:&lt;br /&gt;
            bus = dbus.SystemBus()           &lt;br /&gt;
            computer_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')&lt;br /&gt;
            computer = dbus.Interface(computer_obj, 'org.freedesktop.Hal.Device')&lt;br /&gt;
           &lt;br /&gt;
            product_id = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.product')&lt;br /&gt;
            self.product_id = product_id.lower()&lt;br /&gt;
            product_name = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.version')&lt;br /&gt;
            self.product_name = product_name.lower().replace('/', '-').replace(' ', '_')&lt;br /&gt;
           &lt;br /&gt;
            self.product_pretty_vendor = computer.GetProperty('system.hardware.vendor')&lt;br /&gt;
            self.product_pretty_name = computer.GetProperty('system.hardware.version')&lt;br /&gt;
            self.product_pretty_id = computer.GetProperty('system.hardware.product')&lt;br /&gt;
        except:&lt;br /&gt;
            print &amp;quot;Warning: unable to get your system model from HAL.&amp;quot;&lt;br /&gt;
            self.product_id = None&lt;br /&gt;
            self.product_name = None&lt;br /&gt;
            self.product_pretty_vendor = None&lt;br /&gt;
            self.product_pretty_name = None&lt;br /&gt;
            self.product_pretty_id = None   &lt;br /&gt;
&lt;br /&gt;
TO&lt;br /&gt;
&lt;br /&gt;
     #    try:&lt;br /&gt;
     #       bus = dbus.SystemBus()           &lt;br /&gt;
     #       computer_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')&lt;br /&gt;
     #       computer = dbus.Interface(computer_obj, 'org.freedesktop.Hal.Device')&lt;br /&gt;
                &lt;br /&gt;
     #       product_id = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.product')&lt;br /&gt;
     #       self.product_id = product_id.lower()&lt;br /&gt;
     #       product_name = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.version')&lt;br /&gt;
     #       self.product_name = product_name.lower().replace('/', '-').replace(' ', '_')&lt;br /&gt;
           &lt;br /&gt;
     #       self.product_pretty_vendor = computer.GetProperty('system.hardware.vendor')&lt;br /&gt;
     #       self.product_pretty_name = computer.GetProperty('system.hardware.version')&lt;br /&gt;
     #       self.product_pretty_id = computer.GetProperty('system.hardware.product')&lt;br /&gt;
     #    except:&lt;br /&gt;
     #       print &amp;quot;Warning: unable to get your system model from HAL.&amp;quot;&lt;br /&gt;
          self.product_id = u'LENOVO_74574AC'&lt;br /&gt;
          self.product_name = u'LENOVO_ThinkPad X200'&lt;br /&gt;
          self.product_pretty_vendor = dbus.String(u'LENOVO')&lt;br /&gt;
          self.product_pretty_name = dbus.String(u'ThinkPad X200')&lt;br /&gt;
          self.product_pretty_id = dbus.String(u'74574AC')&lt;br /&gt;
&lt;br /&gt;
The last 5 lines you should replace them to yours.   You can get them by python or from the bottom side of your X200.&lt;br /&gt;
&lt;br /&gt;
==Wheel Emulation==&lt;br /&gt;
&lt;br /&gt;
New file /etc/X11/xorg.conf.d/10-wheel-emulation.conf&lt;br /&gt;
&lt;br /&gt;
    # Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable&lt;br /&gt;
    # http://bugs.freedesktop.org/show_bug.cgi?id=22442&lt;br /&gt;
    Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Trackpoint Wheel Emulation&amp;quot;&lt;br /&gt;
        MatchProduct &amp;quot;TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device&amp;quot;&lt;br /&gt;
        MatchDevicePath   &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
        Option      &amp;quot;EmulateWheel&amp;quot;      &amp;quot;true&lt;br /&gt;
        Option      &amp;quot;EmulateWheelButton&amp;quot;   &amp;quot;2&amp;quot;&lt;br /&gt;
        Option      &amp;quot;Emulate3Buttons&amp;quot;   &amp;quot;false&amp;quot;&lt;br /&gt;
        Option      &amp;quot;XAxisMapping&amp;quot;      &amp;quot;6 7&amp;quot;&lt;br /&gt;
        Option      &amp;quot;YAxisMapping&amp;quot;      &amp;quot;4 5&amp;quot;&lt;br /&gt;
    EndSection&lt;br /&gt;
&lt;br /&gt;
==HDAPS==&lt;br /&gt;
&lt;br /&gt;
Packages: [http://aur.archlinux.org/packages.php?ID=5401 hdapsd] [http://aur.archlinux.org/packages.php?ID=23485 hdaps-gl] [http://aur.archlinux.org/packages.php?ID=27398 thinkhdaps]&lt;br /&gt;
&lt;br /&gt;
Add hdapsd to DAEMON, add thinkhdaps to gnome gnome startup programs.&lt;br /&gt;
&lt;br /&gt;
==Laptop Mode==&lt;br /&gt;
&lt;br /&gt;
Package: laptop-mode-tools&lt;br /&gt;
&lt;br /&gt;
Add laptop-mode to DAEMON, add edit file /etc/laptop-mode/laptop-mode.conf, change ENABLE_AUTO_MODULES' value to 1&lt;br /&gt;
&lt;br /&gt;
==Protect Battery==&lt;br /&gt;
&lt;br /&gt;
Make battery charge cycle grows slowly, we should change some value in sysfs.&lt;br /&gt;
&lt;br /&gt;
New file: /etc/sysfs.conf&lt;br /&gt;
&lt;br /&gt;
    # Make battery live longer&lt;br /&gt;
    devices/platform/smapi/BAT0/start_charge_thresh = 50&lt;br /&gt;
    devices/platform/smapi/BAT0/stop_charge_thresh = 90&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
    # Make battery live longer&lt;br /&gt;
    devices/platform/smapi/BAT0/start_charge_thresh = 10&lt;br /&gt;
    devices/platform/smapi/BAT0/stop_charge_thresh = 100&lt;br /&gt;
&lt;br /&gt;
(choose one you like, and I use the first one)&lt;br /&gt;
&lt;br /&gt;
New file: /etc/rc.d/sysfsutils&lt;br /&gt;
&lt;br /&gt;
    #! /bin/sh -e&lt;br /&gt;
    &lt;br /&gt;
    ### BEGIN INIT INFO&lt;br /&gt;
    # Provides:          sysfsconf&lt;br /&gt;
    # Required-Start:    mountkernfs&lt;br /&gt;
    # Should-Start:      udev module-init-tools loadcpufreq&lt;br /&gt;
    # Required-Stop:&lt;br /&gt;
    # Default-Start:     2 3 4 5&lt;br /&gt;
    # Default-Stop:&lt;br /&gt;
    # Short-Description: Set sysfs variables from /etc/sysfs.conf&lt;br /&gt;
    # Description:       Similarly to /etc/init.d/procps.sh, you can configure&lt;br /&gt;
    #                    values for sysfs variables (such as power management&lt;br /&gt;
    #                    defaults) and /sys file permissions in /etc/sysfs.conf.&lt;br /&gt;
    ### END INIT INFO&lt;br /&gt;
    &lt;br /&gt;
    # /etc/rc.d/sysfsutils:&lt;br /&gt;
    #&lt;br /&gt;
    # (c) 2005 Martin Pitt &amp;lt;mpitt@debian.org&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    CONFFILE=/etc/sysfs.conf&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    [ -r &amp;quot;$CONFFILE&amp;quot; ] || exit 0&lt;br /&gt;
    &lt;br /&gt;
    . /etc/rc.conf&lt;br /&gt;
    . /etc/rc.d/functions&lt;br /&gt;
    &lt;br /&gt;
    case &amp;quot;$1&amp;quot; in&lt;br /&gt;
        start)&lt;br /&gt;
        stat_busy &amp;quot;Setting sysfs variables...&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
       sed  's/#.*$//; /^[[:space:]]*$/d;&lt;br /&gt;
              s/^[[:space:]]*\([^=[:space:]]*\)[[:space:]]*\([^=[:space:]]*\)[[:space:]]*=[[:space:]]*\(.*\)/\1 \2 \3/' \&lt;br /&gt;
                  $CONFFILE | {&lt;br /&gt;
           while read f1 f2 f3; do&lt;br /&gt;
                    if [ &amp;quot;$f1&amp;quot; = &amp;quot;mode&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -n &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f2&amp;quot; ]; then&lt;br /&gt;
                            chmod &amp;quot;$f3&amp;quot; &amp;quot;/sys/$f2&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    elif [ &amp;quot;$f1&amp;quot; = &amp;quot;owner&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -n &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f2&amp;quot; ]; then&lt;br /&gt;
                            chown &amp;quot;$f3&amp;quot; &amp;quot;/sys/$f2&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    elif [ &amp;quot;$f1&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -z &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f1&amp;quot; ]; then&lt;br /&gt;
                            # Some fields need a terminating newline, others&lt;br /&gt;
                            # need the terminating newline to be absent :-(&lt;br /&gt;
                             echo -n &amp;quot;$f2&amp;quot; &amp;gt; &amp;quot;/sys/$f1&amp;quot; 2&amp;gt;/dev/null ||&lt;br /&gt;
                             echo &amp;quot;$f2&amp;quot; &amp;gt; &amp;quot;/sys/$f1&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    else&lt;br /&gt;
                        stat_fail&lt;br /&gt;
                        exit 1&lt;br /&gt;
                    fi&lt;br /&gt;
           done&lt;br /&gt;
       }&lt;br /&gt;
    &lt;br /&gt;
       stat_done&lt;br /&gt;
       ;;&lt;br /&gt;
       stop)&lt;br /&gt;
       ;;&lt;br /&gt;
       *)&lt;br /&gt;
       echo &amp;quot;Usage: /etc/rc.d/sysfsutils {start|stop}&amp;quot;&lt;br /&gt;
       exit 1&lt;br /&gt;
       ;;&lt;br /&gt;
    esac&lt;br /&gt;
&lt;br /&gt;
{{HELP|I don't know how to use wikieditor, so the script displays wrongly.}}&lt;br /&gt;
&lt;br /&gt;
    #chmod +x /etc/rc.d/sysfsutils&lt;br /&gt;
&lt;br /&gt;
Add sysfsutils to DAEMON.&lt;br /&gt;
&lt;br /&gt;
==Profiles I am using==&lt;br /&gt;
&lt;br /&gt;
a: rc.conf&lt;br /&gt;
&lt;br /&gt;
    MODULES=(!snd_pcm_oss !snd_mixer_oss !snd_seq_oss !thinkpad_ec tp_smapi hdaps acpi-cpufreq)&lt;br /&gt;
    DAEMONS=(syslog-ng dbus acpid hdapsd tpfand networkmanager hddtemp alsa laptop-mode sysfsutils)&lt;br /&gt;
&lt;br /&gt;
b: tpfand.conf&lt;br /&gt;
&lt;br /&gt;
    enabled = True&lt;br /&gt;
    override_profile = True&lt;br /&gt;
    &lt;br /&gt;
    0. CPU = 0:0 45:3 60:6&lt;br /&gt;
    1. Mini PCI = 0:0 50:3&lt;br /&gt;
    2. Sensor 2 = 0:255&lt;br /&gt;
    3. GPU = 0:0 50:3&lt;br /&gt;
    4. Bat0 = 0:0 35:2&lt;br /&gt;
    5. Sensor 5 = 0:255&lt;br /&gt;
    6. Bat1 = 0:0 35:2&lt;br /&gt;
    7. Sensor 7 = 0:255&lt;br /&gt;
    8. MB? = 0:0 45:2 60:4&lt;br /&gt;
    9. MB? = 0:0 55:3&lt;br /&gt;
    10. Sensor 10 = 0:255&lt;br /&gt;
    11. Sensor 11 = 0:255&lt;br /&gt;
    12. Sensor 12 = 0:255&lt;br /&gt;
    13. Sensor 13 = 0:255&lt;br /&gt;
    14. Sensor 14 = 0:255&lt;br /&gt;
    15. Sensor 15 = 0:255&lt;br /&gt;
    &lt;br /&gt;
    hysteresis = 2&lt;br /&gt;
    interval_speed = 2&lt;br /&gt;
    interval_duration = 500.000000&lt;br /&gt;
    interval_delay = 5000.000000&lt;br /&gt;
&lt;br /&gt;
[[Category:X200]]&lt;/div&gt;</summary>
		<author><name>Kilior</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Post_Installing_Arch_on_an_X200&amp;diff=49513</id>
		<title>Post Installing Arch on an X200</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Post_Installing_Arch_on_an_X200&amp;diff=49513"/>
		<updated>2010-09-01T16:06:19Z</updated>

		<summary type="html">&lt;p&gt;Kilior: /* Preface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Preface==&lt;br /&gt;
&lt;br /&gt;
If your native language is Chinese or you are good at Chinese, I strangely recommend you read [http://forum.ubuntu.org.cn/viewtopic.php?f=155&amp;amp;t=286666 the Chinese version of this page] &lt;br /&gt;
&lt;br /&gt;
In this page, I will NOT tell you how to install ArchLinux in X200, but something make X200 work better after ArchLinux installation.&lt;br /&gt;
&lt;br /&gt;
If you don't know how to install ArchLinux to your X200, [http://wiki.archlinux.org/index.php/Main_Page ArchWiki],and [http://www.thinkwiki.org/wiki/Installing_Arch_on_an_X200 Installing Arch on an X200]. So if you reach here, I think you have installed ArchLinux to you X200 with desktop environment. If you think the tools in this page isn't the best one, or can't use in your desktop environment, please edit the page, and show your tools to us.&lt;br /&gt;
&lt;br /&gt;
==Prepare kernel modules==&lt;br /&gt;
&lt;br /&gt;
package: [http://aur.archlinux.org/packages.php?ID=3985 tp_smapi]&lt;br /&gt;
&lt;br /&gt;
You can install this package through yaourt, but the source is not patched for X200. So we need to patch the source.&lt;br /&gt;
&lt;br /&gt;
in file hdaps.c &lt;br /&gt;
&lt;br /&gt;
Search &amp;quot;X61&amp;quot; and add following line between &amp;quot; HDAPS_DMI_MATCH_INVERT(&amp;quot;LENOVO&amp;quot;, &amp;quot;ThinkPad X61&amp;quot;, HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X),&amp;quot; and &amp;quot;};&amp;quot; &lt;br /&gt;
&lt;br /&gt;
add:&lt;br /&gt;
       HDAPS_DMI_MATCH_INVERT(&amp;quot;LENOVO&amp;quot;, &amp;quot;ThinkPad X200&amp;quot;, HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X | HDAPS_ORIENT_INVERT_Y),&lt;br /&gt;
       { .ident = NULL }&lt;br /&gt;
&lt;br /&gt;
After you patch source, you can repack the source, edit PKGBUILD, use makepkg to build the package.&lt;br /&gt;
&lt;br /&gt;
Or you can make it step by step&lt;br /&gt;
&lt;br /&gt;
     $HDAPSD=true make&lt;br /&gt;
&lt;br /&gt;
     #make install&lt;br /&gt;
     #depmod -a&lt;br /&gt;
&lt;br /&gt;
==Configure modules==&lt;br /&gt;
&lt;br /&gt;
1 fan control:&lt;br /&gt;
&lt;br /&gt;
file /etc/modprobe.d/modprobe.conf, add one line:&lt;br /&gt;
&lt;br /&gt;
      options thinkpad_acpi fan_control=1&lt;br /&gt;
&lt;br /&gt;
2 audio:&lt;br /&gt;
&lt;br /&gt;
      options snd-hda-intel model=lenovo-x200 enable_msi=1&lt;br /&gt;
&lt;br /&gt;
3 autoload modules:&lt;br /&gt;
&lt;br /&gt;
      tp_smapi hdaps acpi-cpufreq&lt;br /&gt;
&lt;br /&gt;
==Sensors==&lt;br /&gt;
&lt;br /&gt;
Package: lm_sensors, sensors-applet (gnome_applet), hddtemp&lt;br /&gt;
&lt;br /&gt;
Add hddtemp to DAEMON, run sensors-detect to detect sensors, add sensors-applet to panel.&lt;br /&gt;
&lt;br /&gt;
==Fan control==&lt;br /&gt;
&lt;br /&gt;
Package: [http://aur.archlinux.org/packages.php?ID=24120 tpfand]    [http://aur.archlinux.org/packages.php?ID=24121 tpfan-admin](This package may not work well)&lt;br /&gt;
&lt;br /&gt;
Add tpfand to DAEMON. If tpfan-admin can't work, you can write a profile yourself or install [http://aur.archlinux.org/packages.php?ID=24137 tpfand-profiles]&lt;br /&gt;
&lt;br /&gt;
After ArchLinux update Xorg to version 1.8, hal can remove from DAEMON. But this make tpfand doesn't work.&lt;br /&gt;
&lt;br /&gt;
Simply edit the source can make tpfand works well.&lt;br /&gt;
&lt;br /&gt;
File /usr/lib/python2.6/site-packages/tpfand/settings.py&lt;br /&gt;
&lt;br /&gt;
change the part of code &lt;br /&gt;
    def read_model_info(self):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;reads model info from HAL&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        try:&lt;br /&gt;
            bus = dbus.SystemBus()           &lt;br /&gt;
            computer_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')&lt;br /&gt;
            computer = dbus.Interface(computer_obj, 'org.freedesktop.Hal.Device')&lt;br /&gt;
           &lt;br /&gt;
            product_id = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.product')&lt;br /&gt;
            self.product_id = product_id.lower()&lt;br /&gt;
            product_name = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.version')&lt;br /&gt;
            self.product_name = product_name.lower().replace('/', '-').replace(' ', '_')&lt;br /&gt;
           &lt;br /&gt;
            self.product_pretty_vendor = computer.GetProperty('system.hardware.vendor')&lt;br /&gt;
            self.product_pretty_name = computer.GetProperty('system.hardware.version')&lt;br /&gt;
            self.product_pretty_id = computer.GetProperty('system.hardware.product')&lt;br /&gt;
        except:&lt;br /&gt;
            print &amp;quot;Warning: unable to get your system model from HAL.&amp;quot;&lt;br /&gt;
            self.product_id = None&lt;br /&gt;
            self.product_name = None&lt;br /&gt;
            self.product_pretty_vendor = None&lt;br /&gt;
            self.product_pretty_name = None&lt;br /&gt;
            self.product_pretty_id = None   &lt;br /&gt;
&lt;br /&gt;
TO&lt;br /&gt;
&lt;br /&gt;
     #    try:&lt;br /&gt;
     #       bus = dbus.SystemBus()           &lt;br /&gt;
     #       computer_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')&lt;br /&gt;
     #       computer = dbus.Interface(computer_obj, 'org.freedesktop.Hal.Device')&lt;br /&gt;
                &lt;br /&gt;
     #       product_id = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.product')&lt;br /&gt;
     #       self.product_id = product_id.lower()&lt;br /&gt;
     #       product_name = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.version')&lt;br /&gt;
     #       self.product_name = product_name.lower().replace('/', '-').replace(' ', '_')&lt;br /&gt;
           &lt;br /&gt;
     #       self.product_pretty_vendor = computer.GetProperty('system.hardware.vendor')&lt;br /&gt;
     #       self.product_pretty_name = computer.GetProperty('system.hardware.version')&lt;br /&gt;
     #       self.product_pretty_id = computer.GetProperty('system.hardware.product')&lt;br /&gt;
     #    except:&lt;br /&gt;
     #       print &amp;quot;Warning: unable to get your system model from HAL.&amp;quot;&lt;br /&gt;
          self.product_id = u'LENOVO_74574AC'&lt;br /&gt;
          self.product_name = u'LENOVO_ThinkPad X200'&lt;br /&gt;
          self.product_pretty_vendor = dbus.String(u'LENOVO')&lt;br /&gt;
          self.product_pretty_name = dbus.String(u'ThinkPad X200')&lt;br /&gt;
          self.product_pretty_id = dbus.String(u'74574AC')&lt;br /&gt;
&lt;br /&gt;
The last 5 lines you should replace them to yours.   You can get them by python or from the bottom side of your X200.&lt;br /&gt;
&lt;br /&gt;
==Wheel Emulation==&lt;br /&gt;
&lt;br /&gt;
New file /etc/X11/xorg.conf.d/10-wheel-emulation.conf&lt;br /&gt;
&lt;br /&gt;
    # Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable&lt;br /&gt;
    # http://bugs.freedesktop.org/show_bug.cgi?id=22442&lt;br /&gt;
    Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Trackpoint Wheel Emulation&amp;quot;&lt;br /&gt;
        MatchProduct &amp;quot;TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device&amp;quot;&lt;br /&gt;
        MatchDevicePath   &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
        Option      &amp;quot;EmulateWheel&amp;quot;      &amp;quot;true&lt;br /&gt;
        Option      &amp;quot;EmulateWheelButton&amp;quot;   &amp;quot;2&amp;quot;&lt;br /&gt;
        Option      &amp;quot;Emulate3Buttons&amp;quot;   &amp;quot;false&amp;quot;&lt;br /&gt;
        Option      &amp;quot;XAxisMapping&amp;quot;      &amp;quot;6 7&amp;quot;&lt;br /&gt;
        Option      &amp;quot;YAxisMapping&amp;quot;      &amp;quot;4 5&amp;quot;&lt;br /&gt;
    EndSection&lt;br /&gt;
&lt;br /&gt;
==HDAPS==&lt;br /&gt;
&lt;br /&gt;
Packages: [http://aur.archlinux.org/packages.php?ID=5401 hdapsd] [http://aur.archlinux.org/packages.php?ID=23485 hdaps-gl] [http://aur.archlinux.org/packages.php?ID=27398 thinkhdaps]&lt;br /&gt;
&lt;br /&gt;
Add hdapsd to DAEMON, add thinkhdaps to gnome gnome startup programs.&lt;br /&gt;
&lt;br /&gt;
==Laptop Mode==&lt;br /&gt;
&lt;br /&gt;
Package: laptop-mode-tools&lt;br /&gt;
&lt;br /&gt;
Add laptop-mode to DAEMON, add edit file /etc/laptop-mode/laptop-mode.conf, change ENABLE_AUTO_MODULES' value to 1&lt;br /&gt;
&lt;br /&gt;
==Protect Battery==&lt;br /&gt;
&lt;br /&gt;
Make battery charge cycle grows slowly, we should change some value in sysfs.&lt;br /&gt;
&lt;br /&gt;
New file: /etc/sysfs.conf&lt;br /&gt;
&lt;br /&gt;
    # Make battery live longer&lt;br /&gt;
    devices/platform/smapi/BAT0/start_charge_thresh = 50&lt;br /&gt;
    devices/platform/smapi/BAT0/stop_charge_thresh = 90&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
    # Make battery live longer&lt;br /&gt;
    devices/platform/smapi/BAT0/start_charge_thresh = 10&lt;br /&gt;
    devices/platform/smapi/BAT0/stop_charge_thresh = 100&lt;br /&gt;
&lt;br /&gt;
(choose one you like, and I use the first one)&lt;br /&gt;
&lt;br /&gt;
New file: /etc/rc.d/sysfsutils&lt;br /&gt;
&lt;br /&gt;
    #! /bin/sh -e&lt;br /&gt;
    &lt;br /&gt;
    ### BEGIN INIT INFO&lt;br /&gt;
    # Provides:          sysfsconf&lt;br /&gt;
    # Required-Start:    mountkernfs&lt;br /&gt;
    # Should-Start:      udev module-init-tools loadcpufreq&lt;br /&gt;
    # Required-Stop:&lt;br /&gt;
    # Default-Start:     2 3 4 5&lt;br /&gt;
    # Default-Stop:&lt;br /&gt;
    # Short-Description: Set sysfs variables from /etc/sysfs.conf&lt;br /&gt;
    # Description:       Similarly to /etc/init.d/procps.sh, you can configure&lt;br /&gt;
    #                    values for sysfs variables (such as power management&lt;br /&gt;
    #                    defaults) and /sys file permissions in /etc/sysfs.conf.&lt;br /&gt;
    ### END INIT INFO&lt;br /&gt;
    &lt;br /&gt;
    # /etc/rc.d/sysfsutils:&lt;br /&gt;
    #&lt;br /&gt;
    # (c) 2005 Martin Pitt &amp;lt;mpitt@debian.org&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    CONFFILE=/etc/sysfs.conf&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    [ -r &amp;quot;$CONFFILE&amp;quot; ] || exit 0&lt;br /&gt;
    &lt;br /&gt;
    . /etc/rc.conf&lt;br /&gt;
    . /etc/rc.d/functions&lt;br /&gt;
    &lt;br /&gt;
    case &amp;quot;$1&amp;quot; in&lt;br /&gt;
        start)&lt;br /&gt;
        stat_busy &amp;quot;Setting sysfs variables...&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
       sed  's/#.*$//; /^[[:space:]]*$/d;&lt;br /&gt;
              s/^[[:space:]]*\([^=[:space:]]*\)[[:space:]]*\([^=[:space:]]*\)[[:space:]]*=[[:space:]]*\(.*\)/\1 \2 \3/' \&lt;br /&gt;
                  $CONFFILE | {&lt;br /&gt;
           while read f1 f2 f3; do&lt;br /&gt;
                    if [ &amp;quot;$f1&amp;quot; = &amp;quot;mode&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -n &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f2&amp;quot; ]; then&lt;br /&gt;
                            chmod &amp;quot;$f3&amp;quot; &amp;quot;/sys/$f2&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    elif [ &amp;quot;$f1&amp;quot; = &amp;quot;owner&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -n &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f2&amp;quot; ]; then&lt;br /&gt;
                            chown &amp;quot;$f3&amp;quot; &amp;quot;/sys/$f2&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    elif [ &amp;quot;$f1&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -z &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f1&amp;quot; ]; then&lt;br /&gt;
                            # Some fields need a terminating newline, others&lt;br /&gt;
                            # need the terminating newline to be absent :-(&lt;br /&gt;
                             echo -n &amp;quot;$f2&amp;quot; &amp;gt; &amp;quot;/sys/$f1&amp;quot; 2&amp;gt;/dev/null ||&lt;br /&gt;
                             echo &amp;quot;$f2&amp;quot; &amp;gt; &amp;quot;/sys/$f1&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    else&lt;br /&gt;
                        stat_fail&lt;br /&gt;
                        exit 1&lt;br /&gt;
                    fi&lt;br /&gt;
           done&lt;br /&gt;
       }&lt;br /&gt;
    &lt;br /&gt;
       stat_done&lt;br /&gt;
       ;;&lt;br /&gt;
       stop)&lt;br /&gt;
       ;;&lt;br /&gt;
       *)&lt;br /&gt;
       echo &amp;quot;Usage: /etc/rc.d/sysfsutils {start|stop}&amp;quot;&lt;br /&gt;
       exit 1&lt;br /&gt;
       ;;&lt;br /&gt;
    esac&lt;br /&gt;
&lt;br /&gt;
{{HELP|I don't know how to use wikieditor, so the script displays wrongly.}}&lt;br /&gt;
&lt;br /&gt;
    #chmod +x /etc/rc.d/sysfsutils&lt;br /&gt;
&lt;br /&gt;
Add sysfsutils to DAEMON.&lt;br /&gt;
&lt;br /&gt;
==Profiles I am using==&lt;br /&gt;
&lt;br /&gt;
a: rc.conf&lt;br /&gt;
&lt;br /&gt;
    MODULES=(!snd_pcm_oss !snd_mixer_oss !snd_seq_oss !thinkpad_ec tp_smapi hdaps acpi-cpufreq)&lt;br /&gt;
    DAEMONS=(syslog-ng dbus acpid hdapsd tpfand networkmanager hddtemp alsa laptop-mode sysfsutils)&lt;br /&gt;
&lt;br /&gt;
b: tpfand.conf&lt;br /&gt;
&lt;br /&gt;
    enabled = True&lt;br /&gt;
    override_profile = True&lt;br /&gt;
    &lt;br /&gt;
    0. CPU = 0:0 45:3 60:6&lt;br /&gt;
    1. Mini PCI = 0:0 50:3&lt;br /&gt;
    2. Sensor 2 = 0:255&lt;br /&gt;
    3. GPU = 0:0 50:3&lt;br /&gt;
    4. Bat0 = 0:0 35:2&lt;br /&gt;
    5. Sensor 5 = 0:255&lt;br /&gt;
    6. Bat1 = 0:0 35:2&lt;br /&gt;
    7. Sensor 7 = 0:255&lt;br /&gt;
    8. MB? = 0:0 45:2 60:4&lt;br /&gt;
    9. MB? = 0:0 55:3&lt;br /&gt;
    10. Sensor 10 = 0:255&lt;br /&gt;
    11. Sensor 11 = 0:255&lt;br /&gt;
    12. Sensor 12 = 0:255&lt;br /&gt;
    13. Sensor 13 = 0:255&lt;br /&gt;
    14. Sensor 14 = 0:255&lt;br /&gt;
    15. Sensor 15 = 0:255&lt;br /&gt;
    &lt;br /&gt;
    hysteresis = 2&lt;br /&gt;
    interval_speed = 2&lt;br /&gt;
    interval_duration = 500.000000&lt;br /&gt;
    interval_delay = 5000.000000&lt;br /&gt;
&lt;br /&gt;
[[Category:X200]]&lt;/div&gt;</summary>
		<author><name>Kilior</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Post_Installing_Arch_on_an_X200&amp;diff=49512</id>
		<title>Post Installing Arch on an X200</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Post_Installing_Arch_on_an_X200&amp;diff=49512"/>
		<updated>2010-09-01T16:05:19Z</updated>

		<summary type="html">&lt;p&gt;Kilior: /* Sensors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Preface==&lt;br /&gt;
&lt;br /&gt;
If your native language is Chinese or you are good at Chinese, I strangely recommend you read [http://forum.ubuntu.org.cn/viewtopic.php?f=155&amp;amp;t=286666 the Chinese version of this page] &lt;br /&gt;
&lt;br /&gt;
In this page, I will NOT tell you how too install ArchLinux in X200, but something make X200 work better after ArchLinux installation.&lt;br /&gt;
&lt;br /&gt;
If you don't know how to install ArchLinux to your X200, [http://wiki.archlinux.org/index.php/Main_Page ArchWiki],and [http://www.thinkwiki.org/wiki/Installing_Arch_on_an_X200 Installing Arch on an X200]. So if you reach here, I think you have installed ArchLinux to you X200 with desktop environment. If you think the tools in this page isn't the best one, or can't use in your desktop environment, please edit the page, and show your tools to us.&lt;br /&gt;
&lt;br /&gt;
==Prepare kernel modules==&lt;br /&gt;
&lt;br /&gt;
package: [http://aur.archlinux.org/packages.php?ID=3985 tp_smapi]&lt;br /&gt;
&lt;br /&gt;
You can install this package through yaourt, but the source is not patched for X200. So we need to patch the source.&lt;br /&gt;
&lt;br /&gt;
in file hdaps.c &lt;br /&gt;
&lt;br /&gt;
Search &amp;quot;X61&amp;quot; and add following line between &amp;quot; HDAPS_DMI_MATCH_INVERT(&amp;quot;LENOVO&amp;quot;, &amp;quot;ThinkPad X61&amp;quot;, HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X),&amp;quot; and &amp;quot;};&amp;quot; &lt;br /&gt;
&lt;br /&gt;
add:&lt;br /&gt;
       HDAPS_DMI_MATCH_INVERT(&amp;quot;LENOVO&amp;quot;, &amp;quot;ThinkPad X200&amp;quot;, HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X | HDAPS_ORIENT_INVERT_Y),&lt;br /&gt;
       { .ident = NULL }&lt;br /&gt;
&lt;br /&gt;
After you patch source, you can repack the source, edit PKGBUILD, use makepkg to build the package.&lt;br /&gt;
&lt;br /&gt;
Or you can make it step by step&lt;br /&gt;
&lt;br /&gt;
     $HDAPSD=true make&lt;br /&gt;
&lt;br /&gt;
     #make install&lt;br /&gt;
     #depmod -a&lt;br /&gt;
&lt;br /&gt;
==Configure modules==&lt;br /&gt;
&lt;br /&gt;
1 fan control:&lt;br /&gt;
&lt;br /&gt;
file /etc/modprobe.d/modprobe.conf, add one line:&lt;br /&gt;
&lt;br /&gt;
      options thinkpad_acpi fan_control=1&lt;br /&gt;
&lt;br /&gt;
2 audio:&lt;br /&gt;
&lt;br /&gt;
      options snd-hda-intel model=lenovo-x200 enable_msi=1&lt;br /&gt;
&lt;br /&gt;
3 autoload modules:&lt;br /&gt;
&lt;br /&gt;
      tp_smapi hdaps acpi-cpufreq&lt;br /&gt;
&lt;br /&gt;
==Sensors==&lt;br /&gt;
&lt;br /&gt;
Package: lm_sensors, sensors-applet (gnome_applet), hddtemp&lt;br /&gt;
&lt;br /&gt;
Add hddtemp to DAEMON, run sensors-detect to detect sensors, add sensors-applet to panel.&lt;br /&gt;
&lt;br /&gt;
==Fan control==&lt;br /&gt;
&lt;br /&gt;
Package: [http://aur.archlinux.org/packages.php?ID=24120 tpfand]    [http://aur.archlinux.org/packages.php?ID=24121 tpfan-admin](This package may not work well)&lt;br /&gt;
&lt;br /&gt;
Add tpfand to DAEMON. If tpfan-admin can't work, you can write a profile yourself or install [http://aur.archlinux.org/packages.php?ID=24137 tpfand-profiles]&lt;br /&gt;
&lt;br /&gt;
After ArchLinux update Xorg to version 1.8, hal can remove from DAEMON. But this make tpfand doesn't work.&lt;br /&gt;
&lt;br /&gt;
Simply edit the source can make tpfand works well.&lt;br /&gt;
&lt;br /&gt;
File /usr/lib/python2.6/site-packages/tpfand/settings.py&lt;br /&gt;
&lt;br /&gt;
change the part of code &lt;br /&gt;
    def read_model_info(self):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;reads model info from HAL&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        try:&lt;br /&gt;
            bus = dbus.SystemBus()           &lt;br /&gt;
            computer_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')&lt;br /&gt;
            computer = dbus.Interface(computer_obj, 'org.freedesktop.Hal.Device')&lt;br /&gt;
           &lt;br /&gt;
            product_id = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.product')&lt;br /&gt;
            self.product_id = product_id.lower()&lt;br /&gt;
            product_name = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.version')&lt;br /&gt;
            self.product_name = product_name.lower().replace('/', '-').replace(' ', '_')&lt;br /&gt;
           &lt;br /&gt;
            self.product_pretty_vendor = computer.GetProperty('system.hardware.vendor')&lt;br /&gt;
            self.product_pretty_name = computer.GetProperty('system.hardware.version')&lt;br /&gt;
            self.product_pretty_id = computer.GetProperty('system.hardware.product')&lt;br /&gt;
        except:&lt;br /&gt;
            print &amp;quot;Warning: unable to get your system model from HAL.&amp;quot;&lt;br /&gt;
            self.product_id = None&lt;br /&gt;
            self.product_name = None&lt;br /&gt;
            self.product_pretty_vendor = None&lt;br /&gt;
            self.product_pretty_name = None&lt;br /&gt;
            self.product_pretty_id = None   &lt;br /&gt;
&lt;br /&gt;
TO&lt;br /&gt;
&lt;br /&gt;
     #    try:&lt;br /&gt;
     #       bus = dbus.SystemBus()           &lt;br /&gt;
     #       computer_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')&lt;br /&gt;
     #       computer = dbus.Interface(computer_obj, 'org.freedesktop.Hal.Device')&lt;br /&gt;
                &lt;br /&gt;
     #       product_id = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.product')&lt;br /&gt;
     #       self.product_id = product_id.lower()&lt;br /&gt;
     #       product_name = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.version')&lt;br /&gt;
     #       self.product_name = product_name.lower().replace('/', '-').replace(' ', '_')&lt;br /&gt;
           &lt;br /&gt;
     #       self.product_pretty_vendor = computer.GetProperty('system.hardware.vendor')&lt;br /&gt;
     #       self.product_pretty_name = computer.GetProperty('system.hardware.version')&lt;br /&gt;
     #       self.product_pretty_id = computer.GetProperty('system.hardware.product')&lt;br /&gt;
     #    except:&lt;br /&gt;
     #       print &amp;quot;Warning: unable to get your system model from HAL.&amp;quot;&lt;br /&gt;
          self.product_id = u'LENOVO_74574AC'&lt;br /&gt;
          self.product_name = u'LENOVO_ThinkPad X200'&lt;br /&gt;
          self.product_pretty_vendor = dbus.String(u'LENOVO')&lt;br /&gt;
          self.product_pretty_name = dbus.String(u'ThinkPad X200')&lt;br /&gt;
          self.product_pretty_id = dbus.String(u'74574AC')&lt;br /&gt;
&lt;br /&gt;
The last 5 lines you should replace them to yours.   You can get them by python or from the bottom side of your X200.&lt;br /&gt;
&lt;br /&gt;
==Wheel Emulation==&lt;br /&gt;
&lt;br /&gt;
New file /etc/X11/xorg.conf.d/10-wheel-emulation.conf&lt;br /&gt;
&lt;br /&gt;
    # Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable&lt;br /&gt;
    # http://bugs.freedesktop.org/show_bug.cgi?id=22442&lt;br /&gt;
    Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Trackpoint Wheel Emulation&amp;quot;&lt;br /&gt;
        MatchProduct &amp;quot;TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device&amp;quot;&lt;br /&gt;
        MatchDevicePath   &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
        Option      &amp;quot;EmulateWheel&amp;quot;      &amp;quot;true&lt;br /&gt;
        Option      &amp;quot;EmulateWheelButton&amp;quot;   &amp;quot;2&amp;quot;&lt;br /&gt;
        Option      &amp;quot;Emulate3Buttons&amp;quot;   &amp;quot;false&amp;quot;&lt;br /&gt;
        Option      &amp;quot;XAxisMapping&amp;quot;      &amp;quot;6 7&amp;quot;&lt;br /&gt;
        Option      &amp;quot;YAxisMapping&amp;quot;      &amp;quot;4 5&amp;quot;&lt;br /&gt;
    EndSection&lt;br /&gt;
&lt;br /&gt;
==HDAPS==&lt;br /&gt;
&lt;br /&gt;
Packages: [http://aur.archlinux.org/packages.php?ID=5401 hdapsd] [http://aur.archlinux.org/packages.php?ID=23485 hdaps-gl] [http://aur.archlinux.org/packages.php?ID=27398 thinkhdaps]&lt;br /&gt;
&lt;br /&gt;
Add hdapsd to DAEMON, add thinkhdaps to gnome gnome startup programs.&lt;br /&gt;
&lt;br /&gt;
==Laptop Mode==&lt;br /&gt;
&lt;br /&gt;
Package: laptop-mode-tools&lt;br /&gt;
&lt;br /&gt;
Add laptop-mode to DAEMON, add edit file /etc/laptop-mode/laptop-mode.conf, change ENABLE_AUTO_MODULES' value to 1&lt;br /&gt;
&lt;br /&gt;
==Protect Battery==&lt;br /&gt;
&lt;br /&gt;
Make battery charge cycle grows slowly, we should change some value in sysfs.&lt;br /&gt;
&lt;br /&gt;
New file: /etc/sysfs.conf&lt;br /&gt;
&lt;br /&gt;
    # Make battery live longer&lt;br /&gt;
    devices/platform/smapi/BAT0/start_charge_thresh = 50&lt;br /&gt;
    devices/platform/smapi/BAT0/stop_charge_thresh = 90&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
    # Make battery live longer&lt;br /&gt;
    devices/platform/smapi/BAT0/start_charge_thresh = 10&lt;br /&gt;
    devices/platform/smapi/BAT0/stop_charge_thresh = 100&lt;br /&gt;
&lt;br /&gt;
(choose one you like, and I use the first one)&lt;br /&gt;
&lt;br /&gt;
New file: /etc/rc.d/sysfsutils&lt;br /&gt;
&lt;br /&gt;
    #! /bin/sh -e&lt;br /&gt;
    &lt;br /&gt;
    ### BEGIN INIT INFO&lt;br /&gt;
    # Provides:          sysfsconf&lt;br /&gt;
    # Required-Start:    mountkernfs&lt;br /&gt;
    # Should-Start:      udev module-init-tools loadcpufreq&lt;br /&gt;
    # Required-Stop:&lt;br /&gt;
    # Default-Start:     2 3 4 5&lt;br /&gt;
    # Default-Stop:&lt;br /&gt;
    # Short-Description: Set sysfs variables from /etc/sysfs.conf&lt;br /&gt;
    # Description:       Similarly to /etc/init.d/procps.sh, you can configure&lt;br /&gt;
    #                    values for sysfs variables (such as power management&lt;br /&gt;
    #                    defaults) and /sys file permissions in /etc/sysfs.conf.&lt;br /&gt;
    ### END INIT INFO&lt;br /&gt;
    &lt;br /&gt;
    # /etc/rc.d/sysfsutils:&lt;br /&gt;
    #&lt;br /&gt;
    # (c) 2005 Martin Pitt &amp;lt;mpitt@debian.org&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    CONFFILE=/etc/sysfs.conf&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    [ -r &amp;quot;$CONFFILE&amp;quot; ] || exit 0&lt;br /&gt;
    &lt;br /&gt;
    . /etc/rc.conf&lt;br /&gt;
    . /etc/rc.d/functions&lt;br /&gt;
    &lt;br /&gt;
    case &amp;quot;$1&amp;quot; in&lt;br /&gt;
        start)&lt;br /&gt;
        stat_busy &amp;quot;Setting sysfs variables...&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
       sed  's/#.*$//; /^[[:space:]]*$/d;&lt;br /&gt;
              s/^[[:space:]]*\([^=[:space:]]*\)[[:space:]]*\([^=[:space:]]*\)[[:space:]]*=[[:space:]]*\(.*\)/\1 \2 \3/' \&lt;br /&gt;
                  $CONFFILE | {&lt;br /&gt;
           while read f1 f2 f3; do&lt;br /&gt;
                    if [ &amp;quot;$f1&amp;quot; = &amp;quot;mode&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -n &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f2&amp;quot; ]; then&lt;br /&gt;
                            chmod &amp;quot;$f3&amp;quot; &amp;quot;/sys/$f2&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    elif [ &amp;quot;$f1&amp;quot; = &amp;quot;owner&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -n &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f2&amp;quot; ]; then&lt;br /&gt;
                            chown &amp;quot;$f3&amp;quot; &amp;quot;/sys/$f2&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    elif [ &amp;quot;$f1&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -z &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f1&amp;quot; ]; then&lt;br /&gt;
                            # Some fields need a terminating newline, others&lt;br /&gt;
                            # need the terminating newline to be absent :-(&lt;br /&gt;
                             echo -n &amp;quot;$f2&amp;quot; &amp;gt; &amp;quot;/sys/$f1&amp;quot; 2&amp;gt;/dev/null ||&lt;br /&gt;
                             echo &amp;quot;$f2&amp;quot; &amp;gt; &amp;quot;/sys/$f1&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    else&lt;br /&gt;
                        stat_fail&lt;br /&gt;
                        exit 1&lt;br /&gt;
                    fi&lt;br /&gt;
           done&lt;br /&gt;
       }&lt;br /&gt;
    &lt;br /&gt;
       stat_done&lt;br /&gt;
       ;;&lt;br /&gt;
       stop)&lt;br /&gt;
       ;;&lt;br /&gt;
       *)&lt;br /&gt;
       echo &amp;quot;Usage: /etc/rc.d/sysfsutils {start|stop}&amp;quot;&lt;br /&gt;
       exit 1&lt;br /&gt;
       ;;&lt;br /&gt;
    esac&lt;br /&gt;
&lt;br /&gt;
{{HELP|I don't know how to use wikieditor, so the script displays wrongly.}}&lt;br /&gt;
&lt;br /&gt;
    #chmod +x /etc/rc.d/sysfsutils&lt;br /&gt;
&lt;br /&gt;
Add sysfsutils to DAEMON.&lt;br /&gt;
&lt;br /&gt;
==Profiles I am using==&lt;br /&gt;
&lt;br /&gt;
a: rc.conf&lt;br /&gt;
&lt;br /&gt;
    MODULES=(!snd_pcm_oss !snd_mixer_oss !snd_seq_oss !thinkpad_ec tp_smapi hdaps acpi-cpufreq)&lt;br /&gt;
    DAEMONS=(syslog-ng dbus acpid hdapsd tpfand networkmanager hddtemp alsa laptop-mode sysfsutils)&lt;br /&gt;
&lt;br /&gt;
b: tpfand.conf&lt;br /&gt;
&lt;br /&gt;
    enabled = True&lt;br /&gt;
    override_profile = True&lt;br /&gt;
    &lt;br /&gt;
    0. CPU = 0:0 45:3 60:6&lt;br /&gt;
    1. Mini PCI = 0:0 50:3&lt;br /&gt;
    2. Sensor 2 = 0:255&lt;br /&gt;
    3. GPU = 0:0 50:3&lt;br /&gt;
    4. Bat0 = 0:0 35:2&lt;br /&gt;
    5. Sensor 5 = 0:255&lt;br /&gt;
    6. Bat1 = 0:0 35:2&lt;br /&gt;
    7. Sensor 7 = 0:255&lt;br /&gt;
    8. MB? = 0:0 45:2 60:4&lt;br /&gt;
    9. MB? = 0:0 55:3&lt;br /&gt;
    10. Sensor 10 = 0:255&lt;br /&gt;
    11. Sensor 11 = 0:255&lt;br /&gt;
    12. Sensor 12 = 0:255&lt;br /&gt;
    13. Sensor 13 = 0:255&lt;br /&gt;
    14. Sensor 14 = 0:255&lt;br /&gt;
    15. Sensor 15 = 0:255&lt;br /&gt;
    &lt;br /&gt;
    hysteresis = 2&lt;br /&gt;
    interval_speed = 2&lt;br /&gt;
    interval_duration = 500.000000&lt;br /&gt;
    interval_delay = 5000.000000&lt;br /&gt;
&lt;br /&gt;
[[Category:X200]]&lt;/div&gt;</summary>
		<author><name>Kilior</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installation_instructions_for_the_ThinkPad_X200&amp;diff=49511</id>
		<title>Installation instructions for the ThinkPad X200</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installation_instructions_for_the_ThinkPad_X200&amp;diff=49511"/>
		<updated>2010-09-01T16:02:49Z</updated>

		<summary type="html">&lt;p&gt;Kilior: /* Installation Instructions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: X200]]&lt;br /&gt;
==Installation Instructions==&lt;br /&gt;
*[[Installing Arch on an X200| Installing Arch on a ThinkPad X200]]&lt;br /&gt;
*[[Post Installing Arch on an X200|Post Installing Arch on a ThinkPad X200]]&lt;br /&gt;
*[[Installing Debian on an X200|Installing Debian 5.0 (Lenny) on a ThinkPad X200]]&lt;br /&gt;
*[[Installing Debian Sid on an X200| Installing Debian Sid on a ThinkPad X200 ]]&lt;br /&gt;
*[[Installing Fedora on an X200| Installing Fedora on a ThinkPad  X200]]&lt;br /&gt;
*[[Installing Ubuntu 8.04 (Hardy Heron) and Ubuntu 8.10 (Intrepid Ibex) on a ThinkPad X200]]&lt;br /&gt;
*[[Installing Ubuntu 9.04 (Jaunty Jackalope) on a ThinkPad X200]]&lt;br /&gt;
*[[Installing Ubuntu 9.10 (Karmic Koala) on a ThinkPad X200]]&lt;br /&gt;
*[http://vminko.org/gentoo_on_x200 Installing Gentoo on a ThinkPad X200]&lt;/div&gt;</summary>
		<author><name>Kilior</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Post_Installing_Arch_on_an_X200&amp;diff=49510</id>
		<title>Post Installing Arch on an X200</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Post_Installing_Arch_on_an_X200&amp;diff=49510"/>
		<updated>2010-09-01T16:02:28Z</updated>

		<summary type="html">&lt;p&gt;Kilior: /* Fan control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Preface==&lt;br /&gt;
&lt;br /&gt;
If your native language is Chinese or you are good at Chinese, I strangely recommend you read [http://forum.ubuntu.org.cn/viewtopic.php?f=155&amp;amp;t=286666 the Chinese version of this page] &lt;br /&gt;
&lt;br /&gt;
In this page, I will NOT tell you how too install ArchLinux in X200, but something make X200 work better after ArchLinux installation.&lt;br /&gt;
&lt;br /&gt;
If you don't know how to install ArchLinux to your X200, [http://wiki.archlinux.org/index.php/Main_Page ArchWiki],and [http://www.thinkwiki.org/wiki/Installing_Arch_on_an_X200 Installing Arch on an X200]. So if you reach here, I think you have installed ArchLinux to you X200 with desktop environment. If you think the tools in this page isn't the best one, or can't use in your desktop environment, please edit the page, and show your tools to us.&lt;br /&gt;
&lt;br /&gt;
==Prepare kernel modules==&lt;br /&gt;
&lt;br /&gt;
package: [http://aur.archlinux.org/packages.php?ID=3985 tp_smapi]&lt;br /&gt;
&lt;br /&gt;
You can install this package through yaourt, but the source is not patched for X200. So we need to patch the source.&lt;br /&gt;
&lt;br /&gt;
in file hdaps.c &lt;br /&gt;
&lt;br /&gt;
Search &amp;quot;X61&amp;quot; and add following line between &amp;quot; HDAPS_DMI_MATCH_INVERT(&amp;quot;LENOVO&amp;quot;, &amp;quot;ThinkPad X61&amp;quot;, HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X),&amp;quot; and &amp;quot;};&amp;quot; &lt;br /&gt;
&lt;br /&gt;
add:&lt;br /&gt;
       HDAPS_DMI_MATCH_INVERT(&amp;quot;LENOVO&amp;quot;, &amp;quot;ThinkPad X200&amp;quot;, HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X | HDAPS_ORIENT_INVERT_Y),&lt;br /&gt;
       { .ident = NULL }&lt;br /&gt;
&lt;br /&gt;
After you patch source, you can repack the source, edit PKGBUILD, use makepkg to build the package.&lt;br /&gt;
&lt;br /&gt;
Or you can make it step by step&lt;br /&gt;
&lt;br /&gt;
     $HDAPSD=true make&lt;br /&gt;
&lt;br /&gt;
     #make install&lt;br /&gt;
     #depmod -a&lt;br /&gt;
&lt;br /&gt;
==Configure modules==&lt;br /&gt;
&lt;br /&gt;
1 fan control:&lt;br /&gt;
&lt;br /&gt;
file /etc/modprobe.d/modprobe.conf, add one line:&lt;br /&gt;
&lt;br /&gt;
      options thinkpad_acpi fan_control=1&lt;br /&gt;
&lt;br /&gt;
2 audio:&lt;br /&gt;
&lt;br /&gt;
      options snd-hda-intel model=lenovo-x200 enable_msi=1&lt;br /&gt;
&lt;br /&gt;
3 autoload modules:&lt;br /&gt;
&lt;br /&gt;
      tp_smapi hdaps acpi-cpufreq&lt;br /&gt;
&lt;br /&gt;
==Sensors==&lt;br /&gt;
&lt;br /&gt;
Package: lm_sensors、sensors-applet (gnome_applet)、hddtemp&lt;br /&gt;
&lt;br /&gt;
Add hddtemp to DAEMON, run sensors-detect to detect sensors, add sensors-applet to panel.&lt;br /&gt;
&lt;br /&gt;
==Fan control==&lt;br /&gt;
&lt;br /&gt;
Package: [http://aur.archlinux.org/packages.php?ID=24120 tpfand]    [http://aur.archlinux.org/packages.php?ID=24121 tpfan-admin](This package may not work well)&lt;br /&gt;
&lt;br /&gt;
Add tpfand to DAEMON. If tpfan-admin can't work, you can write a profile yourself or install [http://aur.archlinux.org/packages.php?ID=24137 tpfand-profiles]&lt;br /&gt;
&lt;br /&gt;
After ArchLinux update Xorg to version 1.8, hal can remove from DAEMON. But this make tpfand doesn't work.&lt;br /&gt;
&lt;br /&gt;
Simply edit the source can make tpfand works well.&lt;br /&gt;
&lt;br /&gt;
File /usr/lib/python2.6/site-packages/tpfand/settings.py&lt;br /&gt;
&lt;br /&gt;
change the part of code &lt;br /&gt;
    def read_model_info(self):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;reads model info from HAL&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        try:&lt;br /&gt;
            bus = dbus.SystemBus()           &lt;br /&gt;
            computer_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')&lt;br /&gt;
            computer = dbus.Interface(computer_obj, 'org.freedesktop.Hal.Device')&lt;br /&gt;
           &lt;br /&gt;
            product_id = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.product')&lt;br /&gt;
            self.product_id = product_id.lower()&lt;br /&gt;
            product_name = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.version')&lt;br /&gt;
            self.product_name = product_name.lower().replace('/', '-').replace(' ', '_')&lt;br /&gt;
           &lt;br /&gt;
            self.product_pretty_vendor = computer.GetProperty('system.hardware.vendor')&lt;br /&gt;
            self.product_pretty_name = computer.GetProperty('system.hardware.version')&lt;br /&gt;
            self.product_pretty_id = computer.GetProperty('system.hardware.product')&lt;br /&gt;
        except:&lt;br /&gt;
            print &amp;quot;Warning: unable to get your system model from HAL.&amp;quot;&lt;br /&gt;
            self.product_id = None&lt;br /&gt;
            self.product_name = None&lt;br /&gt;
            self.product_pretty_vendor = None&lt;br /&gt;
            self.product_pretty_name = None&lt;br /&gt;
            self.product_pretty_id = None   &lt;br /&gt;
&lt;br /&gt;
TO&lt;br /&gt;
&lt;br /&gt;
     #    try:&lt;br /&gt;
     #       bus = dbus.SystemBus()           &lt;br /&gt;
     #       computer_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')&lt;br /&gt;
     #       computer = dbus.Interface(computer_obj, 'org.freedesktop.Hal.Device')&lt;br /&gt;
                &lt;br /&gt;
     #       product_id = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.product')&lt;br /&gt;
     #       self.product_id = product_id.lower()&lt;br /&gt;
     #       product_name = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.version')&lt;br /&gt;
     #       self.product_name = product_name.lower().replace('/', '-').replace(' ', '_')&lt;br /&gt;
           &lt;br /&gt;
     #       self.product_pretty_vendor = computer.GetProperty('system.hardware.vendor')&lt;br /&gt;
     #       self.product_pretty_name = computer.GetProperty('system.hardware.version')&lt;br /&gt;
     #       self.product_pretty_id = computer.GetProperty('system.hardware.product')&lt;br /&gt;
     #    except:&lt;br /&gt;
     #       print &amp;quot;Warning: unable to get your system model from HAL.&amp;quot;&lt;br /&gt;
          self.product_id = u'LENOVO_74574AC'&lt;br /&gt;
          self.product_name = u'LENOVO_ThinkPad X200'&lt;br /&gt;
          self.product_pretty_vendor = dbus.String(u'LENOVO')&lt;br /&gt;
          self.product_pretty_name = dbus.String(u'ThinkPad X200')&lt;br /&gt;
          self.product_pretty_id = dbus.String(u'74574AC')&lt;br /&gt;
&lt;br /&gt;
The last 5 lines you should replace them to yours.   You can get them by python or from the bottom side of your X200.&lt;br /&gt;
&lt;br /&gt;
==Wheel Emulation==&lt;br /&gt;
&lt;br /&gt;
New file /etc/X11/xorg.conf.d/10-wheel-emulation.conf&lt;br /&gt;
&lt;br /&gt;
    # Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable&lt;br /&gt;
    # http://bugs.freedesktop.org/show_bug.cgi?id=22442&lt;br /&gt;
    Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Trackpoint Wheel Emulation&amp;quot;&lt;br /&gt;
        MatchProduct &amp;quot;TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device&amp;quot;&lt;br /&gt;
        MatchDevicePath   &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
        Option      &amp;quot;EmulateWheel&amp;quot;      &amp;quot;true&lt;br /&gt;
        Option      &amp;quot;EmulateWheelButton&amp;quot;   &amp;quot;2&amp;quot;&lt;br /&gt;
        Option      &amp;quot;Emulate3Buttons&amp;quot;   &amp;quot;false&amp;quot;&lt;br /&gt;
        Option      &amp;quot;XAxisMapping&amp;quot;      &amp;quot;6 7&amp;quot;&lt;br /&gt;
        Option      &amp;quot;YAxisMapping&amp;quot;      &amp;quot;4 5&amp;quot;&lt;br /&gt;
    EndSection&lt;br /&gt;
&lt;br /&gt;
==HDAPS==&lt;br /&gt;
&lt;br /&gt;
Packages: [http://aur.archlinux.org/packages.php?ID=5401 hdapsd] [http://aur.archlinux.org/packages.php?ID=23485 hdaps-gl] [http://aur.archlinux.org/packages.php?ID=27398 thinkhdaps]&lt;br /&gt;
&lt;br /&gt;
Add hdapsd to DAEMON, add thinkhdaps to gnome gnome startup programs.&lt;br /&gt;
&lt;br /&gt;
==Laptop Mode==&lt;br /&gt;
&lt;br /&gt;
Package: laptop-mode-tools&lt;br /&gt;
&lt;br /&gt;
Add laptop-mode to DAEMON, add edit file /etc/laptop-mode/laptop-mode.conf, change ENABLE_AUTO_MODULES' value to 1&lt;br /&gt;
&lt;br /&gt;
==Protect Battery==&lt;br /&gt;
&lt;br /&gt;
Make battery charge cycle grows slowly, we should change some value in sysfs.&lt;br /&gt;
&lt;br /&gt;
New file: /etc/sysfs.conf&lt;br /&gt;
&lt;br /&gt;
    # Make battery live longer&lt;br /&gt;
    devices/platform/smapi/BAT0/start_charge_thresh = 50&lt;br /&gt;
    devices/platform/smapi/BAT0/stop_charge_thresh = 90&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
    # Make battery live longer&lt;br /&gt;
    devices/platform/smapi/BAT0/start_charge_thresh = 10&lt;br /&gt;
    devices/platform/smapi/BAT0/stop_charge_thresh = 100&lt;br /&gt;
&lt;br /&gt;
(choose one you like, and I use the first one)&lt;br /&gt;
&lt;br /&gt;
New file: /etc/rc.d/sysfsutils&lt;br /&gt;
&lt;br /&gt;
    #! /bin/sh -e&lt;br /&gt;
    &lt;br /&gt;
    ### BEGIN INIT INFO&lt;br /&gt;
    # Provides:          sysfsconf&lt;br /&gt;
    # Required-Start:    mountkernfs&lt;br /&gt;
    # Should-Start:      udev module-init-tools loadcpufreq&lt;br /&gt;
    # Required-Stop:&lt;br /&gt;
    # Default-Start:     2 3 4 5&lt;br /&gt;
    # Default-Stop:&lt;br /&gt;
    # Short-Description: Set sysfs variables from /etc/sysfs.conf&lt;br /&gt;
    # Description:       Similarly to /etc/init.d/procps.sh, you can configure&lt;br /&gt;
    #                    values for sysfs variables (such as power management&lt;br /&gt;
    #                    defaults) and /sys file permissions in /etc/sysfs.conf.&lt;br /&gt;
    ### END INIT INFO&lt;br /&gt;
    &lt;br /&gt;
    # /etc/rc.d/sysfsutils:&lt;br /&gt;
    #&lt;br /&gt;
    # (c) 2005 Martin Pitt &amp;lt;mpitt@debian.org&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    CONFFILE=/etc/sysfs.conf&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    [ -r &amp;quot;$CONFFILE&amp;quot; ] || exit 0&lt;br /&gt;
    &lt;br /&gt;
    . /etc/rc.conf&lt;br /&gt;
    . /etc/rc.d/functions&lt;br /&gt;
    &lt;br /&gt;
    case &amp;quot;$1&amp;quot; in&lt;br /&gt;
        start)&lt;br /&gt;
        stat_busy &amp;quot;Setting sysfs variables...&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
       sed  's/#.*$//; /^[[:space:]]*$/d;&lt;br /&gt;
              s/^[[:space:]]*\([^=[:space:]]*\)[[:space:]]*\([^=[:space:]]*\)[[:space:]]*=[[:space:]]*\(.*\)/\1 \2 \3/' \&lt;br /&gt;
                  $CONFFILE | {&lt;br /&gt;
           while read f1 f2 f3; do&lt;br /&gt;
                    if [ &amp;quot;$f1&amp;quot; = &amp;quot;mode&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -n &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f2&amp;quot; ]; then&lt;br /&gt;
                            chmod &amp;quot;$f3&amp;quot; &amp;quot;/sys/$f2&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    elif [ &amp;quot;$f1&amp;quot; = &amp;quot;owner&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -n &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f2&amp;quot; ]; then&lt;br /&gt;
                            chown &amp;quot;$f3&amp;quot; &amp;quot;/sys/$f2&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    elif [ &amp;quot;$f1&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -z &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f1&amp;quot; ]; then&lt;br /&gt;
                            # Some fields need a terminating newline, others&lt;br /&gt;
                            # need the terminating newline to be absent :-(&lt;br /&gt;
                             echo -n &amp;quot;$f2&amp;quot; &amp;gt; &amp;quot;/sys/$f1&amp;quot; 2&amp;gt;/dev/null ||&lt;br /&gt;
                             echo &amp;quot;$f2&amp;quot; &amp;gt; &amp;quot;/sys/$f1&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    else&lt;br /&gt;
                        stat_fail&lt;br /&gt;
                        exit 1&lt;br /&gt;
                    fi&lt;br /&gt;
           done&lt;br /&gt;
       }&lt;br /&gt;
    &lt;br /&gt;
       stat_done&lt;br /&gt;
       ;;&lt;br /&gt;
       stop)&lt;br /&gt;
       ;;&lt;br /&gt;
       *)&lt;br /&gt;
       echo &amp;quot;Usage: /etc/rc.d/sysfsutils {start|stop}&amp;quot;&lt;br /&gt;
       exit 1&lt;br /&gt;
       ;;&lt;br /&gt;
    esac&lt;br /&gt;
&lt;br /&gt;
{{HELP|I don't know how to use wikieditor, so the script displays wrongly.}}&lt;br /&gt;
&lt;br /&gt;
    #chmod +x /etc/rc.d/sysfsutils&lt;br /&gt;
&lt;br /&gt;
Add sysfsutils to DAEMON.&lt;br /&gt;
&lt;br /&gt;
==Profiles I am using==&lt;br /&gt;
&lt;br /&gt;
a: rc.conf&lt;br /&gt;
&lt;br /&gt;
    MODULES=(!snd_pcm_oss !snd_mixer_oss !snd_seq_oss !thinkpad_ec tp_smapi hdaps acpi-cpufreq)&lt;br /&gt;
    DAEMONS=(syslog-ng dbus acpid hdapsd tpfand networkmanager hddtemp alsa laptop-mode sysfsutils)&lt;br /&gt;
&lt;br /&gt;
b: tpfand.conf&lt;br /&gt;
&lt;br /&gt;
    enabled = True&lt;br /&gt;
    override_profile = True&lt;br /&gt;
    &lt;br /&gt;
    0. CPU = 0:0 45:3 60:6&lt;br /&gt;
    1. Mini PCI = 0:0 50:3&lt;br /&gt;
    2. Sensor 2 = 0:255&lt;br /&gt;
    3. GPU = 0:0 50:3&lt;br /&gt;
    4. Bat0 = 0:0 35:2&lt;br /&gt;
    5. Sensor 5 = 0:255&lt;br /&gt;
    6. Bat1 = 0:0 35:2&lt;br /&gt;
    7. Sensor 7 = 0:255&lt;br /&gt;
    8. MB? = 0:0 45:2 60:4&lt;br /&gt;
    9. MB? = 0:0 55:3&lt;br /&gt;
    10. Sensor 10 = 0:255&lt;br /&gt;
    11. Sensor 11 = 0:255&lt;br /&gt;
    12. Sensor 12 = 0:255&lt;br /&gt;
    13. Sensor 13 = 0:255&lt;br /&gt;
    14. Sensor 14 = 0:255&lt;br /&gt;
    15. Sensor 15 = 0:255&lt;br /&gt;
    &lt;br /&gt;
    hysteresis = 2&lt;br /&gt;
    interval_speed = 2&lt;br /&gt;
    interval_duration = 500.000000&lt;br /&gt;
    interval_delay = 5000.000000&lt;br /&gt;
&lt;br /&gt;
[[Category:X200]]&lt;/div&gt;</summary>
		<author><name>Kilior</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Post_Installing_Arch_on_an_X200&amp;diff=49509</id>
		<title>Post Installing Arch on an X200</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Post_Installing_Arch_on_an_X200&amp;diff=49509"/>
		<updated>2010-09-01T16:01:55Z</updated>

		<summary type="html">&lt;p&gt;Kilior: /* Fan control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Preface==&lt;br /&gt;
&lt;br /&gt;
If your native language is Chinese or you are good at Chinese, I strangely recommend you read [http://forum.ubuntu.org.cn/viewtopic.php?f=155&amp;amp;t=286666 the Chinese version of this page] &lt;br /&gt;
&lt;br /&gt;
In this page, I will NOT tell you how too install ArchLinux in X200, but something make X200 work better after ArchLinux installation.&lt;br /&gt;
&lt;br /&gt;
If you don't know how to install ArchLinux to your X200, [http://wiki.archlinux.org/index.php/Main_Page ArchWiki],and [http://www.thinkwiki.org/wiki/Installing_Arch_on_an_X200 Installing Arch on an X200]. So if you reach here, I think you have installed ArchLinux to you X200 with desktop environment. If you think the tools in this page isn't the best one, or can't use in your desktop environment, please edit the page, and show your tools to us.&lt;br /&gt;
&lt;br /&gt;
==Prepare kernel modules==&lt;br /&gt;
&lt;br /&gt;
package: [http://aur.archlinux.org/packages.php?ID=3985 tp_smapi]&lt;br /&gt;
&lt;br /&gt;
You can install this package through yaourt, but the source is not patched for X200. So we need to patch the source.&lt;br /&gt;
&lt;br /&gt;
in file hdaps.c &lt;br /&gt;
&lt;br /&gt;
Search &amp;quot;X61&amp;quot; and add following line between &amp;quot; HDAPS_DMI_MATCH_INVERT(&amp;quot;LENOVO&amp;quot;, &amp;quot;ThinkPad X61&amp;quot;, HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X),&amp;quot; and &amp;quot;};&amp;quot; &lt;br /&gt;
&lt;br /&gt;
add:&lt;br /&gt;
       HDAPS_DMI_MATCH_INVERT(&amp;quot;LENOVO&amp;quot;, &amp;quot;ThinkPad X200&amp;quot;, HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X | HDAPS_ORIENT_INVERT_Y),&lt;br /&gt;
       { .ident = NULL }&lt;br /&gt;
&lt;br /&gt;
After you patch source, you can repack the source, edit PKGBUILD, use makepkg to build the package.&lt;br /&gt;
&lt;br /&gt;
Or you can make it step by step&lt;br /&gt;
&lt;br /&gt;
     $HDAPSD=true make&lt;br /&gt;
&lt;br /&gt;
     #make install&lt;br /&gt;
     #depmod -a&lt;br /&gt;
&lt;br /&gt;
==Configure modules==&lt;br /&gt;
&lt;br /&gt;
1 fan control:&lt;br /&gt;
&lt;br /&gt;
file /etc/modprobe.d/modprobe.conf, add one line:&lt;br /&gt;
&lt;br /&gt;
      options thinkpad_acpi fan_control=1&lt;br /&gt;
&lt;br /&gt;
2 audio:&lt;br /&gt;
&lt;br /&gt;
      options snd-hda-intel model=lenovo-x200 enable_msi=1&lt;br /&gt;
&lt;br /&gt;
3 autoload modules:&lt;br /&gt;
&lt;br /&gt;
      tp_smapi hdaps acpi-cpufreq&lt;br /&gt;
&lt;br /&gt;
==Sensors==&lt;br /&gt;
&lt;br /&gt;
Package: lm_sensors、sensors-applet (gnome_applet)、hddtemp&lt;br /&gt;
&lt;br /&gt;
Add hddtemp to DAEMON, run sensors-detect to detect sensors, add sensors-applet to panel.&lt;br /&gt;
&lt;br /&gt;
==Fan control==&lt;br /&gt;
&lt;br /&gt;
Package: [http://aur.archlinux.org/packages.php?ID=24120 tpfand] [http://aur.archlinux.org/packages.php?ID=24121 tpfan-admin](This package may not work well)&lt;br /&gt;
&lt;br /&gt;
Add tpfand to DAEMON. If tpfan-admin can't work, you can write a profile yourself or install [http://aur.archlinux.org/packages.php?ID=24137 tpfand-profiles]&lt;br /&gt;
&lt;br /&gt;
After ArchLinux update Xorg to version 1.8, hal can remove from DAEMON. But this make tpfand doesn't work.&lt;br /&gt;
&lt;br /&gt;
Simply edit the source can make tpfand works well.&lt;br /&gt;
&lt;br /&gt;
File /usr/lib/python2.6/site-packages/tpfand/settings.py&lt;br /&gt;
&lt;br /&gt;
change the part of code &lt;br /&gt;
    def read_model_info(self):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;reads model info from HAL&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        try:&lt;br /&gt;
            bus = dbus.SystemBus()           &lt;br /&gt;
            computer_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')&lt;br /&gt;
            computer = dbus.Interface(computer_obj, 'org.freedesktop.Hal.Device')&lt;br /&gt;
           &lt;br /&gt;
            product_id = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.product')&lt;br /&gt;
            self.product_id = product_id.lower()&lt;br /&gt;
            product_name = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.version')&lt;br /&gt;
            self.product_name = product_name.lower().replace('/', '-').replace(' ', '_')&lt;br /&gt;
           &lt;br /&gt;
            self.product_pretty_vendor = computer.GetProperty('system.hardware.vendor')&lt;br /&gt;
            self.product_pretty_name = computer.GetProperty('system.hardware.version')&lt;br /&gt;
            self.product_pretty_id = computer.GetProperty('system.hardware.product')&lt;br /&gt;
        except:&lt;br /&gt;
            print &amp;quot;Warning: unable to get your system model from HAL.&amp;quot;&lt;br /&gt;
            self.product_id = None&lt;br /&gt;
            self.product_name = None&lt;br /&gt;
            self.product_pretty_vendor = None&lt;br /&gt;
            self.product_pretty_name = None&lt;br /&gt;
            self.product_pretty_id = None   &lt;br /&gt;
&lt;br /&gt;
TO&lt;br /&gt;
&lt;br /&gt;
     #    try:&lt;br /&gt;
     #       bus = dbus.SystemBus()           &lt;br /&gt;
     #       computer_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')&lt;br /&gt;
     #       computer = dbus.Interface(computer_obj, 'org.freedesktop.Hal.Device')&lt;br /&gt;
                &lt;br /&gt;
     #       product_id = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.product')&lt;br /&gt;
     #       self.product_id = product_id.lower()&lt;br /&gt;
     #       product_name = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.version')&lt;br /&gt;
     #       self.product_name = product_name.lower().replace('/', '-').replace(' ', '_')&lt;br /&gt;
           &lt;br /&gt;
     #       self.product_pretty_vendor = computer.GetProperty('system.hardware.vendor')&lt;br /&gt;
     #       self.product_pretty_name = computer.GetProperty('system.hardware.version')&lt;br /&gt;
     #       self.product_pretty_id = computer.GetProperty('system.hardware.product')&lt;br /&gt;
     #    except:&lt;br /&gt;
     #       print &amp;quot;Warning: unable to get your system model from HAL.&amp;quot;&lt;br /&gt;
          self.product_id = u'LENOVO_74574AC'&lt;br /&gt;
          self.product_name = u'LENOVO_ThinkPad X200'&lt;br /&gt;
          self.product_pretty_vendor = dbus.String(u'LENOVO')&lt;br /&gt;
          self.product_pretty_name = dbus.String(u'ThinkPad X200')&lt;br /&gt;
          self.product_pretty_id = dbus.String(u'74574AC')&lt;br /&gt;
&lt;br /&gt;
The last 5 lines you should replace them to yours. You can get them by python or from the bottom side of your X200.&lt;br /&gt;
&lt;br /&gt;
==Wheel Emulation==&lt;br /&gt;
&lt;br /&gt;
New file /etc/X11/xorg.conf.d/10-wheel-emulation.conf&lt;br /&gt;
&lt;br /&gt;
    # Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable&lt;br /&gt;
    # http://bugs.freedesktop.org/show_bug.cgi?id=22442&lt;br /&gt;
    Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Trackpoint Wheel Emulation&amp;quot;&lt;br /&gt;
        MatchProduct &amp;quot;TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device&amp;quot;&lt;br /&gt;
        MatchDevicePath   &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
        Option      &amp;quot;EmulateWheel&amp;quot;      &amp;quot;true&lt;br /&gt;
        Option      &amp;quot;EmulateWheelButton&amp;quot;   &amp;quot;2&amp;quot;&lt;br /&gt;
        Option      &amp;quot;Emulate3Buttons&amp;quot;   &amp;quot;false&amp;quot;&lt;br /&gt;
        Option      &amp;quot;XAxisMapping&amp;quot;      &amp;quot;6 7&amp;quot;&lt;br /&gt;
        Option      &amp;quot;YAxisMapping&amp;quot;      &amp;quot;4 5&amp;quot;&lt;br /&gt;
    EndSection&lt;br /&gt;
&lt;br /&gt;
==HDAPS==&lt;br /&gt;
&lt;br /&gt;
Packages: [http://aur.archlinux.org/packages.php?ID=5401 hdapsd] [http://aur.archlinux.org/packages.php?ID=23485 hdaps-gl] [http://aur.archlinux.org/packages.php?ID=27398 thinkhdaps]&lt;br /&gt;
&lt;br /&gt;
Add hdapsd to DAEMON, add thinkhdaps to gnome gnome startup programs.&lt;br /&gt;
&lt;br /&gt;
==Laptop Mode==&lt;br /&gt;
&lt;br /&gt;
Package: laptop-mode-tools&lt;br /&gt;
&lt;br /&gt;
Add laptop-mode to DAEMON, add edit file /etc/laptop-mode/laptop-mode.conf, change ENABLE_AUTO_MODULES' value to 1&lt;br /&gt;
&lt;br /&gt;
==Protect Battery==&lt;br /&gt;
&lt;br /&gt;
Make battery charge cycle grows slowly, we should change some value in sysfs.&lt;br /&gt;
&lt;br /&gt;
New file: /etc/sysfs.conf&lt;br /&gt;
&lt;br /&gt;
    # Make battery live longer&lt;br /&gt;
    devices/platform/smapi/BAT0/start_charge_thresh = 50&lt;br /&gt;
    devices/platform/smapi/BAT0/stop_charge_thresh = 90&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
    # Make battery live longer&lt;br /&gt;
    devices/platform/smapi/BAT0/start_charge_thresh = 10&lt;br /&gt;
    devices/platform/smapi/BAT0/stop_charge_thresh = 100&lt;br /&gt;
&lt;br /&gt;
(choose one you like, and I use the first one)&lt;br /&gt;
&lt;br /&gt;
New file: /etc/rc.d/sysfsutils&lt;br /&gt;
&lt;br /&gt;
    #! /bin/sh -e&lt;br /&gt;
    &lt;br /&gt;
    ### BEGIN INIT INFO&lt;br /&gt;
    # Provides:          sysfsconf&lt;br /&gt;
    # Required-Start:    mountkernfs&lt;br /&gt;
    # Should-Start:      udev module-init-tools loadcpufreq&lt;br /&gt;
    # Required-Stop:&lt;br /&gt;
    # Default-Start:     2 3 4 5&lt;br /&gt;
    # Default-Stop:&lt;br /&gt;
    # Short-Description: Set sysfs variables from /etc/sysfs.conf&lt;br /&gt;
    # Description:       Similarly to /etc/init.d/procps.sh, you can configure&lt;br /&gt;
    #                    values for sysfs variables (such as power management&lt;br /&gt;
    #                    defaults) and /sys file permissions in /etc/sysfs.conf.&lt;br /&gt;
    ### END INIT INFO&lt;br /&gt;
    &lt;br /&gt;
    # /etc/rc.d/sysfsutils:&lt;br /&gt;
    #&lt;br /&gt;
    # (c) 2005 Martin Pitt &amp;lt;mpitt@debian.org&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    CONFFILE=/etc/sysfs.conf&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    [ -r &amp;quot;$CONFFILE&amp;quot; ] || exit 0&lt;br /&gt;
    &lt;br /&gt;
    . /etc/rc.conf&lt;br /&gt;
    . /etc/rc.d/functions&lt;br /&gt;
    &lt;br /&gt;
    case &amp;quot;$1&amp;quot; in&lt;br /&gt;
        start)&lt;br /&gt;
        stat_busy &amp;quot;Setting sysfs variables...&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
       sed  's/#.*$//; /^[[:space:]]*$/d;&lt;br /&gt;
              s/^[[:space:]]*\([^=[:space:]]*\)[[:space:]]*\([^=[:space:]]*\)[[:space:]]*=[[:space:]]*\(.*\)/\1 \2 \3/' \&lt;br /&gt;
                  $CONFFILE | {&lt;br /&gt;
           while read f1 f2 f3; do&lt;br /&gt;
                    if [ &amp;quot;$f1&amp;quot; = &amp;quot;mode&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -n &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f2&amp;quot; ]; then&lt;br /&gt;
                            chmod &amp;quot;$f3&amp;quot; &amp;quot;/sys/$f2&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    elif [ &amp;quot;$f1&amp;quot; = &amp;quot;owner&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -n &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f2&amp;quot; ]; then&lt;br /&gt;
                            chown &amp;quot;$f3&amp;quot; &amp;quot;/sys/$f2&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    elif [ &amp;quot;$f1&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -z &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f1&amp;quot; ]; then&lt;br /&gt;
                            # Some fields need a terminating newline, others&lt;br /&gt;
                            # need the terminating newline to be absent :-(&lt;br /&gt;
                             echo -n &amp;quot;$f2&amp;quot; &amp;gt; &amp;quot;/sys/$f1&amp;quot; 2&amp;gt;/dev/null ||&lt;br /&gt;
                             echo &amp;quot;$f2&amp;quot; &amp;gt; &amp;quot;/sys/$f1&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    else&lt;br /&gt;
                        stat_fail&lt;br /&gt;
                        exit 1&lt;br /&gt;
                    fi&lt;br /&gt;
           done&lt;br /&gt;
       }&lt;br /&gt;
    &lt;br /&gt;
       stat_done&lt;br /&gt;
       ;;&lt;br /&gt;
       stop)&lt;br /&gt;
       ;;&lt;br /&gt;
       *)&lt;br /&gt;
       echo &amp;quot;Usage: /etc/rc.d/sysfsutils {start|stop}&amp;quot;&lt;br /&gt;
       exit 1&lt;br /&gt;
       ;;&lt;br /&gt;
    esac&lt;br /&gt;
&lt;br /&gt;
{{HELP|I don't know how to use wikieditor, so the script displays wrongly.}}&lt;br /&gt;
&lt;br /&gt;
    #chmod +x /etc/rc.d/sysfsutils&lt;br /&gt;
&lt;br /&gt;
Add sysfsutils to DAEMON.&lt;br /&gt;
&lt;br /&gt;
==Profiles I am using==&lt;br /&gt;
&lt;br /&gt;
a: rc.conf&lt;br /&gt;
&lt;br /&gt;
    MODULES=(!snd_pcm_oss !snd_mixer_oss !snd_seq_oss !thinkpad_ec tp_smapi hdaps acpi-cpufreq)&lt;br /&gt;
    DAEMONS=(syslog-ng dbus acpid hdapsd tpfand networkmanager hddtemp alsa laptop-mode sysfsutils)&lt;br /&gt;
&lt;br /&gt;
b: tpfand.conf&lt;br /&gt;
&lt;br /&gt;
    enabled = True&lt;br /&gt;
    override_profile = True&lt;br /&gt;
    &lt;br /&gt;
    0. CPU = 0:0 45:3 60:6&lt;br /&gt;
    1. Mini PCI = 0:0 50:3&lt;br /&gt;
    2. Sensor 2 = 0:255&lt;br /&gt;
    3. GPU = 0:0 50:3&lt;br /&gt;
    4. Bat0 = 0:0 35:2&lt;br /&gt;
    5. Sensor 5 = 0:255&lt;br /&gt;
    6. Bat1 = 0:0 35:2&lt;br /&gt;
    7. Sensor 7 = 0:255&lt;br /&gt;
    8. MB? = 0:0 45:2 60:4&lt;br /&gt;
    9. MB? = 0:0 55:3&lt;br /&gt;
    10. Sensor 10 = 0:255&lt;br /&gt;
    11. Sensor 11 = 0:255&lt;br /&gt;
    12. Sensor 12 = 0:255&lt;br /&gt;
    13. Sensor 13 = 0:255&lt;br /&gt;
    14. Sensor 14 = 0:255&lt;br /&gt;
    15. Sensor 15 = 0:255&lt;br /&gt;
    &lt;br /&gt;
    hysteresis = 2&lt;br /&gt;
    interval_speed = 2&lt;br /&gt;
    interval_duration = 500.000000&lt;br /&gt;
    interval_delay = 5000.000000&lt;br /&gt;
&lt;br /&gt;
[[Category:X200]]&lt;/div&gt;</summary>
		<author><name>Kilior</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Post_Installing_Arch_on_an_X200&amp;diff=49508</id>
		<title>Post Installing Arch on an X200</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Post_Installing_Arch_on_an_X200&amp;diff=49508"/>
		<updated>2010-09-01T16:01:22Z</updated>

		<summary type="html">&lt;p&gt;Kilior: /* Wheel Emulation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Preface==&lt;br /&gt;
&lt;br /&gt;
If your native language is Chinese or you are good at Chinese, I strangely recommend you read [http://forum.ubuntu.org.cn/viewtopic.php?f=155&amp;amp;t=286666 the Chinese version of this page] &lt;br /&gt;
&lt;br /&gt;
In this page, I will NOT tell you how too install ArchLinux in X200, but something make X200 work better after ArchLinux installation.&lt;br /&gt;
&lt;br /&gt;
If you don't know how to install ArchLinux to your X200, [http://wiki.archlinux.org/index.php/Main_Page ArchWiki],and [http://www.thinkwiki.org/wiki/Installing_Arch_on_an_X200 Installing Arch on an X200]. So if you reach here, I think you have installed ArchLinux to you X200 with desktop environment. If you think the tools in this page isn't the best one, or can't use in your desktop environment, please edit the page, and show your tools to us.&lt;br /&gt;
&lt;br /&gt;
==Prepare kernel modules==&lt;br /&gt;
&lt;br /&gt;
package: [http://aur.archlinux.org/packages.php?ID=3985 tp_smapi]&lt;br /&gt;
&lt;br /&gt;
You can install this package through yaourt, but the source is not patched for X200. So we need to patch the source.&lt;br /&gt;
&lt;br /&gt;
in file hdaps.c &lt;br /&gt;
&lt;br /&gt;
Search &amp;quot;X61&amp;quot; and add following line between &amp;quot; HDAPS_DMI_MATCH_INVERT(&amp;quot;LENOVO&amp;quot;, &amp;quot;ThinkPad X61&amp;quot;, HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X),&amp;quot; and &amp;quot;};&amp;quot; &lt;br /&gt;
&lt;br /&gt;
add:&lt;br /&gt;
       HDAPS_DMI_MATCH_INVERT(&amp;quot;LENOVO&amp;quot;, &amp;quot;ThinkPad X200&amp;quot;, HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X | HDAPS_ORIENT_INVERT_Y),&lt;br /&gt;
       { .ident = NULL }&lt;br /&gt;
&lt;br /&gt;
After you patch source, you can repack the source, edit PKGBUILD, use makepkg to build the package.&lt;br /&gt;
&lt;br /&gt;
Or you can make it step by step&lt;br /&gt;
&lt;br /&gt;
     $HDAPSD=true make&lt;br /&gt;
&lt;br /&gt;
     #make install&lt;br /&gt;
     #depmod -a&lt;br /&gt;
&lt;br /&gt;
==Configure modules==&lt;br /&gt;
&lt;br /&gt;
1 fan control:&lt;br /&gt;
&lt;br /&gt;
file /etc/modprobe.d/modprobe.conf, add one line:&lt;br /&gt;
&lt;br /&gt;
      options thinkpad_acpi fan_control=1&lt;br /&gt;
&lt;br /&gt;
2 audio:&lt;br /&gt;
&lt;br /&gt;
      options snd-hda-intel model=lenovo-x200 enable_msi=1&lt;br /&gt;
&lt;br /&gt;
3 autoload modules:&lt;br /&gt;
&lt;br /&gt;
      tp_smapi hdaps acpi-cpufreq&lt;br /&gt;
&lt;br /&gt;
==Sensors==&lt;br /&gt;
&lt;br /&gt;
Package: lm_sensors、sensors-applet (gnome_applet)、hddtemp&lt;br /&gt;
&lt;br /&gt;
Add hddtemp to DAEMON, run sensors-detect to detect sensors, add sensors-applet to panel.&lt;br /&gt;
&lt;br /&gt;
==Fan control==&lt;br /&gt;
&lt;br /&gt;
Package: [http://aur.archlinux.org/packages.php?ID=24120 tpfand] [http://aur.archlinux.org/packages.php?ID=24121 tpfan-admin](This package may not work well)&lt;br /&gt;
&lt;br /&gt;
Add tpfand to DAEMON. If tpfan-admin can't work, you can write a profile yourself or install [http://aur.archlinux.org/packages.php?ID=24137 tpfand-profiles]&lt;br /&gt;
&lt;br /&gt;
After ArchLinux update Xorg to version 1.8, hal can remove from DAEMON. But this make tpfand doesn't work.&lt;br /&gt;
&lt;br /&gt;
Simply edit the source can make tpfand works well.&lt;br /&gt;
&lt;br /&gt;
File /usr/lib/python2.6/site-packages/tpfand/settings.py&lt;br /&gt;
&lt;br /&gt;
change the part of code &lt;br /&gt;
    def read_model_info(self):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;reads model info from HAL&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        try:&lt;br /&gt;
            bus = dbus.SystemBus()           &lt;br /&gt;
            computer_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')&lt;br /&gt;
            computer = dbus.Interface(computer_obj, 'org.freedesktop.Hal.Device')&lt;br /&gt;
           &lt;br /&gt;
            product_id = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.product')&lt;br /&gt;
            self.product_id = product_id.lower()&lt;br /&gt;
            product_name = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.version')&lt;br /&gt;
            self.product_name = product_name.lower().replace('/', '-').replace(' ', '_')&lt;br /&gt;
           &lt;br /&gt;
            self.product_pretty_vendor = computer.GetProperty('system.hardware.vendor')&lt;br /&gt;
            self.product_pretty_name = computer.GetProperty('system.hardware.version')&lt;br /&gt;
            self.product_pretty_id = computer.GetProperty('system.hardware.product')&lt;br /&gt;
        except:&lt;br /&gt;
            print &amp;quot;Warning: unable to get your system model from HAL.&amp;quot;&lt;br /&gt;
            self.product_id = None&lt;br /&gt;
            self.product_name = None&lt;br /&gt;
            self.product_pretty_vendor = None&lt;br /&gt;
            self.product_pretty_name = None&lt;br /&gt;
            self.product_pretty_id = None   &lt;br /&gt;
&lt;br /&gt;
TO&lt;br /&gt;
&lt;br /&gt;
     #    try:&lt;br /&gt;
     #       bus = dbus.SystemBus()           &lt;br /&gt;
     #       computer_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')&lt;br /&gt;
     #       computer = dbus.Interface(computer_obj, 'org.freedesktop.Hal.Device')&lt;br /&gt;
                &lt;br /&gt;
     #       product_id = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.product')&lt;br /&gt;
     #       self.product_id = product_id.lower()&lt;br /&gt;
     #       product_name = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.version')&lt;br /&gt;
     #       self.product_name = product_name.lower().replace('/', '-').replace(' ', '_')&lt;br /&gt;
           &lt;br /&gt;
     #       self.product_pretty_vendor = computer.GetProperty('system.hardware.vendor')&lt;br /&gt;
     #       self.product_pretty_name = computer.GetProperty('system.hardware.version')&lt;br /&gt;
     #       self.product_pretty_id = computer.GetProperty('system.hardware.product')&lt;br /&gt;
     #    except:&lt;br /&gt;
     #       print &amp;quot;Warning: unable to get your system model from HAL.&amp;quot;&lt;br /&gt;
          self.product_id = u'LENOVO_74574AC'&lt;br /&gt;
          self.product_name = u'LENOVO_ThinkPad X200'&lt;br /&gt;
          self.product_pretty_vendor = dbus.String(u'LENOVO')&lt;br /&gt;
          self.product_pretty_name = dbus.String(u'ThinkPad X200')&lt;br /&gt;
          self.product_pretty_id = dbus.String(u'74574AC')&lt;br /&gt;
&lt;br /&gt;
The last 4 lines you should replace them to yours. You can get them by python or from the bottom side of your X200.&lt;br /&gt;
&lt;br /&gt;
==Wheel Emulation==&lt;br /&gt;
&lt;br /&gt;
New file /etc/X11/xorg.conf.d/10-wheel-emulation.conf&lt;br /&gt;
&lt;br /&gt;
    # Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable&lt;br /&gt;
    # http://bugs.freedesktop.org/show_bug.cgi?id=22442&lt;br /&gt;
    Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Trackpoint Wheel Emulation&amp;quot;&lt;br /&gt;
        MatchProduct &amp;quot;TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device&amp;quot;&lt;br /&gt;
        MatchDevicePath   &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
        Option      &amp;quot;EmulateWheel&amp;quot;      &amp;quot;true&lt;br /&gt;
        Option      &amp;quot;EmulateWheelButton&amp;quot;   &amp;quot;2&amp;quot;&lt;br /&gt;
        Option      &amp;quot;Emulate3Buttons&amp;quot;   &amp;quot;false&amp;quot;&lt;br /&gt;
        Option      &amp;quot;XAxisMapping&amp;quot;      &amp;quot;6 7&amp;quot;&lt;br /&gt;
        Option      &amp;quot;YAxisMapping&amp;quot;      &amp;quot;4 5&amp;quot;&lt;br /&gt;
    EndSection&lt;br /&gt;
&lt;br /&gt;
==HDAPS==&lt;br /&gt;
&lt;br /&gt;
Packages: [http://aur.archlinux.org/packages.php?ID=5401 hdapsd] [http://aur.archlinux.org/packages.php?ID=23485 hdaps-gl] [http://aur.archlinux.org/packages.php?ID=27398 thinkhdaps]&lt;br /&gt;
&lt;br /&gt;
Add hdapsd to DAEMON, add thinkhdaps to gnome gnome startup programs.&lt;br /&gt;
&lt;br /&gt;
==Laptop Mode==&lt;br /&gt;
&lt;br /&gt;
Package: laptop-mode-tools&lt;br /&gt;
&lt;br /&gt;
Add laptop-mode to DAEMON, add edit file /etc/laptop-mode/laptop-mode.conf, change ENABLE_AUTO_MODULES' value to 1&lt;br /&gt;
&lt;br /&gt;
==Protect Battery==&lt;br /&gt;
&lt;br /&gt;
Make battery charge cycle grows slowly, we should change some value in sysfs.&lt;br /&gt;
&lt;br /&gt;
New file: /etc/sysfs.conf&lt;br /&gt;
&lt;br /&gt;
    # Make battery live longer&lt;br /&gt;
    devices/platform/smapi/BAT0/start_charge_thresh = 50&lt;br /&gt;
    devices/platform/smapi/BAT0/stop_charge_thresh = 90&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
    # Make battery live longer&lt;br /&gt;
    devices/platform/smapi/BAT0/start_charge_thresh = 10&lt;br /&gt;
    devices/platform/smapi/BAT0/stop_charge_thresh = 100&lt;br /&gt;
&lt;br /&gt;
(choose one you like, and I use the first one)&lt;br /&gt;
&lt;br /&gt;
New file: /etc/rc.d/sysfsutils&lt;br /&gt;
&lt;br /&gt;
    #! /bin/sh -e&lt;br /&gt;
    &lt;br /&gt;
    ### BEGIN INIT INFO&lt;br /&gt;
    # Provides:          sysfsconf&lt;br /&gt;
    # Required-Start:    mountkernfs&lt;br /&gt;
    # Should-Start:      udev module-init-tools loadcpufreq&lt;br /&gt;
    # Required-Stop:&lt;br /&gt;
    # Default-Start:     2 3 4 5&lt;br /&gt;
    # Default-Stop:&lt;br /&gt;
    # Short-Description: Set sysfs variables from /etc/sysfs.conf&lt;br /&gt;
    # Description:       Similarly to /etc/init.d/procps.sh, you can configure&lt;br /&gt;
    #                    values for sysfs variables (such as power management&lt;br /&gt;
    #                    defaults) and /sys file permissions in /etc/sysfs.conf.&lt;br /&gt;
    ### END INIT INFO&lt;br /&gt;
    &lt;br /&gt;
    # /etc/rc.d/sysfsutils:&lt;br /&gt;
    #&lt;br /&gt;
    # (c) 2005 Martin Pitt &amp;lt;mpitt@debian.org&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    CONFFILE=/etc/sysfs.conf&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    [ -r &amp;quot;$CONFFILE&amp;quot; ] || exit 0&lt;br /&gt;
    &lt;br /&gt;
    . /etc/rc.conf&lt;br /&gt;
    . /etc/rc.d/functions&lt;br /&gt;
    &lt;br /&gt;
    case &amp;quot;$1&amp;quot; in&lt;br /&gt;
        start)&lt;br /&gt;
        stat_busy &amp;quot;Setting sysfs variables...&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
       sed  's/#.*$//; /^[[:space:]]*$/d;&lt;br /&gt;
              s/^[[:space:]]*\([^=[:space:]]*\)[[:space:]]*\([^=[:space:]]*\)[[:space:]]*=[[:space:]]*\(.*\)/\1 \2 \3/' \&lt;br /&gt;
                  $CONFFILE | {&lt;br /&gt;
           while read f1 f2 f3; do&lt;br /&gt;
                    if [ &amp;quot;$f1&amp;quot; = &amp;quot;mode&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -n &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f2&amp;quot; ]; then&lt;br /&gt;
                            chmod &amp;quot;$f3&amp;quot; &amp;quot;/sys/$f2&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    elif [ &amp;quot;$f1&amp;quot; = &amp;quot;owner&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -n &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f2&amp;quot; ]; then&lt;br /&gt;
                            chown &amp;quot;$f3&amp;quot; &amp;quot;/sys/$f2&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    elif [ &amp;quot;$f1&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -z &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f1&amp;quot; ]; then&lt;br /&gt;
                            # Some fields need a terminating newline, others&lt;br /&gt;
                            # need the terminating newline to be absent :-(&lt;br /&gt;
                             echo -n &amp;quot;$f2&amp;quot; &amp;gt; &amp;quot;/sys/$f1&amp;quot; 2&amp;gt;/dev/null ||&lt;br /&gt;
                             echo &amp;quot;$f2&amp;quot; &amp;gt; &amp;quot;/sys/$f1&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    else&lt;br /&gt;
                        stat_fail&lt;br /&gt;
                        exit 1&lt;br /&gt;
                    fi&lt;br /&gt;
           done&lt;br /&gt;
       }&lt;br /&gt;
    &lt;br /&gt;
       stat_done&lt;br /&gt;
       ;;&lt;br /&gt;
       stop)&lt;br /&gt;
       ;;&lt;br /&gt;
       *)&lt;br /&gt;
       echo &amp;quot;Usage: /etc/rc.d/sysfsutils {start|stop}&amp;quot;&lt;br /&gt;
       exit 1&lt;br /&gt;
       ;;&lt;br /&gt;
    esac&lt;br /&gt;
&lt;br /&gt;
{{HELP|I don't know how to use wikieditor, so the script displays wrongly.}}&lt;br /&gt;
&lt;br /&gt;
    #chmod +x /etc/rc.d/sysfsutils&lt;br /&gt;
&lt;br /&gt;
Add sysfsutils to DAEMON.&lt;br /&gt;
&lt;br /&gt;
==Profiles I am using==&lt;br /&gt;
&lt;br /&gt;
a: rc.conf&lt;br /&gt;
&lt;br /&gt;
    MODULES=(!snd_pcm_oss !snd_mixer_oss !snd_seq_oss !thinkpad_ec tp_smapi hdaps acpi-cpufreq)&lt;br /&gt;
    DAEMONS=(syslog-ng dbus acpid hdapsd tpfand networkmanager hddtemp alsa laptop-mode sysfsutils)&lt;br /&gt;
&lt;br /&gt;
b: tpfand.conf&lt;br /&gt;
&lt;br /&gt;
    enabled = True&lt;br /&gt;
    override_profile = True&lt;br /&gt;
    &lt;br /&gt;
    0. CPU = 0:0 45:3 60:6&lt;br /&gt;
    1. Mini PCI = 0:0 50:3&lt;br /&gt;
    2. Sensor 2 = 0:255&lt;br /&gt;
    3. GPU = 0:0 50:3&lt;br /&gt;
    4. Bat0 = 0:0 35:2&lt;br /&gt;
    5. Sensor 5 = 0:255&lt;br /&gt;
    6. Bat1 = 0:0 35:2&lt;br /&gt;
    7. Sensor 7 = 0:255&lt;br /&gt;
    8. MB? = 0:0 45:2 60:4&lt;br /&gt;
    9. MB? = 0:0 55:3&lt;br /&gt;
    10. Sensor 10 = 0:255&lt;br /&gt;
    11. Sensor 11 = 0:255&lt;br /&gt;
    12. Sensor 12 = 0:255&lt;br /&gt;
    13. Sensor 13 = 0:255&lt;br /&gt;
    14. Sensor 14 = 0:255&lt;br /&gt;
    15. Sensor 15 = 0:255&lt;br /&gt;
    &lt;br /&gt;
    hysteresis = 2&lt;br /&gt;
    interval_speed = 2&lt;br /&gt;
    interval_duration = 500.000000&lt;br /&gt;
    interval_delay = 5000.000000&lt;br /&gt;
&lt;br /&gt;
[[Category:X200]]&lt;/div&gt;</summary>
		<author><name>Kilior</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Post_Installing_Arch_on_an_X200&amp;diff=49507</id>
		<title>Post Installing Arch on an X200</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Post_Installing_Arch_on_an_X200&amp;diff=49507"/>
		<updated>2010-09-01T15:57:50Z</updated>

		<summary type="html">&lt;p&gt;Kilior: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Preface==&lt;br /&gt;
&lt;br /&gt;
If your native language is Chinese or you are good at Chinese, I strangely recommend you read [http://forum.ubuntu.org.cn/viewtopic.php?f=155&amp;amp;t=286666 the Chinese version of this page] &lt;br /&gt;
&lt;br /&gt;
In this page, I will NOT tell you how too install ArchLinux in X200, but something make X200 work better after ArchLinux installation.&lt;br /&gt;
&lt;br /&gt;
If you don't know how to install ArchLinux to your X200, [http://wiki.archlinux.org/index.php/Main_Page ArchWiki],and [http://www.thinkwiki.org/wiki/Installing_Arch_on_an_X200 Installing Arch on an X200]. So if you reach here, I think you have installed ArchLinux to you X200 with desktop environment. If you think the tools in this page isn't the best one, or can't use in your desktop environment, please edit the page, and show your tools to us.&lt;br /&gt;
&lt;br /&gt;
==Prepare kernel modules==&lt;br /&gt;
&lt;br /&gt;
package: [http://aur.archlinux.org/packages.php?ID=3985 tp_smapi]&lt;br /&gt;
&lt;br /&gt;
You can install this package through yaourt, but the source is not patched for X200. So we need to patch the source.&lt;br /&gt;
&lt;br /&gt;
in file hdaps.c &lt;br /&gt;
&lt;br /&gt;
Search &amp;quot;X61&amp;quot; and add following line between &amp;quot; HDAPS_DMI_MATCH_INVERT(&amp;quot;LENOVO&amp;quot;, &amp;quot;ThinkPad X61&amp;quot;, HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X),&amp;quot; and &amp;quot;};&amp;quot; &lt;br /&gt;
&lt;br /&gt;
add:&lt;br /&gt;
       HDAPS_DMI_MATCH_INVERT(&amp;quot;LENOVO&amp;quot;, &amp;quot;ThinkPad X200&amp;quot;, HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X | HDAPS_ORIENT_INVERT_Y),&lt;br /&gt;
       { .ident = NULL }&lt;br /&gt;
&lt;br /&gt;
After you patch source, you can repack the source, edit PKGBUILD, use makepkg to build the package.&lt;br /&gt;
&lt;br /&gt;
Or you can make it step by step&lt;br /&gt;
&lt;br /&gt;
     $HDAPSD=true make&lt;br /&gt;
&lt;br /&gt;
     #make install&lt;br /&gt;
     #depmod -a&lt;br /&gt;
&lt;br /&gt;
==Configure modules==&lt;br /&gt;
&lt;br /&gt;
1 fan control:&lt;br /&gt;
&lt;br /&gt;
file /etc/modprobe.d/modprobe.conf, add one line:&lt;br /&gt;
&lt;br /&gt;
      options thinkpad_acpi fan_control=1&lt;br /&gt;
&lt;br /&gt;
2 audio:&lt;br /&gt;
&lt;br /&gt;
      options snd-hda-intel model=lenovo-x200 enable_msi=1&lt;br /&gt;
&lt;br /&gt;
3 autoload modules:&lt;br /&gt;
&lt;br /&gt;
      tp_smapi hdaps acpi-cpufreq&lt;br /&gt;
&lt;br /&gt;
==Sensors==&lt;br /&gt;
&lt;br /&gt;
Package: lm_sensors、sensors-applet (gnome_applet)、hddtemp&lt;br /&gt;
&lt;br /&gt;
Add hddtemp to DAEMON, run sensors-detect to detect sensors, add sensors-applet to panel.&lt;br /&gt;
&lt;br /&gt;
==Fan control==&lt;br /&gt;
&lt;br /&gt;
Package: [http://aur.archlinux.org/packages.php?ID=24120 tpfand] [http://aur.archlinux.org/packages.php?ID=24121 tpfan-admin](This package may not work well)&lt;br /&gt;
&lt;br /&gt;
Add tpfand to DAEMON. If tpfan-admin can't work, you can write a profile yourself or install [http://aur.archlinux.org/packages.php?ID=24137 tpfand-profiles]&lt;br /&gt;
&lt;br /&gt;
After ArchLinux update Xorg to version 1.8, hal can remove from DAEMON. But this make tpfand doesn't work.&lt;br /&gt;
&lt;br /&gt;
Simply edit the source can make tpfand works well.&lt;br /&gt;
&lt;br /&gt;
File /usr/lib/python2.6/site-packages/tpfand/settings.py&lt;br /&gt;
&lt;br /&gt;
change the part of code &lt;br /&gt;
    def read_model_info(self):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;reads model info from HAL&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        try:&lt;br /&gt;
            bus = dbus.SystemBus()           &lt;br /&gt;
            computer_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')&lt;br /&gt;
            computer = dbus.Interface(computer_obj, 'org.freedesktop.Hal.Device')&lt;br /&gt;
           &lt;br /&gt;
            product_id = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.product')&lt;br /&gt;
            self.product_id = product_id.lower()&lt;br /&gt;
            product_name = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.version')&lt;br /&gt;
            self.product_name = product_name.lower().replace('/', '-').replace(' ', '_')&lt;br /&gt;
           &lt;br /&gt;
            self.product_pretty_vendor = computer.GetProperty('system.hardware.vendor')&lt;br /&gt;
            self.product_pretty_name = computer.GetProperty('system.hardware.version')&lt;br /&gt;
            self.product_pretty_id = computer.GetProperty('system.hardware.product')&lt;br /&gt;
        except:&lt;br /&gt;
            print &amp;quot;Warning: unable to get your system model from HAL.&amp;quot;&lt;br /&gt;
            self.product_id = None&lt;br /&gt;
            self.product_name = None&lt;br /&gt;
            self.product_pretty_vendor = None&lt;br /&gt;
            self.product_pretty_name = None&lt;br /&gt;
            self.product_pretty_id = None   &lt;br /&gt;
&lt;br /&gt;
TO&lt;br /&gt;
&lt;br /&gt;
     #    try:&lt;br /&gt;
     #       bus = dbus.SystemBus()           &lt;br /&gt;
     #       computer_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')&lt;br /&gt;
     #       computer = dbus.Interface(computer_obj, 'org.freedesktop.Hal.Device')&lt;br /&gt;
                &lt;br /&gt;
     #       product_id = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.product')&lt;br /&gt;
     #       self.product_id = product_id.lower()&lt;br /&gt;
     #       product_name = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.version')&lt;br /&gt;
     #       self.product_name = product_name.lower().replace('/', '-').replace(' ', '_')&lt;br /&gt;
           &lt;br /&gt;
     #       self.product_pretty_vendor = computer.GetProperty('system.hardware.vendor')&lt;br /&gt;
     #       self.product_pretty_name = computer.GetProperty('system.hardware.version')&lt;br /&gt;
     #       self.product_pretty_id = computer.GetProperty('system.hardware.product')&lt;br /&gt;
     #    except:&lt;br /&gt;
     #       print &amp;quot;Warning: unable to get your system model from HAL.&amp;quot;&lt;br /&gt;
          self.product_id = u'LENOVO_74574AC'&lt;br /&gt;
          self.product_name = u'LENOVO_ThinkPad X200'&lt;br /&gt;
          self.product_pretty_vendor = dbus.String(u'LENOVO')&lt;br /&gt;
          self.product_pretty_name = dbus.String(u'ThinkPad X200')&lt;br /&gt;
          self.product_pretty_id = dbus.String(u'74574AC')&lt;br /&gt;
&lt;br /&gt;
The last 4 lines you should replace them to yours. You can get them by python or from the bottom side of your X200.&lt;br /&gt;
&lt;br /&gt;
==Wheel Emulation==&lt;br /&gt;
&lt;br /&gt;
New file /etc/X11/xorg.conf.d/10-wheel-emulation.conf&lt;br /&gt;
&lt;br /&gt;
    # Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable&lt;br /&gt;
    # http://bugs.freedesktop.org/show_bug.cgi?id=22442&lt;br /&gt;
    Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
            Identifier &amp;quot;Trackpoint Wheel Emulation&amp;quot;&lt;br /&gt;
            MatchProduct &amp;quot;TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device&amp;quot;&lt;br /&gt;
       MatchDevicePath   &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
       Option      &amp;quot;EmulateWheel&amp;quot;      &amp;quot;true&lt;br /&gt;
       Option      &amp;quot;EmulateWheelButton&amp;quot;   &amp;quot;2&amp;quot;&lt;br /&gt;
       Option      &amp;quot;Emulate3Buttons&amp;quot;   &amp;quot;false&amp;quot;&lt;br /&gt;
       Option      &amp;quot;XAxisMapping&amp;quot;      &amp;quot;6 7&amp;quot;&lt;br /&gt;
       Option      &amp;quot;YAxisMapping&amp;quot;      &amp;quot;4 5&amp;quot;&lt;br /&gt;
    EndSection&lt;br /&gt;
&lt;br /&gt;
==HDAPS==&lt;br /&gt;
&lt;br /&gt;
Packages: [http://aur.archlinux.org/packages.php?ID=5401 hdapsd] [http://aur.archlinux.org/packages.php?ID=23485 hdaps-gl] [http://aur.archlinux.org/packages.php?ID=27398 thinkhdaps]&lt;br /&gt;
&lt;br /&gt;
Add hdapsd to DAEMON, add thinkhdaps to gnome gnome startup programs.&lt;br /&gt;
&lt;br /&gt;
==Laptop Mode==&lt;br /&gt;
&lt;br /&gt;
Package: laptop-mode-tools&lt;br /&gt;
&lt;br /&gt;
Add laptop-mode to DAEMON, add edit file /etc/laptop-mode/laptop-mode.conf, change ENABLE_AUTO_MODULES' value to 1&lt;br /&gt;
&lt;br /&gt;
==Protect Battery==&lt;br /&gt;
&lt;br /&gt;
Make battery charge cycle grows slowly, we should change some value in sysfs.&lt;br /&gt;
&lt;br /&gt;
New file: /etc/sysfs.conf&lt;br /&gt;
&lt;br /&gt;
    # Make battery live longer&lt;br /&gt;
    devices/platform/smapi/BAT0/start_charge_thresh = 50&lt;br /&gt;
    devices/platform/smapi/BAT0/stop_charge_thresh = 90&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
    # Make battery live longer&lt;br /&gt;
    devices/platform/smapi/BAT0/start_charge_thresh = 10&lt;br /&gt;
    devices/platform/smapi/BAT0/stop_charge_thresh = 100&lt;br /&gt;
&lt;br /&gt;
(choose one you like, and I use the first one)&lt;br /&gt;
&lt;br /&gt;
New file: /etc/rc.d/sysfsutils&lt;br /&gt;
&lt;br /&gt;
    #! /bin/sh -e&lt;br /&gt;
    &lt;br /&gt;
    ### BEGIN INIT INFO&lt;br /&gt;
    # Provides:          sysfsconf&lt;br /&gt;
    # Required-Start:    mountkernfs&lt;br /&gt;
    # Should-Start:      udev module-init-tools loadcpufreq&lt;br /&gt;
    # Required-Stop:&lt;br /&gt;
    # Default-Start:     2 3 4 5&lt;br /&gt;
    # Default-Stop:&lt;br /&gt;
    # Short-Description: Set sysfs variables from /etc/sysfs.conf&lt;br /&gt;
    # Description:       Similarly to /etc/init.d/procps.sh, you can configure&lt;br /&gt;
    #                    values for sysfs variables (such as power management&lt;br /&gt;
    #                    defaults) and /sys file permissions in /etc/sysfs.conf.&lt;br /&gt;
    ### END INIT INFO&lt;br /&gt;
    &lt;br /&gt;
    # /etc/rc.d/sysfsutils:&lt;br /&gt;
    #&lt;br /&gt;
    # (c) 2005 Martin Pitt &amp;lt;mpitt@debian.org&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    CONFFILE=/etc/sysfs.conf&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    [ -r &amp;quot;$CONFFILE&amp;quot; ] || exit 0&lt;br /&gt;
    &lt;br /&gt;
    . /etc/rc.conf&lt;br /&gt;
    . /etc/rc.d/functions&lt;br /&gt;
    &lt;br /&gt;
    case &amp;quot;$1&amp;quot; in&lt;br /&gt;
        start)&lt;br /&gt;
        stat_busy &amp;quot;Setting sysfs variables...&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
       sed  's/#.*$//; /^[[:space:]]*$/d;&lt;br /&gt;
              s/^[[:space:]]*\([^=[:space:]]*\)[[:space:]]*\([^=[:space:]]*\)[[:space:]]*=[[:space:]]*\(.*\)/\1 \2 \3/' \&lt;br /&gt;
                  $CONFFILE | {&lt;br /&gt;
           while read f1 f2 f3; do&lt;br /&gt;
                    if [ &amp;quot;$f1&amp;quot; = &amp;quot;mode&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -n &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f2&amp;quot; ]; then&lt;br /&gt;
                            chmod &amp;quot;$f3&amp;quot; &amp;quot;/sys/$f2&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    elif [ &amp;quot;$f1&amp;quot; = &amp;quot;owner&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -n &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f2&amp;quot; ]; then&lt;br /&gt;
                            chown &amp;quot;$f3&amp;quot; &amp;quot;/sys/$f2&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    elif [ &amp;quot;$f1&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -z &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f1&amp;quot; ]; then&lt;br /&gt;
                            # Some fields need a terminating newline, others&lt;br /&gt;
                            # need the terminating newline to be absent :-(&lt;br /&gt;
                             echo -n &amp;quot;$f2&amp;quot; &amp;gt; &amp;quot;/sys/$f1&amp;quot; 2&amp;gt;/dev/null ||&lt;br /&gt;
                             echo &amp;quot;$f2&amp;quot; &amp;gt; &amp;quot;/sys/$f1&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    else&lt;br /&gt;
                        stat_fail&lt;br /&gt;
                        exit 1&lt;br /&gt;
                    fi&lt;br /&gt;
           done&lt;br /&gt;
       }&lt;br /&gt;
    &lt;br /&gt;
       stat_done&lt;br /&gt;
       ;;&lt;br /&gt;
       stop)&lt;br /&gt;
       ;;&lt;br /&gt;
       *)&lt;br /&gt;
       echo &amp;quot;Usage: /etc/rc.d/sysfsutils {start|stop}&amp;quot;&lt;br /&gt;
       exit 1&lt;br /&gt;
       ;;&lt;br /&gt;
    esac&lt;br /&gt;
&lt;br /&gt;
{{HELP|I don't know how to use wikieditor, so the script displays wrongly.}}&lt;br /&gt;
&lt;br /&gt;
    #chmod +x /etc/rc.d/sysfsutils&lt;br /&gt;
&lt;br /&gt;
Add sysfsutils to DAEMON.&lt;br /&gt;
&lt;br /&gt;
==Profiles I am using==&lt;br /&gt;
&lt;br /&gt;
a: rc.conf&lt;br /&gt;
&lt;br /&gt;
    MODULES=(!snd_pcm_oss !snd_mixer_oss !snd_seq_oss !thinkpad_ec tp_smapi hdaps acpi-cpufreq)&lt;br /&gt;
    DAEMONS=(syslog-ng dbus acpid hdapsd tpfand networkmanager hddtemp alsa laptop-mode sysfsutils)&lt;br /&gt;
&lt;br /&gt;
b: tpfand.conf&lt;br /&gt;
&lt;br /&gt;
    enabled = True&lt;br /&gt;
    override_profile = True&lt;br /&gt;
    &lt;br /&gt;
    0. CPU = 0:0 45:3 60:6&lt;br /&gt;
    1. Mini PCI = 0:0 50:3&lt;br /&gt;
    2. Sensor 2 = 0:255&lt;br /&gt;
    3. GPU = 0:0 50:3&lt;br /&gt;
    4. Bat0 = 0:0 35:2&lt;br /&gt;
    5. Sensor 5 = 0:255&lt;br /&gt;
    6. Bat1 = 0:0 35:2&lt;br /&gt;
    7. Sensor 7 = 0:255&lt;br /&gt;
    8. MB? = 0:0 45:2 60:4&lt;br /&gt;
    9. MB? = 0:0 55:3&lt;br /&gt;
    10. Sensor 10 = 0:255&lt;br /&gt;
    11. Sensor 11 = 0:255&lt;br /&gt;
    12. Sensor 12 = 0:255&lt;br /&gt;
    13. Sensor 13 = 0:255&lt;br /&gt;
    14. Sensor 14 = 0:255&lt;br /&gt;
    15. Sensor 15 = 0:255&lt;br /&gt;
    &lt;br /&gt;
    hysteresis = 2&lt;br /&gt;
    interval_speed = 2&lt;br /&gt;
    interval_duration = 500.000000&lt;br /&gt;
    interval_delay = 5000.000000&lt;br /&gt;
&lt;br /&gt;
[[Category:X200]]&lt;/div&gt;</summary>
		<author><name>Kilior</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Post_Installing_Arch_on_an_X200&amp;diff=49506</id>
		<title>Post Installing Arch on an X200</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Post_Installing_Arch_on_an_X200&amp;diff=49506"/>
		<updated>2010-09-01T15:52:39Z</updated>

		<summary type="html">&lt;p&gt;Kilior: â†Created page with '==Preface==  If your native language is Chinese or you are good at Chinese, I strangely recommend you read [http://forum.ubuntu.org.cn/viewtopic.php?f=155&amp;amp;t=286666 the Chi...'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Preface==&lt;br /&gt;
&lt;br /&gt;
If your native language is Chinese or you are good at Chinese, I strangely recommend you read [http://forum.ubuntu.org.cn/viewtopic.php?f=155&amp;amp;t=286666 the Chinese version of this page] &lt;br /&gt;
&lt;br /&gt;
In this page, I will NOT tell you how too install ArchLinux in X200, but something make X200 work better after ArchLinux installation.&lt;br /&gt;
&lt;br /&gt;
If you don't know how to install ArchLinux to your X200, [http://wiki.archlinux.org/index.php/Main_Page ArchWiki],and [http://www.thinkwiki.org/wiki/Installing_Arch_on_an_X200 Installing Arch on an X200]. So if you reach here, I think you have installed ArchLinux to you X200 with desktop environment. If you think the tools in this page isn't the best one, or can't use in your desktop environment, please edit the page, and show your tools to us.&lt;br /&gt;
&lt;br /&gt;
==Prepare kernel modules==&lt;br /&gt;
&lt;br /&gt;
package: [http://aur.archlinux.org/packages.php?ID=3985 tp_smapi]&lt;br /&gt;
&lt;br /&gt;
You can install this package through yaourt, but the source is not patched for X200. So we need to patch the source.&lt;br /&gt;
&lt;br /&gt;
in file hdaps.c &lt;br /&gt;
&lt;br /&gt;
Search &amp;quot;X61&amp;quot; and add following line between &amp;quot; HDAPS_DMI_MATCH_INVERT(&amp;quot;LENOVO&amp;quot;, &amp;quot;ThinkPad X61&amp;quot;, HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X),&amp;quot; and &amp;quot;};&amp;quot; &lt;br /&gt;
&lt;br /&gt;
add:&lt;br /&gt;
       HDAPS_DMI_MATCH_INVERT(&amp;quot;LENOVO&amp;quot;, &amp;quot;ThinkPad X200&amp;quot;, HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X | HDAPS_ORIENT_INVERT_Y),&lt;br /&gt;
       { .ident = NULL }&lt;br /&gt;
&lt;br /&gt;
After you patch source, you can repack the source, edit PKGBUILD, use makepkg to build the package.&lt;br /&gt;
&lt;br /&gt;
Or you can make it step by step&lt;br /&gt;
&lt;br /&gt;
     $HDAPSD=true make&lt;br /&gt;
&lt;br /&gt;
     #make install&lt;br /&gt;
     #depmod -a&lt;br /&gt;
&lt;br /&gt;
==Configure modules==&lt;br /&gt;
&lt;br /&gt;
1 fan control:&lt;br /&gt;
&lt;br /&gt;
file /etc/modprobe.d/modprobe.conf, add one line:&lt;br /&gt;
&lt;br /&gt;
      options thinkpad_acpi fan_control=1&lt;br /&gt;
&lt;br /&gt;
2 audio:&lt;br /&gt;
&lt;br /&gt;
      options snd-hda-intel model=lenovo-x200 enable_msi=1&lt;br /&gt;
&lt;br /&gt;
3 autoload modules:&lt;br /&gt;
&lt;br /&gt;
      tp_smapi hdaps acpi-cpufreq&lt;br /&gt;
&lt;br /&gt;
==Sensors==&lt;br /&gt;
&lt;br /&gt;
Package: lm_sensors、sensors-applet (gnome_applet)、hddtemp&lt;br /&gt;
&lt;br /&gt;
Add hddtemp to DAEMON, run sensors-detect to detect sensors, add sensors-applet to panel.&lt;br /&gt;
&lt;br /&gt;
==Fan control==&lt;br /&gt;
&lt;br /&gt;
Package: [http://aur.archlinux.org/packages.php?ID=24120 tpfand] [http://aur.archlinux.org/packages.php?ID=24121 tpfan-admin](This package may not work well)&lt;br /&gt;
&lt;br /&gt;
Add tpfand to DAEMON. If tpfan-admin can't work, you can write a profile yourself or install [http://aur.archlinux.org/packages.php?ID=24137 tpfand-profiles]&lt;br /&gt;
&lt;br /&gt;
After ArchLinux update Xorg to version 1.8, hal can remove from DAEMON. But this make tpfand doesn't work.&lt;br /&gt;
&lt;br /&gt;
Simply edit the source can make tpfand works well.&lt;br /&gt;
&lt;br /&gt;
File /usr/lib/python2.6/site-packages/tpfand/settings.py&lt;br /&gt;
&lt;br /&gt;
change the part of code &lt;br /&gt;
    def read_model_info(self):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;reads model info from HAL&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        try:&lt;br /&gt;
            bus = dbus.SystemBus()           &lt;br /&gt;
            computer_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')&lt;br /&gt;
            computer = dbus.Interface(computer_obj, 'org.freedesktop.Hal.Device')&lt;br /&gt;
           &lt;br /&gt;
            product_id = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.product')&lt;br /&gt;
            self.product_id = product_id.lower()&lt;br /&gt;
            product_name = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.version')&lt;br /&gt;
            self.product_name = product_name.lower().replace('/', '-').replace(' ', '_')&lt;br /&gt;
           &lt;br /&gt;
            self.product_pretty_vendor = computer.GetProperty('system.hardware.vendor')&lt;br /&gt;
            self.product_pretty_name = computer.GetProperty('system.hardware.version')&lt;br /&gt;
            self.product_pretty_id = computer.GetProperty('system.hardware.product')&lt;br /&gt;
        except:&lt;br /&gt;
            print &amp;quot;Warning: unable to get your system model from HAL.&amp;quot;&lt;br /&gt;
            self.product_id = None&lt;br /&gt;
            self.product_name = None&lt;br /&gt;
            self.product_pretty_vendor = None&lt;br /&gt;
            self.product_pretty_name = None&lt;br /&gt;
            self.product_pretty_id = None   &lt;br /&gt;
&lt;br /&gt;
TO&lt;br /&gt;
&lt;br /&gt;
     #    try:&lt;br /&gt;
     #       bus = dbus.SystemBus()           &lt;br /&gt;
     #       computer_obj = bus.get_object('org.freedesktop.Hal', '/org/freedesktop/Hal/devices/computer')&lt;br /&gt;
     #       computer = dbus.Interface(computer_obj, 'org.freedesktop.Hal.Device')&lt;br /&gt;
                &lt;br /&gt;
     #       product_id = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.product')&lt;br /&gt;
     #       self.product_id = product_id.lower()&lt;br /&gt;
     #       product_name = computer.GetProperty('system.hardware.vendor') + &amp;quot;_&amp;quot; + computer.GetProperty('system.hardware.version')&lt;br /&gt;
     #       self.product_name = product_name.lower().replace('/', '-').replace(' ', '_')&lt;br /&gt;
           &lt;br /&gt;
     #       self.product_pretty_vendor = computer.GetProperty('system.hardware.vendor')&lt;br /&gt;
     #       self.product_pretty_name = computer.GetProperty('system.hardware.version')&lt;br /&gt;
     #       self.product_pretty_id = computer.GetProperty('system.hardware.product')&lt;br /&gt;
     #    except:&lt;br /&gt;
     #       print &amp;quot;Warning: unable to get your system model from HAL.&amp;quot;&lt;br /&gt;
          self.product_id = u'LENOVO_74574AC'&lt;br /&gt;
          self.product_name = u'LENOVO_ThinkPad X200'&lt;br /&gt;
          self.product_pretty_vendor = dbus.String(u'LENOVO')&lt;br /&gt;
          self.product_pretty_name = dbus.String(u'ThinkPad X200')&lt;br /&gt;
          self.product_pretty_id = dbus.String(u'74574AC')&lt;br /&gt;
&lt;br /&gt;
The last 4 lines you should replace them to yours. You can get them by python or from the bottom side of your X200.&lt;br /&gt;
&lt;br /&gt;
==Wheel Emulation==&lt;br /&gt;
&lt;br /&gt;
New file /etc/X11/xorg.conf.d/10-wheel-emulation.conf&lt;br /&gt;
&lt;br /&gt;
    # Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable&lt;br /&gt;
    # http://bugs.freedesktop.org/show_bug.cgi?id=22442&lt;br /&gt;
    Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
            Identifier &amp;quot;Trackpoint Wheel Emulation&amp;quot;&lt;br /&gt;
            MatchProduct &amp;quot;TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device&amp;quot;&lt;br /&gt;
       MatchDevicePath   &amp;quot;/dev/input/event*&amp;quot;&lt;br /&gt;
       Option      &amp;quot;EmulateWheel&amp;quot;      &amp;quot;true&lt;br /&gt;
       Option      &amp;quot;EmulateWheelButton&amp;quot;   &amp;quot;2&amp;quot;&lt;br /&gt;
       Option      &amp;quot;Emulate3Buttons&amp;quot;   &amp;quot;false&amp;quot;&lt;br /&gt;
       Option      &amp;quot;XAxisMapping&amp;quot;      &amp;quot;6 7&amp;quot;&lt;br /&gt;
       Option      &amp;quot;YAxisMapping&amp;quot;      &amp;quot;4 5&amp;quot;&lt;br /&gt;
    EndSection&lt;br /&gt;
&lt;br /&gt;
==HDAPS==&lt;br /&gt;
&lt;br /&gt;
Packages: [http://aur.archlinux.org/packages.php?ID=5401 hdapsd] [http://aur.archlinux.org/packages.php?ID=23485 hdaps-gl] [http://aur.archlinux.org/packages.php?ID=27398 thinkhdaps]&lt;br /&gt;
&lt;br /&gt;
Add hdapsd to DAEMON, add thinkhdaps to gnome gnome startup programs.&lt;br /&gt;
&lt;br /&gt;
==Laptop Mode==&lt;br /&gt;
&lt;br /&gt;
Package: laptop-mode-tools&lt;br /&gt;
&lt;br /&gt;
Add laptop-mode to DAEMON, add edit file /etc/laptop-mode/laptop-mode.conf, change ENABLE_AUTO_MODULES' value to 1&lt;br /&gt;
&lt;br /&gt;
==Protect Battery==&lt;br /&gt;
&lt;br /&gt;
Make battery charge cycle grows slowly, we should change some value in sysfs.&lt;br /&gt;
&lt;br /&gt;
New file: /etc/sysfs.conf&lt;br /&gt;
&lt;br /&gt;
    # Make battery live longer&lt;br /&gt;
    devices/platform/smapi/BAT0/start_charge_thresh = 50&lt;br /&gt;
    devices/platform/smapi/BAT0/stop_charge_thresh = 90&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
    # Make battery live longer&lt;br /&gt;
    devices/platform/smapi/BAT0/start_charge_thresh = 10&lt;br /&gt;
    devices/platform/smapi/BAT0/stop_charge_thresh = 100&lt;br /&gt;
&lt;br /&gt;
(choose one you like, and I use the first one)&lt;br /&gt;
&lt;br /&gt;
New file: /etc/rc.d/sysfsutils&lt;br /&gt;
&lt;br /&gt;
    #! /bin/sh -e&lt;br /&gt;
    &lt;br /&gt;
    ### BEGIN INIT INFO&lt;br /&gt;
    # Provides:          sysfsconf&lt;br /&gt;
    # Required-Start:    mountkernfs&lt;br /&gt;
    # Should-Start:      udev module-init-tools loadcpufreq&lt;br /&gt;
    # Required-Stop:&lt;br /&gt;
    # Default-Start:     2 3 4 5&lt;br /&gt;
    # Default-Stop:&lt;br /&gt;
    # Short-Description: Set sysfs variables from /etc/sysfs.conf&lt;br /&gt;
    # Description:       Similarly to /etc/init.d/procps.sh, you can configure&lt;br /&gt;
    #                    values for sysfs variables (such as power management&lt;br /&gt;
    #                    defaults) and /sys file permissions in /etc/sysfs.conf.&lt;br /&gt;
    ### END INIT INFO&lt;br /&gt;
    &lt;br /&gt;
    # /etc/rc.d/sysfsutils:&lt;br /&gt;
    #&lt;br /&gt;
    # (c) 2005 Martin Pitt &amp;lt;mpitt@debian.org&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    CONFFILE=/etc/sysfs.conf&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    [ -r &amp;quot;$CONFFILE&amp;quot; ] || exit 0&lt;br /&gt;
    &lt;br /&gt;
    . /etc/rc.conf&lt;br /&gt;
    . /etc/rc.d/functions&lt;br /&gt;
    &lt;br /&gt;
    case &amp;quot;$1&amp;quot; in&lt;br /&gt;
        start)&lt;br /&gt;
        stat_busy &amp;quot;Setting sysfs variables...&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
       sed  's/#.*$//; /^[[:space:]]*$/d;&lt;br /&gt;
              s/^[[:space:]]*\([^=[:space:]]*\)[[:space:]]*\([^=[:space:]]*\)[[:space:]]*=[[:space:]]*\(.*\)/\1 \2 \3/' \&lt;br /&gt;
                  $CONFFILE | {&lt;br /&gt;
           while read f1 f2 f3; do&lt;br /&gt;
                    if [ &amp;quot;$f1&amp;quot; = &amp;quot;mode&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -n &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f2&amp;quot; ]; then&lt;br /&gt;
                            chmod &amp;quot;$f3&amp;quot; &amp;quot;/sys/$f2&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    elif [ &amp;quot;$f1&amp;quot; = &amp;quot;owner&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -n &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f2&amp;quot; ]; then&lt;br /&gt;
                            chown &amp;quot;$f3&amp;quot; &amp;quot;/sys/$f2&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    elif [ &amp;quot;$f1&amp;quot; -a -n &amp;quot;$f2&amp;quot; -a -z &amp;quot;$f3&amp;quot; ]; then&lt;br /&gt;
                        if [ -f &amp;quot;/sys/$f1&amp;quot; ]; then&lt;br /&gt;
                            # Some fields need a terminating newline, others&lt;br /&gt;
                            # need the terminating newline to be absent :-(&lt;br /&gt;
                             echo -n &amp;quot;$f2&amp;quot; &amp;gt; &amp;quot;/sys/$f1&amp;quot; 2&amp;gt;/dev/null ||&lt;br /&gt;
                             echo &amp;quot;$f2&amp;quot; &amp;gt; &amp;quot;/sys/$f1&amp;quot;&lt;br /&gt;
                        else&lt;br /&gt;
                            stat_fail&lt;br /&gt;
                        fi&lt;br /&gt;
                    else&lt;br /&gt;
                        stat_fail&lt;br /&gt;
                        exit 1&lt;br /&gt;
                    fi&lt;br /&gt;
           done&lt;br /&gt;
       }&lt;br /&gt;
    &lt;br /&gt;
       stat_done&lt;br /&gt;
       ;;&lt;br /&gt;
       stop)&lt;br /&gt;
       ;;&lt;br /&gt;
       *)&lt;br /&gt;
       echo &amp;quot;Usage: /etc/rc.d/sysfsutils {start|stop}&amp;quot;&lt;br /&gt;
       exit 1&lt;br /&gt;
       ;;&lt;br /&gt;
    esac&lt;br /&gt;
&lt;br /&gt;
{{HELP|I don't know how to use wikieditor, so the script displays wrongly.}}&lt;br /&gt;
&lt;br /&gt;
    #chmod +x /etc/rc.d/sysfsutils&lt;br /&gt;
&lt;br /&gt;
Add sysfsutils to DAEMON.&lt;br /&gt;
&lt;br /&gt;
==Profiles I am using==&lt;br /&gt;
&lt;br /&gt;
a: rc.conf&lt;br /&gt;
&lt;br /&gt;
    MODULES=(!snd_pcm_oss !snd_mixer_oss !snd_seq_oss !thinkpad_ec tp_smapi hdaps acpi-cpufreq)&lt;br /&gt;
    DAEMONS=(syslog-ng dbus acpid hdapsd tpfand networkmanager hddtemp alsa laptop-mode sysfsutils)&lt;br /&gt;
&lt;br /&gt;
b: tpfand.conf&lt;br /&gt;
&lt;br /&gt;
    enabled = True&lt;br /&gt;
    override_profile = True&lt;br /&gt;
    &lt;br /&gt;
    0. CPU = 0:0 45:3 60:6&lt;br /&gt;
    1. Mini PCI = 0:0 50:3&lt;br /&gt;
    2. Sensor 2 = 0:255&lt;br /&gt;
    3. GPU = 0:0 50:3&lt;br /&gt;
    4. Bat0 = 0:0 35:2&lt;br /&gt;
    5. Sensor 5 = 0:255&lt;br /&gt;
    6. Bat1 = 0:0 35:2&lt;br /&gt;
    7. Sensor 7 = 0:255&lt;br /&gt;
    8. MB? = 0:0 45:2 60:4&lt;br /&gt;
    9. MB? = 0:0 55:3&lt;br /&gt;
    10. Sensor 10 = 0:255&lt;br /&gt;
    11. Sensor 11 = 0:255&lt;br /&gt;
    12. Sensor 12 = 0:255&lt;br /&gt;
    13. Sensor 13 = 0:255&lt;br /&gt;
    14. Sensor 14 = 0:255&lt;br /&gt;
    15. Sensor 15 = 0:255&lt;br /&gt;
    &lt;br /&gt;
    hysteresis = 2&lt;br /&gt;
    interval_speed = 2&lt;br /&gt;
    interval_duration = 500.000000&lt;br /&gt;
    interval_delay = 5000.000000&lt;/div&gt;</summary>
		<author><name>Kilior</name></author>
		
	</entry>
</feed>