2024年7月25日星期四

Ubuntu Cinnamon 24.04 with UHD730 passthrough and NoMachine HW encoding (oneVPL)

This guide will be about setting up Ubuntu Cinnamon 24.04 with UHD730 passthrough and HW encoding (oneVPL).

I prefer Cinnamon DE as it have all function I needed, plus it has modern and yet elegant looks. the reason I chosen Ubuntu distro as it is stable enough yet very use friendly for beginner.

1. Download latest Ubuntu Cinnamon ISO, setup VM as below, CPU host, Display - Standard, don't passthrough UHD730 yet.

 2. After installation completed, boot in to the VM, run a apt upgrade, comment out this line in VM's grub:

#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

update-grub

shutdown the Ubuntu Cinnamon VM, change Display to None, and add in PCIE passthrough for UHD730. it is important to change Display to None to have the HDMI passthrough to screen correctly.





3. Power up the VM, and use PiKVM to control the VM remotely. if you do not have PiKVM, just plug a monitor, keyboard mouse passthrough to VM, and control like normal desktop. or else you can install a remote desktop software like NoMachine to remote control your VM incase HDMI is not working.




4. Since I am the NoMachine user (i loved the 60fps and HW encoding and it is free), this guide will be based on NoMachine. download latest version of NoMachine for Linux (8.13), install it. NoMachine do not have HW Encoder out of the box for Ubuntu 24.04, we will talk about how to get it working.


5. We will need to install  intel VPL for UHD730.
       
https://www.intel.com/content/www/us/en/developer/articles/guide/onevpl-installation-guide.html#inpage-nav-6-1 


        restart NoMachine, and you will have a working NoMachine working with hardware encoder VPL.


however, sadly after testing the HW VPL, it consume more CPU and GPU than software encoder.... performance wise software encoder work better....




PiKVM, a useful tools that help you manage your homelab server remotely

Since I have a Pi4B loaded with opensource PiKVM,  a very useful remote KVM server, it is connected to UHD730 HDMI output so I can remotely login to control the BIOS, as well as conduct Proxmox installation, completely remotely.

And this is the reason why I set IGD is first boot VGA in the BIOS.

I will write about how to build your own PiKVM some day, this is just a placeholder to remind myself.


Setup Proxmox with Passthrough ready


Install and setup Proxmox Virtual Environment







nano /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_pstate=disable intel_iommu=on iommu=pt pcie_acs_override=downstream,multifunction nofb nomodeset video=vesafb:off,efifb:off"

update-grub





crontab -e
@reboot echo "schedutil" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor






nano /etc/modules
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd


echo "options vfio_iommu_type1 allow_unsafe_interrupts=1" > /etc/modprobe.d/iommu_unsafe_interrupts.conf

echo "options kvm ignore_msrs=1" > /etc/modprobe.d/kvm.conf

echo "blacklist radeon" >> /etc/modprobe.d/blacklist.conf
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
echo "blacklist nvidia" >> /etc/modprobe.d/blacklist.conf


systemctl disable --now ksmtuned

update-initramfs -u

reboot

BIOS配置

显卡检测依次为IGD优先。

Setup as below in the BIOS:


Disable

Resize Bar
SR-IOV (no need as i will do full passthrough)
Secure Boot


Enable

VT-D
IOMMU

我的主机配置




Hardware:
Intel i5 12400 with UHD730
96GB RAM
2xNVME SSD + 6 SATA Disk
MSI MAG B660M MORTAR DDR4 (MS-7D42)
Nvidia RTX3060
NVidia GTX1650





Proxmox as main OS, running multiple VM with below setup:

Ubuntu LXC running a Binance Tradding Bot.
Synology DSM with redpill loader.
Windows 11 with RTX3060 as HTPC and Gaming in TV.
Windows 11 with GTX1650 as a transcoding server.
Ubuntu Cinnamon with UHD730 for fun.

The reason I chosen Proxmox as my main virtual machine manager simply because it is based on super stable Debian, with a lot of useful function and it is provided as free for personal use. it just work out of the box.

Ubuntu Cinnamon 24.04 with UHD730 passthrough and NoMachine HW encoding (oneVPL)

This guide will be about setting up Ubuntu Cinnamon 24.04 with UHD730 passthrough and HW encoding (oneVPL). I prefer Cinnamon DE as it have ...