Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a small suggestion #68

Open
Ran-Xing opened this issue Jan 23, 2023 · 0 comments
Open

a small suggestion #68

Ran-Xing opened this issue Jan 23, 2023 · 0 comments

Comments

@Ran-Xing
Copy link

I am currently researching amd rx5600xt through macos, and I have seen many fixes and restart bug solutions, I think, can you sort out everyone's solutions

example

Using this script will cause the device to no longer be recognized

#!/bin/bash
echo 1 > /sys/bus/pci/devices/0000:07:00.0/remove
echo 1 > /sys/bus/pci/devices/0000:07:00.1/remove
echo "Suspending..."
rtcwake -m no -s 4
systemctl suspend
sleep 5s
echo 1 > /sys/bus/pci/rescan
echo "Reset done"

example 2

#!/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

example 3

[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

There are also some scripts that are very useful, but unfortunately, my hard drive data was lost once
,tks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant