Saving Display Configuration (Monitor Position, Primary, Refresh Rate)

pt flag

I have something of an unusual setup with my Ubuntu desktop and Windows laptop. The two devices share two monitors, one main monitor using the monitor's input switch (DP for the desktop, HDMI for the laptop) and one secondary monitor switched using a KVM (HDMI for both.)

When I use my laptop during work hours, I set the main monitor to use HDMI from the laptop, and set my Ubuntu display configuration to only use the secondary KVM switched monitor as a single display. That way, if I need to swap to my desktop, I only need to mess with the KVM and I still have a monitor for my work laptop if needed.

The problem comes when it's time to shut off my laptop for the day. I turn off my laptop, swap my main monitor's input to DisplayPort, and it forgets all of the setup I put on before. When switching back to joined/extended displays, it will:

  1. set my secondary monitor as my primary display
  2. swap the position so the left (main) monitor is on the right and vice versa
  3. set my primary monitor's refresh rate to 60Hz instead of 144Hz

Is there any way to save a configuration so I can load all of this at once? I'd prefer if it could be done from the terminal, but as long as I don't have to go into the settings every time I switch from a single display to joined displays I'll be happy.

Here is the output of neofetch for my system specs/configuration.

Thank you!

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.