Size: 8851
Comment: Initial commit. Tablet functionality covered.
|
← Revision 20 as of 2024-07-30 22:03:41 ⇥
Size: 5434
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
#title Making full use of the Asus R1E Tablet PC under Ubuntu 8.04 | #title Making full use of the Asus R1E Tablet PC under Ubuntu 10.04 <<Include(Tag/Unsupported)>> |
Line 11: | Line 12: |
= Disclaimer = <<Anchor(Disclaimer)>> This HOWTO is based on my experience with Ubuntu and the Asus R1E. I make no guarantees, nor take any responsibility for any consequences following the use of this HOWTO. This HOWTO is not for beginners; do NOT take any action, execute scripts or commands which you do not understand. While there is no malicious intent, incorrect usage of commands, scripts and programs can result in unintended consequences. Use at your own risk. |
|
Line 20: | Line 16: |
This section will guide you through updating and configuring the latest wacom development drivers, which include support for USB-based Tablet PCs. If the tablet function is already working properly, then you can skip this section. If you are having issues with the tablet, check the [[#TabletTroubleshooting|Tablet Testing and Troubleshooting]] section. | This section will guide you through updating and configuring the latest wacom development drivers, which include support for USB-based Tablet PCs. If the tablet function is already working properly, then you can skip this section. If you are having issues with the tablet, check the [[#TabletTroubleshooting|Troubleshooting and known issues]] section. |
Line 25: | Line 21: |
In order to install the development drivers, you need to compile them from source, and in order to do that, you need to install some development packages. As I haven't performed this on a clean install, it's possible that I've omitted some packages. If so, please let me know so I can fix it, or update this HOWTO yourself. | === Ubuntu 10.04 === Nearly everything works out of the box in this version. However, there is still an issue with tablet coordinates when rotating the screen. To fix this, you can use the patch found under the [[#TabletRotateScreenLucidLynx|Rotate Screen]] section. |
Line 27: | Line 24: |
The packages needed are: The linux-headers corresponding to the current kernel, build-essential, automake1.9 and xserver-xorg-dev. | |
Line 29: | Line 25: |
The following command will install them for you: {{{ sudo apt-get install linux-headers-`uname -r` build-essential xserver-xorg-dev automake1.9 }}} == Configuring, compiling and installing the drivers == <<Anchor(TabletCompileDriver)>> The following commands will download and install version 0.8.1-4 of the wacom driver. '''NOTE 1''' - Check the [[http://linuxwacom.sourceforge.net|linuxwacom project]] site for the latest version of the development drivers. '''NOTE 2''' - The "--disable-quirk-tablet-rescale" is used as a workaround for jittery lines. The issue should be resolved in later versions and shouldn't be needed with any driver newer than 0.8.1-4. {{{ wget http://prdownloads.sourceforge.net/linuxwacom/linuxwacom-0.8.1-4.tar.bz2 tar jxvf linuxwacom-0.8.1-4.tar.bz2 cd linuxwacom-0.8.1-4 ./configure --disable-quirk-tablet-rescale --enable-wacom make sudo make install }}} It's possible that "make install" doesn't install the kernel module properly. If so, copy it manually (adjust kernel version directory as necessary): {{{ sudo cp ./src/2.6.24/wacom.ko /lib/modules`uname -r`/kernel/drivers/input/tablet/ }}} Reload the driver: {{{ sudo rmmod wacom sudo depmod -e sudo modprobe wacom }}} |
|
Line 67: | Line 28: |
Due to automatic detection not working properly, I had to manually set the values for the wacom driver in xorg.conf. This configuration is the result of some experimentation with values reported by the various tools provided by the linuxwacom package, and are specific to the Asus R1E. Other models, with the possible exception of R1F, will most likely require other values. | |
Line 69: | Line 29: |
After reloading the wacom driver, or rebooting the system, you should have a "/dev/input/wacom" entry. If you don't, then it's either named something else, or the drivers haven't been installed properly. If it's named something else, adjust the config accordingly. | == Enable "rotate screen" functionality == |
Line 71: | Line 31: |
Add the following under the InputDevice sections of xorg.conf: | === Ubuntu 10.04 === <<Anchor(TabletRotateScreenLucidLynx)>> Rotating the screen coordinates is done by /etc/acpi/rotatescreen.sh. Getting the tablet coordinates to sync with the screen coordinates is just a matter of calling xsetwacom with the appropriate parameters from that script. The following patch updates rotatescreen.sh for you. |
Line 74: | Line 37: |
Section "InputDevice" Driver "wacom" Identifier "stylus" Option "Device" "/dev/input/wacom" Option "Type" "stylus" Option "USB" "on" Option "bottomy" "17876" Option "bottomx" "28606" Option "topy" "0" Option "topx" "0" Option "Button2" "3" EndSection Section "InputDevice" Driver "wacom" Identifier "eraser" Option "Device" "/dev/input/wacom" Option "Type" "eraser" Option "USB" "on" Option "bottomy" "17876" Option "bottomx" "28606" Option "topy" "0" Option "topx" "0" Option "Button2" "3" EndSection |
*** /etc/acpi/rotatescreen.sh.orig 2010-07-24 16:38:17.026053835 +0200 --- /etc/acpi/rotatescreen.sh 2010-07-24 16:38:03.588544839 +0200 *************** *** 26,31 **** --- 26,43 ---- if [ x"$XAUTHORITY" != x"" ]; then export DISPLAY=":$displaynum" /usr/bin/xrandr -o $NEW_ROTATION && echo $NEW_ROTATION > /var/lib/acpi-support/screen-rotation + OIFS=$IFS + IFS=' + ' + WACOMDEVICES=`xsetwacom --list | awk NF--` + for device in $WACOMDEVICES; do + if [ "$NEW_ROTATION" = "normal" ]; then + xsetwacom set "$device" rotate NONE + else + xsetwacom set "$device" rotate CW + fi + done + IFS=$OIFS fi done |
Line 101: | Line 62: |
You can tweak the The top*, bottom* values if you feel that the cursor isn't following the pen movements properly... | To patch the file, simply save the patch, say, in your home directory as "rotatescreen.patch", and issue the following command (make sure that the current directory is the same as where you saved the patch): |
Line 103: | Line 64: |
In order for X to process input from the tablet, add the following to the bottom of the "ServerLayout" section: | |
Line 105: | Line 65: |
InputDevice "eraser" "SendCoreEvents" InputDevice "stylus" "SendCoreEvents" |
sudo patch -p0 -i rotatescreen.patch |
Line 109: | Line 68: |
Now, restart X or reboot the computer, and the tablet should function. | The patched script asks xsetwacom for a list of devices, removing the last word from each of them (as it's not part of the device name), and sets their rotation according to the screen rotation. Of course, if you don't want to rotate every device xsetwacom reports, you can simply replace the for-loop with hard coded calls to xsetwacom. |
Line 126: | Line 85: |
When you've found a good value, add it to each wacom InputDevice option of xorg.conf to make it permanent: | When you've found a good value, add it to each wacom InputDevice section of xorg.conf to make it permanent: |
Line 135: | Line 94: |
The tablet buttons located under the screen (Ctrl-Alt-Del, Esc, Rotate Screen) aren't working. However, some of them do produce events when pressed, so it's probably just a matter of mapping them to an action. Also, since they don't seem to produce the same event as the corresponding keyboard key, they can probably be mapped to do other things than originally intended. The screen does not switch orientation when rotated into tablet mode. I don't know if this is an issue with the linuxwacom driver, or some other hardware. However, I've written a quick and dirty shell script based on some obsolete information found on various forums, which you can place in the Panel that will provide the rotation feature for you. Mind you, this is very dependent on the output of xrandr, and may break at any given change to the system. Create a new file with some name, preferably ending in .sh (rotate_screen.sh, for example) and fill it with the following contents {{{ #!/bin/bash orientation=`xrandr --query | grep LVDS | awk '{print $4}'` if [ "$orientation" = "(normal" ]; then xrandr -o right xsetwacom set stylus rotate CW else xrandr -o normal xsetwacom set stylus rotate fi }}} Make the file executable: {{{ chmod +x rotate_screen.sh }}} Add it to the panel. '''NOTE''': xrandr doesn't work well with compiz, so make sure you use Metacity or something else if you intend to rotate the screen. |
The tablet ctrl-alt-del button isn't working. This appears to be because it's sending "left ctrl+left alt+KP delete", which isn't mapped to any specific action. |
Line 169: | Line 103: |
GIMP doesn't appear to update the in-program cursor position when rotating the screen. If the tablet input is off, restart GIMP while the screen is rotated the way you want. |
|
Line 191: | Line 127: |
CategoryDocumentation CategoryHardware | CategoryHardware |
|
Unsupported Version |
Introduction
This HOWTO is intended to help you fix problems related to Ubuntu and the Asus R1E Tablet PC. This HOWTO may be applicable to other models, such as the Asus R1F, where hardware specs overlap.
Currently, this HOWTO only deals with the tablet function of the Asus R1E.
Enabling tablet functionality
This section will guide you through updating and configuring the latest wacom development drivers, which include support for USB-based Tablet PCs. If the tablet function is already working properly, then you can skip this section. If you are having issues with the tablet, check the Troubleshooting and known issues section.
Installing required packages
Ubuntu 10.04
Nearly everything works out of the box in this version. However, there is still an issue with tablet coordinates when rotating the screen. To fix this, you can use the patch found under the Rotate Screen section.
Updating xorg.conf
Enable "rotate screen" functionality
Ubuntu 10.04
Rotating the screen coordinates is done by /etc/acpi/rotatescreen.sh. Getting the tablet coordinates to sync with the screen coordinates is just a matter of calling xsetwacom with the appropriate parameters from that script. The following patch updates rotatescreen.sh for you.
*** /etc/acpi/rotatescreen.sh.orig 2010-07-24 16:38:17.026053835 +0200 --- /etc/acpi/rotatescreen.sh 2010-07-24 16:38:03.588544839 +0200 *************** *** 26,31 **** --- 26,43 ---- if [ x"$XAUTHORITY" != x"" ]; then export DISPLAY=":$displaynum" /usr/bin/xrandr -o $NEW_ROTATION && echo $NEW_ROTATION > /var/lib/acpi-support/screen-rotation + OIFS=$IFS + IFS=' + ' + WACOMDEVICES=`xsetwacom --list | awk NF--` + for device in $WACOMDEVICES; do + if [ "$NEW_ROTATION" = "normal" ]; then + xsetwacom set "$device" rotate NONE + else + xsetwacom set "$device" rotate CW + fi + done + IFS=$OIFS fi done
To patch the file, simply save the patch, say, in your home directory as "rotatescreen.patch", and issue the following command (make sure that the current directory is the same as where you saved the patch):
sudo patch -p0 -i rotatescreen.patch
The patched script asks xsetwacom for a list of devices, removing the last word from each of them (as it's not part of the device name), and sets their rotation according to the screen rotation. Of course, if you don't want to rotate every device xsetwacom reports, you can simply replace the for-loop with hard coded calls to xsetwacom.
Troubleshooting and known issues
Jitter
If the pen is producing jagged lines (jitter), try compiling with or without the "--disable-quirk-tablet-rescale" flag. If the jitter is due to the pen being too sensitive (shaky hand), try playing with the "Suppress" option, which takes a value between 0 and 100. Keep in mind that while a high value will reduce jitter, it will also reduce accuracy.
Update it directly without restarting X:
xsetwacom set stylus Suppress value xsetwacom set eraser Suppress value
When you've found a good value, add it to each wacom InputDevice section of xorg.conf to make it permanent:
Option "Suppress" "value"
Missing functionality
The tablet ctrl-alt-del button isn't working. This appears to be because it's sending "left ctrl+left alt+KP delete", which isn't mapped to any specific action.
Applications
Some applications require that you set up the tablet as a valid input device, in order to use some tablet specific features, such as pressure sensitivity.
For use with the GIMP, you have to enable the stylus and eraser in the GIMP: File->Preferences->Input Devices->Configure Extended Input Devices..., select stylus and eraser, and set Mode to Screen.
GIMP doesn't appear to update the in-program cursor position when rotating the screen. If the tablet input is off, restart GIMP while the screen is rotated the way you want.
Xournal may produce jagged lines, even if the tablet works fine in other applications. If so, try switching "Discard Core Events" on and off, when "Use XInput" is checked.
Useful applications
The GIMP
Image Manipulation Program.
Supports pressure sensitivity from tablet input if enabled.
Xournal
Note taking application.
Useful for taking notes or making quick notes. Uses vector graphics to store input.
CellWriter
Handwriting recognition software.
Handwriting input with support for most unicode characters. Also has a normal click-based keyboard function.