GPU passthrough fails over looking glass, worked fine without it

As the title says, i used to run on my linux host, gpu pass through, to a windows 10 client. Worked fine without any trouble.

At the moment i can not get it to work properly with looking glass. Broken monitor icon remains on looking glass client window.

Any help would be greatly appreciated

looking glass log Windows

[I]    618788762              time.c:85   | windowsSetTimerResolution      | System timer resolution: 500.0 μs
[W]    618790363          platform.c:500  | boostPriority                  | Failed to set realtime GPU priority.
[I]    618791948          platform.c:501  | boostPriority                  | This is not a failure, please do not report this as an issue.
[I]    618793702          platform.c:502  | boostPriority                  | To fix this, install and run the Looking Glass host as a service.
[I]    618795445          platform.c:503  | boostPriority                  | looking-glass-host.exe InstallService
[I]    618796579               app.c:771  | app_main                       | Looking Glass Host (B6)
[I]    618797060           cpuinfo.c:37   | lgDebugCPU                     | CPU Model: 12th Gen Intel(R) Core(TM) i7-12700H
[I]    618797601           cpuinfo.c:38   | lgDebugCPU                     | CPU: 1 sockets, 6 cores, 12 threads
[I]    618798736           ivshmem.c:132  | ivshmemInit                    | IVSHMEM 0* on bus 0x9, device 0x2, function 0x0
[I]    618801674               app.c:788  | app_main                       | IVSHMEM Size     : 64 MiB
[I]    618801945               app.c:789  | app_main                       | IVSHMEM Address  : 0x2E00000
[I]    618802197               app.c:790  | app_main                       | Max Pointer Size : 1024 KiB
[I]    618802466               app.c:791  | app_main                       | KVMFR Version    : 19
[I]    618802706               app.c:809  | app_main                       | Trying           : DXGI
[I]    618804161              dxgi.c:319  | dxgi_init                      | Not using unsupported adapter: Microsoft Basic Render Driver
[I]    618804537              dxgi.c:319  | dxgi_init                      | Not using unsupported adapter: Microsoft Basic Render Driver
[E]    618804880              dxgi.c:384  | dxgi_init                      | Failed to locate a valid output device
[I]    618805172               app.c:809  | app_main                       | Trying           : NVFBC
[I]    618809676         wrapper.cpp:90   | NvFBCInit                      | NvFBC SDK Version: 112
[E]    618815623         wrapper.cpp:94   | NvFBCInit                      | Failed to enable the NvFBC interface: 0
[E]    618815938               app.c:829  | app_main                       | Failed to find a supported capture interface
[I]    618817527               app.c:982  | app_main                       | Host application exited

looking glass log linux

