Again on vga passthrough

87 views
Skip to first unread message

Strak8

unread,
Oct 22, 2019, 3:40:25 PM10/22/19
to qubes-users
Every three months for several years I spend a whole day trying to make the second video card work on my laptop.
Some will say that it cannot work on laptops for several reasons, in particular because the consumer GPU does not support vitualization, because on a MUXed system (radeon 7570M) it is impossible to switch two video cards simultaneously on the same monitor, almost certainly will not even work on the external video output, because the ACPI call fails to load the firmware.
I keep doing so many tests, I find out about dozens and dozens of sites, but I only make small steps forward. Now I can load Windows 7 without having the blue screen, I see the card in the device manager, but it seems to be off. (error code 43).
I put all the options, even though they are probably useless.

rd.qubes.hide_pci=02:00.0 modprobe=xen-pciback.passthrough=1 xen-pciback.permissive xen-pciback.hide=(02:00.0)

kernelopts  -  iommu=soft swiotlb=16384
gfx_passthru   True  (qvm-features ??)

But I don't understand why:

1. The windows 7 VM with the attached video card loads only with less than 4GB of RAM (otherwise it is blue screen)

2. I don't find in any way the possibility to edit the virtual machine configuration XML.
   2.1 under "/ var / lib / qubes / appvms / WIN-7-2 /" the configuration file no longer exists.
   2.2 I found the way to export the XML with virsh dumpxml, but with the qvm-start command there is no longer the "--custom-config" option
   2.3 I force editing the XML from virsh edit (VM) in VIM, but then resume the values ​​entered in qvm-features.
   2.4 I can't change the amount of vram? (qvm-feature video-vram?)

3. the Windows guest video drive (both cirrus and vga) there is no monitor resolution (1366x768)


Valid and working alternatives:
spice?
ovmf?
dgpu on usb3?
Dell precision 7000 series?

I need windows only because there isn't a valid alternative to photoshop and other Adobe products, I don't find myself with gimp and krita.

thanks
bye

awokd

unread,
Oct 22, 2019, 3:49:11 PM10/22/19
to qubes...@googlegroups.com
Strak8:
> Every three months for several years I spend a whole day trying to make the
> second video card work on my laptop.

> 1. The windows 7 VM with the attached video card loads only with less than
> 4GB of RAM (otherwise it is blue screen)

Have you seen
https://github.com/Qubes-Community/Contents/blob/master/docs/customization/windows-gaming-hvm.md?
It was posted on the mailing list a couple months ago.

--
- don't top post
Mailing list etiquette:
- trim quoted reply to only relevant portions
- when possible, copy and paste text instead of screenshots

Strak8

unread,
Oct 22, 2019, 8:01:24 PM10/22/19
to qubes-users
Il giorno martedì 22 ottobre 2019 21:49:11 UTC+2, awokd ha scritto:
Have you seen
https://github.com/Qubes-Community/Contents/blob/master/docs/customization/windows-gaming-hvm.md

Thanks awokd, you gave me more hours of tweaking and still a lot of hope.

I didn't think QWT was necessary.

The mystery of how to modify the configuration xml remains.

See you soon for updates.

Strak8

unread,
Nov 2, 2019, 11:16:52 PM11/2/19
to qubes-users
I was able to make further tests in the time available.
the result did not go well, but some doubts came.

Summary:

QWT (working and correct resolution!)               Ok
UEFI boot                                                       OK
stubdom-linux-rootfs.gz (only Dom0 starts)       KO

even with only Dom0 started and giving 12gb Ram the VM windows goes wrong.
with the fix stubdom-linux-rootfs it only works for me Dom0, so I immediately restored it.
_________________________________________

I saw that the ATI Radeon card shares the IRQ 16 with these others:

00: 01.0 PCI bridge: Intel Corporation Xeon
00: 1a.0 USB controller: Intel Corporation 7 Series / C216 Chipset Family USB Enhanced Host Controller # 2
00: 1c.0 PCI bridge: Intel Corporation 7 Series / C216 Family PCI Express Root Port Chipset 1

But if I try to connect one or all the devices to the HVM, these (besides the vga radeon) I always get:

... has failed to start: internal error: PCI end devices can not be assigned to guest


1.  I MUST also exclude these devices at startup in EFI.cfg ???
      all devices that share the same interrupt ??


