gnif / LookingGlass

An extremely low latency KVMFR (KVM FrameRelay) implementation for guests with VGA PCI Passthrough.
GNU General Public License v2.0
4.75k stars 261 forks source link

B7-rc1 keep black if gpu is attached (Works fine if only the VGA video adapter is attached) #1119

Closed Svenum closed 7 months ago

Svenum commented 7 months ago

Bug Report Required Information

The Looking glass windows appear and while the vm is booting I could see the Windows loading spin thing. But in the second when the looking glass service started the window keep black with the windows cursour inside. Spice still works. Monitor is directly attached to the (passthourghed) GPU. This config worked great with the B6 version.

The entire (not truncated) output from the client application (if applicable). To obtain this run looking-glass-client in a terminal.

00:00:00.000 [I]              main.c:1859 | main                           | Looking Glass (B7-rc1)
00:00:00.000 [I]              main.c:1860 | main                           | Locking Method: Atomic
00:00:00.000 [I]           cpuinfo.c:38   | cpuInfo_log                    | CPU Model: AMD Ryzen 7 7840HS w/ Radeon 780M Graphics
00:00:00.000 [I]           cpuinfo.c:39   | cpuInfo_log                    | CPU: 1 sockets, 8 cores, 16 threads
00:00:00.004 [I]            config.c:608  | config_load                    | Loading config from: /home/sven/.config/looking-glass/client.ini
00:00:00.014 [I]              main.c:1185 | lg_run                         | Using font: /nix/store/kcmhspy6dyjslrjjyx1d28yzwnkx3m4w-dejavu-fonts-2.37/share/fonts/truetype/DejaVuSansMono.ttf
00:00:00.014 [I]           ivshmem.c:128  | ivshmemOpenDev                 | KVMFR Device     : /dev/kvmfr0
00:00:00.028 [I]             audio.c:159  | audio_init                     | Using AudioDev: PipeWire
00:00:00.028 [I]                ps.c:245  | purespice_connect              | Connecting to socket 127.0.0.1:5900
00:00:00.035 [I]               rsa.c:178  | rsa_encryptPassword            | Using Nettle
00:00:00.037 [I]                ps.c:268  | purespice_connect              | Connected
00:00:00.037 [I]      channel_main.c:167  | onMessage_mainName             | Guest name: Windows GPU Nix
00:00:00.037 [I]      channel_main.c:183  | onMessage_mainUUID             | Guest UUID: 3af8cded-1545-4ff2-87d6-d647119aa0e3
00:00:00.046 [I]                ps.c:644  | ps_connectChannel              | RECORD channel connected
00:00:00.054 [I]                ps.c:644  | ps_connectChannel              | PLAYBACK channel connected
00:00:00.064 [I]                ps.c:644  | ps_connectChannel              | INPUTS channel connected
00:00:00.064 [I]               egl.c:289  | egl_initialize                 | Double buffering is off
00:00:00.064 [I]              main.c:1139 | tryRenderer                    | Using Renderer: EGL
00:00:00.064 [I]           channel.c:323  | onMessage_notify               | [notify] keyboard channel is insecure
00:00:00.064 [I]           wayland.c:120  | waylandInit                    | Compositor: .kwin_wayland_w
00:00:00.064 [I]           wayland.c:130  | waylandInit                    | Selected  : xdg
00:00:00.074 [I]                gl.c:58   | waylandGetEGLDisplay           | Using eglGetPlatformDisplay
00:00:00.176 [I]               egl.c:856  | egl_renderStartup              | Single buffer mode
00:00:00.179 [I]               egl.c:883  | egl_renderStartup              | EGL     : 1.5
00:00:00.179 [I]               egl.c:884  | egl_renderStartup              | Vendor  : AMD
00:00:00.179 [I]               egl.c:885  | egl_renderStartup              | Renderer: AMD Radeon Graphics (radeonsi, gfx1103_r1, LLVM 17.0.6, DRM 3.57, 6.8.7)
00:00:00.179 [I]               egl.c:886  | egl_renderStartup              | Version : OpenGL ES 3.2 Mesa 24.0.5
00:00:00.179 [I]               egl.c:887  | egl_renderStartup              | EGL APIs: OpenGL OpenGL_ES 
00:00:00.179 [I]               egl.c:958  | egl_renderStartup              | Debug messages disabled, enable with egl:debug=true
00:00:00.208 [I]           eglutil.c:35   | swapWithDamageInit             | Using EGL_KHR_swap_buffers_with_damage
00:00:00.233 [I]              main.c:1491 | lg_run                         | ================================================================================
00:00:00.233 [I]              main.c:1492 | lg_run                         | The host application seems to not be running
00:00:00.233 [I]              main.c:1493 | lg_run                         | Waiting for the host application to start...
00:00:00.537 [I]              main.c:1498 | lg_run                         | ================================================================================
00:00:00.537 [I]              main.c:1512 | lg_run                         | Check the host log in your guest at %ProgramData%\Looking Glass (host)\looking-glass-host.txt
00:00:00.537 [I]              main.c:1513 | lg_run                         | Continuing to wait...
00:00:01.246 [I]                ps.c:644  | ps_connectChannel              | DISPLAY channel connected
00:00:01.255 [I]              main.c:919  | spice_surfaceCreate            | Create SPICE surface: id: 0, size: 1920x1080
00:00:01.258 [I]                ps.c:644  | ps_connectChannel              | CURSOR channel connected
00:00:28.573 [I]             agent.c:103  | agent_connect                  | Connected to the spice guest agent
00:00:31.886 [I]              main.c:1590 | lg_run                         | Guest Information:
00:00:31.886 [I]              main.c:1591 | lg_run                         | Version  : B7-rc1
00:00:31.886 [I]              main.c:1612 | lg_run                         | UUID     : 3af8cded-1545-4ff2-87d6-d647119aa0e3
00:00:31.886 [I]              main.c:1621 | lg_run                         | CPU Model: AMD Ryzen 7 7840HS w/ Radeon 780M Graphics
00:00:31.886 [I]              main.c:1622 | lg_run                         | CPU      : 1 sockets, 12 cores, 12 threads
00:00:31.886 [I]              main.c:1624 | lg_run                         | Using    : D12
00:00:31.886 [I]              main.c:1651 | lg_run                         | ================================================================================
00:00:31.886 [W]              main.c:1652 | lg_run                         | I have detected you have a CPU with hyperthreads but your guest is not aware of this
00:00:31.886 [W]              main.c:1655 | lg_run                         | This will result in a degredation of latency sensitive tasks including the use of Looking Glass
00:00:31.886 [W]              main.c:1660 | lg_run                         | As you have an AMD CPU, please be sure you have enabled the `topoext` cpu feature flag for your virtual machine
00:00:31.886 [I]              main.c:1662 | lg_run                         | ================================================================================
00:00:31.886 [I]              main.c:1710 | lg_run                         | OS       : Windows
00:00:31.886 [I]              main.c:1712 | lg_run                         | OS Name  : Windows 10 Pro (Build: 19045) 
00:00:31.886 [I]              main.c:1734 | lg_run                         | Starting session
00:00:31.887 [I]              main.c:553  | main_frameThread               | Using DMA buffer support
00:00:34.374 [I]              main.c:710  | main_frameThread               | Format: FRAME_TYPE_BGRA 2560x1440 (2560x1440) stride:2560 pitch:10240 rotation:0 hdr:0 pq:0
00:00:34.423 [I]           channel.c:269  | channel_internal_disconnect    | DISPLAY channel disconnected
00:00:34.423 [I]           channel.c:269  | channel_internal_disconnect    | CURSOR channel disconnected
00:00:42.912 [I]              main.c:710  | main_frameThread               | Format: FRAME_TYPE_BGRA 2560x1440 (2560x1440) stride:2560 pitch:10240 rotation:0 hdr:0 pq:0
00:00:46.909 [I]              main.c:710  | main_frameThread               | Format: FRAME_TYPE_BGRA 2560x1440 (2560x1440) stride:2560 pitch:10240 rotation:0 hdr:0 pq:0

