Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Assigning an extra X-screen to a monitor on a second GPU
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
mhelvens
Guru
Guru


Joined: 17 Mar 2005
Posts: 337
Location: The Netherlands

PostPosted: Thu Sep 05, 2013 9:03 pm    Post subject: Assigning an extra X-screen to a monitor on a second GPU Reply with quote

I remember having trouble with this very issue years ago, and now I have reason to try again. As far as I can tell it hasn't become any easier. :?

Current Status

I have two video-cards in my Gentoo machine:
Code:
mhelvens-pc / # lspci | grep VGA
03:00.0 VGA compatible controller: NVIDIA Corporation G96 [GeForce 9500 GT] (rev a1)
05:00.0 VGA compatible controller: NVIDIA Corporation G96 [GeForce 9500 GT] (rev a1)

The first card has two Dell monitors attached to it, working perfectly with the nouveau driver: extended desktop, but still recognized as two separate monitors, e.g., I'm able to maximize a window to either monitor separately. Let's call this "xinerama" (I've always been confused about that; this mode requires the xinerama use-flag, but in xorg.conf, Xinerama is explicitly turned off).

The second card has my Sharp TV connected to it through a DVI-to-HDMI cable. I remember that at some point in the past I was able to get it recognized, but it was never flawlessly. For example, it would break my "xinerama". Anyway, I can't even figure out how to do that anymore. xrandr will only show me my primary monitors, whatever I try. Xorg.0.log doesn't show any errors.

What I'd like to achieve

I'd like to keep my primary monitors in "xinerama" mode and to be able to launch a separate X session on my TV, in which I plan to run XBMC. I don't need the TV to seamlessly connect to my extended desktop. That would certainly be nice, but I've given up hope of that a long time ago. Just the separate X session would do very nicely!

I know that properly I should list the things I've already tried. But the last time I really put effort into this was years ago, and truth be told... I'm really tired of this issue. Google isn't helping. I have a strong feeling that I'm not running into any exotic corner-cases here, and that this will be a piece of cake to set up for some of the veterans here. Please. :-)
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2282
Location: UK

PostPosted: Fri Sep 06, 2013 7:40 pm    Post subject: Reply with quote

You need to write two "Layout" sections in xorg.conf and attach one card to each, then run something like `startx -- -layout TVLayout :1` to start a second X server on the other card. `man xorg.conf` has all the necessary details.

But before you do all that, try `xrandr --setprovideroutputsource 1 0`.
Back to top
View user's profile Send private message
mhelvens
Guru
Guru


Joined: 17 Mar 2005
Posts: 337
Location: The Netherlands

PostPosted: Fri Sep 06, 2013 9:30 pm    Post subject: Reply with quote

Thanks! I'm very close now. :-)

After xrandr --setprovideroutputsource 1 0, xrandr can list my TV:

Code:
mhelvens ~ ↯ xrandr --setprovideroutputsource 1 0
mhelvens ~ ↯ xrandr
Screen 0: minimum 320 x 200, current 5120 x 1440, maximum 8192 x 8192
DVI-I-1 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
   2560x1440      60.0*+
   1920x1440      60.0
   ...
DVI-I-2 connected 2560x1440+2560+0 (normal left inverted right x axis y axis) 597mm x 336mm
   2560x1440      60.0*+
   1920x1440      60.0
   ...
DVI-I-3 connected (normal left inverted right x axis y axis)
   1920x1080      50.0 +   60.0     24.0 
   1920x1080i     60.1     50.0 
   ...


Then, when I issue the command startx /usr/bin/xbmc -- -layout TVLayout :1, it works!... sort of.

When the TV displays XMBC, I lose the desktop on my primary monitors, and vice versa. I can use Ctrl-Alt-F7 / Ctrl-Alt-F8 to switch between the two, but I'd like both to be visible at the same time. It must be technically possible. Both are using separate cards and separate monitors. But is it possible using two separate server layouts?

