ThinkPad SL400驱动
来源:互联网 发布:linux gedit怎么用 编辑:程序博客网 时间:2024/05/10 21:12
其实我蛮喜欢FreeBSD的,但是站在不折腾的角度还是用容易上手的系统比较节省时间
从买来本子格掉了原装系统,算是折腾了一次吧
到现在一直没再折腾过
“我在我的SL 400本本上安装试用了一下,所有的快捷键都可以正常使用了,蓝牙适配器也能用了,不过遗憾的是HDAPS仍然不被支持。
注意:这个驱动目前还是实验状态,可能有潜在的问题,使用者风险自负。
原始的文档:http://gianlucamagalotti.wordpress.com/2009/02/16/lenovo-thinkpad-sl-series-hotkeys/,我针对ubuntu进行了一些细微的修改。
1、下载源程序。
到http://github.com/tetromino/lenovo-sl-laptop/tree/master去下载Makefile 和lenovo-sl-laptop.c两个文件。可以下载tar包或zip包,下载完毕后解压缩,只需要其中的Makefile和 lenovo-sl-laptop.c 两个文件
2、编译、安装源程序。
打开终端,进入文件下载到的目录,用下面的命令进行编译(请不要用root用户编译,即不要用sudo)
代码:make all
再将编译好的驱动模块复制到驱动目录
代码:sudo cp lenovo-sl-laptop.ko /lib/modules/`uname -r`/kernel/drivers/misc
并重建模块间的依赖关系
代码:sudo depmod
3、禁用原来的thinkpad-acpi模块。
编辑/etc/modprobe.d/blacklist文件,
代码:sudo gedit /etc/modprobe.d/blacklist
在末尾加入下面这行内容
代码:blacklist thinkpad-acpi
保存,关闭。
4、设置模块自动加载(重启后生效)
在/etc/modules中加入一行lenovo-sl-laptop,或者用下面的命令:
代码:sudo sed -i '$alenovo-sl-laptop' /etc/modules
5、允许驱动管理屏幕背光
创建/etc/modprobe.d/lenovo-sl-laptop.conf
代码:sudo gedit /etc/modprobe.d/lenovo-sl-laptop.conf
加入一行
代码:options lenovo-sl-laptop control_backlight=1
6、手动加载模块
代码:sudo modprobe lenovo-sl-laptop
现在应该能用除Fn+F8(禁用/启用触摸板)以外所有的快捷键了,如果你遇到了关于背光控制的问题,请仿照第3步禁用video模块,并将 /etc/init.d/hotkey-setup文件中的echo 0 > /sys/module/video/parameters/brightness_switch_enabled一行删掉(如果有的话),并重新启动。
对于Fn+F8,按照以下步骤:
1、创建/etc/hal/fdi/policy/shmconfig.fdi
代码:sudo gedit /etc/hal/fdi/policy/shmconfig.fdi
2、加入下列内容,保存,关闭。
代码:<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
<device>
<match key="input.x11_driver" string="synaptics">
<merge key="input.x11_options.SHMConfig" type="string">True</merge>
</match>
</device>
</deviceinfo>
3、安装notify-send(这步我没有做,一样可以用)
代码:sudo apt-get install libnotify-bin
4、创建一个脚本来处理按下Fn+F8的事件
代码:sudo mkdir /usr/share/hotkey-setup/gconf-commands
sudo gedit /usr/share/hotkey-setup/gconf-commands/synaptic-touchpad-toggle
加入以下内容
代码:#!/bin/bash
STATE=`synclient -l | grep TouchpadOff | cut -f2 -d'=' | cut -c2`
PARAMS="-t 1500 -i /usr/share/pixmaps/gnome-user-interface.png"
if [ $STATE -eq 0 ] ; then
synclient TouchpadOff=1
notify-send $PARAMS "Touchpad <i>DISABLED</i>" "Touchpad has been <b><i>DISABLED</i></b>"
else
synclient TouchpadOff=0
notify-send $PARAMS "Touchpad <i>ENABLED</i>" "Touchpad has been <b><i>ENABLED</i></b>"
fi
保存,关闭
给脚本加上可执行权限
代码:sudo chmod uga+x /usr/share/hotkey-setup/gconf-commands/synaptic-touchpad-toggle
让GNOME在按下Fn+F8时执行脚本(注意,这会覆盖原来的command_1的值,可以在配置编辑器或者Ubuntu-Tweak里看到,你可以换成command_2~command_12)
代码:gconftool-2 -s --type string /apps/metacity/keybinding_commands/command_1 /usr/share/hotkey-setup/gconf-commands/synaptic-touchpad-toggle
gconftool-2 -s --type string /apps/metacity/global_keybindings/run_command_1 XF86Launch1
到此Fn+F8就可以用了
”
我这次顺利搞定前面几步,到了背光控制那里就不知道出来的提示信息是什么意思了,好像是说那个文件很重要,以后不会允许我们动了。反正最后Fn+Home和Fn+End那两个键仍然没能实现,就不管了。后面的F8键用的少,也不去折腾了。
- ThinkPad SL400驱动
- 完美安装 Thinkpad sl400 7dc ubuntu8.04 视频驱动
- 关于ThinkPad SL400系列笔记本换XP驱动的问题
- Lenovo ThinkPad SL400 XP系统中安装SATA驱动方法
- ThinkPad SL400 改装Win2003方法以及驱动下载列表
- ThinkPad SL400使用手札
- Thinkpad SL400 功能键介绍
- ThinkPad SL400 使用经验小记
- Thinkpad SL400安装xp系统
- paml speed test : thinkpad sl400
- ThinkPad SL400 改装Win2003方法以及驱动下载列表(适用于SL500)
- 联想Thinkpad sl400 7HC入手感觉
- ThinkPad SL400无线网卡的问题
- thinkpad sl400 2743cd1 gentoo driver
- kernel 2.6.34 配置文件 (thinkpad sl400)
- Installation instructions for the ThinkPad SL400
- install mac lion on thinkpad sl400
- THINKPAD SL400 重装XP系统的经历
- 百科:产品生命周期理论
- seo优化技术集合
- 简历
- pintf的用法(总结)
- 好久没有更新博客了……
- ThinkPad SL400驱动
- 七个受用一生的心理寓言
- rsync增量备份
- 其它实验说明
- 匹配img标签及img 的src的正则表达式
- iphone开发常用代码
- RussianIME 全程解析1
- 内部类 概念
- Crontab定时执行工具