Try these steps in order:
- Reset the graphics driver first. Press Windows logo key + Ctrl + Shift + B. If the display stabilizes, the issue was likely a temporary graphics driver problem.
- Restart the PC. Go to Start > Power > Restart. If needed, do a full shutdown and turn it back on.
- If the HDMI connection uses USB-C or an adapter, check the connection path.
- Connect the display or dongle directly to the PC.
- Make sure the PC, display, and cable all support the required display mode.
- If using USB-C, make sure it is plugged into the correct USB-C port that supports the needed Alternate Mode.
- Avoid using an external hub or dock while testing.
- If possible, try a different cable.
- Roll back the display driver if the problem started after an update.
- In the taskbar search box, type Device Manager.
- Open Device Manager.
- Expand Display adapters.
- Right-click the display adapter and select Properties.
- Open the Driver tab.
- Select Roll Back Driver. If there is no rollback option, reinstall the display driver.
- Reinstall the display driver.
- In the taskbar search box, type Device Manager.
- Open Device Manager and expand Display adapters.
- Right-click the display adapter and select Uninstall device.
- Select Attempt to remove the driver for this device, then select Uninstall.
- Restart if prompted.
- Open Device Manager again.
- Expand Display adapters.
- Right-click the display adapter and select Update driver.
- Select Search automatically for updated driver software and complete the installation.
- If the issue only happens with a wireless display adapter, reduce interference.
- Move the device closer to the adapter.
- Keep it away from microwave ovens, cordless phones, and baby monitors.
- Make sure the adapter is plugged in straight, or use the included HDMI extension cable if needed.
If none of these steps fixes it, file a report in Feedback Hub with the exact steps that cause the screen to move in and out.