[I] 101222833436              main.c:1785 | main                           | Looking Glass (B6)
[I] 101222833450              main.c:1786 | main                           | Locking Method: Atomic
[I] 101222849887           cpuinfo.c:37   | lgDebugCPU                     | CPU Model: 12th Gen Intel(R) Core(TM) i7-12700H
[I] 101222849891           cpuinfo.c:38   | lgDebugCPU                     | CPU: 1 sockets, 14 cores, 20 threads
[I] 101222875796              main.c:1162 | lg_run                         | Using font: /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
[I] 101222876080           ivshmem.c:128  | ivshmemOpenDev                 | KVMFR Device     : /dev/shm/looking-glass
[I] 101222880544             audio.c:159  | audio_init                     | Using AudioDev: PipeWire
[I] 101222880556                ps.c:245  | purespice_connect              | Connecting to socket
[I] 101222889927               rsa.c:178  | rsa_encryptPassword            | Using Nettle
[I] 101222892102                ps.c:268  | purespice_connect              | Connected
[I] 101222892126      channel_main.c:167  | onMessage_mainName             | Guest name: Ifaistos
[I] 101222892134      channel_main.c:183  | onMessage_mainUUID             | Guest UUID: 8d53733a-c18d-4355-b78d-8bf825ab52ea
[I] 101222901436                ps.c:644  | ps_connectChannel              | RECORD channel connected
[I] 101222907373                ps.c:644  | ps_connectChannel              | PLAYBACK channel connected
[I] 101222914417                ps.c:644  | ps_connectChannel              | INPUTS channel connected
[I] 101222914472           channel.c:312  | onMessage_notify               | [notify] keyboard channel is insecure
[I] 101222914646               egl.c:267  | egl_initialize                 | Double buffering is off
[I] 101222914660              main.c:1116 | tryRenderer                    | Using Renderer: EGL
[I] 101222915921               x11.c:230  | x11CheckEWMHSupport            | EWMH-complient window manager detected: KWin
[I] 101222916008               x11.c:463  | x11Init                        | X11 XInput 2.0 in use
[I] 101222929105               x11.c:1433 | x11GetEGLDisplay               | Using eglGetPlatformDisplayEXT
[I] 101222973101               egl.c:745  | egl_renderStartup              | Multisampling enabled, max samples: 4
[I] 101222973917               egl.c:828  | egl_renderStartup              | Single buffer mode
[I] 101222977715               egl.c:855  | egl_renderStartup              | EGL     : 1.5
[I] 101222977732               egl.c:856  | egl_renderStartup              | Vendor  : Intel
[I] 101222977746               egl.c:857  | egl_renderStartup              | Renderer: Mesa Intel(R) Graphics (ADL GT2)
[I] 101222977761               egl.c:858  | egl_renderStartup              | Version : OpenGL ES 3.2 Mesa 22.2.5
[I] 101222977778               egl.c:859  | egl_renderStartup              | EGL APIs: OpenGL OpenGL_ES 
[I] 101222977806               egl.c:930  | egl_renderStartup              | Debug messages disabled, enable with egl:debug=true
[I] 101223001567           eglutil.c:35   | swapWithDamageInit             | Using EGL_KHR_swap_buffers_with_damage
[I] 101223197846              main.c:1467 | lg_run                         | ================================================================================
[I] 101223197898              main.c:1468 | lg_run                         | The host application seems to not be running
[I] 101223197923              main.c:1469 | lg_run                         | Waiting for the host application to start...
[I] 101224219320                ps.c:644  | ps_connectChannel              | DISPLAY channel connected
[I] 101224223585              main.c:896  | spice_surfaceCreate            | Create SPICE surface: id: 0, size: 1280x800
[I] 101224229431                ps.c:644  | ps_connectChannel              | CURSOR channel connected
[I] 101232454411              main.c:910  | spice_surfaceDestroy           | Destroy spice surface 0
[I] 101232454891              main.c:896  | spice_surfaceCreate            | Create SPICE surface: id: 0, size: 1280x800
[I] 101233952172              main.c:910  | spice_surfaceDestroy           | Destroy spice surface 0
[I] 101233953029              main.c:896  | spice_surfaceCreate            | Create SPICE surface: id: 0, size: 1920x1440
[I] 101252233421              main.c:1474 | lg_run                         | ================================================================================
[I] 101252233652              main.c:1488 | lg_run                         | Check the host log in your guest at %ProgramData%\Looking Glass (host)\looking-glass-host.txt
[I] 101252233691              main.c:1489 | lg_run                         | Continuing to wait...
[I] 101439477219              main.c:910  | spice_surfaceDestroy           | Destroy spice surface 0
[I] 101439477568              main.c:896  | spice_surfaceCreate            | Create SPICE surface: id: 0, size: 1280x800
[I] 102178278599           channel.c:258  | channel_internal_disconnect    | CURSOR channel disconnected
[I] 102178279279           channel.c:258  | channel_internal_disconnect    | DISPLAY channel disconnected
[I] 102178279305           channel.c:258  | channel_internal_disconnect    | RECORD channel disconnected
[I] 102178279325           channel.c:258  | channel_internal_disconnect    | PLAYBACK channel disconnected
[I] 102178279363           channel.c:258  | channel_internal_disconnect    | INPUTS channel disconnected
[I] 102178279397           channel.c:258  | channel_internal_disconnect    | MAIN channel disconnected
[I] 102178279413                ps.c:330  | purespice_disconnect           | Disconnected

virsh xml file

<domain type='kvm'>
    <libosinfo:libosinfo xmlns:libosinfo="">
      <libosinfo:os id=""/>
  <memory unit='KiB'>32768000</memory>
  <currentMemory unit='KiB'>32768000</currentMemory>
  <vcpu placement='static'>12</vcpu>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
    <vcpupin vcpu='2' cpuset='2'/>
    <vcpupin vcpu='3' cpuset='3'/>
    <vcpupin vcpu='4' cpuset='4'/>
    <vcpupin vcpu='5' cpuset='5'/>
    <vcpupin vcpu='6' cpuset='6'/>
    <vcpupin vcpu='7' cpuset='7'/>
    <vcpupin vcpu='8' cpuset='12'/>
    <vcpupin vcpu='9' cpuset='13'/>
    <vcpupin vcpu='10' cpuset='12'/>
    <vcpupin vcpu='11' cpuset='13'/>
    <type arch='x86_64' machine='pc-q35-6.2'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE_4M.fd</loader>
    <bootmenu enable='yes'/>
    <hyperv mode='custom'>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vpindex state='on'/>
      <synic state='on'/>
      <stimer state='on'>
        <direct state='on'/>
      <reset state='on'/>
      <vendor_id state='on' value=''/>
      <frequencies state='on'/>
 <reenlightenment state='on'/>
      <tlbflush state='on'/>
      <ipi state='on'/>
      <evmcs state='off'/>
      <hidden state='on'/>
    <vmport state='off'/>
    <ioapic driver='kvm'/>
  <cpu mode='host-passthrough' check='none' migratable='off'>
    <topology sockets='1' dies='1' cores='6' threads='2'/>
    <cache mode='passthrough'/>
    <feature policy='require' name='topoext'/>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <timer name='hypervclock' present='yes'/>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/media/calvin/Ifaistos_VM_HD/Windows_10_ISO/Win10_21H2_English_x64.iso'/>
      <target dev='sdb' bus='sata'/>
      <boot order='2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/media/calvin/Ifaistos_VM_HD/Windows_10_ISO/virtio-win-0.1.221.iso'/>
      <target dev='sdc' bus='sata'/>
      <address type='drive' controller='0' bus='0' target='0' unit='2'/>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/media/calvin/Ifaistos_VM_HD/Ifaistos.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    <controller type='usb' index='0' model='qemu-xhci' ports='15'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    <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 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 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 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 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 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 type='pci' index='7' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='7' port='0x16'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
    <controller type='pci' index='8' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='8' port='0x17'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
    <controller type='pci' index='9' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='9' port='0x18'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0' multifunction='on'/>
    <controller type='pci' index='10' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='10' port='0x19'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
    <controller type='pci' index='11' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='11' port='0x1a'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
    <controller type='pci' index='12' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='12' port='0x1b'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x3'/>
    <controller type='pci' index='13' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='13' port='0x1c'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x4'/>
    <controller type='pci' index='14' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='14' port='0x1d'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x5'/>
    <controller type='pci' index='15' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='15' port='0x1e'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x6'/>
    <controller type='pci' index='16' model='pcie-to-pci-bridge'>
      <model name='pcie-pci-bridge'/>
      <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    <interface type='network'>
      <mac address='52:54:00:98:6d:b2'/>
      <source network='default'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    <interface type='network'>
      <mac address='52:54:00:50:5e:cc'/>
      <source network='default'/>
      <model type='rtl8139'/>
      <address type='pci' domain='0x0000' bus='0x10' slot='0x01' function='0x0'/>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
    <console type='pty'>
      <target type='serial' port='0'/>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <input type='mouse' bus='virtio'>
      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
    <input type='keyboard' bus='virtio'>
      <address type='pci' domain='0x0000' bus='0x09' slot='0x00' function='0x0'/>
    <tpm model='tpm-crb'>
      <backend type='emulator' version='2.0'/>
    <graphics type='spice' autoport='yes'>
      <listen type='address'/>
      <image compression='off'/>
    <sound model='ich9'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
    <audio id='1' type='spice'/>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
    <redirdev bus='usb' type='spicevmc'>
      <address type='usb' bus='0' port='1'/>
    <redirdev bus='usb' type='spicevmc'>
      <address type='usb' bus='0' port='2'/>
    <memballoon model='none'/>
    <shmem name='looking-glass'>
      <model type='ivshmem-plain'/>
      <size unit='M'>64</size>
      <address type='pci' domain='0x0000' bus='0x10' slot='0x02' function='0x0'/>

This usually happens for two reasons:

  • You do not have anything connected to the passed-through GPU. Windows will not render (or even initialize) on the GPU unless something that looks like a monitor is connected to it. You should either connect an extra port on your monitor to it, or use a dummy HDMI plug to emulate a connected monitor.
  • The passed-through GPU driver in your Windows VM is failing to load properly. Please verify it’s installed and functioning properly. Sometimes re-installing it helps.
1 Like

I have a second monitor connected to the GPU port. And currently running it.
Also reinstalled nvidia drivers. But neither seems to have changed anything.

VM windows does post, but with poor graphics and broken monitor icon. Even after reinstalling drivers, device manager nvidia remains with yellow-exclamation-mark warning sign

