-
4 Attachment(s)
How to Rotate the Screen for a TX2000 Tablet PC
TX2500, TX2z, TM2t & other Tablet PCs
Last Updated: May 13, 2012
Preliminaries
The Rotation HOW TO assumes the Wacom digitizer is working on your tablet PC. Either because the release default wacom.ko (the usb kernel driver/module) and xserver-xorg-input-wacom (the xf86-input-wacom X driver and xsetwacom) package work for your tablet PC (check Synaptic Package Manager or Software Sources) or you have successfully compiled and installed the Wacom drivers using the LinuxWacom HOW TO or the Bamboo P&T HOW TO. Configuration for Lucid is through the 10-wacom.conf and for Maverick and up it is the 50-wacom.conf. Although you can still use the xorg.conf if you prefer.
There has been a change to the Wacom input tool device naming convention. To get your devices to rotate enter xinput list in a terminal. In the output find the "device name", e.g.:
Code:
⎜ ↳ Wacom ISDv4 93 Pen stylus id=11 [slave pointer (2)]
⎜ ↳ Wacom ISDv4 93 Finger touch id=12 [slave pointer (2)]
⎜ ↳ Wacom ISDv4 93 Pen eraser id=16 [slave pointer (2)]
that correspond to the input tools you have. For a tablet PC these would be stylus, eraser (if you have one), and touch (if you have it). Then substitute the longer more descriptive "device name" (with the quotes) in for stylus, eraser, and touch in the script's xsetwacom commands. For example:
Code:
xsetwacom set stylus rotate ccw
becomes
Code:
xsetwacom set "Wacom ISDv4 93 Pen stylus" rotate ccw
You can also use the ID numbers if you are not hot plugging devices, otherwise the ID #'s can change. Starting with xf86-input-wacom-0.11.0 the xsetwacom Rotate parameter has been made tablet wide so you need to only rotate the parent device. This means for a serial (ISDV4) tablet PC the only xsetwacom Rotate command you need is for the stylus, and the others (eraser and touch) can be left out of the script. For usb tablet PCs with touch you need both the stylus and the touch lines in the script because they are exported from the kernel as two separate devices.
There is a bug using the Lucid default wacom.ko (from linuxwacom version 0.8.4-1(?)). Stylus and touch are the same in the xinput list output, namely "Wacom ISDv4 93", for TX2500 & TX2000's. So for at least touch use the ID number. If you've compiled and installed linuxwacom 0.8.6-2 (or up) or the input-wacom wacom.ko this bug is fixed.
Summary
The first method below invokes the xrandr command line interface to find the screen orientation in the output of the server system's current state. Then the script uses the appropriate xrandr and xsetwacom commands to rotate the screen and input tools. Method 2 provides automatic rotation through a shell script if your tablet PC and the system software support it. Method three does the same but through a Python gtk application that adds other features besides automatic rotation. The fourth method relies on a C daemon and a shell command. "Implementing a Script" describes how to make your script executable, how methods 1 & 4 can be implemented by a Launcher (which can be placed in a panel or a dock) or alternatively bound to a hardware key. Appendix 1 has a little bit on enabling rotation in your video driver (if needed) and appendix 2 discusses how to enable tablet PC bezel buttons. Appendix 3 shows you how to set up a HP Elitebook's thumb scroll bezel button.
Method 1: "xrandr -q --verbose" & grep
This is a “general” script that works for both the TX2000 and TX2500 and other tablet pc's. This script relies on the output of xrandr -q --verbose, which gives current screen state. One line of the output includes current screen orientation. They all seem, regardless of video chipset or driver, to have a common current screen orientation line which shares a common term and format. This allows one script/command line to deal with all.
So this script should work for any Tablet PC that has a line similar to the following in it's xrandr -q --verbose output:
Code:
default connected 1280x800+0+0 (0x1ad) normal (normal left inverted right) 0mm x 0mm
What you are looking for is "connected" and ") normal (". Where "normal" is the current orientation (normal or left or inverted or right) bracketed by parenthesis ")" & "(".
360 degree shell script:
Code:
#!/bin/sh
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"
# Using current screen orientation proceed to rotate screen and input tools.
case "$rotation" in
normal)
# rotate to the left
xrandr -o left
xsetwacom set stylus rotate ccw
xsetwacom set touch rotate ccw
xsetwacom set eraser rotate ccw
;;
left)
# rotate to inverted
xrandr -o inverted
xsetwacom set stylus rotate half
xsetwacom set touch rotate half
xsetwacom set eraser rotate half
;;
inverted)
# rotate to the right
xrandr -o right
xsetwacom set stylus rotate cw
xsetwacom set touch rotate cw
xsetwacom set eraser rotate cw
;;
right)
# rotate to normal
xrandr -o normal
xsetwacom set stylus rotate none
xsetwacom set touch rotate none
xsetwacom set eraser rotate none
;;
esac
This will cause the screen to rotate through 360 degrees counter-clockwise in four 90 degree steps.
A TX2000 or TX2500 screen is hinged to swivel 180 degrees in only one direction before locking down in tablet mode. From landscape to portrait mode in other words. So the script only needs to rotate the screen orientation 90 degrees to portrait and then 90 degrees back to landscape mode. Since a right handed person holds the tablet in the left arm (most like the battery pointing to the right as a handle) the following simplified script serves.
Right handed script:
Code:
#!/bin/sh
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"
# Using current screen orientation proceed to rotate screen and input tools.
case "$rotation" in
normal)
# rotate to the right
xrandr -o right
xsetwacom set stylus rotate cw
xsetwacom set touch rotate cw
xsetwacom set eraser rotate cw
;;
right)
# rotate to normal
xrandr -o normal
xsetwacom set stylus rotate none
xsetwacom set touch rotate none
xsetwacom set eraser rotate none
;;
esac
Left handed script:
Code:
#!/bin/sh
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"
# Using current screen orientation proceed to rotate screen and input tools.
case "$rotation" in
normal)
# rotate to the left
xrandr -o left
xsetwacom set stylus rotate ccw
xsetwacom set touch rotate ccw
xsetwacom set eraser rotate ccw
;;
left)
# rotate to normal
xrandr -o normal
xsetwacom set stylus rotate none
xsetwacom set touch rotate none
xsetwacom set eraser rotate none
;;
esac
You will need to place the script into a text file, name it, and make it executable. See a) Script in Implementing a Script with a Launcher or Key Binding below.
* Thank you to martinjochimsen and manu7irl for helping to validate method 1 for the TX2500.
Method 2: Tablet PC Automatic Rotation Script
Red_Lion got auto-magic rotation working. He developed a script that uses the 'tablet' signal ('dock' for the original unpatched HP-WMI) of HP-WMI as a trigger to provide rotation. While the following script was developed for HP tablet pc's, Lenovo ThinkPads (and very likely other tablet pc's) should be able to use it too with a minor modification.
Determine your "device names" with xinput list entered in a terminal. Then substitute them for stylus, eraser, and touch (if you have it) in the following shell script using the quotes around the "device name". Only use the xsetwacom commands for the devices you have.
Notice the script assumes you have CellWriter installed. You can substitute the onscreen keyboard of your choice or comment out or remove the lines.
Code:
#!/bin/bash
old="0"
while true; do
if [[ -e /sys/devices/platform/hp-wmi/tablet ]]; then
new=`cat /sys/devices/platform/hp-wmi/tablet`
if [[ $new != $old ]]; then
if [[ $new == "0" ]]; then
echo "Rotate to landscape, hide CellWriter."
xrandr -o normal
xsetwacom set stylus rotate none
xsetwacom set eraser rotate none
xsetwacom set touch rotate none
cellwriter --hide-window
elif [[ $new == "1" ]]; then
echo "Rotate to portrait, show CellWriter."
xrandr -o right
xsetwacom set stylus rotate cw
xsetwacom set eraser rotate cw
xsetwacom set touch rotate cw
cellwriter --show-window
fi
fi
old=$new
sleep 1s
fi
done
# From Red_Lion post #576: http://ubuntuforums.org/showthread.php?t=845911&page=58
Save it in "/home/yourusername/" as ".automagic_rotation.sh" (without the quotes), or whatever you want to name it. Make the file executable and add it to your Startup Applications. See a) Script in Implementing a Script with a Launcher or Key Binding below.
For the ThinkPad all you should need to do is change the lines.
Code:
if [[ -e /sys/devices/platform/hp-wmi/tablet ]]; then
new=`cat /sys/devices/platform/hp-wmi/tablet`
to
Code:
if [[ -e /sys/devices/platform/thinkpad_acpi/hotkey_tablet_mode ]]; then
new=`cat /sys/devices/platform/thinkpad_acpi/hotkey_tablet_mode`
Using these examples, if your tablet pc Brand & model also reports the swivel hinge state, you should be able to modify the script to work for you.
See:
The original Auto-magic Rotation Script HOW TO at post #225.
MisteR2's original instructions, the hp-wmi patch, and .fdi for it in posts #104 and #106 on this thread.
MisteR2's new instructions and attachments (with new files) at post #206.
Red_Lion's first post of the auto-magic rotation script in post #576 on the "Info and help for HP TX2500 Series".
Method 3: The Magick Rotation application for Dell, HP, and Lenovo tablet pc's. It automatically rotates screen orientation and devices/tools that use the Wacom or evdev drivers. Versions have worked in Arch, Fedora, Gentoo, Mandriva, and openSUSE among others.
MisteR2 tracked down the swivel hinge signal to the HP-WMI kernel module, solving the mystery of no detectable signal. This sits on top of WMI, which is the Windows Management Instrumentation mapper device. WMI is a proprietary extension to ACPI that exposes parts of the ACPI firmware and is available for some BIOS's. Matthew Garrett (the module maintainer) has separated out the swivel hinge signal from the docking event (on MisteR2's request) for us and provided a patch. The patch is called hp-wmi.diff.txt and is in post #106. It creates a new event called 'tablet' as opposed to 'dock' and will be included in the hp-wmi kernel module for the 2.6.31 (Karmic). Red_Lion then got auto-magic rotation actually working with his first script. He also wrote the first version of the Magick Rotation applet in Python gtk. Not only did it automatically rotate the screen orientation (along with the input tools) when you pivoted the screen to tablet mode it also allowed for handy shell commands.
Magick Rotation 1.5 applet released (10-9-11) is on Launchpad: https://launchpad.net/magick-rotation This version adds support for Oneiric (11.10) . In addition to automatic rotation and selection of rotation direction it offers other features such as a touch toggle function and display of an onscreen keyboard when rotated. Magick Rotation works for HP & Dell tablet pc's if they have auto-magic rotation in Windows (a swivel hinge switch sends a signal) and their bios supports WMI (and hence hp-wmi or dell-wmi). It works for Lenovo tablets if they have the thinkpad_acpi and hence it's hotkey support.
Note: Dell XT & XT2 users. The dell-wmi from the kernel does not report the swivel hinge switch state. To get a dell-wmi that works correctly see the MagickExtras folder in the magick-rotation folder. Instructions are there or in a FAQ at the Launchpad site. Or also see post #1339.
Advanced Setup command examples (note use of semi-colon to separate commands):
[Run before switch to tablet:] killall -9 cairo-dock; gconftool-2 --set /apps/panel/toplevels/top_panel_screen0/size --type integer 42
[Run after switch to tablet:] cellwriter --show-window; cairo-dock -o
[Exec. before switch to normal:] killall -9 cairo-dock; gconftool-2 --set /apps/panel/toplevels/top_panel_screen0/size --type integer 24
[Exec. after switch to normal:] cellwriter --hide-window; cairo-dock -o
CellWriter is included by default; the commands show it in portrait and hide it in landscape. The Cairo (or Glx) Dock commands are to close the dock and restart it after rotation so it resizes correctly. This is no longer necessary with recent versions. The gconftool command resizes the top panel to a larger size (from the default 24) in portrait so it is more touch friendly. For the bottom panel just substitute bottom_panel_screen0 for top_panel_screen0. To verify what your default panel size is use Configuration Editor (you may have to make it visible through System > Preferences > Main Menu). Go to Applications > System Tools > Configuration Editor. Then look in apps > panel > default_setup > toplevels, then top_panel or bottom_panel.
Method 4: The wacomrotate daemon
Tom Jaeger, developer of EasyStroke, came up with an elegant solution. He wrote a daemon in C called wacomrotate that detects current screen orientation and automatically rotates the Wacom input tools stylus, eraser, and touch to the same orientation.
Go to Tom's repository and download the appropriate deb package that contains his C daemon for your release and install type i.e. 32-bit v.s. 64-bit. For e.g., if you have a 64-bit install of Lucid it would be “wacomrotate_0.3.1_amd64.deb” dated 4-13-10. For a 32-bit install of Maverick it would be “wacomrotate_0.3.1-0thjaeger1_i386.deb” dated 9-15-10, etc. Save to desktop. Then double-click on it and let the deb package installer install it. It will automatically install itself into Startup Applications so that it is auto-started at boot. If you grabbed the wrong deb by mistake the Debian Installer will tell you so and refuse to install the package.
He also supplied the following command line command to be used in conjunction with his wacomrotate daemon.
For right handed Portrait rotation use:
Code:
xrandr -q | grep -q '+\w* (' && xrandr -o right || xrandr -o normal
or for left handed Portrait rotation use:
Code:
xrandr -q | grep -q '+\w* (' && xrandr -o left || xrandr -o normal
You'll want to put the command into a Launcher or create a Key Binding as described below.
Implementing a Script with a Launcher or Key Binding
a) Script
1) Open Text Editor (gedit) and create a new .txt file.
2) Into it place the script of your choice. Obviously if you're going to use the wacomrotate daemon you'll need Tom's command (or you can skip this and with his command go straight to the key binding method below).
3) Name the script and Save the script as .yourscriptname.sh. The period in front of the name is makes it a hidden file. This is useful if you place the file in your /home/yourusername directory. That will help prevent directory clutter. If you decide to create a folder/directory bin (/home/yourusername/bin) for your scripts you probably won't want to make it hidden.
4) Now you need to make the script file executable. Right click on the text file and choose Properties. In the Permissions tab check the “Allow executing file as a program” and close. Or in a terminal:
Code:
chmod +x ~/.yourscriptname.sh
5) The Tablet PC Automatic Rotation Script needs to be set up to auto-start. Go to System->Preferences->Startup Applications and click on Add and for the command enter /home/yourusername/.automagic_rotation.sh. And title it “Auto-magic Rotation” or whatever you like.
b) Launcher: for methods 1 & 4
1) Next create a launcher on the desktop by right clicking on it and choosing Create Launcher... Give it a name and in the Command box type the path to the text file you made executable i.e. /home/yourusername/Desktop/.yourscriptname.sh.
Note: when you clean up the Desktop and move the script to say, /home/yourusername or /home/yourusername/bin directory, remember to change the path in the Launcher's command box to reflect the new path.
2) Double click on the launcher's icon and watch the screen rotate! Check that your stylus, eraser, and touch are oriented and working correctly. Double click again and rotate back.
3) If you want, move the launcher to a panel or to a dock, like Cairo-dock, and then a single click will rotate the screen.
c) Button/key Binding: for methods 1 & 4. To further integrate screen rotation into your tablet PC you can do a key binding to a key, preferably a bezel button. A bezel button is one of the buttons on the edge of the screen still accessible in tablet mode.
While a HP TX2000 is used as an example on how to set up the bezel buttons, most of the information should generalize to other tablet PC's. For further explanation see Appendix 2 below. With the TX2000 only 2 bezel buttons ever worked, see Miscellaneous Notes below. And starting with Lucid the DVD button also stopped working, leaving only the "Q" button.
1) To get the DVD button working again and launching the mediaplayer as it did before Lucid edit the hewlett-packard keymap in /lib/udev/keymaps with:
Code:
gksudo gedit /lib/udev/keymaps/hewlett-packard
like so:
Code:
#0x08e dvd
0x08e media
2) To assign the "Q" button to the XF86Launch5 KeySym first edit the hewlett-packard-pavilion keymap in /lib/udev/keymaps using:
Code:
gksudo gedit /lib/udev/keymaps/hewlett-packard-pavilion
And make the following change:
Code:
#0x88 media # FIXME: quick play
0x88
Now edit rc.local in /etc:
Code:
gksudo gedit /etc/rc.local
and add:
Code:
setkeycodes e008 184
above the exit 0 line and reboot.
3) Open the CompizConfig Settings Manager (CCSM). You may need to install it first. In General open Commands. Make sure the Enable Commands box is checked. In the Commands tab pick a command line and type in the name and path of the executable rotation script text file and close. If you're running the wacomrotate daemon you can put in Tom's command directly instead of the path to the rotation script.
4) Next select the Key Bindings tab. Pick the Run command line that has the same number as the Command line # you put the rotation script file name (and path) in. Click on the Disabled button to the right of Run command #. Click the Enabled box and then the Grab key combination button. Press the Q button. You should see XF86Launch5 appear. Close CompizConfig.
5) Now press the "Q" bezel button and watch your screen rotate!
Miscellaneous Notes
With HP TX2000's we never got a signal, in xev or anything else, from the two blue led buttons on the bottom right edge of our screen, one of which is the original rotation button. Starting with Karmic we lost the DVD bezel button too. And the Q key (which we were using as a substitute rotation key) became the only active bezel button. It now codes XF86AudioMedia and launches the mediaplayer like the DVD key used to and should do. Presumably this is due to a bug(s) in hp-wmi. Red_Lion looking at his DSDT thinks the "bezel buttons parsing via PNP0C09 method _Q16." PNP0C09 is the Microsoft acpi-compatible embedded controller. A summary of what we have learned so far is in posts #273 & 274 on this thread. There are similar problems with HP's TX2500 and TX2z bezel buttons, again presumably due to the same hp-wmi bug.
Bezel Button Update: tipp98 is currently investigating the problem and has made progress! He's provided a summary of his findings to date on post #601. Even more information is available on this linux-acpi mailing list thread.
For us HP TX2000, TX2500, & TX2z owners to get auto-magic rotation we needed to detect a signal from our swivel hinge. Nothing came through on xev, or acpi_listen and in /var/log/messages either. Then MisteR2 located the signal to the HP-WMI kernel module.
Previous versions of Magick Rotation (Red_Lion's applet for auto-magic rotation in pygtk): 0.5 is at post #528. 0.4 (first to support Lucid) is at post #484; 0.3-3 is at post #315; 0.2-5 is at post #291; 0.2-4 is at post #279. Also 0.2-3 at post #272 & 0.2-2 at post #265.
The Auto-magic Rotation Script HOW TO is at post #225.
Both the Automatic Rotation script and Magick Rotation (they use the swivel hinge switch signal) work in Lucid, Maverick, and Natty for HP's TC4200, TC4400, TX2000, TX2500, TX2z, 2710p, 2730p, and TM2t.
Sources
Many thanks to the Tom Jaeger and the authors of the following excellent tutorials and associated threads among others:
by mirosol (alternative TX2000 rotation script): http://mirosol.kapsi.fi/tx2020/tx2000howto.htm
alternative TX2500 rotation script by Shm (typo corrected by Pietro Battiston: http://www.pietrobattiston.it/wiki/d...avilion_tx2500): http://ubuntuforums.org/showthread.php?t=845911&page=35
toobaz (Pietro Battiston) has updated his TX2500 wiki for Karmic. He has an interesting take on setting up the rotation scripts there.
Toshiba M700 rotation script: https://wiki.ubuntu.com/SergioZanche...ibaPortegeM700
Appendix 1: enabling video driver rotation
The proprietary Nvidia driver requires the following option in the xorg.conf:
Code:
Option "RandRRotation" "on"
in Section "Device" with the Identifier labeled "Configured Video Device" or "Default Device", depending on your Xserver version.
Most Intel MB chipsets using the Xorg Intel video driver don't require any extra configuration. However some may require the same option, those chipsets that need a xorg.conf for proper configuration.
The ATI proprietary "fglrx" driver through Catalyst should work without any xorg.conf or option added to it. If you have any video issues check out the Unofficial Wiki for the AMD Linux Driver site.
Appendix 2: Bezel Buttons; using mainly the HP TX2000 as an example
First you want to check if the keys are emitting a keycode. There are several diagnostic tests to look for a keycode among them xev and evtest. Let's use xev. In a terminal type:
and hit enter. A little box pops up. Press one of the keys/buttons in question and then close the box. The terminal will fill with output. You are looking for keywords like KeyPress, keycode, and keysym. You can copy and paste the output into gedit and then do a find for them. You are looking for the keycode number and the little sections of output that contain it. There should be two, one for the KeyPress event and one for the KeyRelease event. Then repeat for the next key. Remember the keycodes you get from xev are the X keycodes (hence the x in the name, xev = X event). If there are keycodes you should be able to assign them through Xmodmap, xbindkeys, xdotool, etc.
Now if there is no X keycode that is another situation and there are several possibilities.
1) Something is going wrong with the chain: kernel keycode > udev key mapping (keysym assignment) > X keycode. This is what the rest of appendix 2 deals with, a step by step guide to diagnose the chain.
Other possibilities include:
2) The BIOS has changed key assignments and the kernel driver code that is reading the key assignment needs to be changed to reflect that. Examples of that would be the code in hp-wmi.c or thinkpad-acpi.c. The compiled versions of those are the hp-wmi.ko and thinkpad-acpi.ko (ko = kernel object i.e module/driver) you see in /lib/modules/yourcurrentkernel/kernel/drivers/platform/x86. In which case you may need to work with the kernel source code of the appropriate kernel module/driver and change the hex/scan code assignments. Then compile the module to test your changes. Examples of that being done for the dell-wmi.c are in post #1176 and post #1587 of the N-Trig HOW TO.
3) The final possiblity is either a kernel module/driver has never been written or, if one of the current modules is the appropriate driver, the code has never been written for it to support the buttons/keys in question. Fujitsu tablet PCs "enjoy" a special case of this. While the fujitsu-tablet.c (fujitsu-tablet.ko) module which supports the bezel buttons has been written and submitted to the kernel for unknown reasons it has never been accepted. So to obtain the kernel module/driver (which comes in the fjbtndrv package) you need to use either Robert Gerlach's fjbtndrv PPA or SourceForge site and compile it.
a) kernel codes The first step is to find the bezel button's kernel scan codes. Enter a console with <ctrl-alt-F1>; to get back to X enter <ctrl-alt-F7>. Then enter showkey -s in the console and press the bezel buttons. Only the scan code from the Q key (none of the other 3 do anything) appears: 0xe0 0x6d 0xe0 0xed. Next find the kernel keycodes by entering showkey -k and press the buttons which shows (the two bottom buttons do nothing): DVD button = 389 and Q button = 226. So the bezel button assignments from the kernel are:
Code:
DVD button scan code = ??? keycode = 389
Q button scan code = 0xe0 0x6d 0xe0 0xed keycode = 226
Rotation button N/A
Brightness button N/A
The keys and their corresponding key codes are defined in input.h at /usr/include/linux.
b) udev codes Now using the README at /usr/share/doc/udev/README.keymap.txt let's dump the current mapping and determine the udev scan codes and key codes. To do this we need to know the input/event the keyboard is on. Enter in a terminal /lib/udev/findkeyboards. The output shows the keyboard is on event 5.
Quote:
USB keyboard: input/event5
Or use ls -l /dev/input/by-path and look for -event-kbd.
Quote:
lrwxrwxrwx 1 root root 9 2011-06-01 16:05 platform-i8042-serio-0-event-kbd -> ../event5
Then using that event# dump the current udev keymapping into a text file for reference:
Code:
sudo /lib/udev/keymap input/event5 > /home/yourusername/orig-map.txt
or
sudo /lib/udev/keymap input/event5 > ~/orig-map.txt
To determine the udev codes run in a terminal the following command: sudo /lib/udev/keymap -i input/event5 Then press the bezel button(s) or multimedia/function keys of interest. Use esc to exit. If it shows a tendency to scroll away, use: sudo /lib/udev/keymap -i input/event5 | less And after pressing the bezel buttons, again enter esc to exit, and you will see the scan codes and the associated udev key codes. Enter ctrl-z to exit less. The output shows:
Code:
scan code: 0x8E key code: dvd
scan code: 0x88 key code: media
So now the bezel button assignments from the kernel and udev are:
Code:
DVD button scan code = ??? keycode = 389 scan code: 0x8E keycode: dvd
Q button scan code = 0xe0 0x6d 0xe0 0xed keycode = 226 scan code: 0x88 keycode: media
Note: to find the corresponding X keycode add 8 to the kernel keycode. See e) below.
c) udev rules and keymaps
In /lib/udev/rules.d you'll see the Hewlett-Packard rules in the 95-keymap.rules file. They will apply all the keymaps that the rules match. The match is made to the Vendor and then the dmi id's product_name and board_version (/sys/class/dmi/id). To determine the last two enter the following two commands:
Code:
sudo dmidecode --string system-product-name
sudo dmidecode --string baseboard-product-name
The results being:
Quote:
HP Pavilion tx2000 Notebook PC
30E5
So the rule matches cause the following hewlett-packard keymaps in /lib/udev/keymaps to be applied: hewlett-packard, hewlett-packard-tablet, hewlett-packard-pavilion, and hewlett-packard-tx2. Looking in them we discover that hewlett-packard contains 0x08e dvd and hewlett-packard-pavilion has 0x88 media. Now we know where the udev codes are coming from.
c) changing udev keymaps
Clearly we can edit and change the rules or the keymaps. While the DVD button seems to be recognized by udev it appears to do nothing and acts broken. Can we get it to do anything? Editing the hewlett-packard keymap in /lib/udev/keymaps like so:
Code:
#0x08e dvd
0x08e media
Results in, after a reboot, the DVD bezel key suddenly working again! And it launches the mediaplayer like it used to do and just like the Q key does now. So we are back to two working bezel buttons. But we don't need both assigned to media so let's remove the media assignment from the Q button. Edit the hewlett-packard-pavilion keymap in /lib/udev/keymaps using:
Code:
gksudo gedit /lib/udev/keymaps/hewlett-packard-pavilion
And make the following change:
Code:
#0x88 media # FIXME: quick play
0x88
After a reboot if you check the keymap:
Code:
sudo /lib/udev/keymap input/event4 > /home/username/mod-key-map.txt
You'll find 0x088 media changed to 0x088 reserved indicating the Q button is unassigned.
d) assign the Q button to the XF86Launch5 KeySym with setkeycodes in rc.local
To find the usable form of the kernel scan code needed by setkeycodes press the Q button and run:
You should see:
Quote:
[ 109.500951] atkbd serio0: Unknown key pressed (translated set 2, code 0x88 on isa0060/serio0).
[ 109.500956] atkbd serio0: Use 'setkeycodes e008 <keycode>' to make it known.
[ 109.502910] atkbd serio0: Unknown key released (translated set 2, code 0x88 on isa0060/serio0).
[ 109.502914] atkbd serio0: Use 'setkeycodes e008 <keycode>' to make it known.
Dmesg has kindly done the conversion for us and e008 is what we want to use.
Now we need to assign the "Q" button to XF86Launch5 in order to bind it into a rotation script. We've been traditionally using XF86Launch5 to avoid conflicting with any other key assignment. To determine the keycode for XF86Launch5 run this command:
Code:
xmodmap -pke | grep XF86
In the output we see:
Quote:
keycode 192 = XF86Launch5 NoSymbol XF86Launch5
Notice as the command name xmodmap implies 192 is a X keycode. Recall to get the kernel keycode you need to subtract 8 from the X keycode. So 192 - 8 = 184. Now using 184 enter in rc.local in /etc the following:
Code:
setkeycodes e008 184
above the exit 0 line and reboot. By adding it to rc.local we avoid prefacing it with sudo since rc.local runs before X starts. Now the Q button is assigned to XF86Launch5 and is ready to be bound in CCSM to a rotation script (see "Implementing a Script" c) above). You can verify this by opening up a terminal and running “xev”. A box will pop up. Press the Q bezel button and then close the xev box. In the ouput you will see for the bezel key press XF86Launch5.
TA DA! We're back to where we were pre-Lucid (well OK, Karmic). Two working bezel buttons with DVD calling the music player and Q the rotation script.
Another example of using setkeycodes is the Thinkpad X201t script "setX201tKeys.sh" by linuxd00 from "[HOW TO]Lenovo X201 tablet. Enable your Tablet buttons and some little surprises".
Code:
#!/bin/bash
sudo setkeycodes 0x67 148 # unlabeled(rotating arrow) button mapped to KeySym: XF86Launch1 - X keycode is 156
sudo setkeycodes 0x6c 120 # Rotatebutton button mapped to KeySym: XF86LaunchA - X keycode is 128
sudo setkeycodes 0x68 204 # Toolbarbutton button mapped to KeySym: XF86LaunchB - X keycode is 212
sudo setkeycodes 0x66 149 # Padlock button mapped to KeySym: XF86Launch2 - X keycode is 157
The Thinkwiki.org has more on Thinkpad bezel buttons.
e) X keycodes
The Xserver currently doesn't process keycodes greater than 255 due to core protocol limitations. This is why some keys don't generate any events. X also requires an offset of 8 from the kernel key code. Recall there is a list of kernel key values in input.h. To get the corresponding X keycode simply add 8 to the kernel keycode:
Code:
X keycode = kernel keycode + 8 (provided the new X keycode is not greater than 255)
So for example the Q button's X keycode would be:
Code:
X key code = 234 = 226 + 8
f) Xmodmap (method used prior to Lucid)
1) Open up a terminal. Type “xev” and enter. A box will pop up. Press the bezel button and then close the xev box. Then look for the returned keycode value for the bezel key press. (For a HP TX2000 it was keycode 201 for the “Q” key in Intrepid (205 in Hardy)).
2) Open a text file on the desktop. In it enter the keycode e.g. 201:
Code:
keycode 201 = XF86Launch5
where in this example XF86Launch5 is a key label not being used by any other key code. Save the text file as “.Xmodmap” in your home/user/ directory. The Xmodmap will become active on reboot.
After restart open up a terminal and run “xev”. Press the bezel key. You should see the keycode number as before now associated with in our example XF86Launch5.
*thanks to Ayuthia for his assistance
Appendix 3: HP Elitebook Tablet PC Thumb Scroll Bezel Button
Sometimes the showkey command in appendix 2 a) doesn't yield a scan code. In this example this Elitebook's thumb scroll scan codes were found in the kern.log.
Code:
Mar 6 12:30:22 MisfitToy kernel: [13086.240796] atkbd serio0: Unknown key released (translated set 2, code 0x86 on isa0060/serio0).
Mar 6 12:30:22 MisfitToy kernel: [13086.240806] atkbd serio0: Use 'setkeycodes e006 <keycode>' to make it known.
Mar 6 12:30:22 MisfitToy kernel: [13086.531892] atkbd serio0: Unknown key pressed (translated set 2, code 0x87 on isa0060/serio0).
Mar 6 12:30:22 MisfitToy kernel: [13086.531902] atkbd serio0: Use 'setkeycodes e007 <keycode>' to make it known.
Looking in the:
Code:
xmodmap -pke > xmodmap-pke.txt
output shows these X keycodes which are of interest.
Code:
keycode 111 = Up NoSymbol Up
keycode 112 = Prior NoSymbol Prior
keycode 116 = Down NoSymbol Down
keycode 117 = Next NoSymbol Next
To get the thumb scroll button to work we'll elect to use Prior and Next. Remembering to subtract 8 from the X keycodes, enter in rc.local:
Code:
setkeycodes e006 104
setkeycodes e007 109
above the exit 0 line and reboot. TA DA! Your thumb rocker switch now scrolls.
*thanks to robbyb413 on Mint forums for his assistance
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Awesome post .... you folks are wonderful!!
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi favux
Can you change the "sudo gedit etc/x11/xorg.conf" to "sudo gedit /etc/X11/xorg.conf"? I think there is missing a "/" and a capital "X" in that line. Of course both without the quotes!
Martin :-)
-
1 Attachment(s)
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi martin,
You are correct. Thanks for pointing it out. It's fixed.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Thanks for the post. The only thing that I can't get to work is the stylus calibration when I rotate.
Touch screen works.
Key binding is working with 'Q'
But when I try to use the stylus everything is crazy. Any ideas on what may be causing this?
using tx2500.
Thanks
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi fbdelivers,
The first thing that comes to mind is that your name for "stylus" in xorg.conf is different from "stylus" in the scripts. Check your xorg.conf and look at the stylus name in the "InputDevice" stylus section and in the "ServerLayout" section.
And remember in xorg.conf it's case specific. In other words "Stylus" is not the same as "stylus". Probably best to change the script name unless you want to get into checking your .xinitrc's.
Let me know.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi Favux
How is the calibration for the stylus working when you have rotated your screen?
Mine is off with at least half a centimeter, but is perfect when the screen is normal.
Did you also use Xournal? Do you have pressure sensitivity in that program (or in any programs)?
Mine is the same in both GIMP and Xournal meaning NO sensitivity. It would be great to have some kind of sensitivity when I fx. is using the onscreen keyboard in Cellwriter. As it is now, it is impossible to use. You can only wright reeeaaalllllyyyyy sssslllloooowwwwwllllyyy to be sure you hit the right letter!!!
Martin :-)
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi martin,
My calibration is the same rotated or unrotated. Have you tried calibrating when rotated? I added wacomcpl the my System>Preferences menu using System>Preferences>Main Menu. I called it Wacom Tablet Calibration and in the command box put "wacomcpl". This way it is easy to calibrate it rotated. But to be honest I haven't needed to do this. Hopefully that's all you need to do, and we haven't found a problem with "radeon"!
Yes I have pressure sensitivity in Xournal, Gimp, and Inkscape.
First I'd suggest you go to the Linux Wacom Project's Using Xsetwacom HOWTO at:
http://linuxwacom.sourceforge.net/in...owto/xsetwacom
if you haven't already. Lots of good info., esp. on using terminal to check your pressure sensitivity, etc. Remember the tool names are case sensitive so stylus is not the same as Stylus. Check your xorg.conf if you don't remember. This gives you access to settings that aren't necessarily in wacomcpl.
Xournal: in Options do you have Xinput checked? Do you have pressure sensitivity checked?
Inkscape: Have you gone to File>Input Devices and configured stylus, eraser, and touch?
Gimp:
You probably want to check out Drawing Tablets-Wilber's Wiki at:
http://wiki.gimp.org/gimp/DrawingTablets
Lots of good info. but to set up Gimp you want the hotlink Pressure Sensitivity under Enabling Gimp Pressure Sensitivity. When it says File>Preferences it means Edit>Preferences. Also the Device Status dialog is located in Windows>Dockable Dialogs>Device Status. Just follow the steps and you should have your stylus, eraser, and pressure working in short order. Hope this helps.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hey martin,
Another thought. I have noticed occasionally, if I've opened a program in one orientation and then rotate to another orientation, things can be off. It mainly, or exclusively, happens in Gimp. So I guess I just have developed a habit of only opening the program once I'm in the orientation I want. I really wasn't aware I was doing that until just now.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
No, i didn't have pressure sensitivity checked in xournal - and now it works! Thanks.
I now remember that you earlier gave me the links for the Wacom sites. I only remember that I didn't understand much! :-) I'll take another look.
Have you tried the keyboard in Cellwriter (or the keyboard in Onboard)? Is it easy to write with?
I will try to calibrate the stylus when the screen is rotated and see what happens.
Thanks for the quick reply.
Martin :-)
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi martin,
I just use Cell Writer. It has the key board and the letter recognition feature too. It's as good as the MS input panel. I have it set in Sessions so it's available at boot.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
I also made a startup-session for Cellwriter.
Great minds think alike! :-D
How is the keyboard working for you. Is it sensitive enough for writing?
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi Martin,
I'm writing this with Cell Writer's keyboard! Does this answer your question? It's slower than typing though.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Aha!
I just found this lines from the Wacom howto:
Code:
If you want to know what the current (or default) pressure sensitivity setting is, then:
[jej@ayukawa linuxwacom]$xsetwacom -s get Stylus PressCurve (output in xsetwacom format)
xsetwacom set stylus PressCurve "0 15 85 100"
or
[jej@ayukawa linuxwacom]$xsetwacom -x get Stylus PressCurve (output in xorg.conf Option format)
Option "PressCurve" "0,15,85,100"
[jej@ayukawa linuxwacom]$xsetwacom -x getdefault Stylus PressCurve
Option "PressCurve" "0,0,100,100"
If you want to set the pressure sensitivity a bit softer, then:
[jej@ayukawa linuxwacom]$xsetwacom set Stylus PressCurve 0 15 85 100
and
Code:
PressCurve i1 i2 i3 i4 sets the pressure bezier curve, where i1+i4=100; i2+i3=100
The question is then: How do I get it to be more sensitive than the example (0 15 85 100).....beside just trying and trying?
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi martin,
As far as I know that's what you do. Apparently it's an individual preference. I have seen settings like: 5 15 85 95 and 5 20 80 95. But I don't know what the "standard" settings are. I'm not a graphics artist, I just mess around.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Quote:
Originally Posted by
Favux
Re: TX2500 Tablet PC
Note: TX2500 users. The ATI propietary driver "flgrx" (up to and including Catalyst 8.11) does not support rotation. For rotation you will have to use Xorg's "radeon" driver.
I can't get rotation to work, but I just "got it" that the proprietary drivers might be the problem. Guess I should have read the first line of the instructions. Everything else is working in my tx2500. Backing off the ATI driver next. I'll be back. ;(
-
2 Attachment(s)
Re: How to Rotate the Screen for a TX2000 Tablet PC
Quote:
Originally Posted by
Favux
Hi fbdelivers,
The first thing that comes to mind is that your name for "stylus" in xorg.conf is different from "stylus" in the scripts. Check your xorg.conf and look at the stylus name in the "InputDevice" stylus section and in the "ServerLayout" section.
And remember in xorg.conf it's case specific. In other words "Stylus" is not the same as "stylus". Probably best to change the script name unless you want to get into checking your .xinitrc's.
Let me know.
Thanks for the response. I double checked my script and xorg.conf file and they are using the same name.
Here is my xorg file and script I'm using if that helps. I may be just missing something.
On a side note when I run wacomcpl it doesn't show any devices available. So maybe I should start from scratch with my wacom configuration.
-
1 Attachment(s)
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi fbdelivers,
I think we have you sorted out now. The clue is that in wacomcpl you don't see stylus, eraser, or touch. That means the linuxwacom kernel module is not detecting any usb inputs. You do have a TX2500, correct? I think that means your stylus is working through HAL. You do have it unrotated right? My stylus didn't work through HAL. I wonder if Tom Jaeger's wacomrotate daemon would rotate your stylus which is working through HAL? But you don't have eraser, side button or touch, right?
Your xorg.conf is a TX2000 xorg.conf, not a TX2500 xorg.conf. Look at the difference in usb input:
TX2000(yours)
Code:
Option "Device" "/dev/input/by-path/pci-0000:00:0b.1-usb-0:2.3:1.0-event-mouse"
TX2500
Code:
Option "Device" "/dev/input/by-path/pci-0000:00:14.5-usb-0:2:1.0-event-mouse"
So I have attached a TX2500 xorg.conf from a laptop that has working tablet features.
You can modify it some, using your video section for example. Notice how Synaptic Touchpad is commented out. HAL handles it fine. I notice you have some extra configuration on yours. I think HAL will handle that to. Notice the mouse is handled through HAL. The keyboard could be handled through HAL, but HAL breaks single key key bindings. So we wouldn't be able to use your "Q" key for screen rotation if we used HAL.
Try replacing your xorg.conf with the TX2500 xorg.conf (with changes you feel appropriate). Of course back up your xorg.conf first.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Awesome. You had my xorg.conf figured out. Using your updated tx2500 did the trick and rotation works as per the script I was using before. Very cool.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi fbdelivers,
Great! Isn't being able to use a tablet pc as a tablet nice!
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Quote:
Originally Posted by
Favux
Hi fbdelivers,
Great! Isn't being able to use a tablet pc as a tablet nice!
Yes. With full rotation support I can finally say goodbye to the vista partition.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Quote:
Originally Posted by
Favux
Hi fbdelivers,
Great! Isn't being able to use a tablet pc as a tablet nice!
Yes. With full rotation support I can now say goodbye to my vista partition.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Quote:
Originally Posted by
Favux
Hi fbdelivers,
Great! Isn't being able to use a tablet pc as a tablet nice!
Yes. With full rotation support I can now say goodbye to my vista partition.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Wow! fbdelivers, a triple post. A new record! The forums been flaky tonight.
Hi Riverhed and DrakeGis,
Drew,
Did you run gali98's 11-3-08 tutorial? Why don't you post your xorg.conf.
DrakeGis,
The output of dmesg | grep Wacom :
Quote:
[ 18.048515] input: Wacom ISDv4 93 as /devices/pci0000:00/0000:00:14.5/usb6/6-2/6-2:1.0/input/input10
[ 18.292550] input: Wacom ISDv4 93 as /devices/pci0000:00/0000:00:14.5/usb6/6-2/6-2:1.1/input/input11
[ 18.354005] wacom: v1.49:USB Wacom Graphire and Wacom Intuos tablet driver
seems to indicate you have the wacom module correctly loaded and you should be seeing stylus and touch activity. So it is probably a xorg.conf problem or in .xinitrc or xinitrc. I don't know for sure if "radeon" supports compiz. I guess we'll have to find out. Xorg is promising to add 3d to "radeon" so compiz should be supported soon, if it isn't already.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Quote:
Originally Posted by
Favux
Wow! fbdelivers, a triple post. A new record! The forums been flaky tonight.
The embarrassment of creating a new record is all worth it with rotation working now :p
I don't know what was going on last night.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi everybody,
I thought I'd mention that I went through gali98's tutorial and installed linuxwacom 0.8.2. I read through all the release notes and it seemed like a worthwhile thing to try. It works fine. I just changed 0.8.1-6 to 0.8.2 in the tutorial. The notes talked about more features for wacomcpl. I don't really see anything new though.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Favux, thanks !!!!. I figure out that there was a problem in the xorg.conf. I was able to fix it. I would like to know more about the calibration process. It seems to me that it is very hard to get the touch correctly calibrated...
I haven't try the rotation. I guess it will have to wait until next weekend. Does anyone has compiz and rotation working ?
Thanks again.
D.
Quote:
Originally Posted by
Favux
Wow! fbdelivers, a triple post. A new record! The forums been flaky tonight.
Hi Riverhed and DrakeGis,
DrakeGis,
The output of dmesg | grep Wacom :
seems to indicate you have the wacom module correctly loaded and you should be seeing stylus and touch activity. So it is probably a xorg.conf problem or in .xinitrc or xinitrc. I don't know for sure if "radeon" supports compiz. I guess we'll have to find out. Xorg is promising to add 3d to "radeon" so compiz should be supported soon, if it isn't already.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Quote:
Originally Posted by
Favux
and a TX2500 Tablet PC
:::
9)Go to System>Preferences>CompizConfig Settings Manager.
Favux,
I got rotation working on my HP tx2510 running Ubuntu 8.10 using your instructions. Thank you!
Feedback:
I would possibly add one update to your instructions though. Step 9) describes using Compiz, which was not installed by default on my system, which you might mention in your instructions, that it might need to be installed. I had to install it before I could proceed. That said, it's a pretty cool tool. Thanks for introducing me to it too.
The only thing left for me to fix now is that the touchpad/mouse/pen/eraser do not rotate. Almost there.
Cheers!
Steve
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi DrakeGis and Tekrytor,
DrakeGis,
You're right, touch isn't as sensitive as on Vista. That's one of the reasons I moved to 0.8.2, especially when I saw the stuff about wacomcpl. But if improved touch is in there I haven't figured it out.
Tekrytor,
Quote:
The only thing left for me to fix now is that the touchpad/mouse/pen/eraser do not rotate.
That's what my rotation HOW TO is for. The scripts are not just suppose to rotate the screen, they are suppose to rotate stylus, eraser, touch, etc.. That's what I mean by working rotation. So something is not right. Which method (script) are you using? Please post your xorg.conf.
I'm still not sure if TX2500 owners with the ATI video chipset can use Compiz with Xorg's "radeon" driver (right now I'm thinking they can't). I know they can with flgrx, but it doesn't allow rotation. So I feel I can't just tell folks to install it. If Compiz works with "radeon" I could add that. Someone please let me know.
If you don't have Compiz installed then you have metacity, and it's my understanding the keybinding commands on metacity are essentially the same. Since I haven't used them I'd appreciate input on how to.
So I'm clear. You are able to use Compiz with "radeon" as your video driver? Do you know if this is the latest "radeon" driver?
Talk to you soon.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi DrakeGis,
If the touchscreen on the TX2000 and TX2500 is capacitive, which I believe it is, I have touchscreen calibration.
The xsetwacom parameter "Capacity integer (1 -5)" sets the touch sensitivity level for capacitive touch device (default is 3 for capacitive tools, -1 for none capacitve tools). Add it to your /home/username/.xinitrc like so:
Code:
xsetwacom set touch bottomy "3969"
xsetwacom set touch bottomx "4028"
xsetwacom set touch topy "215"
xsetwacom set touch topx "140"
xsetwacom set touch Capacity "1"
etc. . .
I just tried the numbers between 1 and 5, restarting X in between. Not quite as much variation as I would have expected, but 1 seems the most sensitive.
Give it a try and let me know.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Thanks again for your help !!!! I'm flying tomorrow, so probably I will try to do some testing with the touch calibration, while bored at the airport (Actually, I want to play Battle for Wesnoth with my finger :D ).
I do have some questions:
1) Where did you get the numbers (for bottomy,bottomx, topy and topx) ? from wacdump ?
2) I can't get xev return a value for the "Q" key. BUT, I don't originally have a "keyboard" section in my /etc/X11/xorg.conf.
3) I had some problem with the ATI drivers, when reproducing video the are where the video is reproduced 'flash' or 'blink' (I'm not sure how to decribe this). Has anyone found a similar problem ? Because of that I guess I'm running radeon drivers (how can I verify this ? Again no information in xorg.conf ) . I any case I'm not running Compiz, so where/how can I specify the link between the key value (once I have one) and the command-to-run (I see that System->Preferences->Keyboard Shortcuts allows me to edit setting but no to add )
4) If I'm reading correctly the xorg.conf file specify the same event for stylus and for eraser. Can you set up the eraser (the back of the stylus) to trigger a right-click and the stylus to trigger a left-click and activate the rotation script with the button of the stylus ?
Quote:
Originally Posted by
Favux
Hi DrakeGis,
If the touchscreen on the TX2000 and TX2500 is capacitive, which I believe it is, I have touchscreen calibration.
The xsetwacom parameter "Capacity integer (1 -5)" sets the touch sensitivity level for capacitive touch device (default is 3 for capacitive tools, -1 for none capacitve tools). Add it to your /home/username/.xinitrc like so:
Code:
xsetwacom set touch bottomy "3969"
xsetwacom set touch bottomx "4028"
xsetwacom set touch topy "215"
xsetwacom set touch topx "140"
xsetwacom set touch Capacity "1"
etc. . .
I just tried the numbers between 1 and 5, restarting X in between. Not quite as much variation as I would have expected, but 1 seems the most sensitive.
Give it a try and let me know.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi DrakeGis,
No the numbers were in /home/user name/.xinitrc where I was telling you to add "xsetwacom set touch Capacity "1"" to the touch section. They should have been generated when you did the wacomcpl part of gali98's tutorial. I just included them so you could see what the touch section looked like and where to put Capacity.
Did you see the addendum in the Rotation HOW TO where I talked about activating the keys? This is the xorg.conf keyboard section for a TX2500:
Code:
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "dk"
EndSection
You could just add this to your xorg.conf and reboot.
If in System>Administration>Hardware Drivers you don't have the ATI proprietary driver activated then you're running on Xorg's "radeon". Also the video section in xorg.conf would have "fglrx" in it (the proprietary ATI driver). If you're not running Compiz then you should be running metacity. I think you can do the same keybinding stuff with it, and like Compiz metacity's editor would be in System>Preferences. But since I'm not using it I'm not sure.
As to the rescripting/redirecting of the stylus etc., I don't know. I never thought to try that.
-
1 Attachment(s)
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi,
I thought I'd add another rotation script. Might be useful to those with other types of tablet pc's.
Code:
# Simple rotation script
if [ -f /tmp/rotated ]; then
xrandr -o normal
xsetwacom set "stylus" Rotate none
xsetwacom set "touch" Rotate none
xsetwacom set "eraser" Rotate none
rm -f /tmp/rotated && exit 0
else
xrandr -o right
xsetwacom set "stylus" Rotate CW
xsetwacom set "touch" Rotate CW
xsetwacom set "eraser" Rotate CW
echo 1 > /tmp/rotated && exit 0
fi
Also stuck it on as an attachment.
-
1 Attachment(s)
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi Favux (and anyone else who wants to chip in),
I've almost gotten the rotate thing working, with one problem. After rotation, although the stylus behaves appropriately, it is about 2 cm off.
I tried to calibrate it with the screen rotated, but the lower right calibration box is off of the actual screen.
And application windows, when maximized, also flow off the screen.
So it appears that when rotation occurs, something isn't recognizing the the new screen dimensions.
I'm running a clean Kubuntu installation, 8.10, on an HP TX2510us. I'm using the same xorg.conf file that I was using previously in Ubuntu 8.10, which worked correctly.
I am using XRandR to rotate the screen, and the daemon to rotate the stylus. I'm attaching my xorg.conf file, in case that is of help to anyone.
Thanks for everyone's help. This is the last stage in what has turned out to be an interminably long conversion process (but then again, aren't they always?)
-
1 Attachment(s)
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi Docaltmed,
I'm not sure what the poblem is. You could run more of your stuff through HAL, commenting it out in xorg.conf.
Adding "radeon" to your video section instead of "ati" might be worth trying to fix the rotation problem. I'm going to attach a TX2500 xorg.conf. Compare it to your current xorg.conf side-by-side in a text editor. Maybe you'll spot something.
For future reference I have xorg.conf's attached to the bottom of the rotation HOW TO.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi Docaltmed,
I thought I'd mention KDE does not use Compiz-Fusion like Ubuntu/Gnome does. It uses kwin it's own aiglx/compositing tool integrated into it's window manager. This may be part of your problem.
ATI on 12-31-08 released a bunch more 3-D driver stuff to open source. Hopefully this will make for rapid advancement of Xorg's "radeon" drivers. Also I've seen folks mention a "radeonhd" and "radeonhd-c" driver for r5xx and r6xx chipsets. I'm not sure that applies to you, but it's worth checking out.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi everybody,
Since gali98 hasn't updated his tutorial in two months I took the liberty of posting my "version" with the latest Linux Wacom Drivers. If there are errors please let me know (and be kind). It's at:
http://ubuntuforums.org/showthread.p...12#post6546012
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
latitude radeon driver working well.
i used the xrand command from the first post.
i will try the scripts later.
thanks!
cellwriter is nice....
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi yurtboy,
Good! If one of the scripts or Tom Jaeger's wacomrotate work for you could you please post back. I would greatly appreciate it.
Is that a Dell latitude with multitouch? A N-trig digitizer?
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Here is the script that is working well.
Code:
#!/bin/sh
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "st$
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) $
# Using current screen orientation proceed to rotate screen and input tools.
case "$rotation" in
normal)
# -rotate to the left
xrandr -o left
xsetwacom set stylus rotate CCW
xsetwacom set touch rotate CCW
xsetwacom set eraser rotate CCW
;;
left)
# -rotate to inverted
xrandr -o inverted
xsetwacom set stylus rotate HALF
xsetwacom set touch rotate HALF
xsetwacom set eraser rotate HALF
;;
inverted)
# -rotate to the right
xrandr -o right
xsetwacom set stylus rotate CW
xsetwacom set touch rotate CW
xsetwacom set eraser rotate CW
;;
right)
# -rotate to normal
xrandr -o normal
xsetwacom set stylus rotate NONE
xsetwacom set touch rotate NONE
xsetwacom set eraser rotate NONE
;;
esac
I did nothing to alter it and it works fine.
I did have a question thought, I do not see a screen calibration tool. I tried wacomcpl but that just gives me a control panel to change some settings not a place to calibrate the pen to the screen. The reason I ask is cause when I wake from suspend the point is usually off by an inch or so and worse as you get to the top of the screen. I noticed others had this problem too.
Thanks again for all your work making the script.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi yurtboy,
Great! You're the first non-HP user to post back that that script works for you. Thank you! You have a Dell Latitude XT, correct?
As to calibration. It sounds like your stylus is working through HAL (hardware abstraction layer). There is a .fdi file somewhere controlling your stylus. I stopped trying to learn how to edit .fdi files when it became clear that HAL would only offer stylus and not the rest of my tablet features.
The quick and dirty way I use to recognize that HAL is running things is that my side-switch doesn't work. It doesn't act as a right mouse click. Also when I type "wacomcpl" in a terminal and the gui pops up "stylus", "eraser", and "touch" are absent on the left. I can't click on them to highlight them and so the calibration, screen mapping and other settings don't pop up.
To figure out what's going on I need some more information. How did you install the LinuxWacom kernel driver (which tutorial did you follow)? Is your Tablet PC usb or serial? What tablet features do you have, eg. "sylus", side-switch, "eraser", and "touch"? I probably need to see your xorg.conf. Could you please attach it to your next post.
-
1 Attachment(s)
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hello,
I started here
http://www.mayrhofer.eu.org/Default....ex=6&pageid=77
It it got the tablet to do touch but no rotate.
When I came to this thread i realized I could not use the ati driver but the radeon if I wanted to rotate.
Now that I got the script (the one posted above) to work things seem a bit better but.
1. As noted no calibrate option
2. When I shift into the rotate mode the pen works okay but it is Xournal for example scrolls endlessly if I go beyond a certain point from the right of the screen. Like if I could draw an imaginary line down the middle of the screen when I am in vertical mode, the right works great and the left does funny things like not write but scroll.
But I can draw fine on the right side of the screen so for now I figured that was good enough ( -:
3. When I am in horizonal mode the pen is off by 2-4 inches and basically of no use.
4. Lastly (other then the dream of making the touch screen work) waking from suspend seems to leave the pen off by 2-4 inches in either mode.
I am using intrepid
the xorg is attached
and on the link above the wacom is
http://www.mayrhofer.eu.org/download...3.rm1_i386.deb
I got it from this secion
Quote:
Update: Starting 2008-11-14, the integrated N_Trig touch screen works partially. That is, I can use the stylus to move the cursor and for left- (tapping) right- (the larger button on the stylus), and middle-click (the smaller button on the style), but direct finger touch does not work right now. (K)Ubuntu 8.10 already includes kernel 2.6.27 which supports the N-Trig USB device with HID events. Using the xserver-xorg-input-wacom package, the cursor can already be moved, although quite erratically. To make it usable, get the patch linuxwacom-0.8.1-3.ntrig_hack.patch from here. It applies cleanly to the Kubuntu 8.10 wacom-tools package version 0.8.1.4-0ubuntu3. I suggest to get it using "apt-get source wacom-tools", apply that patch, update the package version to something akin to a NMU release, recompile and install the new driver. Alternatively (if you trust me and my security measures for this page), you can just install my patched and pre-compiled version for x86-32 and x84-64. Note that the wacom-tools binary utilities package doesn't need to be patched (the standard Ubuntu package works).
-
1 Attachment(s)
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi yurtboy,
That was helpful. Basically N-trig needs a patch to the linuxwacom driver. So far the patch you have only works on an older linuxwacom driver. Bugs in that driver have been fixed in the newer versions. But we can't do anything about that because the patch doesn't work on them.
But it looks like we can do some stuff with the xorg.conf before we get into the more complicated driver questions.
First what I did is reorganize and clean up your xorg.conf. This is somewhat arbitrary. I'm trying to get it as close to the Xorg's default format as I understand it, and it also helps me visualize it better.
Next I turned off compiz. It isn't clear to me how well the "radeon" driver supports Compiz, so it's a complication we can eliminate. Be sure to turn off any Compiz theme you have enabled! This may help with Xournal.
The "ServerFlags" section is probably unnecessary. Back when HAL was first introduced some people thought it and xorg.conf would conflict. Since it turned out they didn't I hope we can lose it.
Next I turned off, commented out, your mouse and touchpad section. This is because HAL (hardware abstraction layer), introduced with Intrepid, should be able to run them. Also us TX2000 users had a problem where X confused "Touchpad" with "touch". So we renamed "Touchpad" "Pad" to get around it. By commenting out "Touchpad" we get the same thing. Since your mouse is different from mine I'm not entirely confident it will work through HAL. But it should.
Your Wacom "InputDevice" sections look like they have some problems. Let's save that for the next iteration of xorg.conf.
So back up your xorg.conf! I suggest you compare this xorg.conf to yours and study the changes and also make sure I didn't make an obvious goof. And if you're brave try this edited xorg.conf!
Good luck!
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
So far the Xournal does work better.
The left side seems to have more response!
Thanks!
Do you think it is worth trying to build that patch against the newer wacom?
Other notes
1. Suspend still leaves pen out of alignment
2. compiz is off
I had a nokia n800 for a bit, wonder what they use.
-
1 Attachment(s)
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi yurtboy,
Good, we're making some progress! Keep Compiz off for now.
The suspend causing misalignment may be due to not having a .xinitrc file. X doesn't restart when you come out of suspend, does it? See right now your calibrations are all in xorg.conf, and if you're loosing them during suspend they would only be reapplied after an X server restart. I'm not sure how suspend works, so I don't know for sure if a .xinitrc file would be kept or reapplied. So does wacomcpl work for you yet? Hopefully the patch is not blocking wacomcpl in wacom-tools. Maybe the next edited version of your xorg.conf below will let you use wacomcpl.
You used his deb, right? The problem is we don't know exactly what he compiled on what. Or maybe you do. Xorg warns against using a wacom-tools that isn't the same version as the wacom driver. They say it can crash X!
If the patch works on a later version I would say go for it. Wacom-tools 0.8.1-4 has known bugs that the later versions, like 0.8.1-6, fixed (currently on 0.8.2-2). Unfortunately he says the patch is for kernels before 2.6.27. But Intrepid comes with 2.6.27. Then he says whichever version of 2.6.27 he's using, which he doesn't specify(!), now partially supports N-trig HID! So I am very confused. I think Intrepid is currently on 2.6.27-9 and I'm using 2.6.27-11. Back when he posted it was 2.6.27-7! What I'm saying is you may not even need the patch anymore. The newer kernels may have more N-trig support built in. What I'd like to do is see if the Linux Wacom Project says anything about N-trig support. In it's change-logs or something. So don't do anything about recompiling now, but maybe start researching the question.
Now on to the new xorg.conf. What I did was remove lines from the "InputDevices" sections that I don't think should apply to a usb tablet. But since it's N-trig, I can't be sure. The lines are:
Code:
# Option "Mode" "Absolute"
# Option "ForceDevice" "ISDV4" # Tablet PC ONLY
Also notice that stylus and eraser have the same input so eraser shouldn't need the calibration lines. By the way have you enabled eraser in Gimp or Inkscape? Does it work?
Code:
# Option "TopX" "0"
# Option "TopY" "0"
# Option "BottomX" "9600"
# Option "BottomY" "7200"
Does touch work right? I ask because it has the same calibrations as the stylus. On my TX2000 they aren't even close!
According to his xorg.conf I think I'm counting four buttons. Really? You have four buttons on the stylus?
Like I thought you don't seem to need the ServerFlags section so I deleted it.
I want to point out that you could comment out the keyboard section and let HAL run that too. But HAL breaks single key key bindings. So if you have a bezel button we can get a key code on we could bind it to your rotation script. Do you want a rotation button? If so leave the keyboard active.
As before back up your xorg.conf and proceed at your own risk. Good luck!
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi yurtboy,
At the LWP's bulletin board/forum on 7/30/08 Rafi Rubin volunteered to add N-trig code to the LWP's drivers. He had some sample code and seemed to think it would be relatively simple. He asked if there was any interest in supporting a non-wacom tablet. Ultimately he wanted to support multi-touch.
There wasn't any follow-up I could see. But that doesn't necessarily mean anything. They could have continued the discussion over private channels.
So if there is more support in the kernel (honestly I don't know how to determine that exactly) so far as I can tell there may be more support through LWP too.
-
1 Attachment(s)
Re: How to Rotate the Screen for a TX2000 Tablet PC
Okay here are the results
1. I put in the new xorg file and restarted X. All seems to be working still (though I have yet to gotten scroll to work on the mouse maybe it is not there?)
2. Touch worked fine though, Xournal seemed less sensative on the top left side so that was good, more testing later.
3. I then tried to remove the wacom deb I downloaded (noted in previous message) and use the one in the ubuntu repositories. I did this rebooted and the pen did not create and action. I could click on things and watch the X or button sink in but no reponse. Like File --> Save but I would click File in the menu and it would not open.
Oh well, went back to the other one and it works again.
aptitude remove xserver-xorg-input-wacom
Went back to
xserver-xorg-input-wacom_0.8.1.4-0ubuntu3.rm1_i386.deb
4. Touch (finger) does not work yet
I did look on the threads and wrote that person back about the n-trig.
I wanted to know how to install those patches?
Or do I need to build (which would be fine is someone told which packages)
5. Attached is what I have always seen with wacomcpl
I guess what I meant before is there are no real calibration tools from what I was use to w say a Nokia n800 ie X marks on the screen to poke at to calibrate.
Alright getting closer.
Thanks!
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi yurtboy,
1. I think lack of scroll in the mouse and mouse jitters were two of the bugs in 0.8.1.4. Do you mean trackpad mouse?
2. When you say touch worked what do you mean? By touch I mean the touch screen recognized my finger or fingernail.
3. OK, stuck with the patched deb of 0.8.1.4. LinuxWacom is up to version 0.8.2-2 currently.
4a. Touch (finger) doesn't work. So in 2. you're talking about the touchpad, right? And the "mouse" associated with it?
4b. I hope he contacts you. We need to know more.
5. Above tracking in the blank spot is suppose to be the calibration button/tab. Since wacomcpl is showing stylus and eraser but not touch it looks like touch data is not being sent to Xinput. If you get a reaction at all to your finger does the pointer do something weird like immediately head to the right corner of the screen? We might want to comment out the "touch" section of your xorg.conf at some point if touch isn't working. If it isn't working why not? Also it would let us see, if by removing touch as an input (remember you have to remove it in server layout too), it is interfering with calibration for the stylus. But remember touch has the same calibration as stylus. That wouldn't be true in a Wacom tablet, so maybe the coordinates for touch are just way off?
The fact there is no calibration for the stylus for wacomcpl implies the patch isn't perfect. You could manually experiment with the settings on stylus in xorg.conf. Bit of a pain to be constantly restarting X.
What would be nice is if you'd just be a able to configure the linuxwacom kernel driver 0.8.2-2 and it would work for you. This seems unlikely at this point. Other than Rafi Rubin's two posts I haven't seen anything on the LWP's site re N-trig. All the folks claiming a working tablet seem to be getting their drivers from the same place you are.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Here's a TX2500 data point for anyone who can make use of it. I can't.
I tried for several weeks to get the calibration right when rotating the screen using the rotate daemon. And although the screen would rotate properly, and the touch and stylus functions would also rotate their behavior appropriately, both touch and stylus had a gradually increasing calibration offset moving from the left of the screen to the right. The offset increased to the right. Wacomcpl calibration was of no help, as the right lower crosshairs were off the screen in portrait mode. Messing about with xorg.conf was of no help, although it did produce some spectacularly dysfunctional results from time to time.
Tonight, on a wild hair, I used one of the scripts that Favux demonstrated in his tutorial, and voila! Perfect calibration.
I have no idea why one method would work and the other does not, but I thought the information might help you guys with the binary brain cells.
And, by the way, thanks to all of you who help the rest of us out. I hope to be able to contribute my share one of these days.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
I have gotten rotation to work on a tx2500 in Intrepid using the newest ATI driver, which can be downloaded here. Installation is easy, just run the script as sudo in a terminal and follow the directions. After restarting, the scripts from the first post (or at least the first script, that's the one I use) work for rotating the screen as long as it is not composited. I use compiz, so I just switch to metacity using the compiz icon (fusion-icon) in the dock when I want to rotate, then switch back to compiz when the screen is returned to the normal position. This is a small compromise to get everything working!
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi adamsu,
Good job! Thanks for posting. Don't give up on the compositing, ATI has released a bunch of new stuff to open source. If "fglrx" doesn't support it soon (with rotation) "radeon" might. And the Compiz developers have got their act together now, so improvements in Compiz are coming.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
hi adamsu,
I've tried the latest ATI drivers but I see there's still no rotation support.
running this command with ATI's drivers (this command works with the open source driver)-
xrandr -o inverted
I get the following output-
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 159 (RANDR)
Minor opcode of failed request: 2 (RRSetScreenConfig)
Serial number of failed request: 12
Current serial number in output stream: 12
Which is consistent with the previous version of the ATI driver.
Can you tell me what output you get?
Can you post your 'fglrxinfo' output?
Thanks,
-Aharon
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi all
I'm running intrepid on my TX2000, stylus (minus the eraser) with pressure sensitivity and touchscreen both work.
I've managed to bind the rotate script to the 'Q' LED button, however the Q and DVD buttons only work when the screen is lifted up. I've tried the omke script that microsol linked to on his howto page (located as #7 here: http://mirosol.kapsi.fi/tx2020/tx2000howto.htm) but it doesn't allow the buttons to work in tablet mode. Has there been any progress on this?
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi GrooveTherapy,
Glad you have pretty much everything working.
Right now I have my "Q" button set to Tom Jaeger's wacomrotate daemon and script. The "Q" button works fine with the screen locked down in tablet mode. As does the DVD button. When I was using one of the rotation scripts it also worked. Have you checked your bezel buttons while in tablet mode in Windows?
Regarding your eraser questions please see post #8 and the posts around it at the beginning of this thread. And in Xournal the side-switch should be the eraser.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi Favux
I tried Toms script (I had to use the i386 package) and added the -f and -t lines to the command in System->Preferences->Session and restarted X, but no luck. The Q and DVD buttons are recognized by xev, but only when the lid is up. These two buttons don't work for me in windows (even when they are up) but I always thought this was because I did not have the proper drivers for them (I reformatted the factory vista settings the day I bought my tx2000) The rotate and 'gears' button work for me in windows, even while in tablet mode.
I have the side switcher working as the eraser (it is programmable through Options->Button 3 mapping in Xournal) but the eraser is not...it defaults to the pen instead. It sounds like you're saying that the eraser input is detected, its just applications like xournal aren't programmed to do anything useful with it. Am I reading this correctly?
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi GrooveTherapy,
Your right about Xournal.
Quote:
The rotate and 'gears' button work for me in windows
We can't get them to work in linux, can't detect a signal.
It sounds like a hardware failure with the DVD and Q buttons. If your lucky it might be firmware, since it's positional in linux. Have you updated your bios? Check the HP site and see if there are bezel button drivers. It's been a while since I went there. I just use HP update, which seems to miss things like bios updates. Otherwise I hope you're still under warranty.
Edit: On Tom's daemon, the new version doesn't use the -f and -t switches.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hey Favux
I just tried the bios update and now the buttons work in tablet mode! This tx2000 is the first computer I've ever bought with my own money and I've been extremely diligent about taking care of it, so I'm glad nothing on it is broken! I assumed anything that didn't work in vista was due to the reformat...With the working DVD button, I plan to write a script that will turn off the LCD display (to save battery life while in lectures)
Between the working tablet/keys and xournal, I can finally use linux for the classroom. Thanks for the great guide!
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi GrooveTherapy,
Great! Nice work.
Thanks for the thanks.
If you get the script up and running please share.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hey all
The command:
Code:
xset dpms force off
Will turn off the display. Any input will turn it back on. I find this useful for lectures, so those who use their tablet for taking notes like I do might appreciate it. If the prof steps out of the room or does anything not worthy of writing down for an extended period, this button will save you the 6-8 watts required to run the display. All you need to do is bind it to a button, which you should be able to do in the same way Favux explains in the first post. For some reason though, gconf-editor wouldn't let me do it :confused: I'd rename the DVD key in .Xmodmap, xev would recognize it, but every time I bound any command to it in gconf-editor, it wouldn't execute.
I've had problems with gconf in hardy as well, so if anyone else is having problems, here's an alternative method for keybinding:
In terminal, run:
Code:
sudo apt-get install xbindkeys && apt-get install xbindkeys-config
xbindkeys --defaults > ~/.xbindkeysrc
Run xbindkeys-config to get to the GUI. A few default commands should be listed. If there are none, try loading the .xbindkeyrc file created above by going file -> open default file. From here, select 'New' to create a new keybinding. In the 'Key' field, hit 'Get Key' and press the key you want to bind the action to. In action, simply type the action or path to the script you want to run, such as ~/.rotation.sh or xset dpms force off. Hit apply/save apply and exit, then your new key should be ready.
These setting disable after restarting X, so one last thing is required: to start xbindkeys at login. To do this, go system->preferences->sessions. Click 'Add' and under name type 'Start xbindkeys at login' or whatever you prefer. Under command, simply type 'xbindkeys' Restart X by hitting ctrl alt del, login, and see if your key binding is still enabled.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
First of all, thanks, this was really helpful and allowed me to nuke vista (though ironically I "replaced" it with a small xp install in virtualbox). Everything seems to be working (though I miss compositing...*sniffle*), but I am having the same issue groove had (the 'Q' button does not work when the screen is in tablet mode). Xev detects nothing from it then. I would just use the same solution, but I have a tx2500z, and I can't find a bios update for it.
Any ideas?
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi cak3,
The HP site should have bios upgrades if you go to support drivers and downloads and put in your exact model number. If that doesn't work did you check out the Key code Addendum at the bottom of the Rotation HOW TO?
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
My exact model is the TX2500z, and unfortunately HP has no bios downloads available for it on the site (http://h10025.www1.hp.com/ewfrf/wc/p...oduct=3744020&)
I did use the key-code thing, thats how I got it working initiall. The 'Q' button works just fine, rotates and everything, when the screen is up, but it does nothing when it is in tablet mode.
xev detects nothing from the button (or the DVD button) when the machine is in tablet mode, and both work fine and are detected fine when the laptop is up. They worked fine in vista (though I dont have it any more) so I don't think its a hardware issue, but i suppose it could be, given that it has beem a bit since I used them in vista.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi cak3,
If you still have Vista installed you should boot into it and check it out, see if the bezel keys are working. If they are position sensitive in Vista also it would seem to suggest to me some sort of hardware problem. If they work ok and you have the latest bios I don't know what else to tell you. They updated the bios for the TX2000 like 3 to 5 times, but there hasn't been a new update in months.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi there
I finally got the "Q"-key to rotate the screen. I did it with xbindkey-config. But when I reboot the "Q"-key, the computer, the program have forgotten the command to rotate. Does enyone know how I can make it work after a reboot?
By the way Favux. Did you know there is a rotation-script in /etc/acpi? It rotates the screen 90 degrees clockwise and back again.
I also got suspend and hibernate to work. Take a look at this thread:
http://ubuntuforums.org/showpost.php...6&postcount=19
Code:
Create the following file: sudo nano /etc/pm/sleep.d/25i8042
Code:
#!/bin/bash
case "$1" in
hibernate|suspend)
# Unbind the AT keyboard interface.
if [ -f /sys/bus/platform/drivers/i8042/unbind ]; then
echo -n "i8042" > /sys/bus/platform/drivers/i8042/unbind
fi
;;
thaw|resume)
# Rebind the AT keyboard interface.
if [ -f /sys/bus/platform/drivers/i8042/bind ]; then
echo -n "i8042" > /sys/bus/platform/drivers/i8042/bind
fi
;;
*)
;;
esac
exit $?
Make sure this file is executable. There is no need to reboot your computer - your next suspend should work.
and finally the mics in the screen are working. I made a clean install of the system (8.10) yesterday and after all the updates I just for fun tried the Sound Recorder.....and the mics recorded - but I don't now why. They also work in fx Skype I just had to change some of the preferences for the ingoing sound.
Martin :-)
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
To answer myself...
How to get the "Q"-key to remember the action in xbindkeys-config after a reboot.
Go to System->Preferences->Sessions
Make a new action fx. Xbindkeys
add the command: /usr/bin/xbindkeys
save and exit.
Now the "Q"-key should remember what it is told!!! :-D
Martin :-)
tx2590oe
EDIT:
DUH!!!
I just read GrooveTherapy's post #59
He (she?) must be a GENIUS!!! :-D
Well I can then confirm it worked for me as well.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi martin,
Good couple of posts. I thought GrooveTherapy's screen dimming was clever. Hopefully between you and GrooveTherapy TX2500 users with problems can get their Q key working using xbindkeys. When did you folks start running into Q key problems? Was it a kernel update? Do I need to update the HOW TO?
Good news about the mikes, somewhere in there updates must have fixed it?
Early on I think I remember reading in a wiki or a thread about the included rotatescreen.sh. Was it for one of the early Thinkpad tablets? The X40 or 41? Anyway since I didn't have a screen-rotation in /var/lib/acpi-support, it didn't seem to apply. Especially since acpi_listen doesn't pick up anything from our hinge or rotation button. Thanks for reminding me about it, I had forgotten it was there!
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
For sound, check out this thread: http://ubuntuforums.org/showthread.php?t=843012
Or go straight to the quick guide here:
http://ubuntuforums.org/showthread.php?t=997506
That was able to get my sound issues ironed out (before, multithreaded playback and recording didn't work, now both do :D)
For TX2500 users, I'm not sure. My TX2000 hardware buttons didn't work in tablet mode until I ran the BIOS update. Enter your bios settings and see if there are any settings for it (press F2 during the phoenix splash screen at startup) I don't have a lot of confidence in this producing any useful results though.
My advice would be to contact HP and ask them about it. You could ask them if running the TX2000 bios update would help - I believe the only major hardware difference between the TX2000 and 2500 is the switch from the NVidia Geforce 6150 mobile to the ATI 3200 HD mobile. So hopefully, if that doesn't have too much bearing on the motherboard design, the bios update could work. My sister got the TX2500, so if I can talk her into installing ubuntu, I'll actually have a system to play around with and I might be able to find a fix.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Speaking about BIOS updates.
I'v got the tx2590eo with BIOS version F.05. Somewhere around I read, that there should be a F.08 or even a F.09 version for the tx2500 model. Does anybody now anything about that - maybe a link??? I can't find any link or anything.
Anybody...?
Martin :-)
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Well, I did not fix my problem with the 'Q' key, but I have some more info on the problem. It seems that, after pressing the button above the touchpad (to disable the touchpad) the 'Q' and 'DVD' keys cease to work, but that, upon pressing that button again (reenableing the touchpad) the screen rotates (and the 'Q' and 'DVD' buttons work again). So, it would seem that when the button to disable the touchpad is pressed, it takes the keycode of the 'Q' key.
Weird.
I am not sure what could cause this... it could be hardware, or some bizarre phenomenon with how linux is handling the keys. I don't have a windows install on the laptop now, so until I put one on and test it, I am just going to stick with a launcher and ordinary keyboard command to rotate screen. I'll post whatever I find out after testing it in windows.
Also, @martin : As far as I know, it would be here (http://h10025.www1.hp.com/ewfrf/wc/s...ubmit=Go%20%BB) but I suspect you already looked there and, as in the case with mine, I dont see any bios updates there.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Thanks for the link cak3, but I'v seen it already, and there is no BIOS upgrade for my model. Does everybody else on this forum who's got a tx2500 model have BIOS ver. F.05?
Sounds weird whit the button above the touchpad. My "Q"-button works fine when that button is pushed, and it still works after the touchpad has been enabled again. I'm afraid I can't help you there.
Question:
I'm using xbindkeys to let the "Q"-button flip the screen, and it also works after a reboot - thanks to Groovetherapy. My problem is, that it doesn't work after suspend or hibernate. What can I do to make it work?
Martin :-)
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi,
On my TX2000 I have bios v. F.08 which is the latest. Released in May of '08.
Quote:
by cak3
It seems that, after pressing the button above the touchpad (to disable the touchpad) the 'Q' and 'DVD' keys cease to work, but that, upon pressing that button again (reenableing the touchpad) the screen rotates (and the 'Q' and 'DVD' buttons work again). So, it would seem that when the button to disable the touchpad is pressed, it takes the keycode of the 'Q' key.
Now that is interesting. Could that imply our bottom bezel buttons and swivel hinge also go through the same "drivers" as the Synaptic Touchpad? And our problem with them is that we have an idiosyncratic version of Synaptic Touchpad that Ubuntu doesn't support. Through HAL's .fdi files or whatever?
Martin, I think there's a file or script that runs after suspend/hibernate to reconfigure the system. I can't remember it's name or where it is, but I have seen people edit it to make sure something restarts. Also I found this in a serial tablet user's xorg.conf:
Code:
Section "Module"
Load "wacom"
EndSection
Located above the beginning of the Wacom entries. I'm wondering if this would do the same thing as your "fix" with nano to /etc/modules? Are you in the mood to experiment?
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hey everyone. Just wanted to chime in and say I've just had the same thing happen to my tx2500z that cak3 had happen to his with respect to the mousepad disable button. Everytime it reconnected (push to disable, push again to re-enable/reconnect) it would flip the screen.
I wonder, if in Vista it disables the touchpad when in tablet mode (would make sense) and re-enables it when in laptop mode.
I'll take a look in Vista and see if I can trace what does what at some point (probably not today).
Later all.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hey MisteR2
Are you running hardy? I had the same problem before I upgraded to intrepid
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Ok, so I reinstalled vista (enterprise, actually, since I have a liscence for it from MSDNAA), and the 'Q' and 'DVD' buttons function properly (even when the laptop is in tablet form or when the touchpad is disabled, the two things that caused problems in linux). So it would seem that it is a driver or related issue more than hardware.
And, I am running intrepid, so that that can't be the problem.
-
Re: How to Rotate the Screen for a TX2000 Tablet PC
Hi cak3,
It feels like we're teetering on the brink of a "breakthrough" in understanding some of this stuff. I'm just not bright enough to get it. So now I'm wondering if this has something to do with the laptop "hotkey-setup" program. It's v. 0.1-23 in Intrepid. And with a default install the hotkeys daemon isn't running.