Kodi Community Forum

Full Version: Need help with dual monitor setup (Ubuntu)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've been using XBMC on my Windows machine successfully for years now. Recently I decided to give Ubuntu another chance and all hell broke loose. After a day of tweaking and rebooting I finally managed to set the sound issues straight, but now I have a problem with dual monitor setup.

In short, my primary works just fine. I can also see a background image on my secondary display (40'' Samsung LE40A656) through Nvidia GeForce 9600GT (latest drivers from their site). It's all set in the Nvidia X server

However, there's no way I can force XBMC to start on that secondary display. There is no such option in the settings (only full screen on monitor #1 and windowed). Nvidia X server settings see both monitors, though Ubuntu's own in-built Monitor setting tab only sees one monitor. Could that be the problem? Any suggestions? I've read numerous mentions of setting some environment variables somewhere, but I have no clue as to what to do with them ("SDL_FULLSCREEN_HEAD"). Anyone?

My xorg.conf is this:
Code:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 270.41.19  ([email protected])  Mon May 16 23:52:01 PDT 2011

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 270.41.19  ([email protected])  Mon May 16 23:52:12 PDT 2011

Section "ServerLayout"

# Removed Option "Xinerama" "0"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "1"
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"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Samsung SyncMaster"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "SAMSUNG"
    HorizSync       26.0 - 68.0
    VertRefresh     23.0 - 61.0
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 9600 GT"
    BusID          "PCI:1:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 9600 GT"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

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

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "DFP-1: 1920x1080 +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
Update: I installed the latest Nvidia drivers from their site (275.09.07). Still no success. Then I uninstalled XBMC and installed the latest version (Jun 16) from GIT, no changes. When I open XBMC and navigate to System>Settings>Video output, all I get is the option to either run XBMC on Monitor 1 or windowed. No Monitor 2 available whatsoever.

Both displays are set in the Nvidia X Server settings app as separate X screens. The TV displays the background image just fine and I can move my mouse cursor there no problem.

Finally, I tried starting XBMC with this command:
Code:
SDL_VIDEO_FULLSCREEN_HEAD=1 ./xbmc/xbmc.bin

This started XBMC, but not on head 1 but head 0 (my monitor and not the TV)
Anyone? Pretty, pretty please... Smile
Submitted a bug report (http://trac.xbmc.org/ticket/11642). Feel free to contact me for additional information.
Cheers
I am having the same problem here with twinview and separate x displays.

HP Pavilion dv9925nr laptop, ubuntu
nVidia Corporation C67 [GeForce 7150M / nForce 630M] (rev a2)
Linux x64bit, Driver 275.19
Does this blog help?

Here is the fix... if what I think that is your problem.

Jerry
drivers are way old now please see my signature

Also your xorg, was that auto created or did you manually do most of it?

Anyway some light reading on how to setup various monitors in a cleaner way

http://us.download.nvidia.com/XFree86/Li...tions.html
For TwinView you have to set up MetaModes to get non-doofy fullscreen I'm pretty sure. The problem is that the one display will turn off when XBMC is fullscreened on the other display. If you need both displays on simultaneously then going with separate X screens is probably the better bet.

For TwinView, in the "Screen" section of your xorg.conf:

Code:
Option         "MetaModes" "DFP: 1920x1080 +0+0, CRT: 1280x1024 +1920+0; DFP: 1920x1080 +0+0, CRT: NULL; DFP: NULL, CRT: 1280x1024 +0+0"

Here I set up three MetaModes: 1) Both displays on, 2) Display 1 on and display 2 off, and 3) Display 1 off and display 2 on.

Open up XBMC, go to system settings and switch to "Fullscreen". Then switch resolution to the one that matches your second display.

If anyone knows a better way to get fullscreen on TwinView, please share. Wink

I've never worked with separate X screens but you probably have to identify which display to launch XBMC on, so...

For bash shells:

DISPLAY=:0.1 xbmc

For C-shells:

env DISPLAY=:0.1 xbmc

..would probably work. Or check out the links posted above, especially if you're having problems getting the mouse and keyboard to move between X screens.
under the

Code:
Section "Device"
    Identifier     "nvidia"
    Driver         "nvidia"
wack this
Code:
Option         "TwinView" "on"
Option         "TwinViewOrientation" "clone"
Hey guys i got the same problem and i have tried changing my xorg.conf so that it sets the different meta modes, but i still just get 1 resolution, when going to system in XBMC.

My xorg.conf files:
Code:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 270.41.06  ([email protected])  Mon Apr 18 15:15:12 PDT 2011

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 270.29  (buildd@roseapple)  Fri Feb 25 14:43:24 UTC 2011

Section "ServerLayout"

# Removed Option "Xinerama" "0"
    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"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Samsung SyncMaster"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 60.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "SAMSUNG"
    HorizSync       26.0 - 68.0
    VertRefresh     23.0 - 61.0
EndSection

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

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 9600 GT"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

Section "Screen"

# Removed Option "metamodes" "DFP-0: 1920x1200 +0+0, DFP-1: 1680x1050 +1920+0; DFP-0: 1920x1200 +0+0, DFP-1: NULL; DFP-0: NULL, DFP-1: 1680x1050 +0+0;"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "1"
    Option         "TwinViewXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "DFP-0: 1920x1200 +0+0, DFP-1: 1680x1050 +1920+0; DFP-0: 1920x1200 +0+0, DFP-1: NULL; DFP-0: NULL, DFP-1: 1680x1050 +0+0;"
#Original    Option         "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-1: nvidia-auto-select +1920+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "TwinView" "1"
    Option         "metamodes" "DFP-0: 1920x1200 +0+0, DFP-1: 1680x1050 +1920+0; DFP-0: 1920x1200 +0+0, DFP-1: NULL; DFP-0: NULL, DFP-1: 1680x1050 +0+0;"
#Original    Option         "metamodes" "DFP-1: 1920x1080 +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Did i miss anything?