﻿{"id":809,"date":"2012-04-25T23:50:55","date_gmt":"2012-04-25T15:50:55","guid":{"rendered":"http:\/\/nick.workao.org\/?p=809"},"modified":"2012-06-18T01:18:26","modified_gmt":"2012-06-17T17:18:26","slug":"thinkpad%e5%9c%a8-ubuntu-%e5%ae%89%e8%a3%85aps","status":"publish","type":"post","link":"http:\/\/nick.txtcc.com\/index.php\/linux\/809","title":{"rendered":"thinkpad\u5728 Ubuntu \u5b89\u88c5APS\u548c\u7535\u6e90\u7ba1\u7406"},"content":{"rendered":"<p>\u539f\u6587\uff1a <a href=\"http:\/\/www.thinkwiki.org\/wiki\/Installing_Ubuntu_11.10_(Oineric_Ocelot)_on_a_ThinkPad_T410\"><a href=\"http:\/\/www.thinkwiki.org\/wiki\/Installing_Ubuntu_11.10_(Oineric_Ocelot)_on_a_ThinkPad_T410\">http:\/\/www.thinkwiki.org\/wiki\/Installing_Ubuntu_11.10_(Oineric_Ocelot)_on_a_ThinkPad_T410<\/a><\/a> This article describes the installation of\u00a0<strong>Ubuntu 11.10<\/strong>\u00a0(64 bit) on a Thinkpad T410 type 2537-9UG (NVIDIA NVS 3100M).\u00a0<em>This guide assumes that NVIDIA Optimus is disabled in BIOS (Graphics set to &#8220;discrete&#8221;)!<\/em><\/p>\n<table id=\"toc\">\n<tbody>\n<tr>\n<td>\n<div id=\"toctitle\">\n<h2>Contents<\/h2>\n[<a id=\"togglelink\" href=\"http:\/\/www.thinkwiki.org\/wiki\/Installing_Ubuntu_11.10_(Oineric_Ocelot)_on_a_ThinkPad_T410#\">hide<\/a>]\n\n<\/div>\n<ul>\n    <li><a href=\"http:\/\/www.thinkwiki.org\/wiki\/Installing_Ubuntu_11.10_(Oineric_Ocelot)_on_a_ThinkPad_T410#Hardware_Support_Details\">1\u00a0Hardware Support Details<\/a>\n<ul>\n    <li><a href=\"http:\/\/www.thinkwiki.org\/wiki\/Installing_Ubuntu_11.10_(Oineric_Ocelot)_on_a_ThinkPad_T410#Works_out-of-the-box\">1.1\u00a0Works out-of-the-box<\/a><\/li>\n    <li><a href=\"http:\/\/www.thinkwiki.org\/wiki\/Installing_Ubuntu_11.10_(Oineric_Ocelot)_on_a_ThinkPad_T410#Works_with_additional_configuration\">1.2\u00a0Works with additional configuration<\/a><\/li>\n    <li><a href=\"http:\/\/www.thinkwiki.org\/wiki\/Installing_Ubuntu_11.10_(Oineric_Ocelot)_on_a_ThinkPad_T410#Untested\">1.3\u00a0Untested<\/a><\/li>\n    <li><a href=\"http:\/\/www.thinkwiki.org\/wiki\/Installing_Ubuntu_11.10_(Oineric_Ocelot)_on_a_ThinkPad_T410#Display_brightness_with_NVIDIA\">1.4\u00a0Display brightness with NVIDIA<\/a><\/li>\n    <li><a href=\"http:\/\/www.thinkwiki.org\/wiki\/Installing_Ubuntu_11.10_(Oineric_Ocelot)_on_a_ThinkPad_T410#HDAPS_.28Hard_Drive_Active_Protection_System.29\">1.5\u00a0HDAPS (Hard Drive Active Protection System)<\/a><\/li>\n    <li><a href=\"http:\/\/www.thinkwiki.org\/wiki\/Installing_Ubuntu_11.10_(Oineric_Ocelot)_on_a_ThinkPad_T410#Docking_station_.28tested_with_Lenovo_Mini_Dock_Series_3.29\">1.6\u00a0Docking station (tested with Lenovo Mini Dock Series 3)<\/a><\/li>\n    <li><a href=\"http:\/\/www.thinkwiki.org\/wiki\/Installing_Ubuntu_11.10_(Oineric_Ocelot)_on_a_ThinkPad_T410#Workarounds\">1.7\u00a0Workarounds<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Hardware Support Details<\/h2>\n<h3>Works out-of-the-box<\/h3>\n<ul>\n    <li>Ethernet<\/li>\n    <li>Audio<\/li>\n    <li>DVD burner<\/li>\n    <li>Card reader<\/li>\n    <li>Webcam<\/li>\n    <li>WLAN<\/li>\n    <li>Bluetooth<\/li>\n    <li>DisplayPort (tested with HDMI-TV)<\/li>\n<\/ul>\n<h3>Works with additional configuration<\/h3>\n<ul>\n    <li>Display brightness with NVIDIA<\/li>\n    <li>HDAPS<\/li>\n    <li>Docking station\u00a0<em>(Details soon)<\/em><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>Untested<\/h3>\n<ul>\n    <li>FireWire<\/li>\n    <li>Fingerprint<\/li>\n    <li>NVIDIA Optimus<\/li>\n<\/ul>\n<p>The remaining devices are currently not tested.<\/p>\n<h3>Display brightness with NVIDIA<\/h3>\n<p>Use the following parameter in the &#8220;Device&#8221;-section of\u00a0<strong>\/etc\/X11\/xorg.conf<\/strong>:<\/p>\n<pre>Option \"RegistryDwords\" \"EnableBrightnessControl=1\"<\/pre>\n<h3>HDAPS (Hard Drive Active Protection System)<\/h3>\n<p>You need the ThinkPad SMAPI and the hdaps-daemon, install them by following command:<\/p>\n<pre>sudo apt-get install tp-smapi-dkms hdapsd<\/pre>\n<p>Edit\u00a0<strong>\/etc\/default\/hdapsd<\/strong>\u00a0with root privileges:<\/p>\n<pre>START=yes         # hdaps should be started automatically\nDISK=sda          # normally sda should fit\nSENSITIVITY=15    # higher values mean lesser sensitivity\nFORCEENABLE=\"no\"  # force hdaps, not needed\nOPTIONS=\"\"        # additional options, not needed<\/pre>\n<p>Restart the daemon:<\/p>\n<pre>sudo \/etc\/init.d\/hdapsd restart<\/pre>\n<p>Testing (stop daemon and start in foreground):<\/p>\n<pre>sudo \/etc\/init.d\/hdapsd stop<\/pre>\n<pre>sudo hdapsd -d sda -s 15<\/pre>\n<p>If you shake your T410 gently the output should look like:<\/p>\n<pre>sven@T410:~$ sudo hdapsd -d sda -s 15\nTue Nov 15 13:25:25 2011: Starting hdapsd\nTue Nov 15 13:25:25 2011: Selected interface: HDAPS\nTue Nov 15 13:25:25 2011: Selected HDAPS input device: \/dev\/input\/event9\nTue Nov 15 13:25:28 2011: parking\nTue Nov 15 13:25:29 2011: un-parking<\/pre>\n<p>If test was succesful start daemon again:<\/p>\n<pre>sudo \/etc\/init.d\/hdapsd start<\/pre>\n<h3>Docking station (tested with Lenovo Mini Dock Series 3)<\/h3>\n<ul>\n    <li>Per hardware design the DisplayPort and DVI connector of the Mini Dock Series 3 are only usable with NVIDIA NVS 3100M<\/li>\n    <li>If you want your boot screen on an external display in T410 BIOS set Graphics to &#8220;discrete&#8221; and boot screen to what you desire<\/li>\n    <li>My T410 always showed the login screen on the internal LCD, for a workaround see &#8220;Workarounds&#8221; section<\/li>\n    <li>To avoid conflicts with Unity I suggest using two different xorg.conf (see &#8220;Workarounds&#8221; section)<\/li>\n<\/ul>\n<h3>Workarounds<\/h3>\n<p>For setting various boot-time options I use Ubuntu&#8217;s\u00a0<strong>\/etc\/rc.local<\/strong>\u00a0file (paste them\u00a0<strong>before<\/strong>\u00a0&#8220;exit 0&#8221; line!):<\/p>\n<pre># T410 Workarounds\n\n# choose xorg.conf\nDOCKED=\"`lsusb | grep \"Lenovo ThinkPad Mini Dock Plus Series 3\" | wc -l`\"\nif [ $DOCKED -eq \"1\" ]\n        then\n                cp \/etc\/X11\/xorg.conf-docking \/etc\/X11\/xorg.conf\n        else\n                cp \/etc\/X11\/xorg.conf-nodocking \/etc\/X11\/xorg.conf\nfi\n\n# enable\/disable bluetooth at startup\necho 0 > \/sys\/devices\/platform\/thinkpad_acpi\/bluetooth_enable\n\n# enable\/disable wwan at startup\necho 0 > \/sys\/devices\/platform\/thinkpad_acpi\/wwan_enable<\/pre>\n<p>The above file allows you to specify a xorg.conf for docked-state of your T410 and for undocked state. If you have trouble creating them use the &#8220;NVIDIA X Server Settings Tool&#8221; shipped with the NVIDIA driver. You can disable or enable bluetooth and wwan by echoing 0\/1 to the interfaces. <strong>Technical explanation:<\/strong><\/p>\n<ul>\n    <li>For unknown reasons in 11.10 neither\u00a0<em>\/sys\/devices\/platform\/dock.0\/<\/em>\u00a0nor\u00a0<em>\/sys\/devices\/platform\/dock.1\/<\/em>\u00a0refers to the attached &#8220;Lenovo Mini Dock Series 3&#8221;, so I had to use the lsusb-approach to check for presence of the docking station. Worked fine for me.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>\u7535\u6e90\u90e8\u5206\uff1a<\/p>\n<p>Thinkpad\u7684\u7535\u6e90\u4fdd\u62a4\u548c\u786c\u76d8\u4fdd\u62a4\u529f\u80fd\u76f8\u5f53\u4e0d\u9519\uff0c\u80fd\u4fdd\u8bc1\u7535\u8111\u5546\u52a1\u5e94\u7528\u7684\u7a33\u5b9a\u6027\uff0cUbuntu\u4e0b\u540c\u6837\u53ef\u4ee5\u5b89\u88c5\u8fd9\u4e2a\u529f\u80fd\uff0c\u53ea\u4e0d\u8fc7\u6bd4Windows\u4e0b\u7684\u50bb\u74dc\u5b89\u88c5\u65b9\u5f0f\u8981\u7e41\u7410\u4e00\u4e9b\uff0c\u4f46\u4f9d\u7136\u76f8\u5f53\u50bb\u74dc<\/p>\n<p>\u6309\u987a\u5e8f\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4<\/p>\n<p>$ sudo aptitude install tp-smapi-source<\/p>\n<p>$ sudo module-assistant get tp-smapi-source<\/p>\n<p>$ sudo module-assistant build tp-smapi-source<\/p>\n<p>$ sudo module-assistant install tp-smapi-source<\/p>\n<p>\u7f16\u8f91\u6587\u4ef6\uff1a<\/p>\n<p>sudo gedit \/etc\/modules<\/p>\n<p>\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<p>thinkpad_ec<\/p>\n<p>tp_smapi<\/p>\n<p>hdaps<\/p>\n<p>\u5728\/etc\/rc.local\u4e0b\u5185\u5bb9\uff1a<\/p>\n<h1>Make battery live longer<\/h1>\n<p>echo 40 > \/sys\/devices\/platform\/smapi\/BAT0\/start_charge_thresh<\/p>\n<p>echo 99 > \/sys\/devices\/platform\/smapi\/BAT0\/stop_charge_thresh<\/p>\n<p>\u5982\u679c\u4ee5\u4e0a\u4e24\u6761\u6307\u4ee4\u51fa\u73b0\u9519\u8bef\u8bf7\u5c1d\u8bd5\u4f7f\u7528root\u8eab\u4efd\u6267\u884c,\u5982\u679c\u8fd8\u662f\u4e0d\u884c,\u8bf7\u624b\u52a8\u5b89\u88c5\u00a0sysfsutils,\u7136\u540e\u4fee\u6539\u00a0\/etc\/sysfs.conf \u91cc\u9762\u7684\u914d\u7f6e.<\/p>\n<p>\u641e\u5b9a!<\/p>\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\uff1a <a href=\"http:\/\/www.thinkwiki.org\/wiki\/Installing_Ubuntu_11.10_(Oineric_Ocelot)_on_a_ThinkPad_T410\">http:\/\/www.thinkwiki.org\/wiki\/Installing_Ubuntu_11.10_(Oineric_Ocelot)_on_a_ThinkPad_T410<\/a> This a&#46;&#46;&#46;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-809","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/809","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/comments?post=809"}],"version-history":[{"count":4,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/809\/revisions"}],"predecessor-version":[{"id":811,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/809\/revisions\/811"}],"wp:attachment":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/media?parent=809"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/categories?post=809"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/tags?post=809"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}