Bug 240729 - ThinkPad T420s - suspend/resume does not work after 12-STABLE (rev?) -> 12.1-BETA1 update
Summary: ThinkPad T420s - suspend/resume does not work after 12-STABLE (rev?) -> 12.1-...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.1-RELEASE
Hardware: amd64 Any
: Normal Affects Some People
Assignee: freebsd-bugs mailing list
URL:
Keywords: needs-qa, regression
Depends on:
Blocks: 240700
  Show dependency treegraph
 
Reported: 2019-09-21 14:41 UTC by vermaden
Modified: 2019-10-06 18:40 UTC (History)
4 users (show)

See Also:
koobs: mfc-stable12?


Attachments
T420s dmesg.out (10.83 KB, application/x-extension-out)
2019-09-21 14:41 UTC, vermaden
no flags Details
T420s pciconf-lv.out (3.97 KB, application/x-extension-out)
2019-09-21 14:41 UTC, vermaden
no flags Details
T420s loader.conf (3.34 KB, text/plain)
2019-09-21 14:42 UTC, vermaden
no flags Details
T420s rc.conf (3.47 KB, text/plain)
2019-09-21 14:42 UTC, vermaden
no flags Details
T420s sysctl.conf (5.05 KB, text/plain)
2019-09-21 14:43 UTC, vermaden
no flags Details
dmesg.boot from kabylake laptop (39.03 KB, text/plain)
2019-09-25 22:46 UTC, pete
no flags Details
pciconf -lv out from kabylake laptop (3.39 KB, text/plain)
2019-09-25 22:46 UTC, pete
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description vermaden 2019-09-21 14:41:25 UTC
Created attachment 207681 [details]
T420s dmesg.out

Just updated to 12.1-RELEASE - as in title - suspend/resume does not work. Suspend part works. Resume hangs with endless cycle of lights on an off. Screen dead all the time when trying to resume.

The suspend/resume worked on 11.3-RELEASE from which I upgraded.

I have attached these:

1. pciconf -lv output.
2. dmesg output.
3. /boot/loader.conf
4. /etc/sysctl.conf
5. /etc/rc.conf

What else do you need?

Regards,
vermaden
Comment 1 vermaden 2019-09-21 14:41:55 UTC
Created attachment 207682 [details]
T420s pciconf-lv.out
Comment 2 vermaden 2019-09-21 14:42:32 UTC
Created attachment 207683 [details]
T420s loader.conf
Comment 3 vermaden 2019-09-21 14:42:55 UTC
Created attachment 207684 [details]
T420s rc.conf
Comment 4 vermaden 2019-09-21 14:43:53 UTC
Created attachment 207685 [details]
T420s sysctl.conf
Comment 5 pete 2019-09-24 15:55:16 UTC
I can also confirm this is hanging on my kabylake amd64 system.  was working fine with 12-STABLE before the beta tag was cut, and after upgrading the 12.1-BETA1 suspend/resume no longer works.  Verified it is not due to the i915kms DRM driver as i have same issue when that kmod is not loaded.  Also, unable to get any debug info out of system when it hangs as well.
Comment 6 Andriy Gapon freebsd_committer 2019-09-24 19:51:29 UTC
(In reply to pete from comment #5)
Knowing the exact revision of last working 12-STABLE could be of help.
Comment 7 pete 2019-09-24 21:46:04 UTC
(In reply to Andriy Gapon from comment #6)
yea that was a big oversight on my end.  I was being silly and didn't create a new bootenv when installing beta1.  I will rectify this tonight and update the ticket with hopefully a useful last known working rev.
Comment 8 vermaden 2019-09-25 13:17:58 UTC
Sorry for small error in the description - its 12.1-BETA1 of course. 12.1-RELEASE is not available yet :)
Comment 9 pete 2019-09-25 22:42:45 UTC
The previous version of 12-STABLE I was able to suspend resume from is this commit from git:
https://github.com/freebsd/freebsd/commit/8ae0a83f32f9809e62e375979981f497bd39e71c

I'll also upload two attachments from this laptop containing pciconf -lv and /var/run/dmesg.boot
Comment 10 pete 2019-09-25 22:46:04 UTC
Created attachment 207818 [details]
dmesg.boot from kabylake laptop
Comment 11 pete 2019-09-25 22:46:54 UTC
Created attachment 207819 [details]
pciconf -lv out from kabylake laptop
Comment 12 pete 2019-09-26 02:25:20 UTC
Vermaden,
I think I have found what was breaking on my end.  I had an older version of the drm-kmod package installed which I had forgotten to check previously.  After rebuilding the package from the ports tree then rebooting suspend/resume is now working as expected.

One thing to note is that when I attempt to use the pkg hosted by freebsd.org my system panics on boot with a page fault.  So it seems critical to not use the upstream pre-build binary but to roll your own and install that.  for reference this is the version i have installed:
drm-fbsd12.0-kmod-4.16.g20190814
Comment 13 vermaden 2019-09-26 08:18:57 UTC
(In reply to pete from comment #12)

I will compile that 'drm-fbsd12.0-kmod-4.16.g20190814' from Ports with 12.1-BETA1 sources when I get back home.
Comment 14 vermaden 2019-09-26 20:53:48 UTC
I have just tried with releng/12.1 sources and still same lock - or should I svnlite other tree?

# uname -a
FreeBSD t420s.local 12.1-BETA1 FreeBSD 12.1-BETA1 r352546 GENERIC  amd64

# svnlite co https://svn0.eu.freebsd.org/base/releng/12.1/ /usr/src  107.08s user 211.03s system 34% cpu 15:10.92 total
Checked out revision 352745.

# make -C /usr/ports/graphics/drm-fbsd12.0-kmod build deinstall install clean
(...)
===>  Cleaning for drm-fbsd12.0-kmod-4.16.g20190814

# zzz

Laptop suspends but does not resume.

Regards,
vermaden
Comment 15 pete 2019-09-26 21:20:06 UTC
(In reply to vermaden from comment #14)
Hrm, that's the same branch I am using on my end.  The only thing I can think of is to verify that you rebooted after rebuilding and reinstalling the i915kms kernel module.
Comment 16 vermaden 2019-09-26 21:56:12 UTC
(In reply to pete from comment #15)
Yes, that is what I have done - I have built the module and then I rebooted and tried to zzz(8) after fresh system start.

The interesting thing is - as T420s is Sandy Bridge CPU - the 'native' i915 from the Base System also suspends but does not resume ...

Regards,
vermaden
Comment 17 D. Ebdrup 2019-10-05 18:11:25 UTC
Whenever I try this on a spare T420 I have lying around, I can ssh back into the system when it's resumed, but I can not run reboot, su, or any other command - nor can I write anything to disk.
Comment 18 D. Ebdrup 2019-10-05 18:17:46 UTC
Whoops, forgot to add this to my last comment.
Does anyone have the time to build versions of stable/12, in order that we can zero in on which revision broke suspend/resume?
It should be as simple as 'svn checkout -r<revision ID>' in a folder where stable/12 is checked out in, then building mini-memstick.img with src/release/release.sh, and writing it to an USB stick.
Comment 19 D. Ebdrup 2019-10-06 18:40:48 UTC
Alternatively, as Kyle Evans pointed out on irc, there are CI artifacts on http://artifacts.ci.freebsd.org/snapshot/stable-12/ where r<revision>/amd64/amd64/disk.img.xz image between r352031 and r352546 which when extracted with unxz, can be written to +16GB disk, and booted from.