+ -
当前位置:首页 → 问答吧 → 关于wacom在FC4中的驱动

关于wacom在FC4中的驱动

时间:2005-09-12

来源:互联网

wacom在FC4中的驱动可以用apt安装,但也不知道怎么用,用不起来,听说FC4中的这个驱动很烂.然后到linuxwacom.sourceforge.net下了最新的linuxwacom-0.6.8.tar.bz2是for 2.6.11内核的,不知怎么弄.它上面有FC3中的安装方法,但我英文差看不懂,哪位大侠翻译一下
11.4 - Building wacom driver On Fedora Core 3

The following documentation for building wacom kernel modules and x.org driver on Fedora Core 3 was written by Paul Duffy. If you have any problems or questions, go ahead and post them to the list, or send email to me directly. If I cannot provide a satisfactory answer, I'll forward your email on to Paul.



Copyright (C) 2005 Paul Duffy

Procedure for building linuxwacom package on Fedora Core 3 with 2.6 series
kernel. These instructions are current as of May 23, 2005.
There are several reasons why FC3 is different. The two main reasons
being:

- evdev, hid-core and mousedev are compiled into the kernel core so you can't
just recompile them as modules.

- the Fedora Core kernel is heavily patched, which I don't mind as it means my
Creative Live! Drive II works, but it does mean that compiling the kernel
from http://www.kernel.org may lose you some hardware support.

Additionally, Red Hat no longer supply a simple linux-source rpm so if you
want the official kernel source for Fedora Core 3 you're going to have to use
the source RPM.

At this stage, I am assuming that you have a fully updated system and are
using kernel 2.6.11-1.14_FC3

What you will need:

At this stage you're going to need all of the development packages required to
compile the kernel (gcc, automake, etc) and the xorg-x11-sdk package
installed (under Development >> X Software Development). If you're unsure
where this all is, you can select the hat menu in KDE or Gnome and you want
to select System Settings >> Add/Remove Applications.

If you're unsure as to exactly what you need to install, install everything
(except gcc-java, it causes problems with Sun or IBM java installs) assuming
you have the hard drive space.

Also the vast majority of this will require you to be in SuperUser mode so you
might as well 'su' from the start; not normally advice I'd be giving anyone
but it's kinda necessary in this case.

You have two choices for the first step; you can either download the kernel
SRPM from one of the mirrors at
http://fedora.redhat.com/download/mirrors.html where you can find the correct
package as updates/3/SRPMS/kernel-2.6.11-1.14_FC3.src.rpm and install it
with

rpm -ivh kernel-2.6.11-1.14_FC3.src.rpm

or you can use

up2date --get-source kernel

Either method should leave you with a lot of files in /usr/src/redhat/SOURCES
and the file /usr/src/redhat/SPECS/kernel-2.6.spec
At this stage, don't worry about all the files starting linux-2.6.9... the
main file you are looking for is linux-2.6.11.tar.bz2. As long as that's
there you should be fine.

Now, to actually get all the kernel sources setup in a compilable form you
need to run the command

rpmbuild -bp --target= /usr/src/redhat/SPECS/kernel-2.6.spec

If you don't know what is, run the command

uname -m

and it should tell you.
Of course, it should be noted at this point that if my architecture is i686
and I select that, what will actually be installed is the source
configuration for i386 and above so if you're still not sure but you know you
can run Windows then --target=i386 is a safe default.

After everything has been setup the rpmbuild will have applied all the
standard patches and setup a default configuration so the only reason to run
'make config', or 'make xconfig', is to change something from the default.

Having said this, I like to run 'make xconfig' to alter the selected chip the
kernel is going to compile for as it defaults to compiling for i386 whereas
anyone with a reasonably recent chip (Athlon, Pentium III even) is going to
want something a bit more advanced.

So, the first thing you want to do, if you want most add-on modules to find
the kernel source without adding a really long command-line parameter, is to
add a symbolic link to the source directory.

cd /usr/src
ln -s redhat/BUILD/kernel-2.6.11/linux-2.6.11 linux

So now everything can find the current kernel source in /usr/src/linux

cd linux
make xconfig

