2010年8月19日 星期四

解決 Asus 筆電無法用 Fn 功能鍵關閉觸控板問題

2011.9.1更新:
下面的方法仍然可以解決觸控板熱鍵開關問題,不過偶然發現有高手寫了超完整的 UL30Vt 安裝 Ubuntu 指南(反正我還在使用 10.10 也沒啥急症問題,就懶得研讀測試了,但應該同樣都可以用在我的 UL80Vt 吧):

http://wiki.daviddarts.com/Ubuntu_Maverick_on_the_Asus_UL30VT

2011.4.6更新:

最近又發現觸控版熱鍵無效了,不知是不是哪次更新造成的問題。先找了網友用在Asus UL30Vt 的類似解決方案,果然也管用:

http://ubuntuforums.org/showpost.php?p=10190467&postcount=301

================= 下面內容已經過期無效囉 ===============

發現我手上這台Asus UL80Vt的Fn功能鍵好像無效。

一查之下,我的天啊,知名的Linux Laptop Wiki這樣描述:

Fn功能鍵完全沒有作用,換言之無法調整螢幕亮度、無法開啟Turbo33 (將CPU動態超頻到 1.7GHz)、無法關閉無線網路、無法關閉觸控板、無法使用外接螢幕等。結論是:This notebook might be considered as not suited for running Linux on it.(這台筆電可以視為並不適合安裝Linux。)

先照著這篇的作法:
http://www.webupd8.org/2010/05/enable-fn-keys-on-your-asus-eeepc-and.html
結果好幾個Fn鍵的功能恢復了

但是Fn-F9的觸控板開關依然不能用。打字時不能關觸控板非常麻煩,因為手腕很容易碰到而讓游標移動,一直造成輸入無效。

這裡( http://kezeodsnx.pixnet.net/blog/post/26598471  )說要修改 11-x11-synaptics.fdi 設定,但是我的系統裡面沒這個檔案 0.0

先照這裡的說法安裝gsynaptics看能不能控制觸控版好了。

「GSynaptics 無法初始化。 您必須在 xorg.conf 或 XF86Config 中設定 'SHMConfig' 'true' 以使用 GSynaptics」

結果套件管理程式說不如用 gpointing-device-settings 功能比較好。反正沒差,因為裝哪個都一樣沒作用。在偏好設定選單的指向裝置一直把觸控板辨識為「ImPS/2 Logitech Wheel Mouse」,啊我明明就不是用羅技的滾輪鼠當然控制不了。搞了很久終於找到方法,大致翻譯如下:

如果只想暫時關閉觸控板,在終端機輸入如下指令:
xinput set-int-prop "ImPS/2 Logitech Wheel Mouse" "Device Enabled" 8 0
這個指令則可以打開觸控板,兩者都是關機後就失效:
xinput set-int-prop "ImPS/2 Logitech Wheel Mouse" "Device Enabled" 8 1

如果想讓Fn-F9功能鍵能夠開啟/關閉觸控板,還要費一點工夫:


1. 按下 F9 不只會產生按鍵碼,也會有一個 ACPI 事件,但光靠按鍵碼是無法指派到一個命令稿的。所以我首先檢查產生的熱鍵碼,在終端機輸入:
sudo acpi_listen
接著按下 F9。可以看到傳回的熱鍵碼是 0000006b。
2. 在 /etc/acpi/events 有個 asus-touchpad 事件指令檔,裡面的按鍵碼寫錯,所以我把它改了。
3. 命令稿 /etc/acpi/assus-touchpad.sh 對這個觸控板而言並不正確,因此用附件這個修改版把它取代掉。
4.重新開機,以後就可以用Fn-F9來開關觸控板囉。


以下是 assus-touchpad.sh 的程式碼內容。別忘了要修改權限將所有者改為root,並設定為允許檔案作為程式執行:

#!/bin/sh
[ -f /usr/share/acpi-support/state-funcs ] || exit 0

. /usr/share/acpi-support/power-funcs

# if this is the right behavior, then this should be moved out of acpi-support
# to hal (or whatever is replacing hal for such events)
getXconsole

XINPUT="ImPS/2 Logitech Wheel Mouse"

# get the current state of the touchpad
tpstate=`xinput list-props "$XINPUT" | grep "Device Enabled" | cut -d: -f2`

# if getting the status failed, exit
test -z $tpstate && exit 1

if [ $tpstate -eq 0 ]; then
xinput set-int-prop "$XINPUT" "Device Enabled" 8 1
else
xinput set-int-prop "$XINPUT" "Device Enabled" 8 0
fi


0 意見: