mvisor-win-vgpu-driver icon indicating copy to clipboard operation
mvisor-win-vgpu-driver copied to clipboard

Driver installs, doesn't do anything.

Open Minksh opened this issue 1 year ago • 28 comments

I built virgl from source before compiling (https://gitlab.freedesktop.org/virgl/virglrenderer) Then I compiled and built mvisor using the following command; CCX=-std=c++11 meson setup build -Dsdl=true -Dvgpu=true

Source dir: /home/mink/Desktop/mvisor/mvisor
Build dir: /home/mink/Desktop/mvisor/mvisor/build
Build type: native build
Project name: mvisor
Project version: 2.7.1
C compiler for the host machine: cc (gcc 14.2.1 "cc (GCC) 14.2.1 20240805")
C linker for the host machine: cc ld.bfd 2.43.0
C++ compiler for the host machine: c++ (gcc 14.2.1 "c++ (GCC) 14.2.1 20240805")
C++ linker for the host machine: c++ ld.bfd 2.43.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program protoc found: YES (/usr/bin/protoc)
Program iasl found: YES (/usr/bin/iasl)
Found pkg-config: YES (/usr/bin/pkg-config) 2.1.1
Run-time dependency openssl found: YES 3.3.2
Run-time dependency threads found: YES
Run-time dependency yaml-cpp found: YES 0.8.0
Run-time dependency zlib found: YES 1.3.1
Run-time dependency glib-2.0 found: YES 2.80.5
Run-time dependency pixman-1 found: YES 0.43.4
Dependency glib-2.0 found: YES 2.80.5 (cached)
Run-time dependency virglrenderer found: YES 1.0.1
Run-time dependency libzstd found: YES 1.5.6
Run-time dependency alsa found: YES 1.2.12
Run-time dependency sdl2 found: YES 2.30.7
Run-time dependency protobuf found: YES 27.3.0
Configuring version.h using configuration
Build targets in project: 4

mvisor 2.7.1

  Options
    sdl         : YES
    vgpu        : YES
    sweet-server: NO

  User defined options
    sdl         : true
    vgpu        : true

My mvisor build.ninja was absolutely filled with these arguments

image (24k)

I removed them and compiled mvisor as normal.

Then I installed the driver on my vm

image

image

It appears fine in the device manager after manually assigning the driver, but it just doesn't do anything.

  - class: virtio-vgpu
    memory: 2G
    staging: Yes
    blob: Yes
    node: /dev/dri/renderD129

I only got the renderD129 to get generated once after many tries. I've tried increasing the system's ram to 16gb (it wouldn't install properly with 1gb).

Can I get any pointers? I've even tried compiling the driver myself but results don't differ.

I use a 7800XT, blob enabled or not it still won't function :(

Minksh avatar Sep 09 '24 16:09 Minksh

update: running mvisor without sudo once gave me the following error when trying to use opencl;

X Error of failed request:  GLXBadFBConfig
  Major opcode of failed request:  150 (GLX)
  Minor opcode of failed request:  0 ()
  Serial number of failed request:  40
  Current serial number in output stream:  40
terminate called without an active exception
Aborted (core dumped)

Weird thing is this error doesn't always appear, most of the time opencl just does nothing

Minksh avatar Sep 09 '24 16:09 Minksh

Have you run GPUtest in guest vm?Does it show anything?

nooodles2023 avatar Sep 09 '24 16:09 nooodles2023

Have you run GPUtest in guest vm?Does it show anything?

Unfortunately it doesn't show anything, just a white screen. I don't see the vgpu in task manager either.

Minksh avatar Sep 09 '24 16:09 Minksh

VGPU device only can be seen in device manager, because it's not a real gpu device

nooodles2023 avatar Sep 09 '24 16:09 nooodles2023

Rebuild virglrenderer from source, the old version may not work

nooodles2023 avatar Sep 09 '24 16:09 nooodles2023

Rebuild virglrenderer from source, the old version may not work

I built virgl from https://gitlab.freedesktop.org/virgl/virglrenderer , it is the latest version :(

Minksh avatar Sep 09 '24 16:09 Minksh

Post a screenshot on guest vm device manager

nooodles2023 avatar Sep 09 '24 16:09 nooodles2023

image image image

Minksh avatar Sep 09 '24 16:09 Minksh

oh, maybe be the same problem as https://github.com/tenclass/mvisor-win-vgpu-driver/issues/2 Have you compiled the guest usermode driver?

nooodles2023 avatar Sep 09 '24 16:09 nooodles2023

oh, maybe be the same problem as #2 Have you compiled the guest usermode driver?

I'll try rebuilding the usermode drivers.

Minksh avatar Sep 09 '24 16:09 Minksh

oh, maybe be the same problem as #2 Have you compiled the guest usermode driver?

I'll try rebuilding the usermode drivers.

https://github.com/tenclass/mvisor-win-vgpu-driver/issues/2#issuecomment-2295896828 Fix the patch file like this before building

nooodles2023 avatar Sep 09 '24 16:09 nooodles2023

oh, maybe be the same problem as #2 Have you compiled the guest usermode driver?

I'll try rebuilding the usermode drivers.

#2 (comment) Fix the patch file like this before building

Sorry, I get.

Program win_flex found: NO
Program flex lex found: NO

meson.build:1813:17: ERROR: Program 'flex lex' not found or not 
executable

meson-log.txt

I'm not too familiar with compiling on windows, is it talking about https://github.com/lexxmark/winflexbison ?

How exactly do I tell the bat where the binaries for it are located?

Minksh avatar Sep 09 '24 17:09 Minksh

Okay so small update, I can't get the userspace driver to compile, the patch references virgl .c files that seem to be no longer in the mesa .src, and msys2 can't seem to compile x11. Do you happen to have it compiled with the patch applied?

Minksh avatar Sep 10 '24 07:09 Minksh

I will try to compile it this weekend.

nooodles2023 avatar Sep 10 '24 13:09 nooodles2023

@Minksh https://github.com/tenclass/mvisor-win-vgpu-driver/releases/download/v1.0.0/MvisorVGPUx64.dll

nooodles2023 avatar Sep 15 '24 16:09 nooodles2023

@Minksh https://github.com/tenclass/mvisor-win-vgpu-driver/releases/download/v1.0.0/MvisorVGPUx64.dll

Hey thanks :) , I recompiled mvisor with the gpu flag and tried again, unfortunately it doesn't seem to fix the issue. Which compiler did you use if I may ask?

Minksh avatar Sep 15 '24 17:09 Minksh

@Minksh https://github.com/tenclass/mvisor-win-vgpu-driver/releases/download/v1.0.0/MvisorVGPUx64.dll

Hey thanks :) , I recompiled mvisor with the gpu flag and tried again, unfortunately it doesn't seem to fix the issue. Which compiler did you use if I may ask?