The entire (not truncated) log file from the host application (if applicable). Normally, this is found on the guest system at:

%ProgramData%\Looking Glass (host)\looking-glass-host.txt

This log may be quite long, please delete the file first and then proceed to launch the host and reproduce the issue so that the log only contains the pertinent information.

00:00:00.039 [I]              time.c:85   | windowsSetTimerResolution      | System timer resolution: 499.9 μs
00:00:00.040 [I]               app.c:861  | app_main                       | Looking Glass Host (B7-rc1)
00:00:00.041 [I]           cpuinfo.c:38   | cpuInfo_log                    | CPU Model: AMD Ryzen 7 7840HS w/ Radeon 780M Graphics
00:00:00.042 [I]           cpuinfo.c:39   | cpuInfo_log                    | CPU: 1 sockets, 12 cores, 12 threads
00:00:00.043 [I]           ivshmem.c:132  | ivshmemInit                    | IVSHMEM 0* on bus 0x0, device 0x3, function 0x0
00:00:00.050 [I]               app.c:879  | app_main                       | IVSHMEM Size     : 128 MiB
00:00:00.050 [I]               app.c:880  | app_main                       | IVSHMEM Address  : 0x1750B530000
00:00:00.051 [I]               app.c:881  | app_main                       | Max Pointer Size : 1024 KiB
00:00:00.051 [I]               app.c:882  | app_main                       | KVMFR Version    : 20
00:00:00.051 [I]               app.c:901  | app_main                       | Trying           : D12
00:00:00.052 [I]               d12.c:185  | d12_create                     | debug:0 trackDamage:1
00:00:00.056 [I]               d12.c:905  | d12_enumerateDevices           | Device Name       : \\.\DISPLAY2
00:00:00.057 [I]               d12.c:906  | d12_enumerateDevices           | Device Description: AMD Radeon(TM) RX 7700S
00:00:00.057 [I]               d12.c:907  | d12_enumerateDevices           | Device Vendor ID  : 0x1002
00:00:00.058 [I]               d12.c:908  | d12_enumerateDevices           | Device Device ID  : 0x7480
00:00:00.058 [I]               d12.c:909  | d12_enumerateDevices           | Device Video Mem  : 8129 MiB
00:00:00.059 [I]               d12.c:911  | d12_enumerateDevices           | Device Sys Mem    : 0 MiB
00:00:00.059 [I]               d12.c:913  | d12_enumerateDevices           | Shared Sys Mem    : 10230 MiB
00:00:03.945 [I]               d12.c:367  | d12_init                       | D12 Created Effect: Downsample
00:00:03.948 [I]               d12.c:367  | d12_init                       | D12 Created Effect: HDR16to10
00:00:03.948 [I]               app.c:445  | captureStart                   | ==== [ Capture Start ] ====
00:00:03.949 [I]               app.c:932  | app_main                       | Using            : D12
00:00:03.949 [I]               app.c:933  | app_main                       | Capture Method   : Synchronous
00:00:03.950 [I]               app.c:768  | lgmpSetup                      | Max Frame Size   : 62 MiB
00:00:03.950 [I]               app.c:455  | captureStop                    | ==== [ Capture Stop ] ====
00:00:03.996 [I]               d12.c:905  | d12_enumerateDevices           | Device Name       : \\.\DISPLAY2
00:00:03.996 [I]               d12.c:906  | d12_enumerateDevices           | Device Description: AMD Radeon(TM) RX 7700S
00:00:03.997 [I]               d12.c:907  | d12_enumerateDevices           | Device Vendor ID  : 0x1002
00:00:03.997 [I]               d12.c:908  | d12_enumerateDevices           | Device Device ID  : 0x7480
00:00:03.998 [I]               d12.c:909  | d12_enumerateDevices           | Device Video Mem  : 8129 MiB
00:00:03.998 [I]               d12.c:911  | d12_enumerateDevices           | Device Sys Mem    : 0 MiB
00:00:03.998 [I]               d12.c:913  | d12_enumerateDevices           | Shared Sys Mem    : 10230 MiB
00:00:06.889 [I]               d12.c:367  | d12_init                       | D12 Created Effect: Downsample
00:00:06.892 [I]               d12.c:367  | d12_init                       | D12 Created Effect: HDR16to10
00:00:06.892 [I]               app.c:445  | captureStart                   | ==== [ Capture Start ] ====
    19972497 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    20613654 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    21262101 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    28884914 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
