Screen rotation makes Ubuntu 18.04 stuck after login screen


I am working on connecting 7" MIPI DSI screen to Khadas VIM3L for a project. After some trial and error I got my screen and touch panel working on Ubuntu 18.04 (Bionic).

The next step was to rotate image 90°. As I followed the guide provided here
[TS050 | Khadas Documentation]
I got my login screen perfectly rotated, but after I entered my password I saw nothing but a default wallpaper and a mouse pointer. To test out the possibility that my GUI was hidden “outside” the screen I tried to open context menu with right mouse button, but it woudn’t work either. Both syslog and Xorg log show no major errors.
The same happens with HDMI screen connected.

Does anyone have an idea why does this happen? Thanks.

P.S. Rotation seems to work fine on Ubuntu 20.04, but my screen absolutely refuses to work with the newer version of OS.