The LightDM login screen (greeter) runs before any user session exists, so it ignores your desktop's display configuration: on multi-monitor setups it typically brings up every screen at its EDID-preferred refresh rate (usually ~60 Hz), unrotated, and with a duplicated background.
This Gist installs a small Bash script into LightDM's official greeter-setup-script hook. Right before the greeter appears, it turns off every connected display except the primary one and drives the primary at its maximum detected resolution and refresh rate. If the primary display is not connected, it does nothing and LightDM behaves exactly as stock.
- Hardware-agnostic: Only the primary output's name is declared; resolution and refresh rate are detected on every boot, so it survives monitor upgrades and works with any number of displays.
- Official mechanism: It uses the free
greeter-setup-scripthook, leaving the distribution's owndisplay-setup-scriptuntouched. Two small files under/etc/lightdm/, fully reversible. - Robust script: It follows Bash best practices and always exits successfully, since a failing setup script would keep the greeter from starting; at worst you get the stock login screen, never a lockout.
LightDM on X11 (tested with slick-greeter on Linux Mint Cinnamon). Only standard tools are used: bash, xrandr, and awk.
-
Find your primary output's name and, if it is not
DP-0, edit thePRIMARY_OUTPUTvariable inside the installer:xrandr --query | grep ' connected' -
Run the installer (it will ask for your
sudopassword). It creates/etc/lightdm/greeter-display-setup.shand/etc/lightdm/lightdm.conf.d/95-greeter-display-setup.conf:bash install-greeter-display-setup.sh -
Reboot.
-
At the login screen, only the primary display should be on, with visibly smooth motion on high-refresh panels.
-
LightDM loaded the configuration and ran the script successfully:
sudo grep -n 'greeter-display-setup' /var/log/lightdm/lightdm.log -
The X server set the primary display's maximum mode before the session started:
grep -n 'Setting mode' /var/log/Xorg.0.log
sudo rm /etc/lightdm/greeter-display-setup.sh /etc/lightdm/lightdm.conf.d/95-greeter-display-setup.conf