Looking Glass - Triage

Iā€™ve been asking years ago for Decklink output from the OBS canvas. THANK YOU.

Has this been tested in Linux? @wendell might be our first guinea pig for that. Or @eposvox?

Seriously, Decklink output actually means A LOT to people trying to build cheaper Vmix/Tricaster alternatives.

Anyways, thatā€™s all Iā€™ll say on this issue. Letā€™s get back to Looking Glass.

@feekes the issue you are seeing I have seen in some titles, of most note the Unigine Valley Benchmark where the solution is a simple as tabbing out and back into the program. Please also if you have the option try to run the game in Windowed mode. The stutter youā€™re seeing seems to be common on recent (Pascal or later) NVidia hardware when using DXGI DD capture.

I wouldnā€™t at all be surprised if NVidia are intentionally crippling DXGI DD capture to make NvFBC a desirable thing.

@dodgepong thank you for clearning all that up, if you do ever happen to work out some kind of deal with NVidia for NvFBC please do let us know!

2 Likes

@gnif Come to think of it, i remember you stating this exact thing in one of the looking glass videos. Iā€™ll have to throw the 2060 back in there and give it another shot.

Another nugget for thought, it exibited the same behavior in normal 2d applications like with just the windows desktop. Anything that i can run to collect logs or help with debugging I will gladly do.

Thank you so much for your awesome work.

Strange, I assume itā€™s still 1080p and youā€™re using A12? And your guest is a i440fx or q35 machine?

Please note that youā€™re the first person to my knowledge that has reported the use of a RTX card with LG so youā€™re in uncharted waters.

Thanks but it either works completely or doesnā€™t at all, there are unfortunately no useful logging/debug information with performance issues. The only real way to work on these is to either profile the code yourself, or help me to replicate it so I can do it, which in this case would require a RTX card.

Youā€™re most welcome.

I am on A12 using q35 and of course ovmf. I am running at 1080 and have increased the memory up 64 meg, sad attempt by me to see what changed, but I still see it only using 32. You did say that it wouldnā€™t go over and guess what, the author knows his code lol.

I purchased the RTX card mainly for testing with looking glass and showing some of my students in class the really amazing things that Linux is capable of. Who knew it would be so different than their previous cards in this application, but what fun would it be in charted waters right?

Iā€™m sure that there can be arranged a way for you to aquire an RTX card if that is something you would be interested in.

Please be sure to run a very recent version of Qemu, 3.2 or later IIRC and specify the PCIe link width and speed. By default NVidia cards on a root port in a q35 machine will only report a x1 link and the NVidia driver will configure the SOC for it. Please see this thread for more information: Increasing VFIO VGA Performance

Wow! I am glad to have LG as part of the lecture, I am truly honoured :slight_smile:

Most certainly, LG is one of those projects that requires multiple combinations of hardware to test and develop against. Itā€™s near impossible to profile a performance issue without the hardware on hand.

Running the LTS Ubuntu 18.04, so im sure my qemu is older, not to mention Iā€™m actually running the machine through libvirt and not directly. Intersestingly enough the GPU performance is spot on when using an external display, and infact the benchmarks come back identical when just using the looking glass client, its some oddity in the displaying of the image back that is making it appear to stutter. No stutter is actually present in the rendering.

Iā€™ll have to get some more details to how i could get one sent to you. Not sure where you are located or if you would even want people sending you hardware. That could get messy quick. If only there was someone you have delt with in the past that had the ears of Nvidia. *cough *cough @wendell

If you are outside of the united states, I will gladly contribute the majority to a ā€œGet this guy an RTXā€ fund so you can purchase one locally and not incur a crazy needless shipping cost.

Thatā€™s not an issue, you can continue to do so. Updating qemu under libvirt generally works without an issue from my experience.

The patch that adds link speed negotiation support will most certainly be missing from your Qemu build as an official release has not been made since that code made it into git.

Correct, we have seen this behaviour in Discord and found that the link speed issue is the cause. The GPU is throttling itā€™s GPU RAM->System RAM copy, likely under the false assumption that the transfer will block the PCIe bus for too long while streaming textures.

Unfortunately NVidia have been completely silent on this project as they do not support nor want people using consumer nvidia cards for passthrough. I am in Australia so if youā€™re posting international as @wendell discovered the cost is astronomical unless youā€™re sending from China.

Thank you kindly however I already have a GoFundMe in progress for a Quadro so I can perfect the NvFBC support. Simply to be organised I am not keen to run multiple fund raisers at once as tracking the financials would become a nightmare. However if you really wish to donate towards LG RTX hardware you can donate directly via Paypal if you like.

1 Like

I will definately give those suggestions a shot. Looks like I need to read a little more into the past to see what problems I face in my future. :slight_smile:

Hopefully we can get you the Quadro you need to further development. Donā€™t have a whole lot being in education but I hope the little i can contribute helps.

