Looking Glass - Triage

Until this works, nothing else will, not a Looking Glass problem I am sorry.

i laso think that my input problem ist not a problem from Looking glass.
I also used the regular spice and i had some input problems.
It seems that its a problem from spice so :frowning:

From my side itā€™s not seems to be a graphic card problem. I only have freezes if i also have much input. if i just spectate one person i works absolutly fine. I played a lot of anno 1800 and there was no problem until i used the keyboard to move around.

If i used the keyboard to move it just stuck somethimes and it pressed the button that i pressed for as long as it takes to make the freez again xD

i Also tried other mouses and keyboard th eproblem stays.

Maybe someone has an idea what i can do next?

FIY: The quadro 2000 was at 80%-90% of gpu so there was some free space also the Memory of the quadra was at 794 MiB / 964 MiB

FPS from Looking glass was at 80-100 and UPS from 44 to 60 with opengl cause egl does not work with my quadro 2000

But that numbers seems ok cause quadro 2000 is realy an old piece of shit xD

More of this please! All it needs to do is dump buffers to the canvas directly rather than to a client! If this makes it into Beta 1, I will FOR SURE make a video about it.

XSHM though is very poor performing, resulting in tearing at times on Vanilla OBS. Youā€™ll have to adapt the code to get rid of the current issues with it.

Just here to ask something about QEMU versions, but by Beta 1, what would you expect the recommended QEMU version should be to get around the memcopy bottlenecks? Currently still on 2.11, so I may move to 3.1 and Fedora 30 if that ends up being the version that has that fixed.

Not that simple, synchronisation with the host capture application still needs to be implemented. It is on my list though but I want to come up with a better solution that allows the use of the client and OBS at the same time.

Likely but itā€™s a starting point.

There is no memcpy bottleneck, the performance limits we see are due to DXGI Desktop Duplication. When using NvFBC the capture performance is well fast enough for even 4K @ 144FPS. No version of Qemu will change this, itā€™s a limitation imposed by the NVidia driver in Windows.

Oh, I totally get this is not the problem of looking glass, but you would say that anything not directly looking glass related wonā€™t receive any help here? It is a non trivial prerequisite. I would assume that Iā€™m not the only one that is running in to this problem. My question again: Do you need to use OVMF to get looking glass going?
I donā€™t know much about it, but I figure it must have something to do how the GPU gets initialized at VM startup (or not getting init)

Yes, create a new thread please.

Okay, so I can stick to QEMU 2.11 and Fedora 28 then. Thatā€™s all I needed to know.

I have just bought my new PC wanting to get back into Linux after many years of using OSX for iOS and Android development so I am little rusty.

My Arch Linux install looks good with Gnome and Wayland (with an xorg option, xorg wont do 5120x1440 on my ultra wide monitor but Wayland will, that is why I am using it)

I have 3 VMā€™s: OSX, WinWork and the WinGaming VM has a PCI passthrough of a RTX2080ti and PCI USB3 board. These seem to work well and have my Vive Pro working in the WinGaming VM as well.

I am currently using a USB switcher to switch the mouse and keyboard between the Arch and the WinGaming VM. The problem is when I do this a few times it causes problems, I notice it in the audio in the Vive Pro. I have moved the Vive Pro into a different USB on the PC and pass it through as a USB host device and it is working better.

The advice I am after is how do I get the mouse and keyboard working with Looking Glass? This will solve my above problem. I have Looking Glass working but when I click in the window there is no control. Is it through the Spice Client? I have to start the client with ā€œlooking-glass-client -s ALLā€ otherwise I get a failed to connect to spice server. Think I need to click on ā€œAdd Deviceā€ in the virtual machine manager and add a Channel device of ā€œSpice Clientā€, but can some one help with this or point me in the right direction please?

Last thing is there is no border or title bar in the Looking Glass application. Is that normal? Even if I set the x and y flags the window will sit in the top left and not move.

I am using the package from ā€œArch AUR looking-glass-gitā€ package which is alpha 12.

Thanks for the help and advice in advance :slight_smile:

