Subject: X200 kernel panic on S3 resume (linux-libre > 4.18.9)

From: Mike Gerwitz <[email-masked]>
Date: Wed, 23 Jan 2019 00:58:57 -0500

Hello, Guix:

I've been sitting on this one for a little while since I didn't have
time to try debugging it.

Sometime after 2018-09-25 (linux-libre 4.18.9), my X200 locks up after
resuming from S3 (suspend to memory).  The system is unresponsive, but
Alt+Sysreq+B is recognized and reboots the system.

Unfortunately, I don't know when this happened---my next upgrade on this
box was 2018-12-01, kernel version 4.19.5.

I produced a minimal system configuration where I stripped out all but
base services (attached below) and the problem still occurs.  After
wasting a bunch of time on that, I finally added the
`no_console_suspend' boot param and, sure enough, I get a kernel
panic.  It does not write the log to disk, so I'm reproducing it here in
part manually:

--8<---------------cut here---------------start------------->8---
ACPI: Waking up from system sleep state S3
ACPI: EC: Interrupt unblocked
ACPI: EC: event unblocked
usb usb3: root hub lost power or was reset
general protection fault: 0000 [#1] SMP PTI
CPU: 1 PID: 441 Comm: kworker/u4:23 Tainted: 6     4.28-3gnu #1
Hardware name: LENOVO 7459VLP/7459VLP, BIOS CBET4000 3774c98 09/07/2016
Workqueue: events_unbound async_run_entry_fn
RIP: 0010:uhci_scan_schedule.part.38+0xa3/0xad0
Code: [...machine code...]
[...register values...]
Call trace:  [I'm omitting address offsets]
 ? __dev_printk
 uhci_hub_status_data
 usb_hcd_poll_rh_status
 uhci_pci_resume
 resume_common
 hcd_pci_resume
 pci_pm_resume
[...ata stuff, successful...]
uhci_hcd 0000:00:1d.0: host controller process error, something bad happened!
uhci_hcd 0000:00:1d.0: host controller halted, very bad!
uhci_hcd 0000:00:1d.0: HC died; cleaning up
--8<---------------cut here---------------end--------------->8---

I found this:

  https://01.org/linuxgraphics/gfx-docs/drm/driver-api/usb/persist.html

But it states for `persist':

   For hubs the feature is automatically and permanently enabled and the
   power/persist file doesn’t even exist, so you only have to worry
   about setting it for devices where it really matters.

(Which is indeed true for my hub 0000:00:1d.0, which is usb6, according
to dmesg.)

If someone with more experience with these types of issues offer me some
advice on my next steps (including the best place to report upstream
either for linux-libre or linux, if that's more appropriate), I'd
appreciate it.

-- 
Mike Gerwitz
Free Software Hacker+Activist | GNU Maintainer & Volunteer
GPG: D6E9 B930 028A 6C38 F43B  2388 FEF6 3574 5E6F 6D05
https://mikegerwitz.com