The libkscreen will be a unified library to deal with screen configuration/rotation etc. Once this goes into KDE SC we should start to think about using this, to remove some X11 code. Might be a great help if we ever go for wayland. https://projects.kde.org/projects/playground/libs/libkscreen
libkscreen is shipped with Plasma nowadays, and used for rotating the screen.