centos 6 linux下禁用触摸板(通过命令行实现)

禁用触摸板

synclient TouchpadOff=1

启用触摸板

synclient TouchpadOff=0

synclient 可以设置很多参数,查看如下

[feng@fsc ~]$ synclient -l
Parameter settings:
LeftEdge                = 1781
RightEdge               = 5579
TopEdge                 = 1646
BottomEdge              = 4582
FingerLow               = 24
FingerHigh              = 29
FingerPress             = 255
MaxTapTime              = 180
MaxTapMove              = 245
MaxDoubleTapTime        = 180
SingleTapTimeout        = 180
ClickTime               = 100
FastTaps                = 0
EmulateMidButtonTime    = 75
EmulateTwoFingerMinZ    = 280
EmulateTwoFingerMinW    = 6
VertScrollDelta         = 111
HorizScrollDelta        = 111
VertEdgeScroll          = 0
HorizEdgeScroll         = 0
CornerCoasting          = 0
VertTwoFingerScroll     = 1
HorizTwoFingerScroll    = 1
MinSpeed                = 0.4
MaxSpeed                = 0.7
AccelFactor             = 0.00896057
TrackstickSpeed         = 40
EdgeMotionMinZ          = 29
EdgeMotionMaxZ          = 159
EdgeMotionMinSpeed      = 1
EdgeMotionMaxSpeed      = 446
EdgeMotionUseAlways     = 0
UpDownScrolling         = 1
LeftRightScrolling      = 1
UpDownScrollRepeat      = 1
LeftRightScrollRepeat   = 1
ScrollButtonRepeat      = 100
TouchpadOff             = 0
GuestMouseOff           = 0
LockedDrags             = 0
LockedDragTimeout       = 5000
RTCornerButton          = 0
RBCornerButton          = 0
LTCornerButton          = 0
LBCornerButton          = 0
TapButton1              = 1
TapButton2              = 3
TapButton3              = 2
ClickFinger1            = 1
ClickFinger2            = 1
ClickFinger3            = 1
CircularScrolling       = 0
CircScrollDelta         = 0.1
CircScrollTrigger       = 0
CircularPad             = 0
PalmDetect              = 0
PalmMinWidth            = 9
PalmMinZ                = 199
CoastingSpeed           = 0
PressureMotionMinZ      = 29
PressureMotionMaxZ      = 159
PressureMotionMinFactor = 1
PressureMotionMaxFactor = 1
GrabEventDevice         = 1
TapAndDragGesture       = 1
AreaLeftEdge            = 0
AreaRightEdge           = 0
AreaTopEdge             = 0
AreaBottomEdge          = 0

方法参考于 http://forum.ubuntu.org.cn/viewtopic.php?t=240353

thinkpad t420s在centos/linux上启用指点杆中键竖直水平滚动功能

在thinkpad t420s上使用centos 6, centos 6 在驱动支持方面已经比较完善,基本不需要另外安装驱动即可。不过指点杆小红帽没有中键功能没有打开,这点还是不方便的(虽然触摸板双指滚动是可以通过gui设置界面启用的)。

从thinkwiki里看到开启方式http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint

按其中 Configuration using xinput一节,使用root账号执行命令

xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 8 1
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 8 2
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 8 200

其中第三条命令执行有错误,但没有影响正常使用。再执行以下命令

xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Axes" 8 6 7 4 5
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Middle Button Emulation" 8 1
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Middle Button Timeout" 8 50

执行完毕,不需要重启,连X都不用重启就可以使用中键滚动功能了。

至于原因,并不很清楚,这些都是linux 的外围功能,个人感觉没必要深入研究。

上该方法应该可以用在fedora,redhat等发行版上,不过没有测试。

还有一点很重要的是,使用这几行命令启用中键滚屏功能,注销登录后就失效。可以把这它们写成shell脚本,设置为gnome登录后自动启动。经测试,只需写入下面三行命令即可以。

#!/bin/bash
# for thinkpad trackpoint, middle key scroll screen
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 8 2
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 8 1
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Axes" 8 6 7 4 5

------------------

执行命令输出,仅供参考:

[root@fsc feng]# xinput list-props "TPPS/2 IBM TrackPoint"
Device 'TPPS/2 IBM TrackPoint':
Device Enabled (112):    1
Device Accel Profile (233):    0
Device Accel Constant Deceleration (234):    1.000000
Device Accel Adaptive Deceleration (236):    1.000000
Device Accel Velocity Scaling (237):    10.000000
Evdev Reopen Attempts (230):    10
Evdev Axis Inversion (238):    0, 0
Evdev Axes Swap (240):    0
Axis Labels (241):    "Rel X" (120), "Rel Y" (121)
Button Labels (242):    "Button Left" (113), "Button Middle" (114), "Button Right" (115), "Button Wheel Up" (116), "Button Wheel Down" (117)
Evdev Middle Button Emulation (243):    2
Evdev Middle Button Timeout (244):    50
Evdev Wheel Emulation (245):    0
Evdev Wheel Emulation Axes (246):    0, 0, 4, 5
Evdev Wheel Emulation Inertia (247):    10
Evdev Wheel Emulation Timeout (248):    200
Evdev Wheel Emulation Button (249):    4
Evdev Drag Lock Buttons (250):    0
[root@fsc feng]# xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 8 1
[root@fsc feng]# xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 8 2
[root@fsc feng]# xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 8 200
X Error of failed request:  BadMatch (invalid parameter attributes)
Major opcode of failed request:  140 (XInputExtension)
Minor opcode of failed request:  57 ()
Serial number of failed request:  18
Current serial number in output stream:  19
[root@fsc feng]# xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 8 200^C
[root@fsc feng]# xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 8 200
X Error of failed request:  BadMatch (invalid parameter attributes)
Major opcode of failed request:  140 (XInputExtension)
Minor opcode of failed request:  57 ()
Serial number of failed request:  18
Current serial number in output stream:  19
[root@fsc feng]# xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Axes" 8 6 7 4 5
[root@fsc feng]# xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Middle Button Emulation" 8 1
[root@fsc feng]# xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Middle Button Timeout" 8 50
X Error of failed request:  BadMatch (invalid parameter attributes)
Major opcode of failed request:  140 (XInputExtension)
Minor opcode of failed request:  57 ()
Serial number of failed request:  18
Current serial number in output stream:  19

 

