SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2013-04-10 12:42:24

Ikhnaton
New Member
Registered: 2013-04-05
Posts: 5
Website

[SOLVED] Tablet mode on X61t

Hello everyone,

this is my first time posting here, so please bear with me if I make any mistakes (though if I do, please tell me that I did).


Why I've come to you is quite simply: I cannot properly configure the tablet mode on my X61t. What I mean by that is that, when I turn the screen and close it, so that it's looking up, and then switch the screen to portrait mode (so that instead of 1024x768 the resolution is 768x1024), the stylus behaves in a weird way, in that it moves in a different direction than that that I want it to move.

I found a lovely script on the internet with which I can flip the resolution

#!/usr/bin/ruby
$orientation = `xrandr -q | grep "1400 x 1050"`
if ($orientation.length != 0 )
	puts "Landscape to Portrait"
	`/home/yourusername/xrotate 3 && metacity --replace`
else
	puts "Portrait"
	`/home/yourusername/xrotate 0 && compiz --replace`
end

and

#!/bin/sh

output="(normal left inverted right)" #LVDS
 # if [ "$XROT_OUTPUT" ]
 # then
 #         output=$XROT_OUTPUT;
 # fi
devices="stylus cursor"

geomnbr=0
xrandr=normal
wacom=normal
if [ "$1" == "-" ] || [ "$1" == "+" ] || ! [ "$1" ];
then
        operator="$1";
        [ "$1" ] || operator='+';
        case `xrandr --verbose | grep "$output" | sed "s/^[^ ]* [^ ]* [^ ]* ([^(]*) \([a-z]*\).*/\1/"` in
                normal)         geom=0;;
                left)          geom=1;;
                inverted)       geom=2;;
                right)          geom=3;;
        esac
        let geom=${geom}${operator}1+4
        let geom=${geom}%4
else
        geom="$1"
fi
case $geom in
        1)      wacom=2; xrandr=left ;;
        2)      wacom=3; xrandr=inverted ;;
        3)      wacom=1; xrandr=right ;;
        *)      wacom=0; xrandr=normal ;;
esac

echo "xrandr to $xrandr, xsetwacom to $wacom" >&2

if xrandr -o "$xrandr"; then
        for d in $devices
        do
                xsetwacom set "stylus" Rotate "$wacom"
        done
fi

#workaround for linuxwacom bug
if [ "`xsetwacom get stylus Mode`" == '1' ]; then
        for d in $devices
        do
                xsetwacom set stylus CoreEvent "off"
                xsetwacom set stylus Mode "off"
        done
        { sleep 1;
        for d in $devices
        do
                xsetwacom set stylus Mode "on"
                xsetwacom set stylus CoreEvent "on"
        done; } &
fi

Source: http://thesopebocks.com/2009/01/15/linu … it-usable/


As said, the only problem there is, that the stylus doesn't work properly. I've tried googling, but it seems that the combination X61t and Crunchbang Waldorf is quite rare (sadly).

When I run the script in Terminator it tells me that it can't find "compiz" and "metacity".

If anyone here has knowledge of how to get the stylus to work properly, I'd be forever grateful!

Also, if there's any additional knowledge you'd like to have, just say so.


With that I'll end this post and thank everyone in advance for their help and comments.


Thanks!

Last edited by Ikhnaton (2013-04-12 07:13:34)

Offline

Be excellent to each other!

#2 2013-04-12 07:12:54

Ikhnaton
New Member
Registered: 2013-04-05
Posts: 5
Website

Re: [SOLVED] Tablet mode on X61t

Allright, I think I solved it.

Basically what I did was a combination of two scripts I found on the internet, the first one being the first one I posted above and the second one being this one:

#!/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

Source: http://forums.linuxmint.com/viewtopic.php?f=42&t=110395


What I did was replace the lines "xsetwacom set stylus rotate cw" to "xsetwacom set "Serial Wacom Tablet stylus" rotate cw"

Those values I got from typing "xinput list" into Terminator.


Thanks to everyone for reading!

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo