Register Hello & Welcome to AndroidTablets.net, is this your first visit?

Results 1 to 9 of 9
  1. #1
    Senior Member
    Points: 4,808, Level: 44
    Level completed: 29%, Points required for next Level: 142
    Overall activity: 0%
    Achievements:
    1 year registered 1,000 Experience Points 3 months registered 500 Experience Points 250 Experience Points

    Member #
    85490
    Join Date
    Jan 2012
    Posts
    116
    Thanked
    13 times
    Points
    4,808
    Level
    44
    Device
    Azpen X1 , HP-Touchpad

    Rotating Screen/Touchscreen On Linux

    Since the Viewpad 10 has an Intel CPU, Linux can be installed on it very easily. On the most recent versions of Linux, the touchscreen even works out-of-the-box. What doesn't seem to work is screen rotation, and the proper touchscreen orientation after the screen rotaton.

    I have a cousin of the Viewpad 10, the Azpen X1. I have installed openSUSE Linux 12.1-Gnome on it, because it seems to offer a better Desktop for touching. Here is what I had to do to get a screen rotation button working on my desktop.

    First, you need to know the name of your touchscreen. I used the xinput list command for this:
    Code:
    xinput list
    ⎡ Virtual core pointer                        id=2    [master pointer  (3)]
    ⎜   ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
    ⎜   ↳ ILITEK ILITEK Multi-Touch                   id=9    [slave  pointer  (2)]
    ⎜   ↳ Logitech USB Receiver                       id=12    [slave  pointer  (2)]
    ⎜   ↳ Logitech USB Receiver                       id=13    [slave  pointer  (2)]
    ⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
        ↳ Virtual core XTEST keyboard                 id=5    [slave  keyboard (3)]
        ↳ Power Button                                id=6    [slave  keyboard (3)]
        ↳ Video Bus                                   id=7    [slave  keyboard (3)]
        ↳ Power Button                                id=8    [slave  keyboard (3)]
        ↳ USB2.0-Camera                               id=10    [slave  keyboard (3)]
        ↳ AT Translated Set 2 keyboard                id=11    [slave  keyboard (3)]
        ↳   SCISSORS Keyboard                         id=14    [slave  keyboard (3)]
    My touchpad is the entry highlighted in red. If your touchscreen is different, use that in the following script.

    I then used the touchscreen name in a sh script, this script is a heavily modified version of one that I found on the internet.
    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 
        xinput set-prop --type=int --format=8 "ILITEK ILITEK Multi-Touch" "Evdev Axes Swap" 1
        xinput set-prop --type=int --format=8 "ILITEK ILITEK Multi-Touch" "Evdev Axis Inversion" 0 1
        xinput set-prop --type=int --format=8 4 "Evdev Axis Inversion" 0 1
        ;;
        right) 
    #    -rotate to normal 
        xrandr -o normal 
        xinput set-prop --type=int --format=8 "ILITEK ILITEK Multi-Touch" "Evdev Axes Swap" 0
        xinput set-prop --type=int --format=8 "ILITEK ILITEK Multi-Touch" "Evdev Axis Inversion" 0 0
        xinput set-prop --type=int --format=8 4 "Evdev Axis Inversion" 0 0
        ;; 
    esac
    Save it as rotate.sh. In the first use of xinput, the word Axes is not misspelled! You can run this script from the terminal, but first make it executable. I store mine in a Scripts folder, so I ran this:
    Code:
    chmod +x ~/Scripts/rotate.sh
    Then run it, and it will rotate the screen and touchscreen to the right:
    Code:
    ~/Scripts/rotate.sh
    Running it a second time will return the screen to Normal view. If you just hit the up arrow on the keyboard, it will display the last command entered.

    Now to put a shortcut on the desktop to run the script. You first have to install the gnome-tweak-tool. I believe this is the same in Ubuntu. Open gnome tweak-tool (Applications-->Advanced Settings). Click on the Desktop section, and turn on "Have file manager handle the desktop". You can also then enable any of the other setting in that category that you want shown on the Desktop, and close it.

    Then open a text editor, I use gedit. Then create this file:
    Code:
    #!/usr/bin/env xdg-open
    
    [Desktop Entry]
    Encoding=UTF-8
    Version=1.0
    Name=Rotate
    Comment=Rotate Screen
    Type=Application
    Exec=/home/paul/Scripts/rotate.sh
    Icon=/usr/share/icons/gnome/48x48/actions/view-refresh.png
    Terminal=false
    Catagories=Settings
    StartupNotify=true
    Name[en_US]=Rotate Screen
    Make sure the Exec= is the path to the folder with the rotate.sh script in it. Also, make sure the Icon= path is to an actual icon on your system. Then save the file in your Desktop folder as "Rotate Screen.desktop" (without the quotes). You now should have an icon on your Desktop. Double-touching it should rotate your screen to the right. Double-touching it again will return it to normal.

    Enjoy!
    Last edited by waterhead; 03-03-2012 at 12:28 PM. Reason: Added mouse rotation to script
    My Tablets:

    Azpen X1
    HP Touchpad

  2. # ADS
    Ads
    Circuit advertisement
    Join Date
    Always
    Posts
    Many

  3. #2
    Senior Member
    Points: 4,808, Level: 44
    Level completed: 29%, Points required for next Level: 142
    Overall activity: 0%
    Achievements:
    1 year registered 1,000 Experience Points 3 months registered 500 Experience Points 250 Experience Points

    Member #
    85490
    Join Date
    Jan 2012
    Posts
    116
    Thanked
    13 times
    Points
    4,808
    Level
    44
    Device
    Azpen X1 , HP-Touchpad
    Some screnshots of my Desktop before and after rotating.



    Name:  ScreenshotNormal.png
