您的位置:首页 > 理论基础 > 计算机网络

Thinkpad在Linux下指点杆和无线网络的配置和故障解决方法

2010-01-26 00:43 676 查看
型号是Thinkpad R60i,系统为Fedora Linux 11,内核版本号:2.6.30.10

一、trackpoint 指点杆的调整

1、灵敏度的调整:

前文:指点杆(小红帽)是我最喜欢小黑的地方,我用着也很顺手,所以就不要鼠标啦。但是在Linux下,指点杆的灵敏度很差,把鼠标灵敏度调到最高还是不灵活,天天按的我手疼。

第一步:google查询下,使用了Configure Trackpoint这款软件(yum下可以搜索到),把敏感度和加速度一调高,果然很方便了。



不过另外一个问题又来了,重启后这个灵敏度又恢复到老样子了,只能再进去设置,太麻烦了。

第二步:也是靠的google,把如下两行代码写入/etc/rc.local就搞定了。 255是灵敏度,180是加速度。范围都是0~255



echo -n 255 > /sys/devices/platform/i8042/serio1/sensitivity
echo -n 180 > /sys/devices/platform/i8042/serio1/speed


2、指点杆中键的调整:

前文:trackpoint的中键在linux下默认为粘贴选中的内容,可是我更希望它作为滚动按键来使用。

第一步:在yum源里找到了gpointing这款软件,安装之后发现设置不起作用,失败。

第二步:在thinkwiki上查到方法,配置,编辑或者新建:/etc/hal/fdi/policy/mouse-wheel.fdi,加入如下内容

<match key="info.product" string="TPPS/2 IBM TrackPoint">

<merge key="input.x11_options.EmulateWheel" type="string">true</merge>
<merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
<merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
<merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
<merge key="input.x11_options.EmulateWheelTimeout" type="string">200</merge>
</match>


重启haldaemon和xorg服务即可生效,但是我的机器上却没有生效,重启也不行,后来进到root账户却可以使用滚动了,很奇怪。

第三步:编辑/etc/X11/xorg.conf,我发现自己没有xorg的配置文件,于是使用如下命令新建一个默认的(注意空格):



Xorg -configure :1

即可建立成功,我的机器内容如下:

Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
ModulePath "/usr/lib/xorg/modules"
FontPath "catalogue:/etc/X11/fontpath.d"
FontPath "built-ins"
EndSection

Section "Module"
Load "extmod"
Load "record"
Load "glx"
Load "dri"
Load "dri2"
Load "dbe"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection

Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option "NoAccel" # [<bool>]
#Option "SWcursor" # [<bool>]
#Option "ColorKey" # <i>
#Option "CacheLines" # <i>
#Option "Dac6Bit" # [<bool>]
#Option "DRI" # [<bool>]
#Option "NoDDC" # [<bool>]
#Option "ShowCache" # [<bool>]
#Option "XvMCSurfaces" # <i>
#Option "PageFlip" # [<bool>]
Identifier "Card0"
Driver "intel"
VendorName "Intel Corporation"
BoardName "Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller"
BusID "PCI:0:2:0"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection



然后找到Section "InputDevice" 的mouse那一个段落,修改如下


Section "InputDevice"
Identifier "Mouse0"
Driver "evdev"
Option "Device" "/dev/input/by-path/platform-i8042-serio-1-event-mouse"
Option "GrabDevice" "False"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "2"
Option "XAxisMapping" "6 7"
Option "YAxisMapping" "4 5"
EndSection


利用evdev驱动代替mouse驱动,同时开启x,y轴的滚动功能。重启xorg服务,搞定。

第四步:这个时候我发现再回到第一步调整gpointing居然可以生效了,看来是我的xorg.conf文件没有建立导致软件失效的。

二、无线网卡的调整

前文:为了让我家的环境更整洁,我买了个无线的路由器作为AP,型号是TL-WR340G(TP-LINK:ThinkPad LINK ^^).我的机器是用的Atheros AR5212芯片的 802.11abg。在windows下效果非常好,整个从一层到三层阁楼信号都是在50%以上,网关延迟也1ms左右,下载速度也能达到ADSL的上限。但是我用linux的时候发现,信号偏弱,如果中间穿墙了,就在30%-50%之间。而且致命问题就是延迟超高,路由摆在面前测试都有100-200ms的延迟,如果穿墙了,就成千上万,根本没办法使用。看来是驱动问题,于是想办法搞定。

第一步:lsmod命令查询一看,模块驱动是ath5k。也可以右击无线链接的标识,选择链接信息,在驱动程序的信息中可以发现驱动名字。

第二步:搜索网络和yum源,发现madwifi这个驱动。

第三步:下载madwifi安装。在yum安装的时候提示依赖出错,没办法,只好去atrpms上去找。需要的是这三个包:

[root@dave dave]# rpm -qa| grep madwifi
madwifi-0.9.4.1-44_r4073.fc11.i586
madwifi-kmdl-2.6.30.10-105.fc11-0.9.4.1-44_r4073.fc11.i586
madwifi-hal-kmdl-2.6.30.10-105.fc11-0.9.4.1-44_r4073.fc11.i586


当然随着系统不同版本可能不同了。

然后安装之,重启后发现ath5k驱动仍然挂载,madwifi不生效。

第四步:禁用ath5k驱动,去编辑/etc/modprobe.d/blacklist.conf,加入如下文字

blacklist ath5k

重启,发现驱动加载为ath_pci也就是madwifi的驱动,链接网络,正常。



不过发现信号比ath5k还要弱上一点,但是延迟问题解决了。网速也很正常,而信号强度和windows相比还是有差距。linuxer还需努力阿。

后文:后来查资料发现ath5k是madwifi的替代者,但是在我的机器上还是不够稳定,希望新的版本能解决这个问题。

最后给广大Linux下的黑友们大力推荐thinkwiki: http://www.thinkwiki.org
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: