How to change Ubuntu gdm login resolution on a macbook

After installing ubuntu 19.10 on my macbook, I changed the resolution to 2560×1600 and scaling to 100%¬†instead of the default 200%.

Ubuntu supports very well the retina screen but the login screen was still at the old resolution after reboot.

To have the same resolution during the login with gdm you need to copy the monitors.xml file from your personal config to the /var/lib/gdm3/.config folder:

cd;sudo cp .config/monitors.xml /var/lib/gdm3/.config/

The content of my monitors.xml file is:

<monitors version="2">
          <product>Color LCD</product>

On next login after reboot the solution will be the same as it is during the gnome session.