You are not logged in.

#51 2018-03-04 18:55:59

esonn
Member
From: Austria
Registered: 2015-10-01
Posts: 61

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

I also want to note here that the laptop is still quite slow to sleep, and slow to resume - if I wait, it may take five or six seconds, or I'll use the power button to wake it faster.

I definitely can't confirm that - my machine suspends and resumes almost instantaneously (still using fiji-flo's vanilla patch). I can't tell a difference in speed between going deep or s2idle. Are you using your minimal patch? Did you try both?

Last edited by esonn (2018-03-04 18:57:11)


Anyone who quotes me in their sig is an idiot. -- Rusty Russell

Offline

#52 2018-03-04 19:27:47

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,544

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

Hm. I tried using fiji-flo's patch - still the same issue, it takes 5-8s to sleep, and 5-8s to resume.

Perhaps it's a BIOS setting or hardware difference? My X1C6 has the HDR screen, does each of yours?

s2idle is fast, deep is quite slow.

Last edited by Ranguvar (2018-03-04 19:28:31)

Offline

#53 2018-03-04 19:43:09

esonn
Member
From: Austria
Registered: 2015-10-01
Posts: 61

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

Hmm now that you mention it, I did experience a related behavior before we had the patch a couple of times with s2idle though. Especially resume took much longer from time to time, unless I pressed the power button. I have an FHD display, but since integrated GPUs are similar I don't think that this makes much of a difference. I'm back on regular -ARCH kernel by now.

My CPU is i7-8550U (they do build X1 with 8560U too asaik). Samsung NVME SSD. Don't use too many non-default UEFI settings either.


Anyone who quotes me in their sig is an idiot. -- Rusty Russell

Offline

#54 2018-03-04 20:46:54

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,544

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

Very odd. I have the i7-8650U and the same SSD.

Haven't found a solution yet, tested on 4.15 and 4.16 and disabled all other kernel command line options.

journalctl -xe reveals some details likely related: https://pastebin.com/2TjtMcUb

Specifically:

Mar 04 20:49:41 obsidian kernel: thinkpad_acpi: unknown possible thermal alarm or keyboard event received
Mar 04 20:49:41 obsidian kernel: thinkpad_acpi: unhandled HKEY event 0x60b0
Mar 04 20:49:41 obsidian kernel: thinkpad_acpi: please report the conditions when this event happened to ibm-acpi-devel@lists.sourceforge.net
Mar 04 20:49:41 obsidian kernel: usb 2-3: Disable of device-initiated U1 failed.
Mar 04 20:49:41 obsidian kernel: usb 2-3: Disable of device-initiated U2 failed.
Mar 04 20:49:41 obsidian kernel: usb 2-3: usb_reset_and_verify_device Failed to disable LTM

That last line shows in red.

That device also shows as 100% Usage in powertop, and has been giving me trouble about that for some time - usb 2-3, aka USB3.0-CRW (Generic)

Still slow to resume from suspend even with tlp disabled, same above message.
I will clarify - the keyboard light for the muted audio turns on fairly immediately, which I believe is it trying to resume, and it takes several seconds for the resume to finish even if I press the power button.

Last edited by Ranguvar (2018-03-04 21:02:54)

Offline

#55 2018-03-04 21:08:54

fiji-flo
Member
From: Berlin
Registered: 2013-03-19
Posts: 15

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

For me suspend and resume take each less than 2 seconds. Normal WQHD display, 8550U. There is a fancy thunderbolt setting in the BIOS to enable Linux compatibility. I observed some weird behavior before I enabled that.

Offline

#56 2018-03-04 21:11:09

esonn
Member
From: Austria
Registered: 2015-10-01
Posts: 61

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

My log show the exact same lines; USB3.0-CRW also at 100% in powertop. Still, suspend/resume takes <1 sec each.

Edit: I also enabled the thunderbold UEFI setting fiji-flo is talking about, don't remember if that affected suspend timings though.