Good luck on your ventures and thank you for being such an approachable developer and role model for those young ones looking at the open source space. Too offten they get hit with the old RTFM mentality.

1 Like

Hello all,
Iā€™m trying to use the Looking Glass software to help me display output from my kvm to a window so that I donā€™t need an external montior (thus keeping the portability of a laptop) and am running into some issues. The looking glass quick setup does not talk about using virt-manager and instead uses the qemu command line. Iā€™m not sure how the qemu command line works and there seem to be no tutorials on how to set this up using virt-manager. In my research I started seeing that optimus cards can not even do VGA passthrough, so am what I am trying to do even possible? And if so, how do I do it? Are there alternatives that would achieve the same results with similar performance to looking glass?

  1. You should use libvirt from the quick setup instead of qemu command line since you want to use virt-manager also.

  2. It is sometimes possible.

  3. See here for how to do it if your laptop is mux-ed- https://gist.github.com/Misairu-G/616f7b2756c488148b7309addc940b28

  4. If there were other fast alternatives then why would gnif work on looking glass? You could use rdp or similar although those are much slower then looking glass.

i cant get looking glass host to work on windows.
the GPU is passed through and its driver is installed.
when i run the command prompt as administrator and issue looking-glass-host.exe -f
this error happens.

[I] CaptureFactory.h:83 | CaptureFactory::DetectDevice | Trying DXGI
[I] DXGI.cpp:232 | Capture::DXGI::Initialize | Device Descripion: Microsoft Basic Render Driver
[I] DXGI.cpp:233 | Capture::DXGI::Initialize | Device Vendor ID : 0x1414
[I] DXGI.cpp:234 | Capture::DXGI::Initialize | Device Device ID : 0x8c
[I] DXGI.cpp:235 | Capture::DXGI::Initialize | Device Video Mem : 0 MB
[I] DXGI.cpp:236 | Capture::DXGI::Initialize | Device Sys Mem : 0 MB
[I] DXGI.cpp:237 | Capture::DXGI::Initialize | Shared Sys Mem : 4094 MB
[I] DXGI.cpp:241 | Capture::DXGI::Initialize | Capture Size : 1024 x 768
[E] DXGI.cpp:293 | Capture::DXGI::Initialize | Failed to create D3D11 device: 0x887a0004 (The specified device interface or feature level is not supported on this system.)
[E] CaptureFactory.h:92 | CaptureFactory::DetectDevice | Failed to initialize a capture device
Unable to configure a capture device

Press enter to terminateā€¦

not sure if it matters, but the VMā€™s graphics card is an AMD radeon RX 590.

Try disabling in windows the QXL, or other video card you have present in device manager. Sounds crazy but is exactly what Iā€™m doing. When you do this you will loose video in your spice client and only have looking-glass and external displays to use.

1 Like

thank you, now it just works.
however, the windows desktop is very low resolution, and windows is unable to change its resolution in display settings. is there any way to fix that?
under the ā€œradeon RX 590 Series propertiesā€ tab from the display settings, if i hit ā€œlist all Modesā€ it only shows ā€œ640x480, true color (32bit), 59 hertzā€ and ā€œ640x480, true color (32bit), 60 hertzā€ as options.
UPDATE: ive tried running the half life 2 lost coast benchmark on my VM with looking glass while stuck in this low-re mode. it got 82fps, which is very odd as the host has the same GPU and gets several hundred FPS in that game,

What kind of external display do you have connected? You will need to have some sort of termination on the GPU still. Can be a monitor or if you are solely wanting to use looking glass, a dummy connector.

1 Like

i do not have any physical monitor connected to the VMā€™s GPU. Looking-Glassā€™ website frontpage states that it eliminates the need for a physical monitor.

i do not currently own a monitor that is compatible with the VMā€™s GPU.

Without something on the GPU, it will not be able to negotiate resolutions. I recommend a HDMI dummy plug like this.

As for the preformance, is it a q35 or a 440 based VM?

pc-i440fx-3.1

so is it not possible to create a true headless gaming VM? only one with a false monitor on the GPU?

Not without a dummy plug. Nothing looking glass can do to bypass that. The GPU needs to see a display connected.

As for more performance, a q35 based machine will give better results. Check out this thread, time of info in it.

2 Likes

so i now have a monitor and am trying to play a game with looking glass. but everytime i launch a game looking glass host crashes with this error

DXGI.cpp:328 | Capture::DXGI::Initialize | DuplicateOutput1 Failed: 0x80070005 (Access is denied.)
[E] Service.cpp:190 | Service::ReInit | ReInitialize Failed

not sure if it matters, but i have looking glass running at login by having it added to the registry setting stated in the quickstart guide. i appened the -f switch to this registry setting so that i could see on the monitor any errors that might happen.