cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wintermute42
SCSI Port
Posts: 33
Registered: ‎04-07-2018
Location: DE
Views: 4,159
Message 201 of 306

Re: X1 Carbon Gen 6 cannot enter deep sleep (S3 state aka Suspend-to-RAM) on Linux

oh, I see. thank you. the s2idle in the syslog got me confused. however, in my case, the kernel param doesn't seem to improve the situation. maybe it only works with kernel 4.17?

j6m6
Punch Card
Posts: 7
Registered: ‎03-01-2018
Location: US
Views: 4,121
Message 202 of 306

Re: X1 Carbon Gen 6 cannot enter deep sleep (S3 state aka Suspend-to-RAM) on Linux

It was added in 4.15, and this patch https://patchwork.kernel.org/patch/10470935/ should eventually make that happen by default for the X1C6. 

 

If you haven’t applied the DSDT patch to enable S3, use powertop to tune all the available settings to enable power management on as many devices as possible, and then you can see how much time is spent into Package C-State 10 (pc10) during suspend.

 

I’m seeing about .2W during suspend (s2idle), and with S3, I see about 0.08W. I could probably get s2idle even lower if I disabled WiFi. 

 

Separately, while running I’ve seen big battery improvements adding the kernel parameter i915.enable_psr=1 and a few other i915-related parameters. The machine goes into pc10 even while running if the display doesn’t change. Also, I noticed that even with Bluetooth “disabled”, the btusb kernel module stays loaded, and even though it supports a low power mode during suspend, when not in suspend, that module causes some energy usage, so I remove that module (rmmod btusb). 

schmoove
Ctrl-Alt-Del
Posts: 7
Registered: ‎07-13-2011
Location: Bremen, Germany
Views: 3,825
Message 203 of 306

Re: X1 Carbon Gen 6 cannot enter deep sleep (S3 state aka Suspend-to-RAM) on Linux

Hi guys,

 

I just want to confirm that updating the BIOS on my X1C6 via the `fwupdmgr` cli-commands as described by @ardevd  earlier here worked flawlessly. I admit I was a bit nervous and it took some stealth patience, as after the initial reboot, I was staring at a complete black screen for maybe a minute. I checked if the power was on (yes it was, the power button was lit) and I had to tell myself twice not to turn the power off and on again, as it seemed that nothing was happening. My patience had paid off and after the said minute of complete darkness, I finally got a splashscreen with a progress bar.

 

PS: @ardevd started a new thread for the LVFS topic, which seems more appropriate than cluttering this here S3 sleep thread, but I thought I'd let you guys know here anyway, as many of you are probably considering updating your BIOS (which is totally advisable from a security point of view!).

shazow
Fanfold Paper
Posts: 5
Registered: ‎03-03-2018
Location: CA
Views: 3,791
Message 204 of 306

Re: X1 Carbon Gen 6 cannot enter deep sleep (S3 state aka Suspend-to-RAM) on Linux


@j6m6j6m6 wrote: 

... 

Separately, while running I’ve seen big battery improvements adding the kernel parameter i915.enable_psr=1 and a few other i915-related parameters. 


Please share! Smiley Happy There are so many parameters and it's difficult to figure out which ones are actually necessary (especially since many of them are already default-on).

stayorgo
Fanfold Paper
Posts: 3
Registered: ‎05-14-2013
Location: DK
Views: 3,226
Message 205 of 306

Re: X1 Carbon Gen 6 cannot enter deep sleep (S3 state aka Suspend-to-RAM) on Linux

Hi Lenovo, I just ended here in frustration after searching the net about why my machine can't keep battery during sleep. I 'm another customer of yours, using linux exclusively on X1C6, and don't get me wrong, this is an impressive machine. Please fix these issues, I would like to keep using thinkpads. Please keep the thinkpad brand linux friendly.

 

It is one thing that our community can put together patches/hacks, but if Lenovo introduces new features that favor Windows and that at the same time make the user experience on Linux worse then that is not good. Especially if the machines are certified for linux (Ubuntu).

 

Would you consider giving a selection in an upcoming bios release, something like 'use legacy s3 sleep'? Calling it legacy might make this addition easier to swallow for lobbyists trying to push the Windows OS Smiley Wink

 

Rumors in this thread say it's already happening, just wanted to give my vote on this.

stayorgo
Fanfold Paper
Posts: 3
Registered: ‎05-14-2013
Location: DK
Views: 2,892
Message 206 of 306

