前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >PROXMOX AMD GPU

PROXMOX AMD GPU

作者头像
XRSec
发布2023-08-23 14:52:48
3180
发布2023-08-23 14:52:48
举报
文章被收录于专栏:XRSec.BlogXRSec.Blog

vendor-reset

代码语言:javascript
复制
apt-get install pve-headers-$(uname -r) git dkms build-essential
git clone https://github.com/gnif/vendor-reset.git
cd vendor-reset
dkms install .
echo "vendor-reset" >> /etc/modules
update-initramfs -u
shutdown -r now

vendor_reset_hook

代码语言:javascript
复制
vim /etc/systemd/system/gpu-vendor-reset-method.service
systemctl enable gpu-vendor-reset-method
systemctl start gpu-vendor-reset-method
代码语言:javascript
复制
[Unit]
Description=Set the AMD GPU reset method to 'device_specific'
After=multi-user.target

[Service]
ExecStart=/usr/bin/bash -c '/usr/sbin/modprobe vendor-reset && /usr/bin/echo device_specific > /sys/bus/pci/devices/0000:07:00.0/reset_method'

[Install]
WantedBy=multi-user.target

options

代码语言:javascript
复制
#!/usr/bin/env bash

modprobe vfio-pci
dev="0000:07:00.0"

vendor=$(cat /sys/bus/pci/devices/$dev/vendor)
device=$(cat /sys/bus/pci/devices/$dev/device)
if [ -e /sys/bus/pci/devices/$dev/driver ]; then
        echo 'device_specific' > /sys/bus/pci/devices/$dev/reset_method
        echo $dev > /sys/bus/pci/devices/$dev/driver/unbind
fi
echo $vendor $device > /sys/bus/pci/drivers/vfio-pci/new_id
echo 'device_specific' > /sys/bus/pci/devices/$dev/reset_method

XRSec has the right to modify and interpret this article. If you want to reprint or disseminate this article, you must ensure the integrity of this article, including all contents such as copyright notice. Without the permission of the author, the content of this article shall not be modified or increased or decreased arbitrarily, and it shall not be used for commercial purposes in any way

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2023-07-05,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • vendor-reset
    • vendor_reset_hook
      • options
      领券
      问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档