[Nouveau] multiple cards and monitors with xrandr and opengl

Sampsa Riikonen sampsa.riikonen at iki.fi
Tue May 9 15:43:48 UTC 2017


Hi,

Thanks for your advice..!  I have a few follow-up questions (tagged 
below Q1, Q2 and Q3).  Any help highly/extremely appreciated.

Regarding to "reverse prime", etc. I have read the following page:

https://nouveau.freedesktop.org/wiki/Optimus/

So, if we want a single "macro" xscreen that spans two cards, for example:

Card 0, connected to monitor 0
Card 1, connected to monitor 1
=> a single xscreen

the only (possible) way to do this, is ..

* Card 0 composes the "macro" framebuffer
* .. and sends the relevant parts to Card 1

(Q1) Is this interpretation correct?

The command

xrandr --listproviders

gives me

Providers: number : 3
Provider 0: id: 0xd0 cap: 0x9, Source Output, Sink Offload crtcs: 4 
outputs: 4 associated providers: 2 name:modesetting
Provider 1: id: 0x47 cap: 0x6, Sink Output, Source Offload crtcs: 4 
outputs: 4 associated providers: 2 name:modesetting
Provider 2: id: 0x47 cap: 0x6, Sink Output, Source Offload crtcs: 4 
outputs: 4 associated providers: 2 name:modesetting

I am a bit confused that the name is not "Intel" and/or "nouveau"..  and 
"modesetting" is a kernel module that finds display modes, right?

(Q2) Am I doing something wrong here?

I made a simple test and, indeed, the data transfer (as pointed out by 
Karol) from card 0 => 1 manifested itself in glxgears:

* Open glxgears in monitor 0.  Gears roll about fine.
* .. drag the glxgears to monitor 1.  Gears start to be choppy with 
occasional freezing

However, there is an easy way to avoid this problem, by using the 
good'old xscreens

Card 0, connected to monitor 0 => xscreen 0 (i.e., DISPLAY=:0.0)
Card 1, connected to monitor 1 => xscreen 1 (i.e., DISPLAY=:0.1)

This fixed the issue when using nv$dia's proprietary driver.  When I do

DISPLAY=:0.1 glxgears

The gears appear in the second screen (card 1) and roll fine.  :)

However, to my great disappointment, it seems that noveau is not 
supporting separate xscreens any more.  There was no way around this .. 
I am using lightdm display manager and the xcfe4 window manager.  With 
nv$idia prop. drivers I could get two separate xscreens, but never with 
nouveau.  When testing the two cases, I used (almost) identical xorg 
files (see below).

(Q3) Has the support for separate xscreens been scrapped from the noveau 
driver?

I was also playing around with the "zaphod heads" option (as per 
http://blog.timmattison.com/archives/2012/01/16/how-to-set-up-multi-head-x-in-debian-using-nvidia-cards/ 
), but with little success

Regards,

Sampsa


The following xorg file was used succesfully for "nvidia" (removing "#" 
and replacing "noveau" with "nvidia") and not-so-succesfully for 
noveau.  I could get two separate xscreens only for the "nvidia" case.

Section "ServerLayout"
     Identifier     "Layout0"
     Screen      0  "Screen0" 0 0
     Screen      1  "Screen1" RightOf "Screen0"
     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      "BenQ GL2450"
     HorizSync       30.0 - 83.0
     VertRefresh     50.0 - 76.0
     Option         "DPMS"
EndSection

Section "Monitor"
     # HorizSync source: unknown, VertRefresh source: unknown
     Identifier     "Monitor1"
     VendorName     "Unknown"
     ModelName      "DFP-1"
     HorizSync       0.0 - 0.0
     VertRefresh     0.0
     Option         "DPMS"
EndSection

Section "Device"
     Identifier     "Device0"
     Driver         "nouveau"
     VendorName     "NVIDIA Corporation"
     BoardName      "GeForce GTX 750 Ti"
     BusID          "PCI:1:0:0"
EndSection

Section "Device"
     Identifier     "Device1"
     Driver         "nouveau"
     VendorName     "NVIDIA Corporation"
     BoardName      "GeForce GTX 750 Ti"
     BusID          "PCI:2:0:0"
