You are not logged in.

#1 2009-10-01 07:40:21

o1911
Member
From: Hobart, Australia
Registered: 2009-04-28
Posts: 106

[SOLVED] Disable/enable nvidia twinview from code?

Hi there,

After discovering that xrandr doesn't work properly with the nvidia driver, I was hoping someone could help me with dynamically switching on and off a second monitor.  I only do this because games operate a lot better with my secondary monitor off.  I'm tired of manually using 'nvidia-settings' to do this, so if there was a script I could run before each game, that would be brilliant.

I've got a 9800gtx, using both DVI ports on 22" 1680x1050 (primary) and 1280x1024 (secondary) monitors.

Any help is appreciated.  Cheers!

Last edited by o1911 (2009-10-01 14:33:14)


Arch x86_64

Offline

#2 2009-10-01 09:31:24

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: [SOLVED] Disable/enable nvidia twinview from code?

I believe there was a HOWTO on ubuntuforums about this, half a year ago. I didn't pay too much attention as I hadn't started using dual-screens then.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2009-10-01 10:35:24

theDOC
Member
From: Aachen, Germany
Registered: 2009-06-18
Posts: 50

Re: [SOLVED] Disable/enable nvidia twinview from code?

you can use xrandr

$ xrandr
Screen 0: minimum 1280 x 1024, current 1680 x 1050, maximum 2960 x 1050
default connected 1680x1050+0+0 0mm x 0mm
   1680x1050      50.0* 
   2960x1050      51.0     50.0  
   1280x1024      52.0  
   1400x1050      53.0

xrandr -s 1 switches to 2960x1050, xrandr -s 0 switches back.

I have these settings in my xorg.conf:

Section "Screen"
        ...
        Option          "TwinView" "1"
        Option          "TwinViewXineramaInfoOrder" "DFP-0"
        Option          "metamodes" "DFP: 1680x1050_60 +0+0, CRT: NULL; DFP: 1680x1050_60 +0+0, CRT: 1280x1024_75 +1680+0; DFP: NULL, CRT: 1280x1024_75; DFP: 1400x1050_60 +0+0, CRT: NULL;"
        SubSection "Display"
                Depth     24
                Modes     "1680x1050" "2960x1050" "1280x1024" "1400x1050"
                Virtual   2960 1050
                ViewPort  0 0
        EndSubSection
EndSection

Offline

#4 2009-10-01 14:33:00

o1911
Member
From: Hobart, Australia
Registered: 2009-04-28
Posts: 106

Re: [SOLVED] Disable/enable nvidia twinview from code?

That's excellent; works brilliantly theDOC, thanks very much!


Arch x86_64

Offline

Board footer

Powered by FluxBB