How can I swap my two screens, left to right?
Solution 1
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 X.org 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
Solution 2
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:
- press Win-P
- selected "Built in only"
- then pressed Win-P again
- selected "Join Displays"
If this keeps it in the wrong order, use "External only" first instead of "Built in Only"
Solution 3
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
.
Solution 4
I used the native Gnome Monitor Manager (from the System->Preferences menu) and it worked like a charm.
Solution 5
I don't remember where I found this answer, but it works for me xrandr -o normal
Related videos on Youtube
Comments
-
ripper234 over 1 year
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 -
ripper234 about 13 yearsI'm using Gnome. Having some problems with randr - pastebin.com/rZEjdN4B
-
Gilles 'SO- stop being evil' about 13 years@ripper234: Your display driver isn't compatible with XRandR. What display driver are you using (not just nvidia/ati/intel, but which driver: nv/nouveau/nvidia/radeon/radeonhd/fglrx/…)? If you're not sure, attach the contents of
/var/log/Xorg.0.log
to your question. -
ripper234 about 13 yearshere's the log, thanks. pastebin.com/wpNutkwp
-
8bitjunkie almost 6 yearsThat swaps them around but now I can't scroll the mouse in the correct direction between them. When my mouse is on my right screen, when I scroll left, the mouse stops at the barrier of the right screen - it does not continue onto the left screen.
-
Erdem Tuna over 3 yearsworked for me as well
-
Saad Ismail about 3 yearsI used to change the order of display from display settings every time I accidentally pressed Ctrl + P, this worked for me. Nice hack.
-
holms over 2 yearsNot everyone using ubuntu...
-
nanosoft over 2 yearsThis is awesone shortcut. Thanks @Akhil so many good things are already built we just need to discover