个人工具

UbuntuHelp:WacomGraphireBluetooth

来自Ubuntu中文

Wikibot讨论 | 贡献2008年5月9日 (五) 19:29的版本 (新页面: {{From|https://help.ubuntu.com/community/WacomGraphireBluetooth}} {{Languages|UbuntuHelp:WacomGraphireBluetooth}} These are specific insturctions on how to get your Wacom Graphire Bluetoo...)

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索

These are specific insturctions on how to get your Wacom Graphire Bluetooth working in Ubuntu. Please help to keep this page updated!

Ubuntu 8.04 "Hardy"

WARNING: This is not entirely simple and involves using the linux terminal, editing system files and compiling a kernel module. Even so, it should be pretty straightforward if you follow the steps.

1. Pairing the tablet with your computer

  • press the connect button on the tablet (turn the tablet upside down - it should be near the top right corner)
  • From the main Ubuntu menu, select System > Preferences > Bluetooth, then select the Services tab.
  • Click on Input Service, select the wacom tablet (which should appear in the bottom pane) and click add.

2. Compiling the new hidp kernel module

NOTE: This step needs to be repeated EVERY TIME your kernel version changes. To compile a kernel module you will need to have basic build tools and the linux kernel headers installed. First find out which kernel version you are using by opening a terminal (Accessories > Terminal) and typing:

user@computer:~$ uname -r
2.6.24-16-generic
user@computer:~$ 

Using the suffix here (in this case, "generic"), install the relevant linux-headers package. In my case, my kernel version is 2.6.24-16-generic, so the linux-headers package I want is linux-headers-generic. Also install the build-essential package, as this should install all the utilities you need to compile the module.

user@computer:~$ sudo apt-get install linux-headers-generic build-essential

Download the module source from [1] then extract it somewhere (e.g. your desktop). In the terminal, switch to the folder that was created and compile the module by typing “make”.

user@computer:~$ cd Desktop/wacom-bt-driver
user@computer:~/Desktop/wacom-bt-driver$ make

This should not show any errors, and you should now have a file “hidp.ko” in the hidp subfolder.

user@computer:~/Desktop/wacom-bt-driver$ ls hidp/hidp.ko
hidp/hidp.ko
user@computer:~/Desktop/wacom-bt-driver$ 

Copy the new hidp.ko file over your kernel's current one (replace the kernel version here with the output from "uname -r").

user@computer:~/Desktop/wacom-bt-driver$ sudo cp hidp/hidp.ko /lib/modules/2.6.24-16-generic/kernel/net/bluetooth/hidp/hidp.ko
user@computer:~/Desktop/wacom-bt-driver$ 

Now, make sure the current kernel gets unloaded by first making sure your tablet is turned off, then typing:

user@computer:~/Desktop/wacom-bt-driver$ sudo morprobe -r hidp
user@computer:~/Desktop/wacom-bt-driver$ sudo modprobe hidp

3. Get the tablet working in X

To make sure the proper event symlinks are created, you need to edit the wacom udev rules.

user@computer:~$ sudo gedit /etc/udev/rules.d/50-xserver-xorg-input-wacom.rules

Find the lines:

# Convenience link for the common case of a single tablet.

KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYMLINK="input/wacom"

and add a slightly modified line below:

# Convenience link for the common case of a single tablet.

KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYMLINK="input/wacom"
KERNEL=="event[0-9]*", SYSFS{id/vendor}=="056a", SYMLINK="input/wacom"

Similarly, modify the end of the file as such, also adding a specific link for the graphire bluetooth.

# Bluetooth tablets
KERNEL=="event[0-9]*", SYSFS{id/vendor}=="056a", SYSFS{id/product}=="0081", SYMLINK+="input/tablet-graphire_bt-6x8a"

# Check and repossess the device if a module other than the wacom one
# is already bound to it.

KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", ACTION=="add", RUN+="/lib/udev/check_driver wacom $devpath $env{ID_BUS}"
KERNEL=="event[0-9]*", SYSFS{id/vendor}=="056a", ACTION=="add", RUN+="/lib/udev/check_driver wacom $devpath $env{ID_BUS}"

This should ensure that the symlinks /dev/input/wacom and /dev/input/tablet-graphire_bt-6x8a point to your tablet. Now edit your Xorg configuration to enable the tablet.

user@computer:~$ gksudo gedit /etc/X11/xorg.conf

Find the lines relating to wacom tablets and modify them so that they read as follows:

Section "InputDevice"
	Driver		"wacom"
	Identifier	"stylus"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"	"stylus"
	Option		"Mode"  "absolute"
EndSection

Section "InputDevice"
	Driver		"wacom"
	Identifier	"eraser"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"	"eraser"
	Option		"Mode"  "absolute"
EndSection

Section "InputDevice"
	Driver		"wacom"
	Identifier	"cursor"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"	"cursor"
	Option		"Speed"  "3.0"
	Option		"Mode"  "relative"
EndSection

The "Speed" option in the "cursor" section can be tweaked to match the sensitivity of the mouse on the tablet with any other controllers you use. I've found 3.0 to work well for me. To slow the cursor down, you can use speed values of less than 1.0, e.g. a value of 0.5 would make the tablet mouse cursor twice as slow as a value of 1.0. To get the buttons on the tablet working, add a similar section underneath them called "pad":

Section "InputDevice"
	Driver		"wacom"
	Identifier	"pad"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"	"pad"
EndSection

Also uncomment the “InputDevice” lines in the ”ServerLayout” section, and add a line for the "pad".

Section "ServerLayout"
	Identifier	"Default Layout"
	Screen		"Default Screen"
	Inputdevice	"Generic Keyboard"
	Inputdevice	"Configured Mouse"
	
	# Uncomment if you have a wacom tablet
	InputDevice     "stylus"	"SendCoreEvents"
	InputDevice     "cursor"	"SendCoreEvents"
	InputDevice     "eraser"	"SendCoreEvents"
	InputDevice	"pad"
EndSection

Save your work and restart X by logging out and then back in again, or by pressing ctrl-alt-backspace. You should now have a fully working graphire bluetooth tablet!

Final Notes

Please remember that when your kernel version gets upgraded (which is usually the only time your computer will recommend a restart after updating) you need to do all of step 2 again. Also note that when you turn the tablet on, it may function incorrectly. To solve this, press CTRL-ALT-F6 to switch to another virtual terminal, and CTRL-ALT-F7 to switch back to X. Also, You must have your tablet turned on when you log in. So if switching terminals and back hasn't worked, save your work, log out, and log back in again. This limitation also exists for USB Wacom tablets, but they are usually plugged in all the time.

Ubuntu 7.10 "Gutsy"

Taken from http://ubuntuforums.org/showthread.php?t=674738 WARNING: This is not entirely simple and involves using the linux terminal, editing system files and compiling a kernel module. Even so, it should be pretty straightforward if you follow the steps.

1. Pairing the tablet with your computer

The directions for this are mainly taken from this bluetooth keyboard and mouse howto. Plug in the USB bluetooth dongle that came with the keyboard (probably not necessary if your computer already has bluetooth support) and open a terminal. First you need to find out the MAC address of your tablet. Press the “connect” button on the underside of your tablet then run the following command in the terminal.

user@computer:~$ hcitool scan
Scanning ...
        TABLET_ADDR       WACOM Pen Tablet
user@computer:~$

In place of TABLET_ADDR should be yout tablet's MAC address. Open the bluetooth hcid configuration file for editing (you may be asked for your password).

user@computer:~$ sudo gedit /etc/bluetooth/hcid.conf

At the end of this file, add a new section with the following:

device TABLET_ADDR {
     name "WACOM Pen Tablet";
}

Restart the bluetooth subsystem

user@computer:~$ sudo /etc/init.d/bluetooth restart

You should now be able to pair the tablet with your computer via the following command. You might need to press the “connect” button on your tablet again, if it has turned off.

user@computer:~$ sudo hidd --search
Searching ...
        Connecting to device TABLET_ADDR
user@computer:~$

Your tablet mouse will probably move your cursor now, but it's jerky and slow, and the pen acts just like the mouse. To make sure the tablet connects on startup, edit the bluetooth startup script.

user@computer:~$ sudo gedit /etc/default/bluetooth

Find the lines with the following:

HIDD_ENABLED=0
HIDD_OPTIONS="..."

Change them to:

HIDD_ENABLED=1
HIDD_OPTIONS="--connect TABLET_ADDR --server"

2. Compiling the new hidp kernel module

NOTE: This step needs to be repeated EVERY TIME your kernel version changes. To compile a kernel module you will need to have basic build tools and the linux kernel headers installed. First find out which kernel version you are using.

user@computer:~$ uname -r
2.6.22-14-generic
user@computer:~$ 

Install the relevant linux-headers package. In my case, my kernel version is 2.6.22-14-generic, so the linux-headers package I want is linux-headers-2.6.22.14-generic. Also install the build-essential package, as this should install all the utilities you need to compile the module.

user@computer:~$ sudo apt-get install linux-headers-2.6.22-14-generic build-essential

Download the module source from [2] then extract it somewhere (e.g. your desktop). In the terminal, switch to the folder that was created and compile the module by typing “make”.

user@computer:~$ cd Desktop/wacom-bt-driver
user@computer:~/Desktop/wacom-bt-driver$ make

This should not show any errors, and you should now have a file “hidp.ko” in the hidp subfolder.

user@computer:~/Desktop/wacom-bt-driver$ ls hidp/hidp.ko
hidp/hidp.ko
user@computer:~/Desktop/wacom-bt-driver$ 

Copy the new hidp.ko file over your kernel's current one (replace the kernel version here with your own).

user@computer:~/Desktop/wacom-bt-driver$ sudo cp hidp/hidp.ko /lib/modules/2.6.22-14-generic/kernel/net/bluetooth/hidp/hidp.ko
user@computer:~/Desktop/wacom-bt-driver$ 

Now reboot your computer to make sure the module gets unloaded and reloaded. You will also be able to double-check that your tablet can automatically reconnect on startup.

3. Get the tablet working in X

To make sure the proper event symlinks are created, you need to edit the wacom udev rules.

user@computer:~$ sudo gedit /etc/udev/rules.d/50-xserver-xorg-input-wacom.rules

Find the lines:

# Convenience link for the common case of a single tablet.

KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYMLINK="input/wacom"

and add a slightly modified line below:

# Convenience link for the common case of a single tablet.

KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", SYMLINK="input/wacom"
KERNEL=="event[0-9]*", SYSFS{id/vendor}=="056a", SYMLINK="input/wacom"

Similarly, modify the end of the file as such, also adding a specific link for the graphire bluetooth.

# Bluetooth tablets
KERNEL=="event[0-9]*", SYSFS{id/vendor}=="056a", SYSFS{id/product}=="0081", SYMLINK+="input/tablet-graphire_bt-6x8a"

# Check and repossess the device if a module other than the wacom one
# is already bound to it.

KERNEL=="event[0-9]*", SYSFS{idVendor}=="056a", ACTION=="add", RUN+="/lib/udev/check_driver wacom $devpath $env{ID_BUS}"
KERNEL=="event[0-9]*", SYSFS{id/vendor}=="056a", ACTION=="add", RUN+="/lib/udev/check_driver wacom $devpath $env{ID_BUS}"

This should ensure that the symlinks /dev/input/wacom and /dev/input/tablet-graphire_bt-6x8a point to your tablet. Now edit your Xorg configuration to enable the tablet.

user@computer:~$ gksudo gedit /etc/X11/xorg.conf

Find the lines relating to wacom tablets and modify them so that they read as follows:

Section "InputDevice"
	Driver		"wacom"
	Identifier	"stylus"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"	"stylus"
	Option		"Mode"  "absolute"
EndSection

Section "InputDevice"
	Driver		"wacom"
	Identifier	"eraser"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"	"eraser"
	Option		"Mode"  "absolute"
EndSection

Section "InputDevice"
	Driver		"wacom"
	Identifier	"cursor"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"	"cursor"
	Option		"Speed"  "3.0"
	Option		"Mode"  "relative"
EndSection

The "Speed" option in the "cursor" section can be tweaked to match the sensitivity of the mouse on the tablet with any other controllers you use. I've found 3.0 to work well for me. To slow the cursor down, you can use speed values of less than 1.0, e.g. a value of 0.5 would make the tablet mouse cursor twice as slow as a value of 1.0. To get the buttons on the tablet working, add a similar section underneath them called "pad":

Section "InputDevice"
	Driver		"wacom"
	Identifier	"pad"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"	"pad"
EndSection

Also uncomment the “InputDevice” lines in the ”ServerLayout” section, and add a line for the "pad".

Section "ServerLayout"
	Identifier	"Default Layout"
	Screen		"Default Screen"
	Inputdevice	"Generic Keyboard"
	Inputdevice	"Configured Mouse"
	
	# Uncomment if you have a wacom tablet
	InputDevice     "stylus"	"SendCoreEvents"
	InputDevice     "cursor"	"SendCoreEvents"
	InputDevice     "eraser"	"SendCoreEvents"
	InputDevice	"pad"
EndSection

Save your work and restart X by logging out and then back in again, or by pressing ctrl-alt-backspace. You should now have a fully working graphire bluetooth tablet! useful links: