linux-surface / surface-aggregator-module

Linux ACPI and Platform Drivers for Surface Devices using the Surface Aggregator Module over Surface Serial Hub (Surface Book 2, Surface Pro 2017, Surface Laptop, and Newer)
GNU General Public License v2.0
93 stars 11 forks source link

DGPU auto turns on itself during sleep. #34

Closed StealthBadger747 closed 3 years ago

StealthBadger747 commented 4 years ago

I also have a power drain issue while sleeping. Although this could be unrelated.

qzed commented 4 years ago

This likely happens because something wakes the device and suspends it again instantly. During resume, the PCIe core wakes up the device. On a full wake-up/resume process, the SAM dGPU driver will then suspend the device again. However, when the wake-up process is aborted after the dGPU has been turned on by PCIe-core and the device is suspended again (as may happen during spurious wake-up interrupts), the wakeup-handler for the SAM dGPU driver will not be executed. Thus the device stays on.

I don't have any control over this as the Linux driver infrastructure takes care of these calls, so there's not really anything that I can do here (apart from heavily modifying PCIe core/hot-plug drivers, which I'm not too keen on and will probably result in more of a hack than a driver that could be pursued upstream).

To avoid this you could have a look at your dmesg logs and try to figure out what causes those spurious wakes.

qzed commented 3 years ago

Closing this as I don't see a way to reliably fix that right now.