Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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).

Help appreciated.

share|improve this question
add comment

1 Answer

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)

share|improve this answer
    
Thanks, gonna try that. –  niXar Sep 14 '10 at 19:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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