Install autorandr by entering the following commands in the terminal:
sudo apt update sudo apt install autorandr
Automatically select a display configuration for connected devices
Autorandr is a script for managing xrandr configurations based on the connected devices. It can be set up to automatically switch to a stored configuration whenever a change in the configuration is detected.