cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
spinachbb
Fanfold Paper
Posts: 7
Registered: ‎04-12-2018
Location: US
Views: 6,026
Message 101 of 306

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

The DSDT patch is loaded at GRUB boot time. You should not need to apply the DSDT patch after a BIOS update.

But, you do need to apply the patch after a kernel update. There is more information on page 9 of the thread
Roman79
Punch Card
Posts: 71
Registered: ‎07-28-2017
Location: DE
Views: 5,803
Message 102 of 306

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

Iam using Windows on my X1 Yoga 3rd and i have to say that the "modern standby" is almost useless. After Entering that mode i feel that my Yoga stays warm and battery drain is really heavy. I see no advantage for S0i3 compared to S3. S3 is working perfect over years. So why changing this and add support for S0i3 if this mode is not better than S3? 

 

At the moment iam really disappointed, because after a day in sleep my battery went to 30%. Just give us S3 support and all users will be happy. (Linux and Windows) Sometimes its better to stay on "old" features, and not forcing new things with no advantages only because they are "new"! Smiley Wink

d10r
Paper Tape
Posts: 4
Registered: ‎05-02-2018
Location: AT
Views: 5,464
Message 103 of 306

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

I bought a X1Y3 a few days ago, running Ubuntu 18.04.

Have tried acpi.ec_no_wakeup=1, but that doesn't result in acceptable standby time (it can be sensed from the temperature of the bottom that there's too much power drain). That's after disabling the card reader in BIOS. But as others have mentioned, on the Yoga other devices (which can't be disabled) seem to drain the battery too.

 

I'm not sure if I'm gonna apply the DSDT patch or return the device (about 10 days left to do so).

If it were about a one-time setting (like that needed to have the touchpad working after wakeup), it would be ok.

But I'm not willed to accept a workaround which requires me to care about it again after every kernel update.

 

Expected Linux compatibility was my main reason for choosing a Thinkpad (and also recommending it to others).

I've actually not even considered other brands because I wanted to save myself the time to figure out which models are how compatible / require which workarounds. If Lenovo doesn't value that, I'll stop doing so too.

 

In the case at hand, it would suffice for Lenovo Support to announce (in this thread) they're gonna release a BIOS update which fixes the issue.

Guoxiang
Punch Card
Posts: 9
Registered: ‎05-03-2018
Location: US
Views: 5,288
Message 104 of 306

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

I had the same problem when I first get my X1C. Two steps are not enough to get the problem solved. Additionally, enabling TB3 assist mode finally brings down the power consumption. For others doesn't come across the whole thread. Here are the steps if you don't want to apply a custom BIOS.

 

Prerequisites: You need a new Linux kernel (>4.13? I am using Ubuntu 18.04 (4.15) ) 

 

1. add the kernel parameter

acpi.ec_no_wakeup=1

(how to if you are using Ubuntu https://wiki.ubuntu.com/Kernel/KernelBootParameters)

2. disable SD card reader

3. Enable TB3 assist mode

 

More details can be found here https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)

 

Ubuntu can sleep at very low power consumption. Very rare cases, when I press the power button to resume, it boots from scratch. I am not sure when the OS crashed, either I don't know if this is a Linux-Ubuntu bug. But anyway, I am happy with my X1C. Though an official support from BIOS would be much better.

d10r
Paper Tape
Posts: 4
Registered: ‎05-02-2018
Location: AT
Views: 5,284
Message 105 of 306

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

After deciding that I'm gonna keep the device, I also gave the DSDT patch a try.

 

Following the instructions, at step 7 (recompile) I get errors:

 

$ iasl -ve -tc dsdt.dsl

Intel ACPI Component Architecture
ASL+ Optimizing Compiler/Disassembler version 20180105
Copyright (c) 2000 - 2018 Intel Corporation

dsdt.dsl  19049:     Method (TBTD, 1, Serialized)
Error    6074 -                ^ Name already exists in scope (TBTD)

    Original name creation/declaration below:
    dsdt.dsl    199:     External (TBTD, MethodObj)    // 1 Arguments

dsdt.dsl  19117:     Method (TBTF, 1, Serialized)
Error    6074 -                ^ Name already exists in scope (TBTF)

    Original name creation/declaration below:
    dsdt.dsl    200:     External (TBTF, MethodObj)    // 1 Arguments

dsdt.dsl  27854:         STDV,   8,
Error    6074 -            ^ Name already exists in scope (STDV)

    Original name creation/declaration below:
    dsdt.dsl    198:     External (STDV, IntObj)

ASL Input:     dsdt.dsl - 35084 lines, 1098050 bytes, 15467 keywords
Hex Dump:      dsdt.hex - 1369008 bytes

Compilation complete. 3 Errors, 350 Warnings, 124 Remarks, 6354 Optimizations, 51 Constants Folde

However compilation also fails for the original, unpatched dsl file:

$ iasl -ve -tc dsdt.orig.dsl 

Intel ACPI Component Architecture
ASL+ Optimizing Compiler/Disassembler version 20180105
Copyright (c) 2000 - 2018 Intel Corporation