select 'Processor type and features' and change 'Processor family' from 386 to
whatever it is you're running.
If you make a mistake and you don't know what you've done you can always close
the program and select 'Discard changes' and start again.
Otherwise, click on the floppy disk icon to save and exit safe in the
knowledge that you're not compiling for a CPU that doesn't even have a
floating point unit.

OK, so by now you should have the basic kernel source setup and available
in /usr/src/linux and, due to the setup of the default kernel, we can't just
recompile a few modules, we have to recompile the whole kernel.

So at this stage, we're just about where we'd like to be if we wanted to
compile the kernel as it is, with no support for the Intuos3 or any of the
Cintix range but if you've got an AthlonXP or a Pentium 4 you might get a
little bit more performance out of it.

We now want to be getting the latest linuxwacom-0.6.8.tar.bz2 You may want to
setup your own arrangement for wherever you want it but your home directory
should be fine and...

tar jxvf linuxwacom-0.6.8.tar.bz2
cd linuxwacom-0.6.8

...and you're in the source directory for the code that enables proper Wacom
support.

Now we need to copy just four files, usbmouse.c has been deprecated in favour
of hid-core.c and can be safely ignored, also we don't need to do anything to
input.c. Now we copy all the necessary source files.

cd src/2.6.11
cp evdev.c mousedev.c /usr/src/linux/drivers/input/
cp hid-core.c wacom.c /usr/src/linux/drivers/usb/input/

Now, with the manual patching done everything should work and, unless I've
somehow missed a stage, everything should compile just fine.

cd /usr/src/linux
make all

Now, this is going to take a while, especially if your system's a bit aold
like mine so now would be a good time to get some tea, coffee, go down the
corner shop or have lunch.

Assuming there have been no errors, everything should now be compiled.

make modules_install
make install

You need to install the modules first or 'make install' will quit, complaining
about there being no '/lib/modules/2.6.11-prep' and sulk in the corner.

After all this, there's still one last thing you need to do and that's make
this new kernel the default on boot. You will need to
edit /boot/grub/menu.lst and change the 'default' value from 1 to 0.

Those of you with nVidia and other such graphics cards who like their 3D
acceleration will need to reinstall the drivers before X Windows will work.

As it is, on reboot you will need to change the boot parameters. When Grub
comes up, press a to alter the boot parameters. It is advisable at this stage
to remove 'rhgb' as, one of the effects of running the Red Hat Graphical Boot
is that if you want a change in the xorg.conf file to take effect you have to
reboot the entire system and this just gets to be a PITA when you're trying
to configure something. Then add '3' (without quotes) to the end of the line
to make FC3 boot to the command line.

Right, so by now we should have the kernel set up to recognise whatever tablet
you have properly. We can check this.

cat /proc/bus/usb/devices

should give you a readout of every device on your usb system and we're looking
for the line which includes Vendor=056a

With my Intuos 3 I have ProdID 00b1, manufacturer is listed as 'Tablet' and
Product is listed as PTZ-630 although this may differ depending on which
tablet you have and what size it is.

The most important line is the one beginning with I: which should end with
'Driver=wacom'.

If this is that case, congratulations, your kernel is now fully set up to
recgonise your tablet :o)

Now, to get it running with X Windows we need to update the wacom_drv driver
and this, in itself is going to be different as the configuration script will
not know where to find your x11 SDK and so will efuse to compile the driver.

The xorg SDK in the case of FC3 is located in /usr/X11R6/lib/Server and we can
tell the configuration script this

./configure --with-xorg-sdk=/usr/X11R6/lib/Server

should do the trick and

make install

should compile and install the module in the appropriate place.

After all this is done, now all you need to do is setup the configuration
in /etc/X11 xorg.conf

The ServerLayout section is at the start of the configuration file and, as an
example, mine looks like this:

Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "eraser" "SendCoreEvents"
InputDevice "stylus" "SendCoreEvents"
EndSection

Where Mouse3 and Mouse5 are the identifiers for the pen and eraser.

My InputDevice sections look like this:

Section "InputDevice"
Identifier "eraser"
Driver "wacom"
# Option "TopX" "0"
# Option "TopY" "0"
# Option "BottomX" "1600"
# Option "BottomY" "1200"
Option "Device" "/dev/input/event3"
Option "Type" "eraser"
Option "USB" "On"
EndSection