What is the reason for using QXL instead of VGA as video device? With VGA you should at least get video out on Looking Glass via the Spice channel as long as you use a current LG version. I have no idea if video out via QXL is hindering the NVIDIA driver to do it’s thing. Could you please power down the virtual machine, change the setting to VGA, as instructed on the LG homepage, restart the virtual machine and tell us what you see?

Just did, but nothing has changed. I changed the Video VGA setting within the virtmanager GUI to Model:VGA.

Is it possible that there is a conflict with the virt-manager graphical console? When the latter is selected the looking glass window will shut and the vm_windows will run on it. Still with bad graphics though

Which is exactly why Looking-Glass does not work. Looking-Glass prerequisite is a fully functional VFIO passed-through VM. Your passthrough graphics are currently broken.

The passthrough was working normally before the looking glass attempt. So maybe you can help me clarify this.

Okay so there are multiple ways how you get video output here. The Looking Glass way is that the LG server application on Windows makes a copy of the video output and places it into the IVSHMEM devices that both the guest as well as the host have access to. The Looking Glass client on your host then takes the images from the IVSHMEM devices and displays them in the window that appears on the host.

Then there is Spice, Spice is a toolset of paravirtualized devices, for example a video device. Spice works on channels, so Spice will open a connection on, that a client software like virt-manager can connect to. But there can only ever be one client! So either virt-manager can display video from the stream or Looking Glass can. This is a fallback in Looking Glass so that you do not need a second client software to see the video output as long as LG is not yet working.

So now that this is clear I second @Netboy3’s advice. You need a working setup, where when you have a monitor connected you already get proper hardware accelerated video output on the monitor before you start with Looking Glass. GPU passthrough needs to already work before you use Looking Glass. There is always room for something to go wrong, so I also advise you to remove LG and focus on making GPU passthrough work before you procede and when that problem is resolved we can try again.

Thank you for the explanation.

Where i am puzzled is that before LG, all worked fine. I was running the same win_vm with working gpu passthrough, with no glitch. hardware acceleration worked nominally.

Once i attempted to install LG, also with a helper script that i suspect might have something to do with it (L-G_helperscript), the passthrough no longer works.

What do you mean with helper script? On the Windows guest you go on the download page and download the Windows binary (the one with the Windows icon) for the corresponding version. It installs everything you need, there is no need to do anything else on the guest ‽

This was on the linux site

#This is based on Looking Glass quickstart guide:
#Fedora selinux issues resolved thanks to:

#Making sure that the looking glass folder is present
if ! [ -d looking*/client ]
echo "Please copy the Looking Glass folder into this folder"

#Making sure this script runs with elevated privileges
if [ $(id -u) -ne 0 ]
		echo "Please run this as root!" 
		exit 1

echo "Installing dependencies"
apt-get install binutils-dev cmake fonts-dejavu-core libfontconfig-dev gcc g++ pkg-config libegl-dev libgl-dev libgles-dev libspice-protocol-dev nettle-dev libx11-dev libxcursor-dev libxi-dev libxinerama-dev libxpresent-dev libxss-dev libxkbcommon-dev libwayland-dev wayland-protocols

#Installing required packages for each distro
DISTRO=`cat /etc/*release | grep DISTRIB_ID | cut -d '=' -f 2`
FEDORA=`cat /etc/*release |  head -n 1 | cut -d ' ' -f 1`

if [ "$DISTRO" == "Ubuntu" ] || [ "$DISTRO" == "Pop" ] || [ "$DISTRO" == "LinuxMint" ]
apt-get install binutils-dev cmake fonts-freefont-ttf libsdl2-dev libsdl2-ttf-dev libspice-protocol-dev libfontconfig1-dev libx11-dev nettle-dev  wayland-protocols -y
elif [ "$DISTRO" == "Arch" ]
pacman -Syu binutils sdl2 sdl2_ttf libx11 libxpresent nettle fontconfig cmake spice-protocol make pkg-config gcc gnu-free-fonts
elif [ "$DISTRO" == "ArcoLinux" ]
pacman -Syu binutils sdl2 sdl2_ttf libx11 libxpresent nettle fontconfig cmake spice-protocol make pkg-config gcc gnu-free-fonts

elif [ "$DISTRO" == "ManjaroLinux" ]
pacman -Syu binutils sdl2 sdl2_ttf libx11 libxpresent nettle fontconfig cmake spice-protocol make pkg-config gcc gnu-free-fonts
elif [ "$FEDORA" == "Fedora" ]
	dnf install make cmake binutils-devel SDL2-devel SDL2_ttf-devel nettle-devel spice-protocol fontconfig-devel libX11-devel egl-wayland-devel wayland-devel mesa-libGLU-devel mesa-libGLES-devel mesa-libGL-devel mesa-libEGL-devel libXfixes-devel libXi-devel
