Question How can I strip a Windows 8.1 install down to nothing but an AMD video driver and make it super small

PingSpike

Lifer
Feb 25, 2004
21,729
559
126
I run AMD cards and when they're not in use in a VM you can attach them to a 8.1 VM to allow zerocore to function. In this mode it uses 0-1watts. This works well but it involves a kind of bloated Windows install that just exists to run a video driver basically. This function doesn't work in Windows 10 because of changes to the driver model.

I've seen NTlite and winreducer can be used for this. I used a tool way back for Windows 7 but I can't even remember what it was. Anyone have any recommendations? It really just needs to boot up (preferably somewhat quickly) and load an AMD driver. The power options need a tweak as well. So I could be pretty aggressive.
 

zir_blazer

Golden Member
Jun 6, 2013
1,160
400
136
Your question is so ridiculous niche...
Are you doing PCI Passthrough? Well, I think than it is obvious that yes since you're giving control of the GPU to a VM. Are you using a Linux host or Windows with Hyper-V? Are you 100% sure than there is no way to resolve this host side instead of your overly complicated workaround? At least in Linux vfio-pci should automatically set the card onto D3 power mode, albeit I suppose that ZeroCore may require to bind it to amdgpu instead.
Where did you got the idea of the W8 VM and passing the GPU in the first place? I'm curious.
 

PingSpike

Lifer
Feb 25, 2004
21,729
559
126
Your question is so ridiculous niche...
Are you doing PCI Passthrough? Well, I think than it is obvious that yes since you're giving control of the GPU to a VM. Are you using a Linux host or Windows with Hyper-V? Are you 100% sure than there is no way to resolve this host side instead of your overly complicated workaround? At least in Linux vfio-pci should automatically set the card onto D3 power mode, albeit I suppose that ZeroCore may require to bind it to amdgpu instead.
Where did you got the idea of the W8 VM and passing the GPU in the first place? I'm curious.

Yes, passthrough. I don't really use hyper-v, seems like wearing your pants on your head to use windows as a hypervisor to me. Its on my list to retest a linux VM again actually. When I first ran through the tests they did not work but there have been improvements in the opensource AMD drivers and there were some mentions of "BACO" power modes being implemented (which sound very similar to zerocore) so its possible this may work with newer linux. But at the time, only windows seemed to enable zerocore. If that is the case I'll probably just use a linux VM and call this a day, but it might be also possible to rebind the amdgpu driver and not really use a vm at all.

Contrary to popular belief, vfio-pci bind does not reduce video cards (at least not all of them anyway) to their lowest power state. Most of mine actually use less power when the VM is running. I had tested this myself but this guy has recently replicated my results with a great video:

With that in mind I was reading a lot of techpowerup idle power consumption charts in their video card reviews. Although announced to little fanfare, zerocore came out as a super low power mode and they tested it. It took me awhile to get it to work because there isn't much information on it and Windows 10 ruined it. There's hardly anything out there about this tech but I did some testing based on techpowerups successful test in a review. It works on polaris but I haven't tried anything newer. I've tested it exclusively in VMs since its not that interesting to me personally outside of them.
 

zir_blazer

Golden Member
Jun 6, 2013
1,160
400
136
Contrary to popular belief, vfio-pci bind does not reduce video cards (at least not all of them anyway) to their lowest power state. Most of mine actually use less power when the VM is running. I had tested this myself but this guy has recently replicated my results with a great video:
vfio-pci sets the PCI Devices into the D3 Power State, which according to the PCIe Specification is the lowest standarized Power State (Which can be set with the generic PCI command interface via the PCI Configuration Space). ZeroCore should be totally propietary to AMD, so it makes sense that only when the AMD Drivers are in use the GPU is set to such custom mode.

I'm not sure of amdgpu supporting ZeroCore, I googled a bit and even participated in Threads related to that. According to Phoronix, ZeroCore is the marketing name of BACO (Bus Active Chip Off), which seems to be supported, albeit some people claim than it is inferior to Windows version of it. Assuming that BACO was properly supported by amdgpu Driver, it would be far easier to rebind the GPU to amdgpu in the Linux host when it is Idle, as creating a Linux VM to do so would be stupid if the host can handle it itself.
Also, some of the low power stuff involves the physical PCIe link layer. I have absolutely no idea how Windows handles PCIe ASPM (Active State Power Management), but at least AMD was recently working on its amdgpu Linux Driver to enable by default the latter. I find that quite complicated considering than in virtualized environments Windows is only able to control the passthroughed card but not the physical PCIe link interface since it doesn't manages the involved PCIe Root Port and possible Switches that routes the data traffic, so I find weird that Windows or the AMD Drivers doesn't find themselves in an edge case trying to set the virtual PCIe Port in a low power mode and failing along the way. Or maybe Windows and its AMD Driver doesn't even use ASPM since it was supposed to be a buggy pain in the ass anyway.
 

PingSpike

Lifer
Feb 25, 2004
21,729
559
126
vfio-pci sets the PCI Devices into the D3 Power State, which according to the PCIe Specification is the lowest standarized Power State (Which can be set with the generic PCI command interface via the PCI Configuration Space). ZeroCore should be totally propietary to AMD, so it makes sense that only when the AMD Drivers are in use the GPU is set to such custom mode.

The weird thing is for at least some setups outside of zerocore the D3 is still worse than running a whole VM and letting that go into low power. But you can get good results if you bind it back to the host drivers still, even if its a pain.

I vaguely remember that phoronix post now that you linked it. But it sounds like they aren't even hitching things up for zerocore to work in linux, just trying to use its functionality to do GPU resets. It doesn't sound very promising. But it does suggest zerocore may well work on newer AMD cards still, even though it doesn't officially exist in any marketing materials these days. You have to kind of force driver installs after polaris though since I believe those are the last cards that officially support 8.1. Also it doesn't work if you're connected by another other than VGA or DVI, which is started to become a problem since cards don't always come with DVI now.
 

zir_blazer

Golden Member
Jun 6, 2013
1,160
400
136

PingSpike

Lifer
Feb 25, 2004
21,729
559
126

This sounds like a nice improvement. You could just leave your VM running or even load the driver on the host to get good power savings from nvidia before but neither of those things are ideal.

I doubt it will improve the idle power consumption to the point where it is similar to zerocore, at least not from what I read. But hopefully I'm wrong.