For some reasons, most native games as well as Wine have a problem with Twinview. So when starting SC2 I have to manually disable one of my two screens in nvidia-settings. (By going in X Server Display Configuration > click on second monitor > Display > Resolution: off)

I searched hard but couldn't find a way to do that automagically. nvidia-settings itself has non-GUI options (see "nvidia-settings -q all") but none of them seems to do what I want. I want to put that in my startup script for games, which already replaces Compiz with metacity (and back when it exits).


If you're using Twinview the displays are treated as one display with the resolution of all the physical displays put together. You can use xrandr to change the current output dimensions, and it will turn on or off the appropriate displays to make it fit.

For example, if you have two 1280x1024 monitors:

xrandr --output default --mode 1280x1024   # Just the first monitor
xrandr --output default --mode 2560x1024   # Two 1280 monitors side by side is 2560 wide; this will enable both

However, this requires that X be configured with both modes. I'm not up on the latest wisdom when it comes to X configuration, but I use this metamodes line in my Screen section:

Option "metamodes" "CRT: 1280x1024_60 +1920+0, DFP: 1920x1200 +0+0; NULL, DFP: 1920x1200"

That says "either display on my 1920x1200 DFP at 0x0 and my 1280x1024 CRT to its right, or just display on the DFP and leave the CRT off", so I can tell xrandr to use just the DFP (--mode 1920x1200) or both (--mode 3200x1200)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.