1

I am new in Linux environment, but i know some stuff. I've just installed Ubuntu 19.04 Desktop on my Lenovo MIIX 300 and it got issues with screen rotation. I've removed iio-sensor-proxy and to rotate my screen i'm using xrandr command in terminal. Very soon I've found that my Touchscreen is not working properly so tried to change some values in xinput but nothing happened no matter what values i tried to set. Here is my xinput list and I used this line:

xinput set-prop X "Coordinate Transformation Matrix" <values>

For X equal to 2, 4 or 13

Nothing happened, nothing have changed. I'm curious to see which prop values i need to change. This list above was made with keyboard dock unplugged, so you can see only the inputs included in the tablet part.

I recently found out, that even with the iio-sensor-proxy touch screen does not work properly. It works only in one position, as always (in 'normal')

I've also problem with charging, sometimes Ubuntu shows the charging icon, sometimes not, but there's always sound when i plug and unplug the charging cable. It's not that important as problem above, because it charges properly when system is off.

1 Answer 1

0

I have had the same problem with my Miix 300! I managed to find a script online which I modified to help me with this. It is not perfect by any means (auto rotation still does not work [yet])

Save file as Display.sh (or whatever you want really!)

chmod +x display.sh

./display.sh normal/left/right/inverted

You can also add this script to be executed upon login with GDM/lightdm - especially useful with autologin due to GDM/lightdm still being in portrait mode until script is executed after login

#!/bin/bash
#
# rotate_desktop.sh
#
# Rotates modern Linux desktop screen and input devices to match. Handy for
# convertible notebooks. Call this script from panel launchers, keyboard
# shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.).
#
# Using transformation matrix bits taken from:
#   https://wiki.ubuntu.com/X/InputCoordinateTransformation
#

# Configure these to match your hardware (names taken from `xinput` output).
TOUCHPAD='SynPS/2 Synaptics TouchPad'
TOUCHSCREEN='FTSC1000:00 2808:1015'

if [ -z "$1" ]; then
  echo "Missing orientation."
  echo "Usage: $0 [normal|inverted|left|right] [revert_seconds]"
  echo
  exit 1
fi

function do_rotate
{
  xrandr --output $1 --rotate $2

  TRANSFORM='Coordinate Transformation Matrix'

  case "$2" in
    normal)
 #     [ ! -z "$TOUCHPAD" ]    && xinput set-prop "$TOUCHPAD"    "$TRANSFORM" 1 0 0 0 1 0 0 0 1
      [ ! -z "$TOUCHSCREEN" ] && xinput set-prop "$TOUCHSCREEN" "$TRANSFORM" 1 0 0 0 1 0 0 0 1
      ;;
    inverted)
#      [ ! -z "$TOUCHPAD" ]    && xinput set-prop "$TOUCHPAD"    "$TRANSFORM" -1 0 1 0 -1 1 0 0 1
      [ ! -z "$TOUCHSCREEN" ] && xinput set-prop "$TOUCHSCREEN" "$TRANSFORM" -1 0 1 0 -1 1 0 0 1
      ;;
    left)
#      [ ! -z "$TOUCHPAD" ]    && xinput set-prop "$TOUCHPAD"    "$TRANSFORM" 0 -1 1 1 0 0 0 0 1
      [ ! -z "$TOUCHSCREEN" ] && xinput set-prop "$TOUCHSCREEN" "$TRANSFORM" 0 -1 1 1 0 0 0 0 1
      ;;
    right)
#      [ ! -z "$TOUCHPAD" ]    && xinput set-prop "$TOUCHPAD"    "$TRANSFORM" 0 1 0 -1 0 1 0 0 1
      [ ! -z "$TOUCHSCREEN" ] && xinput set-prop "$TOUCHSCREEN" "$TRANSFORM" 0 1 0 -1 0 1 0 0 1
      ;;
  esac
}

XDISPLAY=`xrandr --current | grep primary | sed -e 's/ .*//g'`
XROT=`xrandr --current --verbose | grep primary | egrep -o ' (normal|left|inverted|right) '`

do_rotate $XDISPLAY $1

if [ ! -z "$2" ]; then
  sleep $2
  do_rotate $XDISPLAY $XROT
  exit 0
fi

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .