I have installed Lubuntu 16.04 Xenial onto a tablet. By default, the screen is oriented sideways (like a Kindle or Nook), and the tablet doesn't have accelerometers to detect automatically when I rotate the device. This doesn't matter a great deal, as I will always be using the tablet as a 'monitor,' that is, rotated 90° from its original (Kindle/Nook-style) orientation.
I wrote a script to perform the rotation at login, but for some reason, it is performing the rotation of the display screen, but not the touchscreen input.
I thought it was perhaps because of the touchscreen input not being fully initialized when the xinput command is called, because I can execute the script manually after boot and it works just fine. I accounted for this in the script, so that the xinput command waits until the touchscreen input is initialized, but I still see the same results.
Here is the script:
#!/bin/bash sleep 3 xrandr -o right & while [ -z "xinput | grep -v 'Pen' | grep 'ELAN'" ] do sleep 1 done xinput set-prop 'ELAN22A6:00 04F3:22A6' 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1 xinput disable 'ASUS HID Device ASUS HID Device Touchpad'
Note: There are two devices with almost exactly the same name under the xinput list - the touchscreen input and a pen pointer (which won't be used). The device ELAN22A6:00 04F3:22A6 is the touchscreen input.
Also, this may or may not be relevant, but I'm running gnome-shell on top of Lubuntu, as well, which is also scripted to start at login (because I don't want it as the default desktop manager).
What am I missing here?