KDE Plasma auto rotate display?

I have a Dell XPS 2 in 1 (7390) - I love this thing. I’ve tried many distributions from Elementary OS, Manjaro, Arco (Awesome and BSPWM) and finally Kubuntu 19.10. Unfortunately I haven’t been able to find one that met all of my needs. Elementary probably came closest but like many others I couldn’t quite get the power management/suspend to work properly.

So I finally tried Kubuntu and it surprised the hell out of me - I hadn’t tried KDE for years but my god it’s polished now. Power management works perfectly on this thing, I can just close the lid and not have to worry about freezing on resume or other anything else.

The last little issue that I have is rotating the screen when I flip the display over to use as a tablet or in tent mode. I can manually change the display settings - annoying but possible but then it does something strange - the touch side of things doesn’t rotate so if I touch the bottom of the screen, it thinks I touched the top - if that makes sense.

Does anyone have a working solution to make this happen automatically or maybe point me in the direction of something that might help?

I believe this feature is still in the works. Plasma 5.18 will be released on 02/11/2020, you would have to be running something like KDE neon or Arch to get 5.18 near that date. There are a few scripts around to get it semi working , but they are a bit hacky. I would personally wait till this feature is implemented by the KDE team.