1 Like

it is normal not to have borders on looking glass client window.
i use the mouse and keyboard through spice and it works fine as long as i make sure im tabbed into looking glass.
i also had issues setting spice. i had to manually set the spice port in the VMā€™s config and both the IP and port in the client.
hereā€™s the relevant part of my VMā€™s config.

    <graphics type='spice' port='5901' autoport='no' listen='0.0.0.0'>
  <listen type='address' address='0.0.0.0'/>
  <image compression='off'/>
  <gl enable='no'/>
</graphics>

and the looking glass client command i use is
./client/build/looking-glass-client -f /dev/uio0 -L 32 -c 10.13.37.228 -p 5901 -w 1920 -b 1080 -F

the 10.13.37.228 is the IP of the host machine, not of the VM.

1 Like

Thanks Mathew. I have keyboard and mouse now working through spice, I had to add the spice server back into Virt Manager which is called Display Spice, not server? It has just been an exciting and frustrating 4 days of setting up all this stuff, but also fun.

Because of my ultra wide monitor I am trying to set up the looking glass client in a window on the right so I can still use Linux for everything else but gaming.

It is working well but you can see the amount of space X11 is not displaying that Wayland will:

I understand that Looking Glass is in alpha an appreciate the effort that is going into it. I will just have to wait to see if scroll lock to lock the cursor and window border and titles will work in Wayland in a future update. Until then I will just have to select a X11 session to use looking glass.

Wayland will most probably be a low priority until nVidia gets their thumbs out of their ass and implement it for their GPUs.

I am planning on building a Linux gaming rig with AMD CPU and GPU, and I do have the required dev experience to actually get things up and running. However it has not been a high priority at the moment, and current plans seems to put me somewhere in August for my new gaming rig (waiting for a stable economic month when I can start affording PC parts).

Iā€™ll see if I can contribute with some Wayland code then and/or be a test bencher, but until I actually have the system I canā€™t do much.

1 Like

Doesnā€™t Ubuntu already use Wayland? I know if I set Wayland=false I get really poor gui performance so Iā€™m assuming it uses Wayland with X on top.

EDIT: Iā€™m running NVIDIA (1080ti) just fine btw.

Looking Glass with Wayland is not at all supported or tested, if you wish to use it please note that youā€™re on your own. This will change in the future but for now I do not have the time to support both windowing systems.

Can it stream multiple monitors?If yes then with different resolutions too?(not for gaming)

Welcome to the community @Zsolt_Madlen :).

At this time itā€™s single monitor only I am sorry, the logistics of multiple monitors is beyond scope (for now)

Iā€™ve been running LookingGlass A10 for a while and it was awesome. Sadly a couple of days ago it stopped working. Initially I thought it might be due to KDE Plasma which Iā€™ve installed recently. But when Iā€™ve switched back to Gnome the problem persisted.

WHen I launch it I get:

[E] opengl.c:521 | configure | Failed to create the OpenGL context
*** Error in `/home/przemek/Dokumenty/Github/LookingGlass-a10/client/bin/looking-glass-clientā€™: free(): invalid pointer: 0x00000000018760e0 ***

Tried using A12. Sadly it is not working either. This time I get:

[I] main.c:757 | run | Looking Glass ()
[I] main.c:758 | run | Locking Method: Atomic
[I] main.c:751 | try_renderer | Using Renderer: EGL
[I] main.c:824 | run | Using: EGL
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 2 (X_ChangeWindowAttributes)
Resource id in failed request: 0x0
Serial number of failed request: 240
Current serial number in output stream: 247
Naruszenie ochrony pamięci (zrzut pamięci)

The last sentence means ā€œmemory protection errorā€, just in case :slight_smile: .

Any ideas what can I try doing to get it back and running? It has become quite important part of my work - allows me to prepare tutorials for my students (Windows CAD apps related) even though I have Windows only in VM on my home machine.
Iā€™m on OpenSUSE Leap 15, Nvidia 418.56 (thatā€™s another thing that might have been updated recently), X11 1.19.6.

edit: got A12 working. It seems it is a simple thing - permission setup to the ivshmem file. Set it up to 666 :wink: for a test and it worked.
Quite surprised that it trips A12 as with the same permissions A10 worked. But also glad Iā€™ve got it working as it seems with this version using the mouse from the host works flawlessly (no need to scrlk ).

edit2: damn it, it is not so easy. Restarted the VM and tried using LG again and it failedā€¦ again ā€¦ Tried launching LG as root (I know - not the best idea in the world, but wanted to rule out permission issues). Didnā€™t help:

[I]               main.c:757  | run                            | Looking Glass ()
[I]               main.c:758  | run                            | Locking Method: Atomic
[I]               main.c:751  | try_renderer                   | Using Renderer: EGL
[I]               main.c:824  | run                            | Using: EGL
*** Error in `./looking-glass-client': corrupted double-linked list: 0x00000000010c5fb0 ***
Przerwane (zrzut pamięci)

The same when Iā€™ve tried OpenGL backend. Tried one more timeā€¦ it startedā€¦
Any suggestions howto fix it greatly appreciated.
At this point Iā€™m trying to start LG a couple of times hoping that at one time it will launch .

The issue is that Wayland require GBM vs nVidias EGLStreams. In fact pretty much all of the Linux ecosystem* has decided to leave EGLStreams as a secondary, also-supported thing.

Some support may still exist for it, but do not expect the Linux ecosystem to bend over backwards on this issue.

*You will always be able to find that project that just contradicts all I said of course, with almost no mainstream supportā€¦

Please see DEBUGGING.md

Or update to the lastest build in git as it has some inbuilt debugging now for issues like this.

sure, will do. Where should I look for the log?
The info I got so far is:

[I]               main.c:751  | try_renderer                   | Using Renderer: EGL
[I]               main.c:824  | run                            | Using: EGL
*** Error in `/home/przemek/Dokumenty/Github/LookingGlass-a12/client/build/looking-glass-client': corrupted double-linked list: 0x000000000089cf60 ***

Program received signal SIGABRT, Aborted.
0x00007ffff5777120 in raise () from /lib64/libc.so.6
(gdb) thread apply all bt

Thread 1 (Thread 0x7ffff7fb2b80 (LWP 4081)):
#0  0x00007ffff5777120 in raise () from /lib64/libc.so.6
Backtrace stopped: Cannot access memory at address 0x7fffffff7a58

edit: and more on the 3rd run (Iā€™m still ā€œhuntingā€ some of the missing debuginfo packages):

[I]               main.c:757  | run                            | Looking Glass ()
[I]               main.c:758  | run                            | Locking Method: Atomic
[I]               main.c:751  | try_renderer                   | Using Renderer: EGL
[I]               main.c:824  | run                            | Using: EGL
*** Error in `/home/przemek/Dokumenty/Github/LookingGlass-a12/client/build/looking-glass-client': corrupted double-linked list: 0x000000000085d000 ***

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51      }
(gdb) thread apply all bt

Thread 1 (Thread 0x7ffff7fb2b80 (LWP 6462)):
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff5778701 in __GI_abort () at abort.c:79
#2  0x00007ffff57ba467 in __libc_message (action=action@entry=(do_abort | do_backtrace), fmt=fmt@entry=0x7ffff58c3370 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:181
#3  0x00007ffff57c0c83 in malloc_printerr (action=<optimized out>, str=0x7ffff58bfc5e "corrupted double-linked list", ptr=<optimized out>, ar_ptr=<optimized out>) at malloc.c:5428
#4  0x00007ffff57c45f1 in _int_malloc (av=0x7ffff5af5c20 <main_arena>, bytes=24) at malloc.c:4030
#5  0x00007ffff57c5ae7 in __GI___libc_malloc (bytes=24) at malloc.c:3081
#6  0x00007ffff699b4b2 in PutEntry (db=db@entry=0xa59250, bindings=0x7fffffff8194, bindings@entry=0x7fffffff8190, quarks=0x7fffffff7ff4, quarks@entry=0x7fffffff7ff0, type=385, 
    value=value@entry=0x7fffffff7fe0) at Xrm.c:958
