Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Screen and pen rotation with a tablet

  1. #1
    Join Date
    Sep 2008
    Location
    Indiana
    Beans
    108
    Distro
    Ubuntu

    Screen and pen rotation with a tablet

    I am running Ubuntu 11.10 on a Thinkpad X61 Tablet. I used the instructions at http://www.thinkwiki.org/wiki/Instal...Tablet#Rotate:
    to get the screen rotation button working. However, when I rotate the screen, the pen doesn't rotate with it. For instance, if the screen has been rotated 180 degrees, when I put the pen in the top left of the screen the cursor still shows up in the old top left (my bottom right). It makes using the pen essentially useless when the screen is rotated.

    Does anyone know how to fix this?

  2. #2
    Join Date
    Nov 2008
    Beans
    9,635
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Screen and pen rotation with a tablet

    It sounds like whatever script you have bound to the rotation button is not using the proper "device names" in the xsetwacom rotation commands to rotate the input tools like the stylus. You can get the "device names" from the output of the xinput list command in a terminal. Then just correct the script.

    For automatic rotation also see the Rotation HOW TO and Magick Rotation.

  3. #3
    Join Date
    Sep 2008
    Location
    Indiana
    Beans
    108
    Distro
    Ubuntu

    Re: Screen and pen rotation with a tablet

    As far as I can tell, the instructions I followed had be create a script called "rotatebutton" that used the xrandr command to rotate the screen. (I checked that doing the xrandr commands from the terminal also didn't rotate the pen correctly). I don't know how to edit the xsetwacom commands for the xrandr command (nor if this is a smart idea).

  4. #4
    Join Date
    Nov 2008
    Beans
    9,635
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Screen and pen rotation with a tablet

    The xrandr commands rotate the screen orientation. You then have to use xsetwacom commands to rotate the stylus, eraser, and touch (if you have it) along with the change in screen orientation. What does the rotation script you have bound to the rotation button look like?

  5. #5
    Join Date
    Sep 2008
    Location
    Indiana
    Beans
    108
    Distro
    Ubuntu

    Re: Screen and pen rotation with a tablet

    Quote Originally Posted by Favux View Post
    The xrandr commands rotate the screen orientation. You then have to use xsetwacom commands to rotate the stylus, eraser, and touch (if you have it) along with the change in screen orientation. What does the rotation script you have bound to the rotation button look like?
    The "rotatebutton" command that I copied from the above mentioned source looks like

    Code:
    mode=`cat /usr/bin/rotationmode`
    if test 0 = $mode
    then
    echo 1 > /usr/bin/rotationmode
    xrandr -o right
    fi
    if test 1 = $mode
    then
    echo 2 > /usr/bin/rotationmode
    xrandr -o inverted
    fi
    if test 2 = $mode
    then
    echo 3 > /usr/bin/rotationmode
    xrandr -o left
    fi
    if test 3 = $mode
    then
    echo 0 > /usr/bin/rotationmode
    xrandr -o normal
    fi
    It appears to be a pretty simple script. The file /usr/bin/rotationmode just keeps track of what orientation the screen currently is in and the script simply rotates the screen to the "next" orientation and updates the rotationmode file accordingly (at least that's what I think it does). Do I need to add a xsetwacom command somewhere in this script? If so, what should I add?

  6. #6
    Join Date
    Nov 2008
    Beans
    9,635
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Screen and pen rotation with a tablet

    Right, there aren't any xsetwacom commands. See the method 1 scripts on the Rotation HOW TO to see what I mean. This script is designed to be used with Tom Jaeger's wacomrotate daemon, that's what is missing. It rotates the screen and wacomrotate rotates the wacom stuff.

    I don't know if wacomrotate still works for Oneiric. I don't remember checking if Tom updated it recently. It is also in the Rotation HOW TO as method 4.

  7. #7
    Join Date
    Sep 2008
    Location
    Indiana
    Beans
    108
    Distro
    Ubuntu

    Re: Screen and pen rotation with a tablet

    Quote Originally Posted by Favux View Post
    Right, there aren't any xsetwacom commands. See the method 1 scripts on the Rotation HOW TO to see what I mean. This script is designed to be used with Tom Jaeger's wacomrotate daemon, that's what is missing. It rotates the screen and wacomrotate rotates the wacom stuff.

    I don't know if wacomrotate still works for Oneiric. I don't remember checking if Tom updated it recently. It is also in the Rotation HOW TO as method 4.
    The instructions I had followed previously had me install wacomrotate, but I'm not sure why since the script didn't seem to implement it.

    Anyway, I was able to follow the instructions in the Ration HOW TO in method 1 (and the remarks at the beginning) to figure out how to modify my script to get it to work. The modified script is as follows.

    Code:
    mode=`cat /usr/bin/rotationmode`
    if test 0 = $mode
    then
    echo 1 > /usr/bin/rotationmode
    xrandr -o right
    xsetwacom set "Serial Wacom Tablet stylus" rotate ccw
    xsetwacom set "Serial Wacom Tablet touch" rotate ccw
    xsetwacom set "Serial Wacom Tablet eraser" rotate ccw
    fi
    if test 1 = $mode
    then
    echo 2 > /usr/bin/rotationmode
    xrandr -o inverted
    xsetwacom set "Serial Wacom Tablet stylus" rotate half
    xsetwacom set "Serial Wacom Tablet touch" rotate half
    xsetwacom set "Serial Wacom Tablet eraser" rotate half
    fi
    if test 2 = $mode
    then
    echo 3 > /usr/bin/rotationmode
    xrandr -o left
    xsetwacom set "Serial Wacom Tablet stylus" rotate cw
    xsetwacom set "Serial Wacom Tablet touch" rotate cw
    xsetwacom set "Serial Wacom Tablet eraser" rotate cw
    fi
    if test 3 = $mode
    then
    echo 0 > /usr/bin/rotationmode
    xrandr -o normal
    xsetwacom set "Serial Wacom Tablet stylus" rotate none
    xsetwacom set "Serial Wacom Tablet touch" rotate none
    xsetwacom set "Serial Wacom Tablet eraser" rotate none
    fi

  8. #8
    Join Date
    Oct 2005
    Location
    USA
    Beans
    243
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Screen and pen rotation with a tablet

    Every time I run the above script I get:
    Code:
    line 2: test: too many arguments
    I get this for each line there is a "if x = $mode"

    Any thoughts?

  9. #9
    Join Date
    Nov 2008
    Beans
    9,635
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Screen and pen rotation with a tablet

    Hi GoodPanos,

    Which tablet PC do you have?

    What is the output in a terminal of?
    Code:
    cat /usr/bin/rotationmode

  10. #10
    Join Date
    Oct 2005
    Location
    USA
    Beans
    243
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Screen and pen rotation with a tablet

    Sorry for the long delay.

    Lenovo Thinkpad X61 Tablet

    It just returns "0" (without the quotes)

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •