VM's output to attached monitor though HDMI cable

pain

Member
Jan 26, 2022
14
0
6
27
Hi everyone, proxmox noob here. I have recently started working with proxmox.
I have two graphic cards; primary one is [AMD/ATI] Lexa XT [Radeon PRO WX 2100], and secondary one is GP107GL [Quadro P400]. My processor is AMD Ryzen 9.
I have installed proxmox on my computer, and I am using the proxmox through my laptop (web interface). My goal is to make two VMs and show both VMs on two different monitors. I know I have to follow a procedure called PCI passthrough which I have already done by following this guide. I made a VM and passed it my secondary graphics card, then I attached an HDMI cable to my laptop and successfully showed the output on one of my monitors. At first, Vm was stuck at boot and then I had to disable the secure boot option at boot time. Then it worked fine.
Then I made another VM by following the same guide but I could not follow the 4a step that explains how to dump your GPU ROM file because my primary GPU is AMD but he is explaining things about Nvidia. Anyway I tried to pass my primary graphics card to it but I came to know that it is not that simple. Below are the config properties of my VM.
agent: 1
args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=on'
bios: ovmf
boot: order=scsi0;ide2;net0
cores: 8
cpu: host,hidden=1,flags=+pcid
efidisk0: local-lvm:vm-107-disk-1,efitype=4m,pre-enrolled-keys=1,size=4M
hostpci0: 0000:0b:00,pcie=1
ide2: local:iso/manjaro-kde-21.2.1-220103-linux515.iso,media=cdrom
machine: q35
memory: 16380
meta: creation-qemu=6.1.0,ctime=1645016906
name: Test-Encryption
net0: virtio=BE:02:39:B0:96:12,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: local-lvm:vm-107-disk-0,discard=on,size=32G
scsihw: virtio-scsi-pci
smbios1: uuid=a6472bed-58f1-4463-93da-0e89dafcbbdd
snaptime: 1645023001
sockets: 1
usb0: host=046a:0113,usb3=1
usb1: host=413c:301a,usb3=1
vga: none
vmgenid: 53a9575c-9ccc-40b9-bc15-d22448c2975d
I searched on google for many days and tried thousands of different settings but still could not find the display on my second monitor. One thing was certain to me that my primary GPU is attached and I need to unbind it. For this purpose, I used these commands
  1. echo "0000:0b:00.0" > /sys/bus/pci/drivers/vfio-pci/unbind
  2. echo "0000:0b:00.1" > /sys/bus/pci/drivers/vfio-pci/unbind
Then after much digging I found this post and started doing what is being done in the post. I ran every single line, some worked and some didn’t. The lines that don’t give me any errors are below
  1. /bin/sh
  2. GPU=0b:00
  3. GPU_ID="1002 6995"
  4. GPU_AUDIO="1002 aae0"
  5. VMID=106
  6. echo 0 > /sys/class/vtconsole/vtcon0/bind
  7. echo 0 > /sys/class/vtconsole/vtcon1/bind
  8. echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind
  9. modprobe vfio
  10. modprobe vfio_iommu_type1
  11. modprobe vfio-pci
  12. Exit
I don’t know what these lines do but they worked. When I started my VM and then magically I could see the display on my monitor.
I have installed Manjaro on my VM and it is working fine. But the problem is the display on the monitor starts from the welcome screen means it does not show the booting screens. It is a problem for me because I have installed Manjaro with encryption settings and at the boot time I have to type my passphrase to continue. I have to install manjaro with encryption settings because I have to deal with sensitive data of patients. So at the moment as I am not able to see the booting screen means not able to type my passphrase, hence not able to get the VM’s display on my monitor. My requirements are not to use remote desktop connections or anything like that, for instance, VNCReal or VNCTiger etc.
Note: if you suggest anything to me then suggest me with proper steps as you are dealing with a noob!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!