Return to Level1Techs.com

[SOLVED] Looking Glass EglError on Fedora 34

First time playing around with Looking glass.
Having issues getting it to work properly, need help tweaking my config and/or finding out what is causing this error.
Running VFIO setup through libvirt on Fedora 34 with SElinux running in permissive mode.
VFIO is verified working and everything with 80~ FPS in cyberpunk @ 1440p.

What am i doing wrong?

Host
Ryzen 9 5950x
Aorus master x570
GTX 1060 6GB
64GB DDR4 3600Mhz ram
1x Samsung EVO 980 Pro

Guest
Windows 10 Enterprise 17763
RTX 3080
16GB Ram
Q35 Chipset
1x Samsung EVO 980 Pro

Looking glass config:
set up through guides on ArchWiki and the official Looking Glass guide from looking-glass.io

tmp file exists and is modified on boot: /etc/tmpfiles.d/10-looking-glass.conf

[[email protected] tmpfiles.d]# cat 10-looking-glass.conf 
 #Type Path Mode UID GID Age Argument
touch /dev/shm/looking-glass
chown delta /dev/shm/looking-glass
f /dev/shm/looking-glass 0660 delta kvm -

also the looking glass “driver” from the SHMEM device from redhat for windows is installed.

I have tried both the bleeding edge version and the cutting edge version (both on client and host, respectively)

Running the looking glass .exe manually on window (after stopping the service) gives the following messages:

On linux:

Debug from looking-glass-client

Reading symbols from looking-glass-client...
(gdb) set args -F -k
(gdb) r
Starting program: /usr/local/bin/looking-glass-client -F -k
warning: Expected absolute pathname for libpthread in the inferior, but got .gnu_debugdata for /lib64/libpthread.so.0.
warning: File "/usr/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
        add-auto-load-safe-path /usr/lib64/libthread_db-1.0.so
line to your configuration file "/home/delta/.gdbinit".
To completely disable this security protection add
        set auto-load safe-path /
line to your configuration file "/home/delta/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
        info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
  1321217926 [I]               main.c:1021 | main                           | Looking Glass (B3-94-g6358f35cb7)
  1321217945 [I]               main.c:1022 | main                           | Locking Method: Atomic
  1321252964 [I]            ivshmem.c:126  | ivshmemOpenDev                 | KVMFR Device     : /dev/shm/looking-glass
[New LWP 6383]
  1321279249 [I]                egl.c:262  | egl_initialize                 | Double buffering is off
  1321279260 [I]               main.c:631  | tryRenderer                    | Using Renderer: EGL
[New LWP 6384]
  1321285480 [I]                 gl.c:55   | waylandGetEGLDisplay           | Using eglGetPlatformDisplay
  1321292830 [E]                egl.c:645  | egl_render_startup             | Failed to create EGL surface (eglError: 0x3004)
[LWP 6384 exited]
[LWP 6383 exited]
[Inferior 1 (process 6379) exited with code 0377]
Missing separate debuginfos, use: dnf debuginfo-install SDL2-2.0.14-3.fc34.x86_64 SDL2_ttf-2.0.15-7.fc34.x86_64 bzip2-libs-1.0.8-6.fc34.x86_64 egl-wayland-1.1.6-2.fc34.x86_64 fontconfig-2.13.93-6.fc34.x86_64 freetype-2.10.4-3.fc34.x86_64 glib2-2.68.2-1.fc34.x86_64 glibc-2.33-8.fc34.x86_64 gmp-6.2.0-6.fc34.x86_64 graphite2-1.3.14-7.fc34.x86_64 harfbuzz-2.7.4-3.fc34.x86_64 libX11-1.7.0-3.fc34.x86_64 libX11-xcb-1.7.0-3.fc34.x86_64 libXScrnSaver-1.2.3-8.fc34.x86_64 libXau-1.0.9-6.fc34.x86_64 libXext-1.3.4-6.fc34.x86_64 libXfixes-5.0.3-14.fc34.x86_64 libXi-1.7.10-6.fc34.x86_64 libXinerama-1.1.4-8.fc34.x86_64 libbrotli-1.0.9-4.fc34.x86_64 libffi-3.1-28.fc34.x86_64 libgcc-11.1.1-1.fc34.x86_64 libglvnd-egl-1.3.3-1.fc34.x86_64 libglvnd-glx-1.3.3-1.fc34.x86_64 libpng-1.6.37-10.fc34.x86_64 libselinux-3.2-1.fc34.x86_64 libwayland-client-1.19.0-1.fc34.x86_64 libwayland-egl-1.19.0-1.fc34.x86_64 libwayland-server-1.19.0-1.fc34.x86_64 libxcb-1.13.1-7.fc34.x86_64 libxml2-2.9.10-12.fc34.x86_64 libxshmfence-1.3-8.fc34.x86_64 mesa-libEGL-21.0.3-2.fc34.x86_64 mesa-libgbm-21.0.3-2.fc34.x86_64 mesa-libglapi-21.0.3-2.fc34.x86_64 pcre-8.44-3.fc34.1.x86_64 pcre2-10.36-4.fc34.x86_64 sssd-client-2.4.2-3.fc34.x86_64 xz-libs-5.2.5-5.fc34.x86_64 zlib-1.2.11-26.fc34.x86_64
(gdb) 

