Looking Glass - Triage

Bleeding edge continuous builds of the c-host are now available at:
https://looking-glass.hostfission.com/downloads

2 Likes

At the request of several people I am now accepting donations via Ko-Fi

So, gave the c-host a shot jut to see whether performance is good enough for playing FFXC and…

Parsec: 60-70 fps
LG: 20-35 fps

I really need frame buffering it seems :sweat_smile:

Anyways, nice work with the c-host and general progress :slight_smile:

Hrmm, I will have to get a parsec install setup and profile it to see what’s going on. Thanks for pointing this out.

no worries. I actually feel kinda bad comparing it to parsec constantly but at the same time want to get rid of it (it meaning parsec).

Anyways. If you need anything let me know. I’m happy to help to the best of my abilities :slight_smile:

1 Like
1 Like

Hello, I have questions about NvFBC. According to https://github.com/gnif/LookingGlass/blob/master/c-host/README.md it means that we can use NvFBC on consumer cards?

Does Looking Glass already supports NvFBC? (Can we already use it?)

Are there / or do you plan to make some benchmarks between NvFBC and DXGI capture API? What is faster and what is real difference?

How does NvFBC really work with Looking Glass? Does it work like: Nvidia GPU takes rendered frame and saves it directly into shared memory? Because then it should mean that Looking Glass in guest whould have zero % of CPU usage, because Nvidia card should handle savings frames into memory?

No

Yes if you have a pro card

No.

The same as DXGI. The memory copy isn’t the bottleneck, the capture API is.

I just tried the b1-rc2 c-host. The performance seems to be lower than a12 (even on a12 it was pretty laggy) is there anything that I might bo doing wrong or is the gpu on guest (gtx 750) simply too slow?

Yes capture API is bottleneck, but NvFBC should be faster than DXGI no?

So there is no way to use NvFBC on consumer cards? Because I read that consumer cards are capable of NvFBC, but there are license issues, but license was updated some times ago :slight_smile:

The license may have been updated but you still cannot use it without proper licensing.

It’s against EULA to even attempt it, so we are not going to try.

If you do attempt to do it, you could jeopardize the entire project and possibly put Gnif in legal trouble since he’s the primary PoC on the project.

I’m going to ask that we stop discussing NvFBC on consumer cards. We can file this one in asked and answered.

2 Likes

I’m getting a lot of [W] dxgi.c:619 | dxgi_capture | Frame skipped warning in the log file. Is this a performance issue (tried gtx 750 and radeon hd 7750)?

EDIT: also tried with gtx 750 ti, might try with a gtx 1060 (swap my host and guest gpus) if I get the time

EDIT2: tried with gtx 1060, still bad performance and warnings

According to this commit https://github.com/gnif/LookingGlass/commit/84b2917706d17710fcf54171af784d28f1eb6a0c

It means that client tries every 1000 microseconds (1ms) to pull new cursor poistion and new frame? If I have 60Hz monitor, can I use delay of 15000 microseconds (15ms --> 15x longer) ? And feel no lag? Because at 60Hz it is around 15ms per frame.

So I was thinking could the choppiness of the LookingGlass in competitive FPS games be attributed to to static hugepages at all? Since the IVSHMEM plugin is using RAM is it all being affected by the kernel trying to defragment the memory or is it simply a matter of yet to be implemented optimizations?

It would probably be the CPU or RAM moreso than the GPU. How many frames are you getting in these games?

In A12 this was 1us, it’s been increased to drop CPU usage on the host. They are tunables so sure, play with the values and see how it behaves for you.

./looking-glass-client app:cursorPollInterval=1000 app:framePollInterval=1000

Really though I don’t see this improving anything for you.

1 Like

No, LG maps a virtual device’s RAM into user space, it’s not standard ram as far as the guest is concerned.

Really though I don’t see this improving anything for you.

Why do you thing it doesn’t help? Because it should wait 15x longer, so 15x less CPU usage?

If this delay is too long you may experience frame skips, we need the sampling resolution to be high enough so that we notice the new frame as soon as possible. At 60FPS I wouldn’t set this lower then 15 checks per frame, so 16.7ms / 15 = 1.13ms. Because it’s set to 1ms, thats actually nearly 18 checks per frame, so that means we get nearly 18 chances per frame to notice it early.

That might seem high, but also remember your OS is not a real-time OS, that sleep time is not guaranteed and it may sleep for far longer, so on the odd loop when the thread doesn’t get time as soon as we like we will get further and further out of sync with the frame updates.

Finally, by detecting the new frame as early as possible we get hopefully around 15ms to upload it into the GPU on the client side, and get it on screen. The upload process can be slow and we are also racing the clock with the guest GPU also.

In short, a high poll interval will decrease performance and increase frame skips… a low poll interval will increase CPU usage, and if the CPU is too busy decrease performance… It’s a balancing act.

2 Likes

I was getting frustrated trying to get B1-rc2 looking-glass-host running as admin on startup with my unprivileged user account. I found a hack that works for now.

  • Download PsExec and put it somewhere.
  • Create a task using an elevated Task Scheduler to start PsExec on logon of your normal user.
    • This task must be run as a privileged account, like SYSTEM.
    • Make sure to check Run with highest priviliges
    • Use these as the arguments to PsExec: -accepteula -i 1 looking-glass-host.exe

Because this is hardcoded for session 1, signing out and back in will break it since you will sign in under session 2. You might be able to make a script to find the running session and run LG under that.

I hope in the future Looking Glass won’t need this hack.

My source is this StackOverflow question: c++ - Escalate program out of Session 0 - Stack Overflow.