You are not logged in.

#1 2012-06-07 16:31:42

oz
Member
Registered: 2004-05-20
Posts: 102

Anyone know how to power-off a PCIe slot? (eg. video card)

My workstation has multiple video cards.  One is a loud high power unit that I use for scientific visualization, CAD, gaming, etc and the other is a silent low power card.   I'm looking for a way to power off the loud card when I'm not using it (which is 99% of the time because I'm mostly just writing software).  Anyone know if this is possible and how to go about it?

I know there is a bunch of control stuff in /sys/devices/pciXXXX/.   I tried "removing" the card from that interface and it worked (device became unavailable) but the card did not power off.  I'm thinking I need to use one of the sleep states or something.  From my reading I get hints that it's possible to cut power to specific PCI slots but I can't figure out exactly how.  Any ideas?

Offline

#2 2012-06-07 22:31:05

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Anyone know how to power-off a PCIe slot? (eg. video card)

If you really don't use it too often, it might be easiest to just switch it off in the BIOS, if that's possible.

Offline

#3 2012-06-08 00:09:02

oz
Member
Registered: 2004-05-20
Posts: 102

Re: Anyone know how to power-off a PCIe slot? (eg. video card)

Yeah but that wouldn't power down the card either.  I want to turn it off so the fan doesn't run.

I played with some ACPI utilities and tried to put it in D3 sleep mode but it didn't do anything.  I think there is some other interface specific to PCI (ie. not ACPI) that allows directly cutting power to specific PCI slots.  I can't find much information on how to use it though.

Offline

#4 2012-06-09 12:59:41

oz
Member
Registered: 2004-05-20
Posts: 102

Re: Anyone know how to power-off a PCIe slot? (eg. video card)

According to the kernel documentation:

What:		/sys/bus/pci/devices/.../remove
Date:		January 2009
Contact:	Linux PCI developers <linux-pci@vger.kernel.org>
Description:
		Writing a non-zero value to this attribute will
		hot-remove the PCI device and any of its children.
		Depends on CONFIG_HOTPLUG.

Only thing is, I can't find any "remove" files at all under /sys/bus/pci/devices/.  I don't know if I need another module loaded or what.  I currently have pci_hotplug and pciehp loaded and CONFIG_HOTPLUG=y

Argh, I hate how there is practically no information on how to use this.  I found some mention of not being able to hotplug video devices based on a misunderstanding of the PCI spec or something and they were suppose to enable it but then there were no more posts, no information, no nothing...  That was 2 years ago... !!!

Last edited by oz (2012-06-09 13:00:41)

Offline

#5 2012-06-09 13:19:44

oz
Member
Registered: 2004-05-20
Posts: 102

Re: Anyone know how to power-off a PCIe slot? (eg. video card)

Finally, I found the "remove" files.  They aren't under /sys/bus/devices/ but in a different path under each device.

Unfortunately removing it doesn't power off the card.  Could be because my console is on that card but I can't figure out how to switch the console to another card.  I give up.

Offline

Board footer

Powered by FluxBB