Whenever I suspend my Linux machine attached to an eGPU, the GPU in my eGPU would start spinning it’s fan like crazy.

I think it’s because it’s doing some intensive operation, like an aggressive try loop because it can’t connect to the direct device.

I couldn’t figure out how to get the eGPU to do something different, so I started looking at the Linux Kernel.

This guide on Linux explains the various sleep states and what they do. I figured out that mine were:

cat /sys/power/mem_sleep
[s2idle] deep

Which means that by default, my systemd would be sleep to idle, moving devices to low power mode.

I noticed that my Linux installation also supported deep: in other words: suspend to ram.

I configured mem_sleep to use deep rather than s2idle:

$ sudo bash -c 'echo "deep" > /sys/power/mem_sleep'

And suspend my machine:

sudo bash -c 'echo "mem" > /sys/power/state'

That did it! No more spinning fan.

The mem sleep type also seems to be what systemd uses for it’s suspend command, so changing that mem_sleep config will help that as well.