How can I swap my two screens, left to right?

Unix & Linux Asked by ripper234 on August 4, 2020

I pressed something and accidentally swapped my two screens. My left one is actually considered as the right one, and vice versa. How can I swap them back?

Edit – Specifically, I’m using Gnome, though we might also want to keep this question generic.

Edit 2 – It appears that my driver isn’t compatible with xrandr. I’m attaching log of /var/log/Xorg.0.log here

5 Answers

I use Ubuntu 20.4, and pressed Win-P accidentally, and fuzzled around with the several options. To switch back to my original setting I used:

  1. press Win-P
  2. selected "Built in only"
  3. then pressed Win-P again
  4. selected "Join Displays"

If this keeps it in the wrong order, use "External only" first instead of "Built in Only"

Answered by Edo de Roo on August 4, 2020

Ubuntu 18.10 here with GNOME 3.30.2. Just go to Settings > Devices > Displays.

The display arrangement can be rearranged, with simple drag-and-drop.

I had better experience doing this rather than adding xrandr --output DVI-0 --left-of DVI-1 to my /home/.profile.

Answered by Akhil on August 4, 2020

I don't remember where I found this answer, but it works for me xrandr -o normal

Answered by Vitaliy Sobol on August 4, 2020

I used the native Gnome Monitor Manager (from the System->Preferences menu) and it worked like a charm.

Answered by ripper234 on August 4, 2020

Your desktop environment probably has a way, but you don't say which one you're using (if any).

If your display driver is compatible with the XRandR extension, which is the standard method for managing display resolutions and arrangements, you can use the command-line utility xrandr. I think the proprietary NVidia driver bypasses XRandR, so if you're using it, you'll have to use a dedicated NVidia tool.

Run xrandr (with no argument) to see your monitor (screen) arrangement. You'll see lines like these:

DVI-0 connected 1600x1200+1600+0 (normal left inverted right x axis y axis) 408mm x 306mm
DVI-1 connected 1600x1200+0+0 (normal left inverted right x axis y axis) 408mm x 306mm

This example means that I have two monitors called DVI-0 and DVI-1, and DVI-1 is at the top left (position +0+0) while DVI-0 is to its right (position +1600+0). To swap them, I would run

xrandr --output DVI-0 --left-of DVI-1

Answered by Gilles 'SO- stop being evil' on August 4, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP