What are the modules I need to unload with my amd gpu (Vega 64)
sylvesterroos opened this issue · 6 comments
I can't find info on this anywhere. I'm currently following SomeOrdinaryGamers's video talking about this guide but I can only find info about nvidia cards
I'm not entirely sure what modules you have to unload for AMD cards, however, I'll do a little research and try to find out and add them to the guide. I've never personally done this on any hardware except my own, but I think there are enough success stories at this point that I'd feel comfortable adding them.
Basically, you'll need to unload any module that the card uses to display video, so that it can be bound to VFIO.
Try doing an lspci -nnk
to find out what module is in use by your VGA card. Like here:
Then, if possible try to ssh into your machine, and close everything that the card would use: ie. Display manager, virtual consoles, efi-framebuffer.
Then try unloading the module. It might tell you it's in use by another module, in which case, try unloading that module, etc. Once you've successfully unloaded the first module, work backwards until you've unloaded whatever lspci
says the card was using.
Then you should be able to bind it to vfio.
Let me know if you can do that and what you had to unload and I'll add that to the guide. I might just make those hook scripts downloadable next to the readme.
I found this guide which I'm trying out. I'll let you know if everything works
https://github.com/cosminmocan/vfio-single-amdgpu-passthrough
Update: using that guide works partly. I'm booting into the VM just fine, but getting back into the host isn't working.
kvm.txt
start.txt
revert.txt
Can you spot the problem?
(.txt so I can link them in github. The real files have correct extensions obv)
Is the revert script executable?
Are you able to get into the host after shutdown with ssh and run those commands manually?
Update: using that guide works partly. I'm booting into the VM just fine, but getting back into the host isn't working.
kvm.txt
start.txt
revert.txtCan you spot the problem?
(.txt so I can link them in github. The real files have correct extensions obv)
Add this after re-attaching the GPU (nodedev-reattach) on your revert script
rtcwake -m mem -s 5
, it puts the computer to sleep for 5 seconds just so it can fully reattach itself. Worked for me for my 5700XT setup.
This can also be added in your start script after detaching the GPU (Especially if you have pink artifacts during boot).
This is also meant to solve the Code 43 error in other cases, although I haven't been able to get this figured out over the past week or so.