Compiler aborting due to parser-detected syntax error(s)
dsdt.orig.dsl    264:     Name (SS4, One)
Error    6126 -             ^ syntax error, unexpected PARSEOP_NAME

ASL Input:     dsdt.orig.dsl - 35136 lines, 1100295 bytes, 15466 keywords
Hex Dump:      dsdt.orig.hex - 235 bytes

Compilation complete. 1 Errors, 0 Warnings, 0 Remarks, 0 Optimizations

This is on a X1 Yoga, running Ubuntu 18.04, iasl 20180105.

 

If anybody runs into a similar issue and finds a solution, please report.

 

PS: Again @Lenovo this is something you should take care about with a BIOS update

rh78
Punch Card
Posts: 27
Registered: ‎03-24-2018
Location: US
Views: 5,184
Message 106 of 306

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

So it appears that the only X1Y3 patch is here (you used it I believe) and is for bios version 1.10 and I believe it needs to be updated for 1.12 (or whatever bios you are on).   I'd like to use S3 patched sleep but until the bios upgrades stop coming fast and furious, I'm using hibernate, which works fine.   

d10r
Paper Tape
Posts: 4
Registered: ‎05-02-2018
Location: AT
Views: 5,151
Message 107 of 306

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

Yes, I used that patch.
I am on BIOS 1.10, that shouldn't be the problem.

Hibernate doesn't work for me. `pm-hibernate` just briefly turns off the screen. That's in kernel log:

...
[24036.572895] PM: Image saving progress:  30%
[24037.049246] PM: Image saving progress:  40%
[24037.337624] PM: Wrote 6498668 kbytes in 2.24 seconds (2901.19 MB/s)
[24037.474773] PM: Basic memory bitmaps freed
[24037.474776] OOM killer enabled.
[24037.474776] Restarting tasks ... done.
[24037.539864] PM: hibernation exit

I guess it fails because my swap partition is only 1 GB (for some reason the Ubuntu installer picked that as default), while as far as I understand it would need to be 16 GB+. I'll try to resize. Is there any other settings required for hibernate to work?

rh78
Punch Card
Posts: 27
Registered: ‎03-24-2018
Location: US
Views: 5,098
Message 108 of 306

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

Yeah you need a swap partition at least as big as memory size.  Here are my notes on making it work after you have the swap setup (for fedora).

 

This script modifies grub entries to allow hibernation, points the kernel to the correct swap device, and regenerates grub efi settings:

#!/bin/bash
# Enable hibernation
# Using info from:
# https://psohny.wordpress.com/2015/08/13/fedora_hiber/

# Enable recovery in the /etc/default/grub
sed -i -e 's|^\(GRUB_DISABLE_RECOVERY="\)true"|\1false"|' /etc/default/grub

#Find the swapdevice
SWAPDEVICE=`grep -e '^[^#].*swap' /etc/fstab | head -n 1 | cut -d ' ' -f 1`
echo "Using SWAPDEVICE=${SWAPDEVICE} for hibernation"

#add "resume=swapdevice" to the GRUB_CMDLINE_LINUX=
sed -i -e "s|^\(GRUB_CMDLINE_LINUX=\".*\)\"|\1 resume=${SWAPDEVICE}\"|" /etc/default/grub

#Regenerate the grub config
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

after doing this, the relevant part of my /etc/default/grub looks like this:

GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb quiet resume=/dev/mapper/fedora-swap"
GRUB_DISABLE_RECOVERY="false"

2. Make sure hibernate is the default lid switch method.  In /etc/systemd/logind.conf, add this to the end of the [Login] section (it may already be a commented out entry in the file, in which case you can just uncomment it):

HandleLidSwitch=hibernate

You'll need to restart.  Once it all works, it takes approximately 10-15 seconds to exit hibernation after opening the lid.  Also there are no keyboard backlight flickering problems either . It is very solid. 

doubleapple
Fanfold Paper
Posts: 2
Registered: ‎05-06-2018
Location: US
Views: 4,759
Message 109 of 306

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

Need help with step 5 of https://delta-xi.net/#056. I have the dsdt rejected file, however there is an abnormally large amount of lines in the file. At least 30 lines with the (-) symbol, which I think needs to be removed in the .dsl file. Normally there is only 2 lines with the (-) symbol right? The 2 "One" lines, which needs to be removed in the .dsl file. What should I do? Is there any fix to this?

Highlighted
ateijelo
Fanfold Paper
Posts: 8
Registered: ‎05-09-2018
Location: CA
Views: 4,151
Message 110 of 306

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

To avoid having to modify grub.cfg after every kernel upgrade when using the DSDT patch, use this initramfs-tools hook:

 

#!/bin/sh

. /usr/share/initramfs-tools/hook-functions
prepend_earlyinitramfs /boot/acpi_override

Save that as /etc/initramfs-tools/hooks/acpi_override.sh and give it exec permissions. Any time an initramfs is generated (e.g. when installing new kernels), this hook will prepend the acpi_override.

Check out current deals!


Shop current deals

Top Kudoed Authors