00:00:15.851 [I]               app.c:455  | captureStop                    | ==== [ Capture Stop ] ====
00:00:15.889 [I]               d12.c:905  | d12_enumerateDevices           | Device Name       : \\.\DISPLAY2
00:00:15.889 [I]               d12.c:906  | d12_enumerateDevices           | Device Description: AMD Radeon(TM) RX 7700S
00:00:15.890 [I]               d12.c:907  | d12_enumerateDevices           | Device Vendor ID  : 0x1002
00:00:15.890 [I]               d12.c:908  | d12_enumerateDevices           | Device Device ID  : 0x7480
00:00:15.890 [I]               d12.c:909  | d12_enumerateDevices           | Device Video Mem  : 8129 MiB
00:00:15.891 [I]               d12.c:911  | d12_enumerateDevices           | Device Sys Mem    : 0 MiB
00:00:15.891 [I]               d12.c:913  | d12_enumerateDevices           | Shared Sys Mem    : 10230 MiB
00:00:16.110 [I]               d12.c:367  | d12_init                       | D12 Created Effect: Downsample
00:00:16.113 [I]               d12.c:367  | d12_init                       | D12 Created Effect: HDR16to10
00:00:16.113 [I]               app.c:445  | captureStart                   | ==== [ Capture Start ] ====
    30176012 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    30932217 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    31579898 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    32225382 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    32869344 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    33516090 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    34163250 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
00:00:21.116 [I]               app.c:455  | captureStop                    | ==== [ Capture Stop ] ====
00:00:21.152 [I]               d12.c:905  | d12_enumerateDevices           | Device Name       : \\.\DISPLAY2
00:00:21.152 [I]               d12.c:906  | d12_enumerateDevices           | Device Description: AMD Radeon(TM) RX 7700S
00:00:21.153 [I]               d12.c:907  | d12_enumerateDevices           | Device Vendor ID  : 0x1002
00:00:21.153 [I]               d12.c:908  | d12_enumerateDevices           | Device Device ID  : 0x7480
00:00:21.153 [I]               d12.c:909  | d12_enumerateDevices           | Device Video Mem  : 8129 MiB
00:00:21.154 [I]               d12.c:911  | d12_enumerateDevices           | Device Sys Mem    : 0 MiB
00:00:21.154 [I]               d12.c:913  | d12_enumerateDevices           | Shared Sys Mem    : 10230 MiB
00:00:21.304 [I]               d12.c:367  | d12_init                       | D12 Created Effect: Downsample
00:00:21.307 [I]               d12.c:367  | d12_init                       | D12 Created Effect: HDR16to10
00:00:21.308 [I]               app.c:445  | captureStart                   | ==== [ Capture Start ] ====
    34931284 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    36980377 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    37630449 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    38278823 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    39070658 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    39717233 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    40361908 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    41003904 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    41648981 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    42297927 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    42945735 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    43589392 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    44235347 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    44877278 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    45677751 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    46325385 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    46976709 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    47619107 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    48262083 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    48906425 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    49553072 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
    50200766 [E]                d12.c:966  | d12_frameBufferToResource      | Failed to create the FrameBuffer ID3D12Resource: 0x887a0005 (The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.)
gnif commented 7 months ago

Upgrade to bleeding edge, your GPU does not work with D12 capture and this version of LG has a bug that prevents fallback to DXGI that has been fixed in later versions.

Svenum commented 7 months ago

Ok, I will try it

Svenum commented 7 months ago

Fixed it :+1:

xquangdang commented 7 months ago

@gnif what is the requirement for D12 capture. I'm using 6900xt with the same error

gnif commented 7 months ago

If it's not working and the instructions here do not help, then you simply need to wait and hope AMD fix this. https://forum.level1techs.com/t/new-looking-glass-beta-7-release-candidate-1/208250/3

In future please do not hijack unrelated issues for support requests, use the official support channels provided such as the L1Tech forums or the LG Discord.