Pretty sure it was on Wendell’s stream.
Also, here:
I noticed in Wendell’s recent GPU pass-through live stream, that he mentioned that there isn’t a reliable solution for the AMD GPU reinitialization problem. He mentioned that once a Windows guest VM on linux is shut down, the AMD GPU will refuse to reinitialize, and that this requires a reboot of the Host machine to fix.
In my personal experience, this actually seemed to be rather random. Sometimes the VM would be able to boot back up, sometimes not. I found that it was not actually the shut down of the VM, but if the host machine enters a sleep state, while the VM was shut down, after having run at least once.
The root issue I suspect has less to do with how Linux is treating the GPU, but the behaviour of the Windows OS while it is a guest. Mainly the Windows guest OS is not sending a signal to the GPU to shut-down or start up while it is running in a VM. I assume this is because when on bare-metal, when a Windows OS shuts down, power is actually killed to the GPU from the motherboard/PSU but when in a guest VM, this does not happen, leaving the GPU in an initialized state. Then if/when the host machine enters a low power state, and power is significantly reduced to the GPU, it enters a non-responsive state after the host machine wakes up.
Anyway, I found a fix/work-around. I’ve borrowed bits from around the web for this. I don’t write how-to’s often, so bare with me.
(note, all these steps take place inside the Windows Guest OS)
Step 1
We are going to need the Windows Device Console (DevCon)
It is included bundled with the Windows Driver Kit , which you can download and install like a chump, but you don’t require all the added bloat.
So, instead download and install Chocolatey , so you can install it from terminal like a bad-ass. Follow the instructions on the Chocolatey website to install.
Once Chocolatey is installed open a Windows command prompt and run this command to install DevCon:
choco install devcon.portable
DevCon is rather straight fo…
If you shut down the guest you need to shutdown the host to get the GPU to behave correctly. It was a pretty miserable experience with an RX580. Then again, I guess that statement applies regardless of passthrough in my experience.
3 Likes