Skip to content

Instantly share code, notes, and snippets.

View Tedpac's full-sized avatar
🔭
Discovering

Nicolás Capdet Tedpac

🔭
Discovering
View GitHub Profile
@Tedpac
Tedpac / README.md
Last active August 20, 2026 23:14
Make the LightDM login screen use only the primary display, at its maximum resolution and refresh rate.

LightDM Greeter Display Setup

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.

Why this approach

  • 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-script hook, leaving the distribution's own display-setup-script untouc