gcc (gcc 8.1.0 "gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0")

Check the debug info in the dbgview if some error happens.

nooodles2023 avatar Sep 15 '24 17:09 nooodles2023

I have fixed, use release v1.0.1 and rebuild virglrenderer in host with old version(8df4cba170940dad9350a99900293adbcef39b6c)

nooodles2023 avatar Sep 18 '24 10:09 nooodles2023

I have fixed, use release v1.0.1 and rebuild virglrenderer in host with old version(8df4cba170940dad9350a99900293adbcef39b6c)

Yay, I'll take a look :)

Minksh avatar Sep 18 '24 10:09 Minksh

I have fixed, use release v1.0.1 and rebuild virglrenderer in host with old version(8df4cba170940dad9350a99900293adbcef39b6c)

Could you link the required source? I can't find anything relating to the build number provided.

Minksh avatar Sep 18 '24 10:09 Minksh

git clone https://gitlab.freedesktop.org/virgl/virglrenderer get reset --hard 8df4cba170940dad9350a99900293adbcef39b6c

nooodles2023 avatar Sep 18 '24 10:09 nooodles2023

@nooodles2023 I have the same issue. The v 1.01 failed to install unless I use https://github.com/tenclass/mvisor-win-vgpu-driver/releases/download/v1.0.0/MvisorVGPUx64.dll. After that I still can't get driver to work. I found following error in device event log:

Имя журнала:   Microsoft-Windows-Kernel-PnP/Configuration
Источник:      Microsoft-Windows-Kernel-PnP
Дата:          18.09.2024 17:56:23
Код события:   411
Категория задачи:Отсутствует
Уровень:       Ошибка
Ключевые слова:
Пользователь:  СИСТЕМА
Компьютер:     DESKTOP-BDMJK6M
Описание:
Возникла проблема с запуском устройства PCI\VEN_1AF4&DEV_105B&SUBSYS_11001AF4&REV_01\3&11583659&0&30.

Имя драйвера: oem8.inf
GUID класса: {4d36e97d-e325-11ce-bfc1-08002be10318}
Служба: vgpu
Нижние фильтры: 
Верхние фильтры: 
Проблема: 0x0
Состояние проблемы: 0xC00000E5
Xml события:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Kernel-PnP" Guid="{9c205a39-1250-487d-abd7-e831c6290539}" />
    <EventID>411</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x4000000000000000</Keywords>
    <TimeCreated SystemTime="2024-09-18T14:56:23.7190818Z" />
    <EventRecordID>148</EventRecordID>
    <Correlation />
    <Execution ProcessID="4" ThreadID="540" />
    <Channel>Microsoft-Windows-Kernel-PnP/Configuration</Channel>
    <Computer>DESKTOP-BDMJK6M</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="DeviceInstanceId">PCI\VEN_1AF4&amp;DEV_105B&amp;SUBSYS_11001AF4&amp;REV_01\3&amp;11583659&amp;0&amp;30</Data>
    <Data Name="DriverName">oem8.inf</Data>
    <Data Name="ClassGuid">{4d36e97d-e325-11ce-bfc1-08002be10318}</Data>
    <Data Name="ServiceName">vgpu</Data>
    <Data Name="LowerFilters">
    </Data>
    <Data Name="UpperFilters">
    </Data>
    <Data Name="Problem">0x0</Data>
    <Data Name="Status">0xc00000e5</Data>
  </EventData>
