> The burning question in my mind is whether you're trying to get a 
multi-monitor config for the purposes of screen real estate or for the purposes 
of performance. If all you need is to run 3D applications on the nVidia chip 
and 
display them to the Intel chip, VirtualGL can certainly do that, and in fact 
there is a downstream project called bumblebee that specifically uses VirtualGL 
to provide that functionality for Optimus-equipped laptops.

Ideally I want both real estate and performance. I know about bumblebee, that's 
how I learned about VirtualGL in the first place. I've been using it for a 
while 
but it doesn't solve this problem.

 > I'm not sure now VirtualGL is going to help vis-a-vis actually creating a 
multi-monitor config. Creating such a config should just be a matter of setting 
up Xinerama correctly.

The problem is that Xinerama can't combine different X servers, which is 
required to have hardware acceleration on all screens.

 > However, VGL can certainly solve the problem of how to display the 
application to one graphics card while using the 3D acceleration of the other, 
and doing that doesn't involve anything so complex as running compiz in VGL. 
You 
just would use VirtualGL to start whatever application you wanted to redirect, 
and you'd set VGL's 3D X server (VGL_DISPLAY or vglrun -d) to whatever screen 
the nVidia adapter is attached to (:0.1, for instance.)

I don't think my application fits the standard VGL paradigm. I envision more 
something like the whole desktop gets rendered into a pixbuf, half of which 
gets 
output by the same device it is being rendered on and half of which gets 
outputted via some transport to be displayed in another X server.

Jethro

On 15-06-12 19:02, DRC wrote:
> The burning question in my mind is whether you're trying to get a 
> multi-monitor config for the purposes of screen real estate or for the 
> purposes of performance. If all you need is to run 3D applications on the 
> nVidia chip and display them to the Intel chip, VirtualGL can certainly do 
> that, and in fact there is a downstream project called bumblebee that 
> specifically uses VirtualGL to provide that functionality for 
> Optimus-equipped laptops.
>
> I'm not sure now VirtualGL is going to help vis-a-vis actually creating a 
> multi-monitor config. Creating such a config should just be a matter of 
> setting up Xinerama correctly. However, VGL can certainly solve the problem 
> of how to display the application to one graphics card while using the 3D 
> acceleration of the other, and doing that doesn't involve anything so complex 
> as running compiz in VGL. You just would use VirtualGL to start whatever 
> application you wanted to redirect, and you'd set VGL's 3D X server 
> (VGL_DISPLAY or vglrun -d) to whatever screen the nVidia adapter is attached 
> to (:0.1, for instance.)
>
> On Jun 15, 2012, at 8:20 PM, Jethro Beekman<jet...@jbeekman.nl>  wrote:
>
>> I knew I wasn't going to get away with no explanation. Well, here goes:
>>
>> The ultimate problem is getting a dual head setup on my hybrid graphics
>> [1,2] laptop. This should be a real multi-monitor desktop "The way it
>> should work™", where you can move windows between monitors (or half on
>> either side if you so incline) and the maximize function maximizes
>> across a monitor, not the entire screen. My laptop has an nVidia card
>> attached to the DisplayPort and an Intel card attached to the internal
>> LVDS port. Because the proprietary nVidia drivers use all kinds of
>> OpenGL-library magic, you can't have OpenGL working on both cards in the
>> same X server. My laptop has an option the BIOS to switch between three
>> graphics modes. "Integrated" turns off the nVidia card, saving power,
>> I'm not sure what this does to the DisplayPort. "Hybrid" works as I just
>> described, and note that the nVidia card can still be powered down by
>> software when not in use. "Discrete" turns off the Intel card and
>> connects the LVDS port to the nVidia card as well. I understand not all
>> laptops with hybrid graphics have these options in the BIOS.
>>
>> Solution #1. Reboot and change the BIOS every time I switch from
>> 'docked at my desk with an external monitor' to 'on-the-go with maximum
>> power savings'. This is cumbersome and might not be possible for some
>> people with different hardware setups.
>>
>> Solution #2. Find some way to copy the screen rendered by one chip to
>> the other. This might involve running different X servers or not.
>> Ideally, you want to leverage the power of the nVidia card to do the
>> heavy 3D lifting. If you don't have separate X servers, you can't use
>> OpenGL on one of the graphics cards. I have tried to use x11vnc [3], but
>> the performance is really poor (<1fps). Today I came across two other
>> attempts at a solution [4,5], I will try them out later, but since they
>> still use XGetImage/XShmGetImage, I don't think the performance will be
>> much better. I think this might be where VirtualGL can play an important
>> role.
>>
>> Solution #3. Reverse engineering other software. Obviously the BIOS has
>> a way to (dis)connect the LVDS screen to the nVidia card. If I could
>> figure out how that works, I might be able to do that dynamically. Also,
>> the Windows drivers seem to have all of this figured out, so may be
>> there are some hidden gems in those drivers.
>>
>> Solution #4. Wait for nVidia to fix the problem in their proprietary
>> drivers. They are supposedly working on that, but no one knows how long
>> it is going to take and whether they will support older hardware once it
>> is released.
>>
>> I hope this helps to provide some context to my question. Don't say
>> tl;dr because you asked for it ;)
>>
>> Jethro
>>
>> [1] https://en.wikipedia.org/wiki/ATI_Hybrid_Graphics
>> [2] https://en.wikipedia.org/wiki/Nvidia_Optimus
>> [3] http://www.karlrunge.com/x11vnc/
>> [4] https://github.com/harp1n/hybrid-windump
>> [5] https://github.com/liskin/hybrid-screenclone
>>
>> On Fri, 15 Jun 2012 03:23:03 -0500, DRC wrote:
>>> On 6/15/12 1:36 AM, Jethro Beekman wrote:
>>>> I want to capture part of my desktop, and since I'm using compiz as
>>>> a window
>>>> manager, I'd think I should be able to use VirtualGL to do this. Is
>>>> that right?
>>>> Just to be clear: I still want everything to appear on my attached
>>>> monitor as well.
>>>
>>> That depends.  I wasn't aware that compiz actually worked properly
>>> with
>>> VirtualGL yet, but I could be behind the curve on that.  I've never
>>> personally been able to bring it up with all of the 3D stuff enabled.
>>>
>>> Further, if remote delivery of the images is not necessary, then
>>> VirtualGL may not be what you want.  It's hard to say without knowing
>>> more about what you're trying to do.  VirtualGL is certainly not
>>> intended as a session capture program.  There are much better ways to
>>> do
>>> that.
>>>
>>>
>>>> If the answer is yes, I assume I will need to write my own
>>>> transport. Is there
>>>> any developer documentation? Chapter 11 is not very elaborate.
>>>
>>> rrtransport.h (which is shipped in /usr/include if you are using our
>>> binary packages) provides detailed API documentation.  You could
>>> probably just modify testplugin2.cpp and add a separate thread that
>>> saves the images to disk rather than displaying them.
>>>
>>> I echo Arthur's comment, however, that VirtualGL may or may not be
>>> the
>>> best solution for this.  We really need more information about what
>>> you're trying to do, what format you need to output, etc.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond.
>>> Discussions
>>> will include endpoint security, mobile security and the latest in
>>> malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> VirtualGL-Users mailing list
>>> VirtualGL-Users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/virtualgl-users
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> VirtualGL-Users mailing list
>> VirtualGL-Users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/virtualgl-users
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> VirtualGL-Users mailing list
> VirtualGL-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtualgl-users

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
VirtualGL-Users mailing list
VirtualGL-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtualgl-users

Reply via email to