Vfio libvirt config XML:

<domain type='kvm'>
  <name>win10</name>
  <uuid>8ed66603-2831-4cb9-8972-c0c67d5c891a</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://microsoft.com/win/10"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit='KiB'>16521216</memory>
  <currentMemory unit='KiB'>16521216</currentMemory>
  <vcpu placement='static'>16</vcpu>
  <iothreads>1</iothreads>
  <cputune>
    <vcpupin vcpu='0' cpuset='8'/>
    <vcpupin vcpu='1' cpuset='24'/>
    <vcpupin vcpu='2' cpuset='9'/>
    <vcpupin vcpu='3' cpuset='25'/>
    <vcpupin vcpu='4' cpuset='10'/>
    <vcpupin vcpu='5' cpuset='26'/>
    <vcpupin vcpu='6' cpuset='11'/>
    <vcpupin vcpu='7' cpuset='27'/>
    <vcpupin vcpu='8' cpuset='12'/>
    <vcpupin vcpu='9' cpuset='28'/>
    <vcpupin vcpu='10' cpuset='13'/>
    <vcpupin vcpu='11' cpuset='29'/>
    <vcpupin vcpu='12' cpuset='14'/>
    <vcpupin vcpu='13' cpuset='30'/>
    <vcpupin vcpu='14' cpuset='15'/>
    <vcpupin vcpu='15' cpuset='31'/>
    <emulatorpin cpuset='0-3'/>
    <iothreadpin iothread='1' cpuset='4-7'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-q35-5.2'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vpindex state='on'/>
      <runtime state='on'/>
      <synic state='on'/>
      <stimer state='on'/>
      <reset state='on'/>
      <vendor_id state='on' value='fuckjensen'/>
    </hyperv>
    <kvm>
      <hidden state='on'/>
    </kvm>
    <vmport state='off'/>
    <ioapic driver='kvm'/>
  </features>
  <cpu mode='host-passthrough' check='none' migratable='off'>
    <topology sockets='1' dies='1' cores='8' threads='2'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <timer name='hypervclock' present='yes'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/LTSCX64.ENU.MAR2020.ISO'/>
      <target dev='sdb' bus='sata'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='qemu-xhci' ports='15'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='1' port='0x10'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
    </controller>
    <controller type='pci' index='2' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='2' port='0x11'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
    </controller>
    <controller type='pci' index='3' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='3' port='0x12'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
    </controller>
    <controller type='pci' index='4' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='4' port='0x13'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
    </controller>
    <controller type='pci' index='5' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='5' port='0x14'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
    </controller>
    <controller type='pci' index='6' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='6' port='0x15'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
    </controller>
    <controller type='pci' index='7' model='pcie-to-pci-bridge'>
      <model name='pcie-pci-bridge'/>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    </controller>
    <controller type='pci' index='8' model='pci-bridge'>
      <model name='pci-bridge'/>
      <target chassisNr='8'/>
      <address type='pci' domain='0x0000' bus='0x07' slot='0x01' function='0x0'/>
    </controller>
    <controller type='pci' index='9' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='9' port='0x16'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
    </controller>
    <controller type='pci' index='10' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='10' port='0x17'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:a2:02:1d'/>
      <source network='default'/>
      <model type='e1000e'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='spice' autoport='yes'>
      <listen type='address'/>
      <image compression='off'/>
    </graphics>
    <sound model='ich9'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
    </sound>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x0c' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x09' slot='0x00' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x0c' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
    </hostdev>
    <redirdev bus='usb' type='spicevmc'>
      <address type='usb' bus='0' port='2'/>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
      <address type='usb' bus='0' port='3'/>
    </redirdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </memballoon>
    <shmem name='looking-glass'>
      <model type='ivshmem-plain'/>
      <size unit='M'>64</size>
      <address type='pci' domain='0x0000' bus='0x08' slot='0x01' function='0x0'/>
    </shmem>
  </devices>
</domain>

What GPU driver have you installed on your linux host?

akmod-nvidia from the rpmfusion repo

akmod-nvidia-3:465.27-1.fc34

[[email protected] delta]# lsmod | grep nvidia
nvidia_drm 69632 20
nvidia_modeset 1187840 8 nvidia_drm
nvidia 34971648 1074 nvidia_modeset
drm_kms_helper 278528 1 nvidia_drm
drm 618496 23 drm_kms_helper,nvidia_drm