Edit2: For the sake of completeness, according to the Ubuntu certification, that Generic USB3.0-CRW device seems to be for the card reader (wan't clear to me).

Last edited by esonn (2018-03-05 08:41:13)


Anyone who quotes me in their sig is an idiot. -- Rusty Russell

Offline

#57 2018-03-04 23:22:29

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,544

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

....that is interesting.
So changing the Thunderbolt setting in the BIOS results in a completely different DSDT being used, and overriding with this patched one breaks the Linux boot.

Patching the new DSDT works, and now my resume is <1s. -- but my suspend still takes 5-8s.
...and now disabling the tlp-sleep service fixes the slow suspend.

I am still getting 'acpi INT3400:00: Unsupported event [0x86]' on resume (saved in systemd journal), but that seems innocuous so far.

Last edited by Ranguvar (2018-03-04 23:25:30)

Offline

#58 2018-03-05 01:10:23

Ran
Member
Registered: 2014-08-23
Posts: 7

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

esonn wrote:

What my gut feeling tells me: Once you extract and decompile the Yoga DSDT table, it will probably be a rather simple task to patch it manually yourself by looking at the lines changed by fiji-flo's patch and proceeding step by step. The patch is rather small, and only the hunk containing the few insert lines at the end make the sleep magic happen - all deletes are simply for eliminating errors when re-compiling. Again, that's only a gut feeling.

I can confirm that your gut was right -- I have a Yoga G3 and just did this myself, and deep sleep works, hurrah! (Modified patch here, but it was exactly as you guessed.)

Offline

#59 2018-03-05 07:49:47

esonn
Member
From: Austria
Registered: 2015-10-01
Posts: 61

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

So changing the Thunderbolt setting in the BIOS results in a completely different DSDT being used, and overriding with this patched one breaks the Linux boot.

Maybe that's why I got those ACPI errors when trying to boot with your compiled DSDT before you changed that setting. In any case, people should probably still compile it on their own, who knows what other settings might change the DSDT.

I can confirm that your gut was right -- I have a Yoga G3 and just did this myself, and deep sleep works, hurrah! (Modified patch here, but it was exactly as you guessed.)

Good news, I'm changing the thread name to include the Yoga then. Thanks for the info.


Anyone who quotes me in their sig is an idiot. -- Rusty Russell

Offline

#60 2018-03-05 22:31:52

similuke
Member
Registered: 2018-03-04
Posts: 2

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

Ran wrote:
esonn wrote:

What my gut feeling tells me: Once you extract and decompile the Yoga DSDT table, it will probably be a rather simple task to patch it manually yourself by looking at the lines changed by fiji-flo's patch and proceeding step by step. The patch is rather small, and only the hunk containing the few insert lines at the end make the sleep magic happen - all deletes are simply for eliminating errors when re-compiling. Again, that's only a gut feeling.

I can confirm that your gut was right -- I have a Yoga G3 and just did this myself, and deep sleep works, hurrah! (Modified patch here, but it was exactly as you guessed.)

thank you for verifying this.
also thanks to esonn for pointing it out

Offline

#61 2018-03-06 05:59:01

johannesg00
Member
Registered: 2010-11-30
Posts: 74

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

Has anyone tried running Ubuntu, like suggested in the official Lenovo forum?

Offline

#62 2018-03-09 04:43:40

Ran
Member
Registered: 2014-08-23
Posts: 7

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

johannesg00 wrote:

Has anyone tried running Ubuntu, like suggested in the official Lenovo forum?

Behavior on Ubuntu is identical; s2idle works out of the box, and the same fix from this thread is needed for deep sleep / s3.

Offline

#63 2018-03-09 06:11:53

PastExcitement
Member
Registered: 2018-03-01
Posts: 24

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

esonn: That "USB3.0-CRW (Generic)" device appears to correspond to the "Bus 002 Device 002: ID 0bda:0328 Realtek Semiconductor Corp." device, but I can't seem to disable that device. I tried

echo suspend > /sys/bus/usb/devices/2-3/power/control
bash: echo: write error: Invalid argument

Offline

#64 2018-03-09 21:03:09

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,544

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

Updated patch for 1.12 BIOS: http://ix.io/UEI

Only minor changes.

Last edited by Ranguvar (2018-03-09 21:25:49)

Offline

#65 2018-03-11 04:14:32

PastExcitement
Member
Registered: 2018-03-01
Posts: 24

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

I started a wiki page for the X1C6 at https://wiki.archlinux.org/index.php/Le … on_(Gen_6). Please feel free to update this with any relevant documentation. Also, I didn't want to copy any content from https://delta-xi.net/#056 since I don't own that copyright, but if it makes sense, please consider adding those steps directly on the wiki so that anyone can update those instructions in the future.

Offline

#66 2018-03-11 12:06:05

a1ex
Member
From: Germany
Registered: 2007-02-16
Posts: 91

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

Thank you very much for the DSDT patch and figuring this out.

A remaining suspend issue for me is that closing the lid does not put the laptop to sleep.
I can tell by polling  /proc/acpi/button/lid/LID/state that it correctly reports the closed state, but have no clue why this isn't enough for logind to put the laptop to sleep. Is that a common problem or something wrong with my installation only?

Sorry, powerdevil has been interfering and defaults to do nothing it seems.

Last edited by a1ex (2018-03-11 13:30:16)

Offline

#67 2018-03-11 13:47:37

johannesg00
Member
Registered: 2010-11-30
Posts: 74

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

Can anyone confirm that the X1C6 enters pc10 when the internal memory card reader is disabled in the BIOS (see https://bbs.archlinux.org/viewtopic.php … #p1773016)? When I understand correctly, then this is a requirement to enter S0i3...

Offline

#68 2018-03-13 01:33:36

PastExcitement
Member
Registered: 2018-03-01
Posts: 24

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

@johannesg00: I can see that pc10 is reached when the memory card reader is disabled. (It would be nice if someone else confirmed that too). However, from some measurements, I don't really see that much of a power savings during a freeze (s2idle) unfortunately, and I can't really pinpoint the issue at this point. Likely, there is something waking up the CPU, but I'm not sure yet what that is, so I think that S3 is still needed for a reasonable suspend.

Offline

#69 2018-03-16 09:20:59

zapphot
Member
Registered: 2018-03-15
Posts: 12

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

Hi, i also got a x1c6 and i am considering to use this fix. Thanks a lot for that!
However, currently i have suspend/resume errors which seem to crash systemd in ~1 out of 5 attempts when only using s2idle.
Here is the dmesg:

[ 1233.752984] PM: suspend entry (s2idle)
[ 1233.752986] PM: Syncing filesystems ... done.
[ 1233.768107] Freezing user space processes ... (elapsed 0.004 seconds) done.
[ 1233.772141] OOM killer disabled.
[ 1233.772142] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 1233.773676] Suspending console(s) (use no_console_suspend to debug)
[ 1233.977569] e1000e: EEE TX LPI TIMER: 00000011
[ 1234.126190] acpi INT3400:00: Unsupported event [0x86]
[ 1234.131250] thinkpad_acpi: unknown possible thermal alarm or keyboard event received
[ 1234.131251] thinkpad_acpi: unhandled HKEY event 0x6032
[ 1234.131252] thinkpad_acpi: please report the conditions when this event happened to ibm-acpi-devel@lists.sourceforge.net
[ 1974.092251] acpi INT3400:00: Unsupported event [0x86]
[ 1974.383117] OOM killer enabled.
[ 1974.383119] Restarting tasks ...
[ 1974.383619] Core dump to |/usr/lib/systemd/systemd-coredump 402 0 0 6 1521190862 18446744073709551615 x1 systemd-logind pipe failed
[ 1974.385977] Core dump to |/usr/lib/systemd/systemd-coredump 4378 0 0 6 1521190862 18446744073709551615 x1 systemd-journal pipe failed
[ 1974.386607] Core dump to |/usr/lib/systemd/systemd-coredump 3076 0 0 6 1521190862 18446744073709551615 x1 systemd-udevd pipe failed
[ 1974.387193] done.
[ 1974.389440] systemd[1]: systemd-journald.service: Main process exited, code=killed, status=6/ABRT
[ 1974.389505] systemd[1]: systemd-journald.service: Failed with result 'watchdog'.
[ 1974.389966] thermal thermal_zone6: failed to read out thermal zone (-61)
[ 1974.390273] [drm] RC6 on
[ 1974.390428] systemd[1]: systemd-journald.service: Service has no hold-off time, scheduling restart.
[ 1974.390508] systemd[1]: systemd-journald.service: Scheduled restart job, restart counter is at 3.
[ 1974.390549] systemd[1]: Stopped Flush Journal to Persistent Storage.
[ 1974.390557] systemd[1]: Stopping Flush Journal to Persistent Storage...
[ 1974.390566] systemd[1]: Stopped Journal Service.
[ 1974.396472] systemd[1]: Starting Journal Service...
[ 1974.403042] systemd[1]: systemd-udevd.service: Main process exited, code=killed, status=6/ABRT
[ 1974.403096] systemd[1]: systemd-udevd.service: Failed with result 'watchdog'.
[ 1974.412295] PM: suspend exit
[ 1974.428956] systemd-journald[7373]: File /var/log/journal/2a8ba349b0364c86a9fc4ff954c2cb1a/system.journal corrupted or uncleanly shut down, renaming and replacing.
[ 1974.641794] [drm] Reducing the compressed framebuffer size. This may lead to less power savings than a non-reduced-size. Try to increase stolen memory size if available in BIOS.
[ 1974.680695] systemd-journald[7373]: File /var/log/journal/2a8ba349b0364c86a9fc4ff954c2cb1a/user-1000.journal corrupted or uncleanly shut down, renaming and replacing.
[ 1974.905961] psmouse serio1: synaptics: queried max coordinates: x [..5678], y [..4758]
[ 1974.938207] psmouse serio1: synaptics: queried min coordinates: x [1266..], y [1094..]
[ 1974.991374] rfkill: input handler enabled
[ 1982.780723] rfkill: input handler disabled

can this be caused by the missing s3 state and would be fixed by enabling deep sleep? Or is it more likely that i messed something up?

Thanks!

Offline

#70 2018-03-20 01:23:54

PastExcitement
Member
Registered: 2018-03-01
Posts: 24

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

From https://bbs.archlinux.org/viewtopic.php … 6#p1775078, I was able to measure around 0.84 W in s2idle and also in s3, so it appears that just the kernel parameter

acpi.ec_no_wakeup=1

might be sufficient for suspend. Locally, I've also disabled at least one device that appeared to use a constant amount of power, so I've not tested this kernel parameter with a vanilla setup, but it looks promising.

Offline

#71 2018-03-22 20:11:56

schlehmil
Member
Registered: 2010-10-01
Posts: 19

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

PastExcitement wrote:

From https://bbs.archlinux.org/viewtopic.php … 6#p1775078, I was able to measure around 0.84 W in s2idle and also in s3, so it appears that just the kernel parameter

acpi.ec_no_wakeup=1

might be sufficient for suspend. Locally, I've also disabled at least one device that appeared to use a constant amount of power, so I've not tested this kernel parameter with a vanilla setup, but it looks promising.

Hi,

I've also got an X1C6 and "acpi.ec_no_wakeup=1" results in deep sleep but I have to wake up the device after lid open by pressing the power button. Beside that the track point sometime becomes unresponsive (touchpad too) after wake up. Mostly I recognize lagging/hanging in Chromium. But sometimes only keyboard works and I had to restart the system.

Offline

#72 2018-03-30 01:15:56

h54
Member
Registered: 2011-11-22
Posts: 96

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

schlehmil wrote:
PastExcitement wrote:

From https://bbs.archlinux.org/viewtopic.php … 6#p1775078, I was able to measure around 0.84 W in s2idle and also in s3, so it appears that just the kernel parameter

acpi.ec_no_wakeup=1

might be sufficient for suspend. Locally, I've also disabled at least one device that appeared to use a constant amount of power, so I've not tested this kernel parameter with a vanilla setup, but it looks promising.

Hi,

I've also got an X1C6 and "acpi.ec_no_wakeup=1" results in deep sleep but I have to wake up the device after lid open by pressing the power button. Beside that the track point sometime becomes unresponsive (touchpad too) after wake up. Mostly I recognize lagging/hanging in Chromium. But sometimes only keyboard works and I had to restart the system.


I had to disable the trackpoint for the touchpad to work.  Hopefully, later BIOS versions fix this.

Offline

#73 2018-04-11 19:54:16

rin
Member
Registered: 2013-12-24
Posts: 31

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

I still seem to be having problems.
grub.cfg:

initrd	/acpi_override /intel-ucode.img /initramfs-linux.img

/etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="quiet mem_sleep_default=deep"
$ dmesg |grep ACPI|grep supports
[    0.172396] ACPI: (supports S0 S3 S4 S5)

$ cat /sys/power/mem_sleep 
[s2idle] deep

Looks good. However, after sleep/wake:

$ sudo journalctl | grep "PM: suspend" | tail -2
Apr 11 20:25:36 rylai kernel: PM: suspend entry (s2idle)
Apr 11 20:25:50 rylai kernel: PM: suspend exit

BIOS is 1.12, patched using Ranguvar's newer patch (http://ix.io/UEI) however this produced exactly the same dsl file as when I used the patch from https://delta-xi.net/#056.

Offline

#74 2018-04-11 20:01:40

esonn
Member
From: Austria
Registered: 2015-10-01
Posts: 61

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

What about doing

# echo deep > /sys/power/mem_sleep

before sleeping? Seems you're still using s2idle, despite having mem_sleep_default in your kernel boot params (see the brackets).

Last edited by esonn (2018-04-11 20:02:16)


Anyone who quotes me in their sig is an idiot. -- Rusty Russell

Offline

#75 2018-04-11 20:10:20

rin
Member
Registered: 2013-12-24
Posts: 31

Re: [SOLVED] Lenovo X1C6 / X1Y3 (2018): No deep sleep (S3)?

esonn wrote:

What about doing

# echo deep > /sys/power/mem_sleep

before sleeping? Seems you're still using s2idle, despite having mem_sleep_default in your kernel boot params (see the brackets).

That works!
Could it be something to do with this?

GRUB_CMDLINE_LINUX_DEFAULT="quiet mem_sleep_default=deep"
GRUB_CMDLINE_LINUX=""

Offline

Board footer

Powered by FluxBB