EndSection

Section "Screen"
     Identifier     "Screen0"
     Device         "Device0"
     Monitor        "Monitor0"
     DefaultDepth    24
     Option         "Stereo" "0"
     #Option         "nvidiaXineramaInfoOrder" "DFP-0"
     Option         "metamodes" "1920x1080 +0+0"
     #Option         "SLI" "Off"
     #Option         "MultiGPU" "Off"
     #Option         "BaseMosaic" "off"
     SubSection     "Display"
         Depth       24
     EndSubSection
EndSection

Section "Screen"
     Identifier     "Screen1"
     Device         "Device1"
     Monitor        "Monitor1"
     DefaultDepth    24
     Option         "Stereo" "0"
     Option         "metamodes" "1024x768 +0+0"
     #Option         "SLI" "Off"
     #Option         "MultiGPU" "Off"
     #Option         "BaseMosaic" "off"
     SubSection     "Display"
         Depth       24
     EndSubSection
EndSection


On 08.05.2017 09:41, Karol Herbst wrote:
>
> On 8 May 2017 12:10:13 a.m. GMT+02:00, Ben Skeggs <skeggsb at gmail.com> wrote:
>> On 05/07/2017 11:12 PM, Ilia Mirkin wrote:
>>> On Sun, May 7, 2017 at 7:17 AM, Sampsa Riikonen
>> <sampsa.riikonen at iki.fi> wrote:
>>>> Dear Devs,
>>>>
>>>> We have achieved a desktop of up to six monitors, with openGL
>> running
>>>> succesfully on the desktop, with the following setup/features:
>>>>
>>>> * Ubuntu 16+
>>>> * Xrandr
>>>> * Noveau driver
>>>> * Two gtx750 graphic cards
>>>>
>>>> Each (identical) graphic card has 2xHDMI + 2xDVI connectors, which
>> we
>>>> connect to the monitor array.
>>>>
>>>> So far it works with six monitors, but we'd like to achieve eight.
>>>> However, throwing in more monitors, results in monitors starting to
>> drop
>>>> out (black screen).  However, xrandr sees them correctly.
>>>>
>>>> The nv$dia proprietary driver is not an option - they have
>> artificially
>>>> restricted the amount of monitors in the "base mosaic" feature (ref.
>>>>
>> https://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/x-org-drm/46705-linux-multi-head-success-with-8-monitors-in-1-x-screen-without-xinerama
>>>> ).
>>>>
>>>> What might cause the monitors to drop out?  I can provide some logs
>>>> later next week (which file should I look at?)
>>>>
>>>> Could using nv$dia's proprietary firmware in noveau help?
>>>>
>>>> Regards,
>>>>
>>>> Sampsa
>>>>
>>>> P.S. This seems to be a bit outdated.. ?
>>>>
>>>> https://nouveau.freedesktop.org/wiki/MultiMonitorDesktop/
>>>>
>>>> .. it implies that xinerama must be used to combine screens from two
>>>> different graphics cards into a single screen which implies that
>> opengl
>>>> should not work, right?
>>> Using reverse prime with a ton of screens has had a questionable
>>> success rate. Using Xinerama Just Works (tm). But you do lose direct
>>> rendering (but you still get OpenGL via indirect GLX, assuming the X
>>> server has that enabled). However in the past, this hasn't been an
>>> issue for the people trying to create such arrangements.
>>>
>>> With reverse prime, I believe it's all just one big framebuffer, so
>>> you run into fb size limits. I think we restrict it to 16k x 16k in
>>> size.
>> Another possibility is running into memory bandwidth limitations.
>>
> And PCIe bandwidth, especially if only on 2.5 GT/s speed. So if this is done through Reverse Prime, reclocking is a must.
>
>>> Cheers,
>>>
>>>    -ilia
>>> _______________________________________________
>>> Nouveau mailing list
>>> Nouveau at lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/nouveau
>>>
>> _______________________________________________
>> Nouveau mailing list
>> Nouveau at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/nouveau
> _______________________________________________
> Nouveau mailing list
> Nouveau at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau



More information about the Nouveau mailing list