Views: 2744
Size:  256.0 KB


    Name:  ScreenshotRight.png
Views: 2517
Size:  290.0 KB
    My Tablets:

    Azpen X1
    HP Touchpad

  4. #3
    Senior Member
    Points: 4,808, Level: 44
    Level completed: 29%, Points required for next Level: 142
    Overall activity: 0%
    Achievements:
    1 year registered 1,000 Experience Points 3 months registered 500 Experience Points 250 Experience Points

    Member #
    85490
    Join Date
    Jan 2012
    Posts
    116
    Thanked
    13 times
    Points
    4,808
    Level
    44
    Device
    Azpen X1 , HP-Touchpad

    Rotate Screen Left

    Rotating the screen to the right puts the USB, power and headphone ports at the bottom. If you have anything plugged in, this is not very convenient. I have made a new script to now make it rotate to the left.
    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 
        xinput set-prop --type=int --format=8 "ILITEK ILITEK Multi-Touch" "Evdev Axes Swap" 1
        xinput set-prop --type=int --format=8 "ILITEK ILITEK Multi-Touch" "Evdev Axis Inversion" 1 0
        xinput set-prop --type=int --format=8 4 "Evdev Axis Inversion" 1 0
        ;;
        left) 
    #    -rotate to normal 
        xrandr -o normal 
        xinput set-prop --type=int --format=8 "ILITEK ILITEK Multi-Touch" "Evdev Axes Swap" 0
        xinput set-prop --type=int --format=8 "ILITEK ILITEK Multi-Touch" "Evdev Axis Inversion" 0 0
        xinput set-prop --type=int --format=8 4 "Evdev Axis Inversion" 0 0
        ;; 
    esac
    Last edited by waterhead; 02-18-2012 at 12:36 PM. Reason: Added mouse to rotation script.
    My Tablets:

    Azpen X1
    HP Touchpad

  5. #4
    Senior Member
    Points: 4,808, Level: 44
    Level completed: 29%, Points required for next Level: 142
    Overall activity: 0%
    Achievements:
    1 year registered 1,000 Experience Points 3 months registered 500 Experience Points 250 Experience Points

    Member #
    85490
    Join Date
    Jan 2012
    Posts
    116
    Thanked
    13 times
    Points
    4,808
    Level
    44
    Device
    Azpen X1 , HP-Touchpad
    If you are using a USB mouse, I noticed that it did not rotate along with the screen and touchscreen. I added the "Virtual core XTEST pointer" to the script. I used the ID number instead of the name.

    I updated both scripts. Please post if you are having any trouble.
    My Tablets:

    Azpen X1
    HP Touchpad

  6. #5
    Senior Member
    Points: 4,808, Level: 44
    Level completed: 29%, Points required for next Level: 142
    Overall activity: 0%
    Achievements:
    1 year registered 1,000 Experience Points 3 months registered 500 Experience Points 250 Experience Points

    Member #
    85490
    Join Date
    Jan 2012
    Posts
    116
    Thanked
    13 times
    Points
    4,808
    Level
    44
    Device
    Azpen X1 , HP-Touchpad

    Touchscreen Calibration

    If you find that your touchscreen is not accurate, meaning the point that registers is not exactly where you touched, there is a way to compensate for that. There is the Linux app xinput-calibrator. It can be installed in Ubuntu from the regular repositories:
    Code:
    sudo apt-get install xinput-calibrator
    In openSUSE-12.1, you have to first add a repository (as root):
    Code:
    zypper addrepo http://download.opensuse.org/repositories/home:koprok:base-12.1/standard/home:koprok:base-12.1.repo
    Code:
    zypper refresh
    Code:
    zypper install xinput-calibrator
    Run the app from a terminal window:
    Code:
    xinput_calibrator
    It will ask you to touch the cross-hairs in the four corners. For accuracy, you should use a touchscreen stylus (pen) or a mouse. It will then output data to the terminal window, like this:
    Code:
    paul@AzpenX1:~> xinput_calibrator
    Section "InputClass"
        Identifier    "calibration"
        MatchProduct    "ILITEK ILITEK Multi-Touch"
        Option    "Calibration"    "162 4940 54 2783"
        Option    "SwapAxes"    "0"
        Option "InvertX" "0"
        Option "InvertY" "0"
    EndSection
    This is formatted for insertion into a xorg.conf file, but you can use the info from the line Option "Calibration". Add it to the screen rotating script, like so:
    Code:
    xinput setprop "ILITEK ILITEK Multi-Touch" "Evdev Axis Calibration" 162 4940 54 2783
    Of course, use your touchscreen name, and your results from running the xinput-calibrator. You only need to run it once, at the beginning of the 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)')" 
    
    # Insert screen calibration settings:
    xinput set-prop "ILITEK ILITEK Multi-Touch" "Evdev Axis Calibration" 162 4940 54 2783
    
    # Using current screen orientation proceed to rotate screen and input tools. 
    
    case "$rotation" in 
        normal) 
    #    -rotate to the left 
        xrandr -o left 
        xinput set-prop --type=int --format=8 "ILITEK ILITEK Multi-Touch" "Evdev Axes Swap" 1
        xinput set-prop --type=int --format=8 "ILITEK ILITEK Multi-Touch" "Evdev Axis Inversion" 1 0
        xinput set-prop --type=int --format=8 4 "Evdev Axis Inversion" 1 0
        ;;
        left) 
    #    -rotate to normal 
        xrandr -o normal 
        xinput set-prop --type=int --format=8 "ILITEK ILITEK Multi-Touch" "Evdev Axes Swap" 0
        xinput set-prop --type=int --format=8 "ILITEK ILITEK Multi-Touch" "Evdev Axis Inversion" 0 0
        xinput set-prop --type=int --format=8 4 "Evdev Axis Inversion" 0 0
        ;; 
    esac
    Last edited by waterhead; 03-20-2012 at 04:26 PM.
    My Tablets:

    Azpen X1
    HP Touchpad

  7. #6
    Senior Member
    Points: 4,808, Level: 44
    Level completed: 29%, Points required for next Level: 142
    Overall activity: 0%
    Achievements:
    1 year registered 1,000 Experience Points 3 months registered 500 Experience Points 250 Experience Points

    Member #
    85490
    Join Date
    Jan 2012
    Posts
    116
    Thanked
    13 times
    Points
    4,808
    Level
    44
    Device
    Azpen X1 , HP-Touchpad
    There is a way in Linux to have the tablet automatically rotate the screen when you rotate the tablet. It appears to be reading a sensor, and interpreting it as a keyboard. It outputs it as binary data, which you can see if you enter this command and then rotate the tablet (openSUSE)
    Code:
    cat /dev/input/event0
    Or in Ubuntu:
    Code:
    cat /dev/input/event2
    I don't know if this is from an accelerometer, or a simple gravity sensor. It puzzled me how I could use this data, that is until I ran Ubuntu 11.10 on my tablet.

    Linux has "Workspaces", which are extensions of the desktop. You can run different applications on them, and switch to them with a keyboard shortcut key combo. Ubuntu installs with four workspaces, openSUSE with only two. It seems the output of the sensors is actually a keyboard shortcut! Each position corresponds to a shortcut key combo to switch to a different workspace! In Ubuntu, this was more obvious, and it spurred me to seek a solution. This shortcut-key action can't be by accident, but I can't find any documentation regarding it.

    To use this, you first need to disable the existing shortcut keys. In openSUSE, click on your name in the upper-right corner, and select: System Settings --> Keyboard, and then the Shortcuts tab.

    In Ubuntu the process is similar, except click the gear-like icon next to your name. You should get a window similar to this:





    After disabling the workspace shortcuts, you will now use them to run scripts that will rotate the screen. These scripts are attached to this post.

    Select "Custom Shortcuts" from the left side, then create four new shortcuts, by clicking the "+" icon, like these:




    Give it any name you want, but in the "Command" line, you must give the full path to where you saved the four rotate scripts. Link each shortcut to the corresponding script. I keep them in a "Scripts" folder in my home directory, so the path I entered is this:

    /home/paul/Scripts/rotate_normal

    If this tablet has more than one user account, you will want to keep the scripts in a folder that is accessible by all. Something like /usr/local/bin/ will work, but you need root permissions to save to that folder:
    Code:
    gksu nautilus
    Then you can move the files. You also need to make them executable files. Open the "Properties" on the file, and on the "Permissions" tab, check the "Allow executing file as program".

    After creating the new shortcuts, it will say "disabled" in the right column. Click on this until it says "New shortcut". Then hold down the keys for the shortcut, in the order that you want them. Use these for proper rotation:

    Rotate Normal: Ctrl+Alt+Up (up arrow)
    Rotate Inverted: Ctrl+Alt+Down (down arrow)
    Rotate Left: Ctrl+Alt+Left (left arrow)
    Rotate Right: Ctrl+Alt+Right (right arrow)

    It seems that openSUSE had a problem recording the "Ctrl" key. I had to manually edit the shortcut config files to add it. They were found in a hidden folder in my home directory:

    /.gconf/desktop/gnome/keybindings/customX/%gconf.xml

    Open it in a text editor (gedit), and add to the last line so that it looks like this:
    Code:
    <stringvalue>&lt;Control&gt;&lt;Alt&gt;Left</stringvalue>
    Ubuntu didn't have this problem, so no file editing is needed.

    I have included screen calibration data in the scripts. This is for my tablet, and may not be good for other tablets. I got the data from running the screen calibration app five or six times, and averaging the outputted data:
    Code:
    xinput_calibrator
    My scripts are for my tablet, the Azpen X1. Since the Viewpad 10 may have a different touchscreen, they will need to be edited to work correctly. I encourage some of the Viewpad 10 owners to post with the info needed.
    Attached Files Attached Files
    Last edited by waterhead; 03-08-2012 at 04:01 PM. Reason: Spelling
    My Tablets:

    Azpen X1
    HP Touchpad

  8. #7
    Junior Member Achievements:
    31 days registered 100 Experience Points 7 days registered

    Member #
    90464
    Join Date
    Feb 2012
    Posts
    15
    Wow your good in solving things.... I'll try this when I reinstall Ubuntu.... Any workarounds for emulating mouse right-click in Ubuntu?

  9. #8
    Senior Member
    Points: 4,808, Level: 44
    Level completed: 29%, Points required for next Level: 142
    Overall activity: 0%
    Achievements:
    1 year registered 1,000 Experience Points 3 months registered 500 Experience Points 250 Experience Points

    Member #
    85490
    Join Date
    Jan 2012
    Posts
    116
    Thanked
    13 times
    Points
    4,808
    Level
    44
    Device
    Azpen X1 , HP-Touchpad
    Quote Originally Posted by Daskalos View Post
    Wow your good in solving things.... I'll try this when I reinstall Ubuntu....
    Please do, and don't be afraid to ask for help.
    Quote Originally Posted by Daskalos View Post
    Any workarounds for emulating mouse right-click in Ubuntu?
    Open the "Universal Access" in the System settings. On the "Pointing and Clicking" tab, enable the option "Simulate secondary click". That only seems to work so-so, though.
    My Tablets:

    Azpen X1
    HP Touchpad

  10. #9
    Junior Member Achievements:
    31 days registered 100 Experience Points 7 days registered

    Member #
    90464
    Join Date
    Feb 2012
    Posts
    15
    Quote Originally Posted by waterhead View Post
    Please do, and don't be afraid to ask for help.

    Open the "Universal Access" in the System settings. On the "Pointing and Clicking" tab, enable the option "Simulate secondary click". That only seems to work so-so, though.
    Hmmm it rarely works for me
    It would be nice to have a tap-and-hold for right click like in Windows

    From reading some old threads, I read that on old version of ubuntu you can have a first finger hold and second finger tap to have a right click easily, i don't undertand why it's gone on newer builds.


 

