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

Reply via email to