My setup: Raspberry Pi 3b+, Acer 17" VGA monitor, HDMI->VGA converter from Pi to monitor, PIR sensor (script uses vcgencmd display to turn on/off), monitor is portrait mode (so turned 90 degree).

My issue: when the PIR sensor detects motion, the Pi script enables the display. The monitor tries to “auto-config” at that time. Most of the time, all is well but sometimes, the monitor auto-configs such that the magic mirror image shown is shifted up a bit. That is, the monitor seems to sync say 2cm down from the top of the expected image. At the bottom of the monitor, you can see a dim black 2cm bar where the bottom 2cm of the image should be. Hope that’s clear. :)

I tried playing with hdmi_* settings in the Pi boot/config.txt file but have had no luck.

It’s an old monitor but when used with my windows PC, it worked fine.