Update: When I use a single server layout, such as the "CombiLayout" below, I get the behavior I remember from my previous attempts: the mouse can travel from one screen to the other, but I lose "xinerama" on my main monitors. :-( Also, strangely, the TV cannot seem to get keyboard focus.

Here's my xorg.conf:

Code:
############################################################
# Video Cards                                              #
############################################################

Section "Device"
    Identifier  "UpperDevice"
    Driver      "nouveau"
    VendorName  "NVIDIA Corporation"
    BoardName   "GeForce 9500 GT"
    BusID       "PCI:3:0:0"
    Option      "Coolbits" "1"
    Option      "Monitor-DVI-I-1" "LeftMonitor"
    Option      "Monitor-DVI-I-2" "RightMonitor"
EndSection

Section "Device"
    Identifier  "LowerDevice"
    Driver      "nouveau"
    VendorName  "NVIDIA Corporation"
    BoardName   "GeForce 9500 GT"
    BusID       "PCI:5:0:0"
    Option      "Coolbits" "1"
    Option      "Monitor-DVI-I-3" "TVMonitor"
EndSection



############################################################
# Mouse and Keyboard                                       #
############################################################

Section "InputDevice"
    Identifier     "Mouse"
    Driver         "mouse"
    Option         "Protocol"
    Option         "Device" "/dev/input/mice"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    Identifier     "Keyboard"
    Driver         "kbd"
EndSection



############################################################
# Physical Monitors                                        #
############################################################

Section "Monitor"
    Identifier     "LeftMonitor"
    VendorName     "Dell"
    ModelName      "UltraSharp"
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "RightMonitor"
    VendorName     "Dell"
    ModelName      "Ultrasharp"
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "TVMonitor"
    VendorName     "Sharp"
    ModelName      "Aquos"
    Option         "DPMS"
EndSection



############################################################
# Screen Abstractions                                      #
############################################################

Section "Screen"
    Identifier    "DesktopScreen"
    Device        "UpperDevice"
    DefaultDepth   24
    SubSection "Display"
        Depth    24
        Virtual  5120 1600
    EndSubSection
EndSection

Section "Screen"
    Identifier    "TVScreen"
    Device        "LowerDevice"
    Monitor       "TVMonitor"
    DefaultDepth   24
    SubSection "Display"
        Depth    24
        Virtual  1920 1080
    EndSubSection
EndSection



############################################################
# Server Layouts                                           #
############################################################

Section "ServerLayout"
    Identifier   "MainLayout"
    Screen       "DesktopScreen"
    InputDevice  "Keyboard" "CoreKeyboard"
    InputDevice  "Mouse"    "CorePointer"
    Option       "Xinerama" "0"
EndSection

Section "ServerLayout"
    Identifier   "TVLayout"
    Screen       "TVScreen"
    Option       "Xinerama" "0"
EndSection

Section "ServerLayout"
    Identifier   "CombiLayout"
    Screen     0 "DesktopScreen"
    Screen     1 "TVScreen" RightOf "DesktopScreen"
    InputDevice  "Keyboard" "CoreKeyboard"
    InputDevice  "Mouse"    "CorePointer"
    Option       "Xinerama" "0"
EndSection

############################################################
# Files                                                    #
############################################################

Section "Files"
EndSection
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2282
Location: UK

PostPosted: Tue Sep 10, 2013 11:24 pm    Post subject: Reply with quote

You can't have xinerama on multiple cards when doing things the xorg.conf way.

After the xrandr command, have you tried using xrandr --output DVI-I-3 --auto instead of starting a separate X server?
Back to top
View user's profile Send private message
mhelvens
Guru
Guru


Joined: 17 Mar 2005
Posts: 337
Location: The Netherlands

PostPosted: Wed Sep 11, 2013 8:19 am    Post subject: Reply with quote

Ant P. wrote:
You can't have xinerama on multiple cards when doing things the xorg.conf way.

Well, I'd be happy to try another way.

Also, I don't need Xinerama on multiple cards, just on the main card. As far as I'm concerned, the TV screen can be completely separate from the main monitors. In fact, I don't even care if it doesn't have keyboard / mouse input (though that would be convenient).

The important thing is that all screens are active at the same time, the two main ones have xinerama, and I have some sort of command-line control over what is displayed on the TV.

Quote:
After the xrandr command, have you tried using xrandr --output DVI-I-3 --auto instead of starting a separate X server?

I tried it. What it does is restart X, without any change afterwards.
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2282
Location: UK

PostPosted: Wed Sep 11, 2013 2:47 pm    Post subject: Reply with quote

I'm not really sure what else to suggest, I don't have the hardware to try this out myself. Maybe someone else can step in.
Back to top
View user's profile Send private message
mhelvens
Guru
Guru


Joined: 17 Mar 2005
Posts: 337
Location: The Netherlands

PostPosted: Wed Sep 11, 2013 3:00 pm    Post subject: Reply with quote

I see. Oh well. :-) Thanks for your help! I'm certainly further than I was before.

So... If anyone knows (and is actually still monitoring this thread), I'd appreciate your assistance!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum