|
////////////////////////////////////////////////////
:: wacom intuos 2 for linux 安装教程 ::
////////////////////////////////////////////////////
--------------------------------------
硬件: intuos 2 ,普通PC
操作系统: redhat 9.0
-------------------------------------
#1,下载wacom for linux驱动程序
http://prdownloads.sourceforge.net/linuxwacom/linuxwacom-0.4.1.tar.gz
------------------------------------------------------------
#2,在shell下查看模块载入情况
[jej@ayukawa jej]$ su -
[root@ayukawa root]# lsmod | grep wacom
wacom 8020 0 (unused)
input 5920 0 [evdev wacomn mousedev keybdev hid]
usbcore 77024 1 [wacom usb-storage snd printer hid usb-uhci]
---------------------------------------------------------------------------
#3,移除老模块
[root@ayukawa root]# rmmod wacom evdev
----------------------------------------------------------------------------
#4,检查老模块移除否
[root@ayukawa root]# cd /dev/input
[root@ayukawa input]# ls -la mouse0 event0
crw------- 1 root root 13, 64 Aug 30 16:31 event0
crw------- 1 root root 13, 32 Aug 30 16:31 mouse0
[root@ayukawa input]# xxd mouse0
xxd: mouse0: No such device
[root@ayukawa input]# xxd event0
xxd: event0: No such device
--------------------------------------------------------------------------------
#5,解压以前下载的驱动
[jej@ayukawa jej]$ gunzip linuxwacom-0.4.1.tar.gz
[jej@ayukawa jej]$ tar -xf linuxwacom-0.4.1.tar
---------------------------------------------------------------------------------
#6,查看驱动程序文件是否齐全
[jej@ayukawa jej]$ cd linuxwacom-0.4.1
以下为驱动程序文件列表及介绍:
文件 介绍
configure - configure script for distribution independent builds
prebuilt/wacom_drv.o - binary XFree86 driver for the wacom (26-j0.4.0)
src/wacom.c - a stable, working kernel driver (1.30-j0.4.0)
src/wacdump.c - a simple program for displaying tablet event data directly using ncurses; current version is 0.4.0
src/xidump.c - a diagnostic program for displaying XInput event data; current version is 0.4.0
src/wacscrn.c - curses library for wacdump
src/wactablet.c - wacom tablet library for wacdump
src/wacusb.c - wacom USB protocol library for wacdump
src/wacserial.c - wacom serial protocol library for wacdump
src/wactablet.h - wacom tablet library for wacdump
src/wacusb.h - wacom USB protocol library for wacdump
src/wacserial.h - wacom serial protocol library for wacdump
src/usbmouse.c - replacement kernel driver (2.4.19/20), use only if needed
src/hid-core.c - replacement kernel driver (2.4.19/20), use only if needed
src/hiddev.c - replacement kernel driver (2.4.19/20), use only if needed
src/hid-input.c - replacement kernel driver (2.4.19/20), use only if needed
src/xf86Wacom.c - source for wacom_drv.o; requires XF86 build environment to compile. Binary available in prebuilt directory.
GPL - the GNU General Public License, in case you did not already have twenty or more lying around
------------------------------------------------------------------------------------------------------------------
#7,运行configure程序,自动完成wacom驱动程序编译及链接
[jej@ayukawa linuxwacom]$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
...
checking for processor type... i686
checking for kernel module versioning... yes
checking for kernel sources... /usr/src/linux-2.4
checking for XLib include directory... found
checking for XLib header files... found
...
checking for ncurses.h... yes
...
----------------------------------------
BUILD ENVIRONMENT:
architecture - i686
linux kernel - yes
module versioning - yes
kernel source - yes
XFree86 - no
XLib - yes
ncurses - yes
BUILD OPTIONS:
wacom.o - yes
wacdump - yes
xidump - yes
hid.o - no
usbmouse.o - no
wacom_drv.o - no
查看编译结果可以发现,XFree86环境没有正确建立,从而使wacom_drv.o不能正确链接.
-------------------------------------------------------------------------------
#8,解决方法.
从redhat9.0原程序包中复制XFree86-4.3.0-2.src.rpm到系统中
解压
[root@sen src]# rpm -ivh XFree86-4.3.0-72.src.rpm
1:XFree86 ########################################### [100%]
重建源
[root@sen root]# cd /usr/src/redhat
[root@sen redhat]# rpmbuild -bc SPECS/XFree86.spec
重建目标文件
[root@sen redhat]# cd BUILD/XFree86-4.3.0/xc/programs/Xserver/hw/xfree86/input/wacom
[root@sen wacom]# ls
Imakefile wacom.man xf86Wacom.c.Wacom-USB-driver-a25-update
Makefile xf86Wacom.c
[root@sen wacom]# make
rm -f xf86Wacom.o
gcc -O2 -march=i386 ... -c xf86Wacom.c
rm -f wacom_drv.o
ld -r xf86Wacom.o -o wacom_drv.
重新编译驱动程序.
[jej@ayukawa linuxwacom]$ ./configure --enable-hid --enable-usbmouse \
--enable-wacomdrv --with-xf86=/usr/src/redhat/BUILD/XFree86-4.3.0 \
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
...
checking for processor type... i686
checking for kernel module versioning... yes
checking for kernel sources... /usr/src/linux-2.4
checking for valid XFree86 build environment... ok
...
----------------------------------------
BUILD ENVIRONMENT:
architecture - i686
linux kernel - yes
module versioning - yes
kernel - yes
XFree86 - yes
XLib - yes
ncurses - yes
BUILD OPTIONS:
wacom.o - yes
wacdump - yes
xidump - yes
hid.o - yes
usbmouse.o - yes
wacom_drv.o - yes
成功编译!
以下为configure各选项解释及默认值
--enable-wacom yes wacom.o kernel driver
--enable-wacdump yes wacdump LinuxInput event monitor
--enable-xidump yes xidump XInput event monitor
--enable-hid no hid.o replacement kernel driver (not normally necessary)
--enable-usbmouse no usbmouse.o replacement kernel driver (not normally necessary)
--enable-wacomdrv no wacom_drv.o XFree86 driver (binary is available in prebuilt directory)
--enable-modver best guess enables kernel module versioning; usually guesses correctly, but can be enabled or disabled if not
--with-kernel=dir best guess Specifies the kernel source directory if configure cannot guess correctly.
--with-xf86=dir none Specifies the XFree86 build directory.
--with-arch=arch best guess Specifies the architecture if configure guesses incorrectly.
--with-linux=yes|no best guess Specifies if compiled on a Linux system; USB code is Linux specific.
--with-xlib=yes|no best guess Specifies if building xlib-based programs; xidump uses XInput headers.
-------------------------------------------------------------------------------------------------------
#9,配置xf86config启动文件
[jej@ayukawa linuxwacom] vi /etc/X11/XF86Config
以下是我机器的XF86Config全文,有需要的同志请参考自己的机器设备进行修改.
##########################################################################
# XFree86 4 configuration created by pyxf86config
Section "ServerLayout"
Identifier "tablet"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "cursor" "SendCoreEvents"
InputDevice "stylus" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
InputDevice "tablet" "SendCoreEvents"
#InputDevice "DevInputMice" "AlwaysCore"
EndSection
#########################################################
#Section "ServerLayout"
# Identifier "Default Layout"
# Screen 0 "Screen0" 0 0
# InputDevice "Mouse0" "CorePointer"
# InputDevice "Keyboard0" "CoreKeyboard"
# InputDevice "cursor" "SendCoreEvents"
# InputDevice "stylus" "SendCoreEvents"
# InputDevice "eraser" "SendCoreEvents"
# InputDevice "Mouse1" "SendCoreEvents"
# InputDevice "tablet" "SendCoreEvents"
#EndSection
###########################################################
Section "Files"
# RgbPath is the location of the RGB database. Note, this is the name of the
# file minus the extension (like ".txt" or ".db"). There is normally
# no need to change the default.
# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Red Hat 6.0 and later now use a font server independent of
# the X server to render fonts.
RgbPath "/usr/X11R6/lib/X11/rgb"
FontPath "unix/:7100"
EndSection
Section "Module"
Load "dbe"
Load "extmod"
Load "fbdevhw"
Load "glx"
Load "record"
Load "freetype"
Load "type1"
Load "dri"
EndSection
Section "InputDevice"
# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
# Option "Xleds" "1 2 3"
# To disable the XKEYBOARD extension, uncomment XkbDisable.
# Option "XkbDisable"
# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults). For example, for a non-U.S.
# keyboard, you will probably want to use:
# Option "XkbModel" "pc102"
# If you have a US Microsoft Natural keyboard, you can use:
# Option "XkbModel" "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
# Option "XkbLayout" "de"
# or:
# Option "XkbLayout" "de"
# Option "XkbVariant" "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:swapcaps"
# Or if you just want both to be control, use:
# Option "XkbOptions" "ctrl:nocaps"
#
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
##############################################################
Section "InputDevice"
Driver "wacom"
Identifier "cursor"
#Option "Device" "/dev/ttyS0" # SERIAL ONLY
Option "Device" "/dev/input/event0" # USB ONLY
Option "Type" "cursor"
Option "Mode" "relative"
Option "Speed" "3.0"
Option "USB" "on" # USB ONLY
Option "Threshold" "5"
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "stylus"
#Option "Device" "/dev/ttyS0" # SERIAL ONLY
Option "Device" "/dev/input/event0" # USB ONLY
Option "Type" "stylus"
Option "Mode" "absolute"
Option "USB" "on" # USB ONLY
Option "Tilt" "on"
#Option "TiltInvert" "on"
Option "Threshold" "5"
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "eraser"
#Option "Device" "/dev/ttyS0" # SERIAL ONLY
Option "Device" "/dev/input/event0" # USB ONLY
Option "Type" "eraser"
Option "Mode" "absolute"
Option "USB" "on" # USB ONLY
Option "Tilt" "on"
#Option "TiltInvert" "on"
Option "Threshold" "5"
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "tablet"
Option "Device" "/dev/input/event0"
# Option "Type" "beta"
EndSection
##########################################################################
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/psaux"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "yes"
EndSection
Section "InputDevice"
# If the normal CorePointer mouse is not a USB mouse then
# this input device can be used in AlwaysCore mode to let you
# also use USB mice at the same time.
Identifier "DevInputMice"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "PHILIPS 105S"
DisplaySize 280 210
HorizSync 30.0 - 60.0
VertRefresh 50.0 - 120.0
Option "dpms"
EndSection
Section "Device"
Identifier "Videocard0"
Driver "nv"
VendorName "Videocard vendor"
BoardName "NVIDIA Riva TNT2 (generic)"
VideoRam 16384
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection
Section "DRI"
Group 0
Mode 0666
EndSection
#######################################################################
各选项的解释:
Option "Type" "stylus"|"eraser"|"cursor"
sets the type of tool the device represent. This option is
mandatory.
Option "Device" "path"
sets the path to the special file which represents serial
line where the tablet is plugged. You have to specify it
for each subsection with the same value if you want to have
multiple devices with the same tablet. This option is
mandatory.
Option "USB" "on"
tells the driver to dialog with the tablet the USB way.
This option is only available on some Linux platforms.
Option "DeviceName" "name"
sets the name of the X device.
Option "Suppress" "Inumber"
sets the position increment under which not to transmit
coordinates. This entry must be specified only in the
first Wacom subsection if you have multiple devices for one
tablet. If you don’t specify this entry, the default value
is computed to
Option "Mode" "Relative"|"Absolute"
sets the mode of the device.
Option "Tilt" "on"
enables tilt report if your tablet supports it (ROM version
1.4 and above). If this is enabled, multiple devices at
the same time will not be reported.
Option "HistorySize" "number"
sets the motion history size. By default the value is zero.
Option "AlwaysCore" "on"
enables the sharing of the core pointer. When this feature
is enabled, the device will take control of the core
pointer (and thus will emit core events) and at the same
time will be able, when asked so, to report extended
events. You can use the last available integer feedback to
control this feature. When the value of the feedback is
zero, the feature is disabled. The feature is enabled for
any other value.
Option "TopX" "number"
X coordinate of the top corner of the active zone.
Option "TopY" "number"
Y coordinate of the top corner of the active zone.
Option "BottomX" "Inumber"
X coordinate of the bottom corner of the active zone.
Option "BottomY" "number"
Y coordinate of the bottom corner of the active zone.
Option "KeepShape" "on"
When this option is enabled, the active zone begins
according to TopX and TopY. The bottom corner is adjusted
to keep the ratio width/height of the active zone the same
as the screen while maximizing the area described by TopX,
TopY, BottomX, BottomY.
Option "DebugLevel" number
sets the level of debugging info reported.
Option "BaudRate" "38400", "19200" or "9600" (default)
changes the serial link speed. This option is only avail‐
able for wacom V models (Intuos).
Option "Serial" "number"
sets the serial number associated with the physical device.
This allows to have multiple devices of the same type (i.e.
multiple pens). This option is only available on wacom V
devices (Intuos). To see which serial number belongs to a
device, you have to set the DebugLevel to 6 and watch the
output of the X server.
Option "Threshold" "number"
sets the pressure threshold used to generate a button 1
events of stylus devices for some models of tablets (Intuos
and Graphire).
--------------------------------------------------------------------------
#10,重启机器,打开gimp进行如下设置:
打开"文件/对话框/输入设备"
把eraser,stylus,cursor\三项都设置成"screen"模式.
选择画笔工具进行绘画,可以看到熟悉的压力效果呈现在你的面前!!
-----------------------------------------------------------------------------
#11,如有疑问及指教请联系我
email: [email protected]
[email protected]
MySite: http://hi.baidu.com/horsetery
http://www.horsetery.com
msn: [email protected]
QQ : 64629637
鸣谢
http://www.linuxfans.org
http://linuxwacom.sourceforge.net/ |
|