Solved the issue by installing an extension for the nvidia driver (came with steam apparently) However now im getting a new error:

  1901790149 [I]               main.c:1029 | main                           | Looking Glass (B3-243-g6058a0e243)
  1901790164 [I]               main.c:1030 | main                           | Locking Method: Atomic
  1901793394 [I]            ivshmem.c:126  | ivshmemOpenDev                 | KVMFR Device     : /dev/shm/looking-glass
  1901808861 [I]                egl.c:273  | egl_initialize                 | Double buffering is off
  1901808868 [I]               main.c:640  | tryRenderer                    | Using Renderer: EGL
  1901834226 [I]                 gl.c:57   | waylandGetEGLDisplay           | Using eglGetPlatformDisplay
  1901856490 [I]                egl.c:684  | egl_render_startup             | Single buffer mode
  1901892058 [I]                egl.c:700  | egl_render_startup             | EGL       : 1.5
  1901892063 [I]                egl.c:701  | egl_render_startup             | Vendor    : Mesa/X.org
  1901892065 [I]                egl.c:702  | egl_render_startup             | Renderer  : llvmpipe (LLVM 12.0.0, 256 bits)
  1901892066 [I]                egl.c:703  | egl_render_startup             | Version   : OpenGL ES 3.2 Mesa 21.1.1
  1901892067 [I]                egl.c:704  | egl_render_startup             | EGL APIs  : OpenGL OpenGL_ES 
  1901892070 [I]                egl.c:705  | egl_render_startup             | Extensions: EGL_EXT_create_context_robustness EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_context_flush_control EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image_base EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_query_driver 
  1901899942 [I]                 gl.c:91   | waylandEGLSwapBuffers          | Swapping buffers with damage: not supported
  1901923958 [ ]               main.c:865  | lg_run                         | ================================================================================
  1901923969 [I]               main.c:866  | lg_run                         | The host application seems to not be running
  1901923970 [I]               main.c:867  | lg_run                         | Waiting for the host application to start...
  1901924043 [E]              crash.c:214  | crit_err_hdlr                  | ==== FATAL CRASH (B3-243-g6058a0e243) ====
  1901924048 [E]              crash.c:215  | crit_err_hdlr                  | signal 11 (Segmentation fault), address is 0x1c
  1901924157 [E]              crash.c:206  | printBacktrace                 | [trace]: (0) /lib64/libpthread.so.0(+0x13a20) [0x7ffb203aaa20]
  1901924160 [E]              crash.c:206  | printBacktrace                 | [trace]: (1) looking-glass-client(queue_push+0x43) [0x426adf]
  1901924161 [E]              crash.c:206  | printBacktrace                 | [trace]: (2) looking-glass-client(spice_agent_start_msg+0xaa) [0x425240]
  1901924162 [E]              crash.c:206  | printBacktrace                 | [trace]: (3) looking-glass-client(spice_clipboard_grab+0x1c9) [0x426277]
  1901924163 [E]              crash.c:206  | printBacktrace                 | [trace]: (4) looking-glass-client(app_clipboardNotifyTypes+0xde) [0x418c30]
  1901924164 [E]              crash.c:206  | printBacktrace                 | [trace]: (5) looking-glass-client() [0x42896e]
  1901924165 [E]              crash.c:206  | printBacktrace                 | [trace]: (6) looking-glass-client(waylandWait+0x2e1) [0x42fab2]
  1901924166 [E]              crash.c:206  | printBacktrace                 | [trace]: (7) looking-glass-client() [0x414e29]
  1901924166 [E]              crash.c:206  | printBacktrace                 | [trace]: (8) looking-glass-client(main+0x782) [0x4170cb]
  1901924167 [E]              crash.c:206  | printBacktrace                 | [trace]: (9) /lib64/libc.so.6(__libc_start_main+0xd5) [0x7ffb20054b75]
  1901924168 [E]              crash.c:206  | printBacktrace                 | [trace]: (10) looking-glass-client(_start+0x2e) [0x40e89e]

(bleeding edge version)

This should be fixed :slight_smile:

1 Like

Thank you, downloading the new source, and switching to X11 solved my problem.

There should have been no need to switch to X11, bleeding-edge has native Wayland support.

1 Like

The problem was with the nvidia driver i was using, didnt work properly under wayland.

1 Like

Sorry but can you elaborate? Was it an issue with LG and Wayland with the nvidia driver? Or a general Wayland issue with nvidia?

I’d just like to clarify as we are trying to squash as many wayland issues as possible before the next release. Any and all details you can provide would be of help.

I still can’t get dxvk to work properly at all under Wayland on Fedora with the latest nvidia driver from negativo17 repo, and he pushes bleeding edge as well.

I switched over to X11 and it works no problem

This is LookingGlass forum and has nothing to do with dxvk. you might want to open an issue with the dxvk dev at: Issues · doitsujin/dxvk · GitHub

Thank you, I was only elaborating on the subject that Wayland in general does not work correctly yet with the binary nvidia drivers.

The nvidia driver that was packed in RPMfusion for fedora 34 was defunct with wayland, i dont believe it was related to LG.

Symptoms: Nvidia-settings didnt work on wayland, and i had to switch back to xorg

Got it. Though I’m not a Wayland user, it is well known that the official Nvidia driver does not play well with Wayland. Nvidia already announced that the V470 drivers will have many improvements targeted at Wayland. Time will tell.