Ads:

Posting Permissions

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

Similar Threads

  1. linux on arnova 10
    By niccc in forum Android Tablet Discussions
    Replies: 0
    Last Post: 01-20-2012, 04:53 PM
  2. Making camera display preview image full scree -
    By rmwilson in forum Gome Flytouch
    Replies: 1
    Last Post: 10-02-2011, 10:27 PM
  3. Replies: 4
    Last Post: 08-17-2011, 03:28 PM
  4. Acer Iconia A500 - Games and some apps not rotating in landscape mode
    By vince1979 in forum Acer Iconia Tab A500 Forum
    Replies: 2
    Last Post: 05-23-2011, 02:45 PM

Search tags for this page

how to get touch to work on viewpad 10 in ubuntu
,
ilitek multitouch windows 8 azpen
,
linux int screen rotation command
,
linux senzor rotate display
,
linux touchscreen mouse rotation
,
linux touchscreen rotate
,
linux virtual touchscreen touchpad
,

rotate linux touchscreen

,
rotate touchpad linux
,
rotate touchpad with screen android
,
surface pro 2 ubuntu screen rotation
,
xinput orientation
Click on a term to search our sites for related topics.
Powered by vBulletin® Version 4.1.11
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Android Tablets.net is not affiliated or associated with Google, Android Project or any of the device manufacturers listed on this site.
We are simply an enthusiast site.
All times are GMT -5. The time now is 04:46 AM.