thinkpad t420s安装无线网卡驱动手记

核心内容:

安装无线网卡驱动(新版本的linux内核里驱动一般是比较全的),并安装 linux-firmware,这个包好像不能从内核源码里安装。

-----------------------------

折腾了一周,就在刚刚5分钟前,终于成功的把无线网卡的驱动装好!

问题是这样的:

两个月前下血本买了台港版thinkpad t420s,安装了fedora 15,硬件支持倒算是比较完善,毕竟fedora是号称“自由. 友爱. 杰出. 前卫”的一个linux发行版。用了一段时间,gnome 3很炫,反应稍微有点迟钝,系统不是很稳定,死过几次,桌面完全停止响应,连ctrl+alt+fn都没反应,除了鼠标还可以在画面上正常移动。 于是准备换个发行版,考虑到一直学习redhat系列,时值centos 6正式发布,于是换用;期间也在考虑了debian。

centos6 的软件确实比较老旧,内核2.6.32,这个内核对OEM版ati显卡的旧笔记本的支持相当不好,花屏,连纯字符下都花屏。感觉升级内核有可能解决问题,但不想自己编译内核,怕白白浪费时间,直接使用fedora14的最新update内核,到国内的镜像站点上下载rpm包,安装,主要kernel-***的几个包,如kernel-2.6.35.13-92.fc14.i686.rpm, kernel-devel-2.6.35.13-92.fc14.i686.rpm等,安装后,重启机器,开机过程是的画面已经上正常分辨率了,开机后有线网卡正常工作,但无线网卡不行,ifconfig显示没有wlan0,那肯定还是驱动的问题了,于是换用fedora15的内核升级,还不行,横下心自己编译内核,照样不行。

另外一个分区里安装了debian6.0.2,情况与初始安装的centos6几乎完全一样,使用自己编译的内核,也一样。

于是查看dmesg的信息,里面有一行

rtlwifi: wireless switch is off

以为有问题,对照另一个分区的fedora15x64,好像也有这样的一行,大概问题不是出在这里。昨天夜里到几个论坛发帖子提问,oschina,csdn,chinaunix. 今天收到oschina里的一条回复,说是rtl8192网卡,驱动问题,要安装驱动。csdn里一天没人回;chinaunix最狠,发问的帖子都被獾狸猿删除了,感觉不可理解,或许是问题太低级了。

晚上回来继续研究,仔细看dmesg消息;强制移除rtl8192ce模块,再载入;Google;.....

突然看到一条消息

[   64.794644] rtl8192ce:rtl92c_download_fw():<0-0> Failed to request firmware!

Failed to request firmware,想起linux内核编译make help里有个make firmware_install的,于是安装,只是安装信息显示只有那么几行,好像没有安装多少东西,重启,结果是没有什么用。

联想到安装fedora内核时,有个firemware的软件包,似乎升级安装过,是否是它的问题,查看

[root@fsc rpm]# rpm -q linux-firmware
linux-firmware-20100806-4.fc14.noarch

应该是安装fedora14内核时下载安装了,但fedora15下的该包没有装,于是到中科大镜像上下载linux-firmware-20110601-1.fc15.noarch(以前都用163的源,前几天搞debian时,才发现没想到中科大的镜像电信访问速度也非常快,打开目录比163快N倍!)升级安装。点了一下面板上的网络图标,自然还是没有无线,明知没用还是随手点了一下。是否需要重启机器才能生效呢? 先不重启,重新加载模块试试。

[root@fsc rpm]# rmmod rtl8192ce
[root@fsc rpm]# modprobe rtl8192ce

满心激动的去点面板网络图标,不知道结果会怎么样。

结果是振奋人心的,无线网络出来了,看到了好几个接入点!抓张图留做记念

 

一个很不错的关于ThinkPad安装Linux的网站

http://www.thinkwiki.org/wiki/Installation

This is ThinkWiki, the Wiki Web for IBM/Lenovo ThinkPad users. Here you find anything you need to install your favourite Linux distribution on your ThinkPad. Windows users shouldn't run away, there's a lot of useful information for them as well.

8,738 users have registered since Sep. 2004 and created 1,254 articles (49,508 page edits).

Please support us and help to extend this wiki. Thank you!

 

http://www.thinkwiki.org/wiki/Installation

Here you will find specific information on how to install different operating systems on your ThinkPad.