#7  0x00007ffff699c201 in PutEntry (value=0x7fffffff7fe0, type=<optimized out>, quarks=0x7fffffff7ff0, bindings=0x7fffffff8190, db=0xa59250) at Xrm.c:854
#8  GetDatabase (db=db@entry=0xa59250, 
    str=0x648d26 "\n*Canvas.background:\t#1c1c1c\n*Canvas.foreground:\t#ebebeb\n*Canvas.highlightBackground:\t#1c1c1c\n*Canvas.highlightColor:\t#ebebeb\n*Canvas.selectbackground:\t#53728e\n*Canvas.selectforeground:\t#ffffff\n*Check"..., 
    str@entry=0x648bf0 "*Box.background:\t#323232\n*Box.foreground:\t#ebebeb\n*Button.activeBackground:\t#323232\n*Button.activeForeground:\t#ebebeb\n*Button.background:\t#323232\n*Button.foreground:\t#ebebeb\n*Button.highlightBackgroun"..., filename=filename@entry=0x0, doall=doall@entry=1, depth=depth@entry=0) at Xrm.c:1513
#9  0x00007ffff699ce6b in XrmGetStringDatabase (
    data=0x648bf0 "*Box.background:\t#323232\n*Box.foreground:\t#ebebeb\n*Button.activeBackground:\t#323232\n*Button.activeForeground:\t#ebebeb\n*Button.background:\t#323232\n*Button.foreground:\t#ebebeb\n*Button.highlightBackgroun"...) at Xrm.c:1561
#10 0x00007ffff6979154 in InitDefaults (dpy=dpy@entry=0x638500) at GetDflt.c:148
#11 0x00007ffff69793f8 in XGetDefault (dpy=dpy@entry=0x638500, prog=prog@entry=0x7ffff34b079d "Xcursor", name=name@entry=0x7ffff34b082f "core") at GetDflt.c:220
#12 0x00007ffff34ad8d3 in _XcursorGetDisplayInfo (dpy=0x638500) at display.c:151
#13 0x00007ffff34ad939 in XcursorSupportsARGB (dpy=dpy@entry=0x638500) at display.c:288
#14 0x00007ffff34ac134 in XcursorImageLoadCursor (dpy=<optimized out>, image=<optimized out>) at cursor.c:554
#15 0x00007ffff7967ef5 in X11_CreateXCursorCursor (hot_y=4, hot_x=4, surface=0x69c4f0) at /usr/src/debug/SDL2-2.0.8-lp150.2.3.1.x86_64/src/video/x11/SDL_x11mouse.c:110
#16 X11_CreateCursor (surface=0x69c4f0, hot_x=4, hot_y=4) at /usr/src/debug/SDL2-2.0.8-lp150.2.3.1.x86_64/src/video/x11/SDL_x11mouse.c:214
#17 0x00007ffff78d1d48 in SDL_CreateColorCursor_REAL (surface=<optimized out>, surface@entry=0x69c4f0, hot_x=hot_x@entry=4, hot_y=hot_y@entry=4)
    at /usr/src/debug/SDL2-2.0.8-lp150.2.3.1.x86_64/src/events/SDL_mouse.c:872
#18 0x00007ffff78d1ee3 in SDL_CreateCursor_REAL (data=0x7fffffffd788 " \\\257\365\377\177", mask=0x7fffffffd788 " \\\257\365\377\177", w=8, h=8, hot_x=4, hot_y=4)
    at /usr/src/debug/SDL2-2.0.8-lp150.2.3.1.x86_64/src/events/SDL_mouse.c:833
#19 0x000000000040931f in run () at /home/przemek/Dokumenty/Github/LookingGlass-a12/client/main.c:905
#20 0x0000000000406f73 in main (argc=<optimized out>, argv=0x7fffffffda38) at /home/przemek/Dokumenty/Github/LookingGlass-a12/client/main.c:1623