linux-surface / linux-surface

Linux Kernel for Surface Devices
4.62k stars 201 forks source link

[SP5] Waking after auto hibernate causes distorted sound and unresponsive touchscreen #1363

Open jahed opened 3 months ago

jahed commented 3 months ago

When my battery gets too low, Ubuntu will suspend/hibernate. Upon waking from this state, I've found the following issues arise:

Doing a normal suspend and wake, or a reboot fixes these issues.

There are various existing issues similar to this like #1171, #1223. None for SP5 specifically and there are some differences: Normal suspend wakes fine. It's only waking from hibernate suspend that is causes these issues.

Environment

`dmesg` output. `[ID-N]` are various identifiers I've replaced. There's some `surface_acpi_notify` events showing errors and a bunch of `ipts` failures at the end after waking. ``` [18947.479614] dptf_power INT3407:00: Unsupported event [0x82] [18967.908654] mwifiex_pcie 0000:01:00.0: info: successfully disconnected from [ID-1]: reason code 3 [18969.227681] PM: Image not found (code -16) [18969.429655] PM: hibernation: hibernation entry [18969.461099] Filesystems sync: 0.027 seconds [18969.461326] Freezing user space processes [18969.468233] Freezing user space processes completed (elapsed 0.006 seconds) [18969.468246] OOM killer disabled. [18969.468461] PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff] [18969.468471] PM: hibernation: Marking nosave pages: [mem 0x000a0000-0x000fffff] [18969.468482] PM: hibernation: Marking nosave pages: [mem 0x40000000-0x403fffff] [18969.468547] PM: hibernation: Marking nosave pages: [mem 0x885be000-0x885fbfff] [18969.468555] PM: hibernation: Marking nosave pages: [mem 0x88f71000-0x88f71fff] [18969.468559] PM: hibernation: Marking nosave pages: [mem 0x8a453000-0x8a454fff] [18969.468564] PM: hibernation: Marking nosave pages: [mem 0x8b950000-0x8bd4ffff] [18969.468628] PM: hibernation: Marking nosave pages: [mem 0x8bd69000-0x8befefff] [18969.468656] PM: hibernation: Marking nosave pages: [mem 0x8bf00000-0xffffffff] [18969.475963] PM: hibernation: Basic memory bitmaps created [18969.475967] PM: hibernation: Preallocating image memory [18981.408933] PM: hibernation: Allocated 769046 pages for snapshot [18981.408938] PM: hibernation: Allocated 3076184 kbytes in 11.93 seconds (257.85 MB/s) [18981.408941] Freezing remaining freezable tasks [18981.410409] Freezing remaining freezable tasks completed (elapsed 0.001 seconds) [18981.425845] printk: Suspending console(s) (use no_console_suspend to debug) [18981.494009] ipts [ID-2]: Stopping IPTS [18986.731367] Disabling non-boot CPUs ... [18986.732760] smpboot: CPU 1 is now offline [18986.735899] smpboot: CPU 2 is now offline [18986.737726] smpboot: CPU 3 is now offline [18986.739596] PM: hibernation: Creating image: [18986.885504] PM: hibernation: Need to copy 750597 pages [18986.885508] PM: hibernation: Normal pages needed: 750597 + 1024, available pages: 1325002 [18987.430559] PM: hibernation: Image created (634151 pages copied, 116446 zero pages) [18986.740679] Enabling non-boot CPUs ... [18986.740703] smpboot: Booting Node 0 Processor 1 APIC 0x2 [18986.741343] CPU1 is up [18986.741374] smpboot: Booting Node 0 Processor 2 APIC 0x1 [18986.742077] CPU2 is up [18986.742094] smpboot: Booting Node 0 Processor 3 APIC 0x3 [18986.742740] CPU3 is up [18986.805370] surface_acpi_notify MSHW0091:00: rqst: device is suspended, not executing [18986.807366] surface_acpi_notify MSHW0091:00: ETWL(0x01, 0x02): RQST(2, 13, 1) error: 5 [18986.814145] nvme nvme0: 4/0/0 default/read/poll queues [18986.977523] ipts [ID-2]: Starting IPTS [18986.980855] ipts [ID-2]: IPTS EDS Version: 1 [18986.981560] PM: Using 3 thread(s) for compression [18986.981568] PM: Compressing and saving image data (635618 pages)... [18986.981626] PM: Image saving progress: 0% [18986.984338] ipts [ID-2]: IPTS running in event mode [18986.985989] input: IPTS [ID-4] Touchscreen as /devices/pci0000:00/0000:00:16.4/[ID-2]/0000:[ID-4].0007/input/input52 [18986.986512] input: IPTS [ID-4] as /devices/pci0000:00/0000:00:16.4/[ID-2]/0000:[ID-4].0007/input/input53 [18987.035671] hid-generic 0000:[ID-4].0007: input,hidraw1: HID v0.00 Device [IPTS [ID-4]] on [18987.036312] mei_hdcp [ID-3]: bound 0000:00:02.0 (ops i915_hdcp_ops [i915]) [18987.406548] PM: Image saving progress: 10% [18987.837119] PM: Image saving progress: 20% [18988.291820] PM: Image saving progress: 30% [18988.770068] PM: Image saving progress: 40% [18989.276748] PM: Image saving progress: 50% [18989.799994] PM: Image saving progress: 60% [18990.332538] PM: Image saving progress: 70% [18990.859052] PM: Image saving progress: 80% [18991.314379] PM: Image saving progress: 90% [18991.755864] PM: Image saving progress: 100% [18991.756221] PM: Image saving done [18991.756223] PM: hibernation: Wrote 2542472 kbytes in 4.77 seconds (533.01 MB/s) [18991.756298] PM: S| [18991.861193] printk: Suspending console(s) (use no_console_suspend to debug) [18991.937815] ipts [ID-2]: Stopping IPTS [18992.066355] intel_pch_thermal 0000:00:14.2: CPU-PCH is cool [28C] [19230.447715] surface_acpi_notify MSHW0091:00: rqst: device is suspended, not executing [19230.448870] surface_acpi_notify MSHW0091:00: ETWL(0x01, 0x02): RQST(2, 13, 1) error: 5 [19230.525782] ipts [ID-2]: Starting IPTS [19230.529727] ipts [ID-2]: IPTS EDS Version: 1 [19230.532879] ipts [ID-2]: IPTS running in event mode [19230.533812] input: IPTS [ID-4] Touchscreen as /devices/pci0000:00/0000:00:16.4/[ID-2]/0000:[ID-4].0008/input/input54 [19230.534051] input: IPTS [ID-4] as /devices/pci0000:00/0000:00:16.4/[ID-2]/0000:[ID-4].0008/input/input55 [19230.564455] PM: hibernation: Basic memory bitmaps freed [19230.564642] OOM killer enabled. [19230.564643] Restarting tasks ... done. [19230.583106] hid-generic 0000:[ID-4].0008: input,hidraw1: HID v0.00 Device [IPTS [ID-4]] on [19230.583616] mei_hdcp [ID-3]: bound 0000:00:02.0 (ops i915_hdcp_ops [i915]) [19230.621000] PM: hibernation: hibernation exit [19230.940561] input: IPTS Touch as /devices/virtual/input/input56 [19230.942576] input: IPTS Stylus as /devices/virtual/input/input57 [19230.945114] ipts [ID-2]: Stopping IPTS [19231.967425] ipts [ID-2]: QUIESCE_IO: recv failed: -11 [19231.967433] ipts [ID-2]: Failed to wait for flush: -11 [19232.995461] ipts [ID-2]: Starting IPTS [19234.019508] ipts [ID-2]: GET_DEVICE_INFO: recv failed: -11 [19234.019522] ipts [ID-2]: Failed to get device info: -11 [19234.019530] ipts [ID-2]: Failed to switch modes: -11 [19235.354486] mwifiex_pcie 0000:01:00.0: info: trying to associate to bssid [ID-1] [19235.376408] mwifiex_pcie 0000:01:00.0: info: associated to bssid [ID-1] successfully ```