2.  in lspci -t (show bus tree) which means this representation ??
(+ -01.0- [02-03] ---- 00.0) ??

sudo lspci -vt
- [0000: 00] - + - 00.0 Intel Corporation 3rd Gen Core processor DRAM Controller
           
+ -01.0- [02-03] ---- 00.0 Advanced Micro Devices, Inc. [AMD / ATI] Thames [Radeon HD 7550M / 7570M / 7650M]



3.  is the kernel driver loaded on the card no good? (Kernel modules: radeon)

4.  In the conclusions of the guide, where can I find more info to try with libvirt and libxl ??


"If it doesn’t work and you need to debug more things, you can go deeper.

    Virsh (start, define, ...)
   
/etc/libvirt/libxl/
    xl
   
/etc/qubes/templates/libvirt/xen/by-name/
    /
usr/lib/xen/boot/
    virsh
-c xen:/// domxml-to-native xen-xm /etc/libvirt/libxl/..."


Thanks to those who want to explain these doubts.


sudo lspci -v -d 1002:6841
02:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Thames [Radeon HD 7550M/7570M/7650M] (prog-if 00 [VGA controller])
   
Flags: fast devsel, IRQ 16
   
Memory at e0000000 (64-bit, prefetchable) [size=256M]
   
Memory at f7e20000 (64-bit, non-prefetchable) [size=128K]
    I
/O ports at e000 [size=256]
   
Expansion ROM at f7e00000 [disabled] [size=128K]
   
Capabilities: [50] Power Management version 3
   
Capabilities: [58] Express Legacy Endpoint, MSI 00
   
Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+
   
Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
   
Capabilities: [150] Advanced Error Reporting
   
Kernel driver in use: pciback
   
Kernel modules: radeon

____________________________________

sudo lspci
-vt
-[0000:00]-+-00.0  Intel Corporation 3rd Gen Core processor DRAM Controller
           
+-01.0-[02-03]----00.0  Advanced Micro Devices, Inc. [AMD/ATI] Thames [Radeon HD 7550M/7570M/7650M]
           
+-02.0  Intel Corporation 3rd Gen Core processor Graphics Controller
           
+-14.0  Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller
           
+-16.0  Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1
           
+-1a.0  Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2
           
+-1b.0  Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller
           
+-1c.0-[04]--
________________________________________________
sudo lspci
-vv

00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09) (prog-if 00 [Normal decode])
   
Flags: bus master, fast devsel, latency 0, IRQ 16
   
Bus: primary=00, secondary=02, subordinate=03, sec-latency=0
    I
/O behind bridge: 0000e000-0000efff [size=4K]
   
Memory behind bridge: f7e00000-f7efffff [size=1M]
   
Prefetchable memory behind bridge: 00000000e0000000-00000000efffffff [size=256M]
   
Capabilities: [88] Subsystem: Dell Device 057e
   
Capabilities: [80] Power Management version 3
   
Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit-
   
Capabilities: [a0] Express Root Port (Slot+), MSI 00
   
Capabilities: [100] Virtual Channel
   
Capabilities: [140] Root Complex Link
   
Kernel driver in use: pcieport


00:1a.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 (rev 04) (prog-if 20 [EHCI])
   
Subsystem: Dell Device 057e
   
Flags: medium devsel, IRQ 16
   
Memory at f7f18000 (32-bit, non-prefetchable) [size=1K]
   
Capabilities: [50] Power Management version 2
   
Capabilities: [58] Debug port: BAR=1 offset=00a0
   
Capabilities: [98] PCI Advanced Features
   
Kernel driver in use: pciback
   
Kernel modules: ehci_pci

00:1c.0 PCI bridge: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 1 (rev c4) (prog-if 00 [Normal decode])
   
Flags: bus master, fast devsel, latency 0, IRQ 16
   
Bus: primary=00, secondary=04, subordinate=04, sec-latency=0
    I
/O behind bridge: None
   
Memory behind bridge: None
   
Prefetchable memory behind bridge: None
   
Capabilities: [40] Express Root Port (Slot+), MSI 00
   
Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
   
Capabilities: [90] Subsystem: Dell Device 057e
   
Capabilities: [a0] Power Management version 2
   
Kernel driver in use: pcieport


Reply all
Reply to author
Forward
0 new messages