xrandr and nvidia [was: better multi-display support in X]

Matt Price matt.price-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Thu Feb 1 16:18:07 UTC 2007


On Wed, 2007-01-31 at 23:04 -0500, Tim Writer wrote:
> "Jing Su" <gargamel.su-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> writes:
> 
> > Hello,
> > 
> > I have a laptop that I sometimes want to connect an external monitor
> > to and have extra screen real-estate.  So far, the only solution that
> > really works for me is to restart X with Xinerama when I have the
> > external monitor connected and restart X again when I disconnect to be
> > on-the-go.
> > 
> > This has really frustrated me because it's just not very friendly or
> > smooth.  I've tried running in dual-screen mode (having two different
> > X screens) but it's annoying to not be able to juggle and move windows
> > around.  It's still the case then when I connect or reconnect I have
> > to restart the apps that I want to move.
> > 
> > Googling hasn't turned up many useful results for me on this topic.
> > Has anyone else had better luck in terms of little utility programs or
> > configs which make this a more bearable experience?
> 
> xrandr combined with various dual head setups (Xinerama, radeon MergedFB,
> ATI fglrx Big Desktop, or nVidia TwinView) _may_ do what you want.  I
> generally just switch between the builtin flat panel at 1024x768 and an
> external flat panel at 1280x1024 (with my notebook closed) so YMMV. Note
> that the proprietary ATI fglrx drivers have (some) hotplug support. nVidia
> may have something similar.
> 

I just finally got nvidia twinview working on my laptop and it's pretty
cool, though I have trouble with the horizsync and vertsync when
connecting to the projectors at work.  actually sucked rather badly last
week. in any case this solutionwill obviously only work if you have
nvidia hardware and are willing to use the nonfree drivers.  

a further question w.r.t xrandr/twinview:  I am able to switch between
twinview configurations listed on the "multimodes" line of my xorg.conf,
but only by using the graphical "nvidia-settings" program.  My
understanding is that I ought to be able to switch between them by using
xrandr, like this:

xrandr -o 2
xrandr -o 0

However, while xrandr -o 0 runs fine,, any other number produces an
error:

~$ xrandr -o 1
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  156 (RANDR)
  Minor opcode of failed request:  2 (RRSetScreenConfig)
  Serial number of failed request:  12
  Current serial number in output stream:  12
-----------------------------------------------
I have what I think is a pretty good "device" section in my xorg.conf:

Section "Device"
        Option  "NvAGP"      "1"
    Identifier     "NVIDIA Corporation NVIDIA Default Card"
    Driver         "nvidia"
    Option     "NoLogo"                    "true"
    Option     "ConnectedMonitor"          "DFP-0, CRT-0"
    Option     "UseDisplayDevice"          "DFP-0, CRT-0"
#    Option     "UseEdidFreqs"              "false"
    Option     "UseEdidFreqs"              "true"
    Option     "UseEDID"                   "true"
#    Option     "UseEDID"                   "false"
    Option     "TwinView"                  "true"
    Option     "TwinViewOrientation"       "LeftOf"
#     These sync options need to be changed to get the monitor to work with presentations
    Option     "SecondMonitorHorizSync"    "30-160"
    Option     "SecondMonitorVertRefresh"  "30-85"
    # playing with metamodes is probably a good idea, may be useful when doing presentations
    # nvidia-settings also always a good option.
    Option         "metamodes" "CRT-0: 1280x1024 +1920+0, DFP-0: 1920x1200 +0+0; CRT-0: 1024x768 +1920+0, DFP-0: 1920x1200 +0+0; CRT-0: 800x600 +1920+0, DFP-0: 1920x1200 +0+0; CRT-0: nvidia-auto-select +1920+0, 
DFP-0: 1920x1200 +0+0; CRT-0: NULL, DFP-0: 1920x1200 +0+0"
    # Not sure if this xinerama option is good or not
    # Option     "Xinerama"                  "on"
    Option     "TwinViewXineramaInfoOrder" "DFP-0, CRT-0"
# experiment with this to get it to work with my main screen
#    Option     "DPI"                       "75 x 75"
    Option     "DPI"                       "96 x 96"
    Option     "UseEdidDpi"                "false"
    Option     "FlatPanelProperties"       "Scaling = Centered, Dithering = Default"
    Option     "AddARGBGLXVisuals"         "true"
    Option     "TripleBuffer"              "true"
EndSection

with all of these options I can do most of what I want (though beryl and
compiz currently both break when xinerama/twinview are switched on), but
I would really like to be able to change configurations on the
command-line.  anyone know whether I'm doing something wrong?

thanks,
m



-- 
Matt Price
History Dept
University of Toronto
matt.price-H217xnMUJC0sA/PxXw9srA at public.gmane.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gtalug.org/pipermail/legacy/attachments/20070201/ec065247/attachment.sig>


More information about the Legacy mailing list