I have a clean installation of Ubuntu 18.04.2 on a detachable tablet/keyboard and I cannot get the cursor on screen to rotate properly with the display. Currently, the cursor image draws upside down and movement is inverted but the actual click and hover events are not (i.e. I drag my finger to the bottom left on the track pad: upside down arrow on screen moves to the top left. I click and the app menu pops up).
I have tried using xrandr/xinput with and without iio-sensor proxy as recommended here: Display and cursor are out of sync on Ubuntu 18.04 tablet and here: https://unix.stackexchange.com/questions/328248/screen-detection-and-mouse-reverse-x-y-axis-kali-linux.
I tried installing KDE and when I logged out from Gnome and back into KDE, the issue was resolved until I rebooted and the original issue came back in KDE. I also corrected the auto-rotation orientation by modifying /lib/udev/hwdb.d/60-sensor.hwdb. After rotating the input device I did check that the matrix applied to the correct input device (tried every combination of virtual pointer and touchpad device) and restarted (though I don't believe that should be necessary). I haven't found working touchscreen drivers yet if that makes any difference (dmesg shows 'probe of i2c-MSSL1680:00 failed with error -11')
Any ideas for next steps to troubleshoot/fix this?
UPDATE: Applying a Coordinate Transformation Matrix setting to the touchpad xinput device did make the cursor icon follow touchpad movement (adjusting the Virtual core pointer (2) did nothing), however click actions still occur opposite the cursor icon position.