Re: X1 Carbon Gen 6 cannot enter deep sleep (S3 state aka Suspend-to-RAM) on Linux

I can confirm that passing kernel parameter `acpi.ec_no_wakeup=1` resolves this issue for the most part in my case. I'm running kernel 4.17.12 (Arch linux) and did not override DSDT tables, nor disable the card reader or anything else than passing this kernel parameter.

 

I'm measuring a battery loss of about 0.75% per hour now when in suspend mode, which is perfectly fine for me.

 

I don't see having to press the power button in order to resume the machine as being too much of an annoyance.

 

So this doesn't introduce S3 state, but makes for a usable solution as far as I'm concerned.

igtheflig
Fanfold Paper
Posts: 14
Registered: ‎04-09-2018
Location: GB
Views: 1,599
Message 207 of 306

Re: X1 Carbon Gen 6 cannot enter deep sleep (S3 state aka Suspend-to-RAM) on Linux

I don't know how to measure my power loss, but I left the laptop at 100%, closed the lid, went to bed, and 8 hours later it was empty (critical battery) when trying to resume, had to plug in the charger and boot from off.

 

I _do_ have the acpi.no_ec_wakeup=1 parameter.

 

I attemped the DSDT table patch, everything _seemed_ to work (no problem decompiling, applying patch, recompiling, editing grub config etc etc) and yet, after a reboot, dmsg still does not include s3 as a listed suspend state.

 

I'm kind of at a loss here. My x270 running exactly the same 18.04 pop_os install (basically ubuntu 18.04) can be left lid closed for DAYS and resume with barely a few percent lost. The x1c6, not so much (yet.)

 

I'd love to get the DSDT patch working, but I don't know where to start figuring out what is even going on there.

 

I have the Thunderbolt bios setting enabled, no SD card rider in my machine (that I can see).

 

It's a real shame, 'cos it's a pretty good piece of kit (loose enter key, loose trackpoint left button, bit shoddy on the QC lenovo!)

Upthere77
Paper Tape
Posts: 2
Registered: ‎08-16-2018
Location: GB
Views: 1,585
Message 208 of 306

Re: X1 Carbon Gen 6 cannot enter deep sleep (S3 state aka Suspend-to-RAM) on Linux

Hello all,

 

Thanks to everyone for their help in solving this. 
I had this all working until this morning when my X1 updated to 4.15.0-32-generic.
From that point on suspend stopped working. 
Now it starts the suspend process but the simply wakes up within a sec or so.

This is my syslog log:

 