</Event>

I build virglrenderer in host with old version(8df4cba170940dad9350a99900293adbcef39b6c), but still no luck.

einhander avatar Sep 18 '24 15:09 einhander

@nooodles2023 I have the same issue. The v 1.01 failed to install unless I use https://github.com/tenclass/mvisor-win-vgpu-driver/releases/download/v1.0.0/MvisorVGPUx64.dll. After that I still can't get driver to work. I found following error in device event log:

Имя журнала:   Microsoft-Windows-Kernel-PnP/Configuration
Источник:      Microsoft-Windows-Kernel-PnP
Дата:          18.09.2024 17:56:23
Код события:   411
Категория задачи:Отсутствует
Уровень:       Ошибка
Ключевые слова:
Пользователь:  СИСТЕМА
Компьютер:     DESKTOP-BDMJK6M
Описание:
Возникла проблема с запуском устройства PCI\VEN_1AF4&DEV_105B&SUBSYS_11001AF4&REV_01\3&11583659&0&30.

Имя драйвера: oem8.inf
GUID класса: {4d36e97d-e325-11ce-bfc1-08002be10318}
Служба: vgpu
Нижние фильтры: 
Верхние фильтры: 
Проблема: 0x0
Состояние проблемы: 0xC00000E5
Xml события:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Kernel-PnP" Guid="{9c205a39-1250-487d-abd7-e831c6290539}" />
    <EventID>411</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x4000000000000000</Keywords>
    <TimeCreated SystemTime="2024-09-18T14:56:23.7190818Z" />
    <EventRecordID>148</EventRecordID>
    <Correlation />
    <Execution ProcessID="4" ThreadID="540" />
    <Channel>Microsoft-Windows-Kernel-PnP/Configuration</Channel>
    <Computer>DESKTOP-BDMJK6M</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="DeviceInstanceId">PCI\VEN_1AF4&amp;DEV_105B&amp;SUBSYS_11001AF4&amp;REV_01\3&amp;11583659&amp;0&amp;30</Data>
    <Data Name="DriverName">oem8.inf</Data>
    <Data Name="ClassGuid">{4d36e97d-e325-11ce-bfc1-08002be10318}</Data>
    <Data Name="ServiceName">vgpu</Data>
    <Data Name="LowerFilters">
    </Data>
    <Data Name="UpperFilters">
    </Data>
    <Data Name="Problem">0x0</Data>
    <Data Name="Status">0xc00000e5</Data>
  </EventData>
</Event>

I build virglrenderer in host with old version(8df4cba170940dad9350a99900293adbcef39b6c), but still no luck.

The windows guest BSOD? Post your config.yaml here

nooodles2023 avatar Sep 19 '24 03:09 nooodles2023

The windows guest BSOD? Yes, I have BSOD on Windows 11 if I try to install v1.01 release. If I replace MvisorVGPUx64.dll from additional file from v1.0 release driver install Ok, but do nothing, although windows reports that device works normally.

sample_1_1.yaml.txt

einhander avatar Sep 19 '24 12:09 einhander

The windows guest BSOD? Yes, I have BSOD on Windows 11 if I try to install v1.01 release. If I replace MvisorVGPUx64.dll from additional file from v1.0 release driver install Ok, but do nothing, although windows reports that device works normally.

sample_1_1.yaml.txt

Try to increase guest vm ram size to 12G. If guest didn't bsod and gputest didn't work, ues dbgview to get some debug info

nooodles2023 avatar Sep 19 '24 14:09 nooodles2023

Try to increase guest vm ram size to 12G.

Still no luck. No errors, but no 3d available.

dbgview to get some debug info

that info you need? Edit DESKTOP-BDMJK6M.LOG

einhander avatar Sep 27 '24 17:09 einhander

Try to increase guest vm ram size to 12G.

Still no luck. No errors, but no 3d available.

dbgview to get some debug info

that info you need? Edit DESKTOP-BDMJK6M.LOG

Do you use new release and rebuild virglrenderer from commit “8df4cba170940dad9350a99900293adbcef39b6c”? The log shows that you might not have rebuilt the virglrenderer.

nooodles2023 avatar Sep 27 '24 18:09 nooodles2023

Try to increase guest vm ram size to 12G.

Still no luck. No errors, but no 3d available.

dbgview to get some debug info

that info you need? Edit DESKTOP-BDMJK6M.LOG

Do you use new release and rebuild virglrenderer from commit “8df4cba170940dad9350a99900293adbcef39b6c”? The log shows that you might not have rebuilt the virglrenderer.

Thank you! I misspelled library name in my LD_PRELOAD command. Now it's fully working. Edit. Furmark still complains about OpenGL 2.0, but gputest work OK.

einhander avatar Sep 27 '24 18:09 einhander