echo "This script does not support your current distribution. Only Fedora, Manjaro, PopOS and Ubuntu are supported!"
echo "You can still install Looking Glass manually!"


#Identifying user to set permissions
echo "User: $VIRT_USER will be using Looking Glass on this PC. "
echo "If that's correct, press (y) otherwise press (n) and you will be able to specify the user."
echo "y/n?"
read USER_YN

#Allowing the user to manually edit the Looking Glass user
if [ $USER_YN = 'n' ] || [ $USER_YN = 'N' ]
		while [ '$USER_YN' = "n" ]; do
			echo "Enter the new username: "
			read VIRT_USER

			echo "Is $VIRT_USER correct (y/n)?"
			read USER_YN
echo User $VIRT_USER selected. Press any key to continue:
read ANY_KEY

# Looking Glass requirements: /dev/shm/looking_glass needs to be created on startup
echo "touch /dev/shm/looking-glass && chown $VIRT_USER:kvm /dev/shm/looking-glass && chmod 660 /dev/shm/looking-glass" >

#Create a systemd service to initialize the GPU on startup
cp lg_start.service /etc/systemd/system/lg_start.service
chmod 644 /etc/systemd/system/lg_start.service

mv /usr/bin/
chmod +x /usr/bin/

systemctl enable lg_start.service

systemctl start lg_start.service

if [ -a looking*.tar.gz ]
mv looking*.tar.gz tar_lg.tar.gz

#Compiling Looking Glass
cd looking*
mkdir client/build
cd client/build
cmake ../
chown $VIRT_USER looking-glass-client

#SELinux on Fedora prevents it from working
if [ "$FEDORA" == "Fedora" ]
echo "Please be patient"
sudo ausearch -c 'qemu-system-x86' --raw | audit2allow -M my-qemusystemx86
sudo semodule -X 300 -i my-qemusystemx86.pp
sudo setsebool -P domain_can_mmap_files 1
echo "  /dev/shm/looking-glass rw," >> /etc/apparmor.d/abstractions/libvirt-qemu 

I would not trust this script, what Distribution are you on?

Kubuntu 22.04
KDE Plasma 5.24.7
Kernel 5.15.0-69

Looking-Glass installation has nothing to do with with the proper working of a VFIO VM. LG installs a small driver and runs a small background application. It does not touch anything else. LG installation on the VM is very well documented and does not include running any scripts. Using any scripts or tutorials is not supported by the LG team and puts your system at risk.

LG installation on win_vm was done without a script

Your GPU driver is not loading and LG does not touch it. Have you tried looking at the GPU driver dialog box and see what error does it show in the “general” tab?

1 Like

Okay, so for Ubuntu, according to the page about building the client, what you need to do is the following. Please try to understand what we do here to make this work!

# This step installs all required dependencies for Ubuntu according to the build page I linked earlier
apt-get install binutils-dev cmake fonts-dejavu-core libfontconfig-dev \
gcc g++ pkg-config libegl-dev libgl-dev libgles-dev libspice-protocol-dev \
nettle-dev libx11-dev libxcursor-dev libxi-dev libxinerama-dev \
libxpresent-dev libxss-dev libxkbcommon-dev libwayland-dev wayland-protocols \
libpipewire-0.3-dev libpulse-dev libsamplerate0-dev

# With curl we download the tar ball, for the version labeled as B6, with the source files from the download page to your users home directory
curl --output ~/looking-glass-B6.tar.gz

# we go into your users home directory
cd ~/

# and unpack the tar ball
tar -xvzf looking-glass-B6.tar.gz

# we change into the unpacked folder with the sources
cd looking-glass-B6

# and create a build directory
mkdir client/build

# chnage into the build directory
cd client/build

# and execute the first build step 
cmake ../

# and then the second build step

After that the compiled binary for the host will be found in this very same folder and be named looking-glass-client! If the compilation was successful copy the file to a folder that is part of your path like /usr/local/bin. This is how you compile the client application on Ubuntu. No need to use weird scripts.

As we mentioned a working GPU passthrough is still required.

Where do you mean for me to look?

I will try to go back to a working non-LG vm_win client with working passthrough and try all over again with the above guide.

Any suggestion how to completely purge any host (and client) LG settings?

Open the device manager, double click on your GPU (with the yellow triangle) and look at the general tab: