3

I have a working twin view setup using nvidia graphics card and propriety drivers on Debian jessie.

  • main monitor (DFP-0): Dell 2405FPW via DVI, placed to the right
  • sencondary (DFP-1): Sharp TV screen via HDMI, placed to the left

But in software, the position is switched and does not correspond to my hardware setup. How to change this and make it permanent after restart?

I can change it temporary using gksu nvidia-settings, but after restart, the ordering is reversed again. (note: I did run as root and save the resulting xorg.conf file directly from GUI, and also by copy pasting it into sudo nano /etc/X11/xorg.conf, with no effect)

my xorg.conf after reboot:

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 319.72  (pbuilder@cake)  Sat Nov  9 14:29:01 UTC 2013

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "DELL 2405FPW"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 460"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "DFP-0: nvidia-auto-select +1920+0, DFP-1: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

As far as I understand this should result in the correct setup. I did try different settings, like:

  • Option "metamodes" "DFP-0: 1920x1200_60 +1920+0, DFP-1: 1920x1080_50 +0+0"
  • Option "metamodes" "DFP-1: nvidia-auto-select +1920+0, DFP-0: nvidia-auto-select +0+0"
  • Option "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-1: nvidia-auto-select +1920+0"
  • Option "metamodes" "DFP-1: nvidia-auto-select +1920+0, DFP-0: nvidia-auto-select +0+0"

but they all resulted in exactly the same situation after restart, so I suppose I'm missing something else, and I don't think this is an error in xorg.conf. Any advice?

  • What desktop environment are you using? Some have their own settings that can override the X settings. What you have looks right to me, and in fact is pretty mirrors my setup. – casey Feb 13 '14 at 14:46
  • default Gnome, gnome shell 3.8.4. It's a pretty fresh install, I did only install Synergy and Steam on this box. Otherwise it's a fresh netinst, sources changed to jessie and then dist-upgrade.. – RafiK Feb 13 '14 at 15:21
  • gdm3 already runs with the switched settings, before loggin in.. i could of course just run xrandr --output HDMI-0 --left-of DVI-I-1 in a user start up script, but I'm interested in how to do it correctly and for all users.. – RafiK Feb 13 '14 at 15:25
4

Method #1 - From GNOME Control Center

I usually just launch the Display applet from the GNOME Settings (typically under your username's pulldown in the upper right corner). BTW, you can summon the GNOME Control Center via command line using gnome-control-center.

Example

Laptop screen on left, VGA attached monitor on right

   ss of display settings #1

Now if I grab with my mouse and left click drag the VGA attached monitor (orange) to the left side of my laptop's display (red) I get the desired change that you're inquiring about.

   ss of display settings #2

NOTE: These changes persist across reboots!

Method #2 - xorg.conf

You should be able to define the orientation in your system's xorg.conf like so.

relative coordinates

# /etc/X11/xorg.conf
Section "Monitor"
    Identifier  "VGA1"
    Option      "Primary" "true"
EndSection

Section "Monitor"
    Identifier  "HDMI1"
    Option      "RightOf" "VGA1"
EndSection

Or you can specify LeftOf.

Fixed coordinates

# /etc/X11/xorg.conf
Section "Monitor"
    Identifier  "VGA1"
    Option      "PreferredMode" "1024x768"
    Option      "Position" "1920 0"
EndSection

Section "Monitor"
    Identifier  "HDMI1"
    Option      "PreferredMode" "1920x1080"
    Option      "Position" "0 0"
EndSection

If you take a look at the man page for xorg.conf:

   Option "LeftOf" "output"
          This optional entry specifies that the monitor should be 
          positioned to the left of the output (not monitor) of the given 
          name.  (RandR 1.2-supporting drivers only)

   Option "RightOf" "output"
          This optional entry specifies that the monitor should be 
          positioned to the right of the output (not monitor) of the given 
          name.  (RandR 1.2-supporting drivers only)

   Option "Above" "output"
          This optional entry specifies that the monitor should be 
          positioned above the output (not monitor) of the given name.  
          (RandR 1.2-supporting drivers only)

   Option "Below" "output"
          This optional entry specifies that the monitor should be 
          positioned below the output (not monitor) of the given name.  
          (RandR 1.2-supporting drivers only)

References

| improve this answer | |
  • stupid me.. first try the default tool! Thanks. But I suppose this does something similar than the xrandr command in autostart.. It is correct now for the current user, but not for the whole system. (for example the login screen, there it's still switched). It fixes the problem, but not in the way I hoped it could be possible (find a system wide solution, without flickering screens while loggin in.) – RafiK Feb 13 '14 at 16:04
  • @RafiK - I would assume something similar to xrandr, but it allows the users to control how they want it. As a user I'd rather have control. I'll take another look. – slm Feb 13 '14 at 16:09
  • @RafiK - see update. – slm Feb 13 '14 at 16:14
  • Thanks for you efforts, I really appreciate.. But isn't method 2 rather for dual head instead of twin view? -- Twinview means xorg.conf with one of each section "Device", "Monitor" and "Screen". "screen" having the Option "metamodes" "DFP-0: 1920x1200_60 +1920+0, DFP-1: 1920x1080_50 +0+0" part, so the screen section "connects" the screen. -- Dualhead means having one "device", two "Monitor" and two "Screen"? -- I'm confused.. I'll dive in the manuals.. If I find out something I'll update, untill then I'll accept your answer. – RafiK Feb 13 '14 at 17:43
  • @RafiK - twinview is NVidia name for multihead I'm showing the setup for RandR, which to my knowledge should work independently of the that tech. since it's doing it at the X11 level. See the wiki topic I linked: wiki.archlinux.org/index.php/multihead#TwinView – slm Feb 13 '14 at 18:08

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.