-
-
Notifications
You must be signed in to change notification settings - Fork 290
Description
The Surface Laptop 4 AMD cannot reliably resume from suspend as it only support S0ix.
Support for S0ix is currently missing from mainline, and the device does not support S3.
As far as I can tell, at least part of this issue is relevant to the SL3A, as it also only support S0ix and no S3.
The SL3A has the hardware ID AMD0004, so the amd-pmc loads without needing a patch.
Behavior
Device after resume from suspend will appear to be unresponsive, the screen is blank without backlight.
If you actually manage to wake the device up, and have remote access you can find the amdgpu driver dying.
Issues
There are a couple of issues.
- SL4 AMD PMC HID was not updated to the AMDI0005, but to the AMD0005. linux-surface/kernel
- AMDGPU driver changes are upstream bug comment
- S0ix patches not yet in mainline. See issue
- Latest update
- Resume appears to be working with these patches.
- LID0 doesn't cause full resume
- Once the lid opens power consumption jumps up, does not drop after closing again.
- Not sure if device is getting an interrupt from the lid event yet.
- rtcwake is not causing wake
- Can't recall currently if rtcwake worked after amd-pmc driver loaded, did work before but the amdgpu was broken.
My dmesg logs have rotated out, so I don't have a copy on hand at the moment, and I don't have a kernel ready to roll back to at this moment.
Amdgpu will complain of "Fences timed out".
LID0
Seems like LID0 might be triggering something via KIP (is that keyboard?).
Unique to suspend with lid, resume with opening lid then triggering wakeup with pre-plugged external input.
surface_serial_hub serial0-0: event: unhandled event (rqid: 0x0e, tc: 0x0e, tid: 0x01, cid: 0x1d, iid: 0x00)
Have I missed something with the LID switch here? I have not yet worked out how to determine if it has an interrupt assigned. I'm not seeing any in the dsdt.dsl.
/proc/interrupts
CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 CPU8 CPU9 CPU10 CPU11 CPU12 CPU13 CPU14 CPU15
3: 0 0 0 0 0 0 0 0 0 0 99869 0 0 0 0 0 IR-IO-APIC 3-edge ttyS4
4: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-IO-APIC 4-edge AMDI0010:02
7: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-IO-APIC 7-fasteoi pinctrl_amd
8: 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 IR-IO-APIC 8-edge rtc0
9: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-IO-APIC 9-fasteoi acpi
10: 0 24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-IO-APIC 10-edge AMDI0010:00
11: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-IO-APIC 11-edge AMDI0010:01
25: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IOMMU-MSI 0-edge AMD-Vi
26: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 34816-edge PCIe PME
27: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 36864-edge PCIe PME
28: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 133120-edge PCIe PME
30: 0 0 0 0 0 0 0 0 0 40 0 0 0 0 0 0 IR-PCI-MSI 524288-edge nvme0q0
31: 1507 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 524289-edge nvme0q1
32: 0 1267 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 524290-edge nvme0q2
33: 0 0 1385 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 524291-edge nvme0q3
34: 0 0 0 1270 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 524292-edge nvme0q4
35: 0 0 0 0 650 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 524293-edge nvme0q5
36: 0 0 0 0 0 780 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 524294-edge nvme0q6
37: 0 0 0 0 0 0 672 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 524295-edge nvme0q7
38: 0 0 0 0 0 0 0 725 0 0 0 0 0 0 0 0 IR-PCI-MSI 524296-edge nvme0q8
39: 0 0 0 0 0 0 0 0 1735 0 0 0 0 0 0 0 IR-PCI-MSI 524297-edge nvme0q9
40: 0 0 0 0 0 0 0 0 0 1391 0 0 0 0 0 0 IR-PCI-MSI 524298-edge nvme0q10
41: 0 0 0 0 0 0 0 0 0 0 847 0 0 0 0 0 IR-PCI-MSI 524299-edge nvme0q11
42: 0 0 0 0 0 0 0 0 0 0 0 1385 0 0 0 0 IR-PCI-MSI 524300-edge nvme0q12
43: 0 0 0 0 0 0 0 0 0 0 0 0 687 0 0 0 IR-PCI-MSI 524301-edge nvme0q13
44: 0 0 0 0 0 0 0 0 0 0 0 0 0 1056 0 0 IR-PCI-MSI 524302-edge nvme0q14
45: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 650 0 IR-PCI-MSI 524303-edge nvme0q15
46: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 697 IR-PCI-MSI 524304-edge nvme0q16
47: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 amd_gpio 2 ACPI:Event
48: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 amd_gpio 61 ACPI:Event
49: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 amd_gpio 62 ACPI:Event
50: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 amd_gpio 58 ACPI:Event
51: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 amd_gpio 59 ACPI:Event
52: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 amd_gpio 5 ACPI:Event
53: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 amd_gpio 23 ACPI:Event
54: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 amd_gpio 7 ssam_wakeup
57: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1576960-edge psp-1
59: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1579008-edge xhci_hcd
60: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1579009-edge xhci_hcd
61: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1579010-edge xhci_hcd
62: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1579011-edge xhci_hcd
63: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1579012-edge xhci_hcd
64: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1579013-edge xhci_hcd
65: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1579014-edge xhci_hcd
66: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1579015-edge xhci_hcd
68: 0 0 0 0 0 6608 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1581056-edge xhci_hcd
69: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1581057-edge xhci_hcd
70: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1581058-edge xhci_hcd
71: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1581059-edge xhci_hcd
72: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1581060-edge xhci_hcd
73: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1581061-edge xhci_hcd
74: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1581062-edge xhci_hcd
75: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1581063-edge xhci_hcd
77: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 amd_gpio 8 apds9960_event
78: 0 0 0 0 0 0 0 0 0 0 0 0 0 12364 0 0 IR-PCI-MSI 1048576-edge iwlwifi: default queue
79: 552 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1048577-edge iwlwifi: queue 1
80: 0 534 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1048578-edge iwlwifi: queue 2
81: 0 0 565 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1048579-edge iwlwifi: queue 3
82: 0 0 0 476 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1048580-edge iwlwifi: queue 4
83: 0 0 0 0 618 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1048581-edge iwlwifi: queue 5
84: 0 0 0 0 0 469 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1048582-edge iwlwifi: queue 6
85: 0 0 0 0 0 0 1198 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 1048583-edge iwlwifi: queue 7
86: 0 0 0 0 0 0 0 624 0 0 0 0 0 0 0 0 IR-PCI-MSI 1048584-edge iwlwifi: queue 8
87: 0 0 0 0 0 0 0 0 583 0 0 0 0 0 0 0 IR-PCI-MSI 1048585-edge iwlwifi: queue 9
88: 0 0 0 0 0 0 0 0 0 330 0 0 0 0 0 0 IR-PCI-MSI 1048586-edge iwlwifi: queue 10
89: 0 0 0 0 0 0 0 0 0 0 618 0 0 0 0 0 IR-PCI-MSI 1048587-edge iwlwifi: queue 11
90: 0 0 0 0 0 0 0 0 0 0 0 357 0 0 0 0 IR-PCI-MSI 1048588-edge iwlwifi: queue 12
91: 0 0 0 0 0 0 0 0 0 0 0 0 981 0 0 0 IR-PCI-MSI 1048589-edge iwlwifi: queue 13
92: 0 0 0 0 0 0 0 0 0 0 0 0 0 744 0 0 IR-PCI-MSI 1048590-edge iwlwifi: queue 14
93: 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 IR-PCI-MSI 1048591-edge iwlwifi: exception
95: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 485 0 IR-PCI-MSI 1574912-edge snd_hda_intel:card0
96: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 917 IR-PCI-MSI 1585152-edge snd_hda_intel:card1
97: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 348316 0 IR-PCI-MSI 1572864-edge amdgpu
NMI: 5 5 5 4 26 12 6 8 4 4 6 4 6 6 9 30 Non-maskable interrupts
LOC: 46578 41168 51577 40420 1032587 360918 165644 87496 44263 42916 116108 38935 60192 76739 73680 406567 Local timer interrupts
SPU: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Spurious interrupts
PMI: 5 5 5 4 26 12 6 8 4 4 6 4 6 6 9 30 Performance monitoring interrupts
IWI: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 IRQ work interrupts
RTR: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 APIC ICR read retries
RES: 97588 103338 94546 94512 561062 345854 174626 134826 95064 88611 70716 99181 141665 151804 155564 960024 Rescheduling interrupts
CAL: 213819 103898 97711 91550 127538 107752 72810 81118 84565 83662 114858 131339 114830 65912 91408 90784 Function call interrupts
TLB: 16065 15530 15801 16674 27381 26795 13059 18425 16819 18372 15502 18646 15795 14139 17889 8882 TLB shootdowns
TRM: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Thermal event interrupts
THR: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Threshold APIC interrupts
DFR: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Deferred Error APIC interrupts
MCE: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Machine check exceptions
MCP: 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 Machine check polls
ERR: 0
MIS: 0
PIN: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Posted-interrupt notification event
NPI: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Nested posted-interrupt event
PIW: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Posted-interrupt wakeup event
/proc/acpi/wakeup
Device S-state Status Sysfs node
GPP9 S0 *disabled
GP17 S4 *enabled pci:0000:00:08.1
HDAU S0 *disabled pci:0000:03:00.1
ACP S0 *disabled pci:0000:03:00.5
AZAL S0 *disabled pci:0000:03:00.6
Power Consumption
Not sure if I should break this out into another issue, but I'll add this here for now.
Power consumption seems to be acting strange with resume.
I'll try to describe the issue as best I can for now, but I need to take better notes so I can describe it more accurately.
Using a power meter at the AC side of the OEM power supply, the device shows a draw of about 13W with a desktop environment up, brightness full, and a rather power hungry external keyboard.
Once suspended with s2idle with the AMD PMC and the 6 S0ix patches the power meter reports a consumption of ~1.1W.
If the lid was closed, opening the lid will see a jump in consumption to ~8.5W.
Suspending the machine via an interactive means, rtcwake -s 30 -m freeze rtcwake -s 30 -m mem KDE-Menu->Suspend or systemctl suspend then touching the laptop keyboard sees the machine jump to ~8.5W consumption as well.
The 8.5W of power consumption seems exceptionally high, as the keyboard has it's LED's turned off at this stage, which when re-testing with the desktop environment open, and external keyboard LEDs off, power consumption drops to 9.7W with the screen at full brightness, and 6.0w with the display at minimum brightness.
I haven't slept the device for an extended period of time to see if the power consumption shows up without human input.
It seems like the platform might be waking up some hardware in preparation for us to receive an event and do something with it, but I'm not sure yet.