Aug 16 13:38:53 Ulysses systemd[1]: Started Run anacron jobs.
Aug 16 13:38:53 Ulysses anacron[10574]: Anacron 2.3 started on 2018-08-16
Aug 16 13:38:53 Ulysses anacron[10574]: Normal exit (0 jobs run)
Aug 16 13:38:53 Ulysses kernel: [ 1399.029375] PM: suspend entry (s2idle)
Aug 16 13:38:53 Ulysses kernel: [ 1399.029376] PM: Syncing filesystems ... done.
Aug 16 13:38:55 Ulysses kernel: [ 1399.297198] Freezing user space processes ... (elapsed 0.003 seconds) done.
Aug 16 13:38:55 Ulysses kernel: [ 1399.301012] OOM killer disabled.
Aug 16 13:38:55 Ulysses kernel: [ 1399.301013] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Aug 16 13:38:55 Ulysses kernel: [ 1399.302927] Suspending console(s) (use no_console_suspend to debug)
Aug 16 13:38:55 Ulysses kernel: [ 1399.303705] wlp2s0: deauthenticating from 98:fc:11:b1:05:16 by local choice (Reason: 3=DEAUTH_LEAVING)
Aug 16 13:38:55 Ulysses kernel: [ 1399.436126] e1000e: EEE TX LPI TIMER: 00000011
Aug 16 13:38:55 Ulysses kernel: [ 1399.744061] acpi INT3400:00: Unsupported event [0x86]
Aug 16 13:38:55 Ulysses kernel: [ 1399.751276] thinkpad_acpi: unknown possible thermal alarm or keyboard event received
Aug 16 13:38:55 Ulysses kernel: [ 1399.751278] thinkpad_acpi: unhandled HKEY event 0x6032
Aug 16 13:38:55 Ulysses kernel: [ 1399.751279] thinkpad_acpi: please report the conditions when this event happened to ibm-acpi-devel@lists.sourceforge.net
Aug 16 13:38:55 Ulysses kernel: [ 1399.893094] acpi INT3400:00: Unsupported event [0x86]
Aug 16 13:38:55 Ulysses kernel: [ 1400.116511] nvme nvme0: Shutdown timeout set to 8 seconds
Aug 16 13:38:55 Ulysses kernel: [ 1400.694990] [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.
Aug 16 13:38:55 Ulysses kernel: [ 1400.734012] OOM killer enabled.
Aug 16 13:38:55 Ulysses kernel: [ 1400.734012] Restarting tasks ... 
Aug 16 13:38:55 Ulysses kernel: [ 1400.737165] [drm] RC6 on
Aug 16 13:38:55 Ulysses wpa_supplicant[1103]: wlp2s0: CTRL-EVENT-SIGNAL-CHANGE above=0 signal=0 noise=9999 txrate=0
Aug 16 13:38:55 Ulysses wpa_supplicant[1103]: wlp2s0: CTRL-EVENT-DISCONNECTED bssid=98:fc:11:b1:05:16 reason=3 locally_generated=1
Aug 16 13:38:55 Ulysses kernel: [ 1400.738855] done.
Aug 16 13:38:55 Ulysses NetworkManager[1096]: <warn>  [1534423135.2286] sup-iface[0x558ae0278650,wlp2s0]: connection disconnected (reason -3)
Aug 16 13:38:55 Ulysses NetworkManager[1096]: <info>  [1534423135.2342] device (wlp2s0): supplicant interface state: completed -> disconnected
Aug 16 13:38:55 Ulysses kernel: [ 1400.758402] PM: suspend exit
Aug 16 13:38:55 Ulysses systemd[1]: Started Run anacron jobs.
Aug 16 13:38:55 Ulysses anacron[10929]: Anacron 2.3 started on 2018-08-16
Aug 16 13:38:55 Ulysses anacron[10929]: Normal exit (0 jobs run)

 

Not sure if this is related to the X1 or the new kernel.

Any advice would be most welcomed

 

/G

Koobi
Fanfold Paper
Posts: 7
Registered: ‎04-12-2018
Location: AT
Views: 1,549
Message 209 of 306

Re: X1 Carbon Gen 6 cannot enter deep sleep (S3 state aka Suspend-to-RAM) on Linux


@igtheflig wrote:

I don't know how to measure my power loss, but I left the laptop at 100%, closed the lid, went to bed, and 8 hours later it was empty (critical battery) when trying to resume, had to plug in the charger and boot from off.

 

I _do_ have the acpi.no_ec_wakeup=1 parameter.

 

I attemped the DSDT table patch, everything _seemed_ to work (no problem decompiling, applying patch, recompiling, editing grub config etc etc) and yet, after a reboot, dmsg still does not include s3 as a listed suspend state.

 

I'm kind of at a loss here. My x270 running exactly the same 18.04 pop_os install (basically ubuntu 18.04) can be left lid closed for DAYS and resume with barely a few percent lost. The x1c6, not so much (yet.)

 

I'd love to get the DSDT patch working, but I don't know where to start figuring out what is even going on there.

 

I have the Thunderbolt bios setting enabled, no SD card rider in my machine (that I can see).

 

It's a real shame, 'cos it's a pretty good piece of kit (loose enter key, loose trackpoint left button, bit shoddy on the QC lenovo!)


Did you forget to 'update-grub' after altering the /etc/default/grub? Did you add /boot/acpi_override in /boot/grub/grub.cfg after using 'update-grub'?

This was what I messed up the first time, maybe it helps ;P

Highlighted
igtheflig
Fanfold Paper
Posts: 14
Registered: ‎04-09-2018
Location: GB
Views: 1,503
Message 210 of 306

Re: X1 Carbon Gen 6 cannot enter deep sleep (S3 state aka Suspend-to-RAM) on Linux

Thanks for the reply, I did update-grub, and I checked manually that the /boot/grub/grub/cfg did indeed contain the /boot/acpi_override text. 

 

I'm skeptical though, because on my first attempt I typo'd override as overide and the machine booted without complaint. I guess that despite editting both the template, and checking /boot/grub/grub/cfg, that config is maybe not being used? Is there a way to tell?

Check out current deals!


Shop current deals

Top Kudoed Authors