Section "InputDevice"
Identifier "stylus"
Driver "wacom"
# Option "TopX" "0"
# Option "TopY" "0"
# Option "BottomX" "1600"
# Option "BottomY" "1200"
Option "Device" "/dev/input/event3"
Option "Type" "stylus"
Option "USB" "On"
EndSection

It's important to note, at this point, that the TopX/Y and BottomX/Y options
are not actually necessary unless you have problem with the detection of the
tablet as all the lpi information is included in the source code for the
wacom module so it's perfectly safe to leave these out if you don't know what
the values should be.

Also note, that at this stage I still don't have /dev/input/wacom and the
tablet appears on /dev/input/event3

If you're unsure as to which device your tablet is using, then wacdump should
be able to find it. It is, to be honest, a bit trial and error but you'll
know when you've found it as the readout will look like this:

wacdump v0.5.2

MODEL=Wacom Intuos3 6x8 ROM=1.0-2
CLS=USB VNDR=Wacom DEV=Intuos3 SUB=PTZ-630




TOOLTYPE=NONE IN_PROX=+00000 (+00000 .. +00000)
BUTTON=+00000 (+00000 .. +00000) POS_X=+00000 (+00000 .. +40640)
POS_Y=+00000 (+00000 .. +30480) ROT_Z=+00000 (-00900 .. +00899)
DISTANCE=+00000 (+00000 .. +00015) PRESSURE=+00000 (+00000 .. +01023)
TILT_X=+00000 (+00000 .. +00127) TILT_Y=+00000 (+00000 .. +00127)
ABSWHEEL=+00000 (+00000 .. +01023) RELWHEEL=+00000 (-00001 .. +00001)
THROTTLE=+00000 (-01023 .. +01023)

LEFT= MIDDLE= RIGHT= EXTRA=
SIDE= TOUCH= STYLUS= STYLUS2=


Once you've setup all the configuration with the correct input device execute

init 5; exit

and you should find yourself in X with a fully working graphics tablet.
Instructions for configuring GIMP 2.2 are the same as in the official HowTo.

Good luck.

regards, Paul

作者: mayaarthxf   发布时间: 2005-09-12

我找到火星时代上的一篇,大家看看行的通吗
fc4本身自带了wacom的驱动,但是工作不正常,没压感,gimp不认
我上了linuxwacom.sourceforge.net,按照上面fc3的方法编译内核
但是不会做,没成功
虽然fc4的wacom驱动(好像是6.4)不是最新的,但应该也能正常工作才是
郁闷了很久之后,我终于弄成了,其实方法很简单
按照以前论坛上安装wacom的经验,首先要找到wacom是出于/dev/input/中的哪个设备
可以进入终端窗口 ls /dev/input/列出所有设备,然后逐一cat这些设备,晃动wacom笔,如果屏幕上有很多字符出现,那么就是哪个设备
cat /dev/input/event2/ 我的是event2
然后修改 /etc/X11/xorg.conf
第一部分为:
Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "stylus" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
EndSection
其中
InputDevice "stylus" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
两句是我们要加上的分别代表笔尖和橡皮
然后根据 event的对应结果
在鼠标的定义快后加入
Section "InputDevice"
Driver "wacom"
Identifier "stylus"
Option "Device" "/dev/input/event2" # USB ONLY
Option "Type" "stylus"
Option "USB" "on" # USB ONLY
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "eraser"
Option "Device" "/dev/input/event2" # USB ONLY
Option "Type" "eraser"
Option "USB" "on" # USB ONLY
EndSection
重新起动,就行了!配置gimp吧!
注意修改前做一个备份,如果不成功,会起动不了xwindows,需要进入文本方式修改.我的是usb 的intus2,跟usb鼠标有冲突,所以我找了一个ps鼠标.如果你的wacom型号跟我的不同,上 linuxwacom.sourceforge.net看相应详细的参数说明.

作者: mayaarthxf   发布时间: 2005-09-12

正要试验下我的F420呐,,不过看到你的经历好麻烦啊,,还和USB鼠标有冲突,,我的本子没PS/2口,,那岂不是郁闷,,还是老老实实在Windows下用吧。。

作者: lsa   发布时间: 2005-09-12