Display sleep: “sleep” graphics card

displaygraphicspower-management

I often run simulations or other processes on my desktop for hours or days where I don't touch the machine.

During this time, I'd like the display to sleep and I want the discrete graphics card to sleep or turn off with it, using as little power as possible. (edit: I can physically power off the monitor, so that's why I'm asking about the GPU.)

How should I do it? Is it possible to force the graphics card to either turn off or idle until I come back to the computer and move the mouse / bang the keyboard?

If it matters, the current card is an AMD Radeon, I'm running Arch.

Best Answer

Preface: Whether this works is highly dependent on your hardware.

Since you're using a Radeon card and all more recent cards(starting with GCN 1.0 circa 2011) support something called ZeroPower, the first step would be to check if it's maybe just a DPM issue. Try forcing your card into a low power state. I assume that you're using the open source drivers since fglrx pretty much useless on Arch. Try

    echo low > /sys/class/drm/card0/device/power_dpm_force_performance_level

to force the card into it's lowest power state, turn of your screen and see if the fan turns off. For more information about DPM you can look here.

If the above fails or you simply want to try it out, you can also try removing/disabling the card. A word of caution: Playing with PCIe hotplug can be a very entertaining way to crash your system. To do so, stop Xorg and unload the kernel module your GPU driver uses(probably radeon in your case). Afterwards, find out how your CPU is called (lspci, some line will contain somthing like 01:00.0 VGA compatible controller). Using this number, you can remove the GPU from the bus by doing(adjust the numbers)

    echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/remove

This will not turn off the power but hopefully cause the GPU to power down since it's no longer attached. To reattach it you can try to redetect it using

    echo 1 > /sys/bus/pci/rescan

via SSH or rebooting the machine (probably also via SSH).

Related Question