# reference
https://cloud.tencent.com/developer/article/2414840
# before
root@box02:~# dmesg | grep -E "DMAR|IOMMU"
echo nothing
# after reboot: IOMMU
root@box02:~# dmesg | grep -E "DMAR|IOMMU"
[ 0.000000] Warning: PCIe ACS overrides enabled; This may allow non-IOMMU protected peer-to-peer DMA
[ 0.004754] ACPI: DMAR 0x0000000072312000 000088 (v01 INTEL EDK2 00000002 01000013)
[ 0.004783] ACPI: Reserving DMAR table memory at [mem 0x72312000-0x72312087]
[ 0.068253] DMAR: IOMMU enabled
[ 0.160656] DMAR: Host address width 39
[ 0.160656] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
[ 0.160661] DMAR: dmar0: reg_base_addr fed90000 ver 4:0 cap 1c0000c40660462 ecap 29a00f0505e
[ 0.160662] DMAR: DRHD base: 0x000000fed91000 flags: 0x1
[ 0.160665] DMAR: dmar1: reg_base_addr fed91000 ver 5:0 cap d2008c40660462 ecap f050da
[ 0.160666] DMAR: RMRR base: 0x0000007c000000 end: 0x000000807fffff
[ 0.160668] DMAR-IR: IOAPIC id 2 under DRHD base 0xfed91000 IOMMU 1
[ 0.160669] DMAR-IR: HPET id 0 under DRHD base 0xfed91000
[ 0.160669] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
[ 0.162202] DMAR-IR: Enabled IRQ remapping in x2apic mode
[ 0.358227] pci 0000:00:02.0: DMAR: Skip IOMMU disabling for graphics
[ 0.417403] DMAR: No ATSR found
[ 0.417404] DMAR: No SATC found
[ 0.417405] DMAR: IOMMU feature fl1gp_support inconsistent
[ 0.417406] DMAR: IOMMU feature pgsel_inv inconsistent
[ 0.417406] DMAR: IOMMU feature nwfs inconsistent
[ 0.417407] DMAR: IOMMU feature dit inconsistent
[ 0.417408] DMAR: IOMMU feature sc_support inconsistent
[ 0.417408] DMAR: IOMMU feature dev_iotlb_support inconsistent
[ 0.417409] DMAR: dmar0: Using Queued invalidation
[ 0.417411] DMAR: dmar1: Using Queued invalidation
[ 0.418166] DMAR: Intel(R) Virtualization Technology for Directed I/O
# verify vfio
box02:~# dmesg | grep -i vfio
[ 1.783340] VFIO - User Level meta-driver version: 0.3
[ 7.532731] vfio-pci 0000:01:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=io+mem:owns=none
[ 7.533818] vfio-pci 0000:01:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=io+mem:owns=none
[ 7.534253] vfio-pci 0000:01:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=io+mem:owns=none
# verify interrupt mapping
box02:~# dmesg | grep 'remapping'
[ 0.160669] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
[ 0.162202] DMAR-IR: Enabled IRQ remapping in x2apic mode
# grub
# update-initramfs -k all -u
update-initramfs: Generating /boot/initrd.img-6.8.12-8-pve
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
No /etc/kernel/proxmox-boot-uuids found, skipping ESP sync.
Removable bootloader found at '/boot/efi/EFI/BOOT/BOOTX64.efi', but GRUB packages not set up to update it!
Run the following command:
echo 'grub-efi-amd64 grub2/force_efi_extra_removable boolean true' | debconf-set-selections -v -u
Then reinstall GRUB with 'apt install --reinstall grub-efi-amd64'
# before
$ sudo lspci
00:02.0 VGA compatible controller: Device 1234:1111 (rev 02)
# after
$ sudo lspci | grep VGA
00:02.0 VGA compatible controller: Device 1234:1111 (rev 02)
00:10.0 VGA compatible controller: NVIDIA Corporation TU106 [GeForce GTX 1650] (rev a1)
# driver
sudo apt-get remove --purge '^nvidia-.*'
sudo apt install nvidia-driver-550 nvidia-dkms-550
sudo reboot
nvidia-smi
$ nvidia-smi
Sat Mar 29 17:30:35 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.120 Driver Version: 550.120 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce GTX 1650 Off | 00000000:00:10.0 Off | N/A |
| 26% 37C P8 9W / 100W | 6MiB / 4096MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 1638 G /usr/lib/xorg/Xorg 4MiB |
+-----------------------------------------------------------------------------------------+
沒有留言:
張貼留言