system installation – When installing Ubuntu 18.04.5 Desktop from a USB flash drive, how do I disable `iio-sensor-proxy`?

I’m trying to install Ubuntu 18.04.5 Desktop on a computer using a USB flash drive (which I made with the official ISO file). However, for some reason, the screen orientation is always wrong after the installer is loaded.

My colleague has told me it’s caused by iio-sensor-proxy so, after the OS is installed, we just run apt remove iio-sensor-proxy to remove it and the removal doesn’t cause any problem.

But it’s very painful during the OS installation because of the wrong screen orientation as well as the weirdly mapped mouse movement. But for testing purpose, we want to wipe out the machine and re-install the OS often, so I want to see if I could fix or work around this issue.

Because the wrong orientation is caused by iio-sensor-proxy, I’m thinking about whether there is a way to tell the installer not to load it at all. So I’m wondering if there is something (maybe a file) I can add/edit on the flash drive installer to do this.

Alternatively, if there is no such a method as said in the previous paragraph, I’m wondering if there is something I may do at the beginning of the installation when the wrong orientation already happens. This is not ideal, but if I only need to suffer from the pain at the beginning of the installation and could have a normal user-experience in the following steps, it’s still acceptable.