Ubuntu 22.04. How to change primary login monitor away from external HDMI monitor

AMD laptop with Ubuntu 22.04 Gnome Wayland.

A few days ago I executed this command to change my primary login monitor to my external HDMI monitor:

sudo cp ~/.config/monitors.xml /var/lib/gdm3/.config/

(This command sets the external monitor as the boot login monitor.)

How do I reverse this command? I want to change my primary monitor back to the laptop monitor.

See this page for more details: How to Display Login Screen in External Monitor in Ubuntu 22.04 | 22.10 | UbuntuHandbook

If the file existed in the folder before you copied it over it, restore the file from your backup (which you of course have, since you are messing with system files, right?).
If it didn’t, simply removing the file should revert the change.

Otherwise you can try re-installing the package that provides that file, but I have no idea which package that is, maybe gdm?

1 Like