You are not logged in.

#1 2018-07-18 15:51:01

DrFrankenstein
Member
Registered: 2015-06-30
Posts: 6

[SOLVED] Lenovo x230 not staying in suspend mode since kernel 4.17

Hi,

since the update to linux 4.17 my laptop shows the following behavior: after a reboot the first time the lid is closed or the suspend key is pressed it works as expected. Every time after that it wakes up immediately after going into suspend. I have posted the journal output of the relevant time frame here, but it doesn't look very informative to me. The relevant line is

Jul 18 17:19:44 archy kernel: ACPI: Waking up from system sleep state S3

If anyone has an idea what causes this, I'd appreciate it.

The issue disappears after downgrading to linux 4.16.13.

I have verified that the issue occurs with linux 4.17.2, 4.17.3, 4.17.4 and 4.17.6.

Last edited by DrFrankenstein (2018-10-09 15:32:02)

Offline

#2 2018-07-23 05:48:06

mwkuster
Member
Registered: 2018-07-22
Posts: 3

Re: [SOLVED] Lenovo x230 not staying in suspend mode since kernel 4.17

Hello,

For what it is worth, since about 10 days I observe the same phenomenon also on a Lenovo X250 (though in my case the latest version that I remember working might have been 4.17.3-1 - I haven't had the opportunity to downgrade the kernel to check).

Immediately after going into suspend the machine wakes up again:

systemctl suspend

[...]
[33188.519048] PM: Saving platform NVS memory
[33188.519071] Disabling non-boot CPUs ...
[33188.559767] smpboot: CPU 1 is now offline
[33188.598932] smpboot: CPU 2 is now offline
[33188.632151] smpboot: CPU 3 is now offline
[33188.635210] ACPI: Low-level resume complete
[33188.635256] ACPI: EC: EC started
[33188.635257] PM: Restoring platform NVS memory
[...]

I've tried disabling most wakeup criteria, but only when disabling IGBE the laptop now actually stays suspended:

cat /proc/acpi/wakeup
Device    S-state      Status   Sysfs node
LID      S4    *disabled  platform:PNP0C0D:00
SLPB      S3    *enabled   platform:PNP0C0E:00
IGBE      S4    *disabled  pci:0000:00:19.0
EXP2      S4    *disabled  pci:0000:00:1c.1
XHCI      S3    *disabled  pci:0000:00:14.0
EHC1      S3    *disabled  pci:0000:00:1d.0

I don't know why IGBE (= Integrated Gigabit Ethernet) should make the difference - I don't even have an Ethernet cable connected. Has this workaround the same effect  on the X230?

Offline

#3 2018-07-23 11:50:23

DrFrankenstein
Member
Registered: 2015-06-30
Posts: 6

Re: [SOLVED] Lenovo x230 not staying in suspend mode since kernel 4.17

Thank you very much. I have tried many combinations and this configuration works for me:

$ cat /proc/acpi/wakeup
Device  S-state   Status   Sysfs node
LID       S4    *enabled   platform:PNP0C0D:00
SLPB      S3    *enabled   platform:PNP0C0E:00
IGBE      S4    *disabled  pci:0000:00:19.0
EXP3      S4    *disabled  pci:0000:00:1c.2
XHCI      S3    *disabled  pci:0000:00:14.0
EHC1      S3    *disabled  pci:0000:00:1d.0
EHC2      S3    *disabled  pci:0000:00:1a.0
HDEF      S4    *disabled  pci:0000:00:1b.0

It seems that enabling any of the devices where 'Sysfs node' begins with 'pci' leads to the problem. I don't really know what that means. Probably those are devices conneted via PCI?

So I'm still searching for an explanation, but thank you for the workaround.

P.S.: Problem persists at linux 4.17.8.

Last edited by DrFrankenstein (2018-07-23 11:54:27)

Offline

#4 2018-07-23 15:30:21

pfrenssen
Member
Registered: 2012-04-09
Posts: 14

Re: [SOLVED] Lenovo x230 not staying in suspend mode since kernel 4.17

I also have this problem with my Lenovo X1 Carbon 1st generation. I also had to disable XHCI, EHC1 and EHC2 for the suspend to work. Thanks!

For people looking for some more information, here is the relevant section in the wiki: https://wiki.archlinux.org/index.php/Po … om_suspend

And here is a forum post that shows how to create a systemd  unit file to automatically disable these wakeups on boot: https://bbs.archlinux.org/viewtopic.php … 7#p1575617

Offline

#5 2018-07-24 06:17:25

mwkuster
Member
Registered: 2018-07-22
Posts: 3

Re: [SOLVED] Lenovo x230 not staying in suspend mode since kernel 4.17

DrFrankenstein, you are surely right that the handling of devices connected via PCI has changed for the worse in 4.17. I guess that this is a regression / bug. I haven't seen any relevant ticket in Arch's bug tracker yet, so will you create on? I'm not sure if it should be done upstream in the kernel bug tracker, though

pfrenssen, thanks for the pointer to the wiki. A workaround I've created myself a bash script, for now to be executed manually, but possibly to executed on boot if the problem persists

Offline

#6 2018-07-24 17:09:02

loqs
Member
Registered: 2014-03-06
Posts: 18,032

Re: [SOLVED] Lenovo x230 not staying in suspend mode since kernel 4.17

mwkuster wrote:

DrFrankenstein, you are surely right that the handling of devices connected via PCI has changed for the worse in 4.17. I guess that this is a regression / bug. I haven't seen any relevant ticket in Arch's bug tracker yet, so will you create on? I'm not sure if it should be done upstream in the kernel bug tracker, though

It it is a packaging / integration bug then report it to the arch bug tracker.
If it is a kernel bug report it to the kernel (note the kernel bug tracker is not the appropriate mechanism for many sub systems).
If it is an intended change rather than a bug do not report it anywhere.  What are the PCI devices that are generating the wakeups?
Before reporting upstream I would suggest bisecting the kernel to find which commit caused the change.
Then see if you can determine from the commit message if the change was intentional or a bug.

Offline

#7 2018-07-25 09:32:53

mwkuster
Member
Registered: 2018-07-22
Posts: 3

Re: [SOLVED] Lenovo x230 not staying in suspend mode since kernel 4.17

There are numerous commits in 4.17 related to the ACPI subsystem, notably fe03a7594d86e0754f05e604cd803a6a9aae3c1c, 2c85025c75dfe7ddc2bb33363a998dad59383f94 and b50154d53e668314542ef9a592accc37137a8f65 (there are more, cf. https://github.com/torvalds/linux). None of these seems to be aimed at disturbing the functioning of suspend on Lenovo x devices. I don't have the necessary know-how to analyze these changes in more detail.

In terms of PCI devices I need to deactivate at least IGBE, XHCI, and EHC1 to avoid unwanted wakeups after suspend

Offline

#8 2018-10-09 15:31:20

DrFrankenstein
Member
Registered: 2015-06-30
Posts: 6

Re: [SOLVED] Lenovo x230 not staying in suspend mode since kernel 4.17

Quick update: The issue is fixed at linux 4.18.12.arch1-1. Disabling the devices is no longer necessary. I didn't find out what change caused this, but the topic is solved.

Offline

Board footer

Powered by FluxBB