You are not logged in.

#76 2018-04-11 20:14:21

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

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

Have you re-generated your GRUB config file since changing /etc/default/grub? You can verify by calling

sudo cat /boot/grub/grub.cfg | grep deep

and looking whether mem_deep_sleep is shown. Or if the currently booted kernel has the option set via

$ cat /proc/cmdline

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

Offline

#77 2018-04-11 21:25:09

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

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

esonn wrote:

Have you re-generated your GRUB config file since changing /etc/default/grub? You can verify by calling

sudo cat /boot/grub/grub.cfg | grep deep

and looking whether mem_deep_sleep is shown. Or if the currently booted kernel has the option set via

$ cat /proc/cmdline

Yep, regenerating it has fixed it.
Thank you!

Offline

#78 2018-04-27 14:18:04

axboe
Member
Registered: 2018-04-12
Posts: 3

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

For what it's worth, BIOS 1.15 still doesn't show S3 out of the box. I updated yesterday and used the below patch to get it to work.

https://pastebin.com/VDBTJDmP

Offline

#79 2018-04-28 01:02:24

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

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

axboe wrote:

For what it's worth, BIOS 1.15 still doesn't show S3 out of the box. I updated yesterday and used the below patch to get it to work.

https://pastebin.com/VDBTJDmP


What are you patching and how is applied?

Offline

#80 2018-04-28 01:05:36

axboe
Member
Registered: 2018-04-12
Posts: 3

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

h54 wrote:
axboe wrote:

For what it's worth, BIOS 1.15 still doesn't show S3 out of the box. I updated yesterday and used the below patch to get it to work.

https://pastebin.com/VDBTJDmP


What are you patching and how is applied?

It's referenced earlier in this thread, basically the decompiled ACPI tables. See: https://delta-xi.net/#056

Offline

#81 2018-04-29 19:24:16

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

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

I successfully applied the original X1C6_S3_DSDT.patch and manually removed the two "One" lines to make S3 work with the 1.15 BIOS.

Offline

#82 2018-05-01 07:39:37

mrfaber
Member
Registered: 2016-08-09
Posts: 9

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

For me, even in S3 deep sleep with patched DSDT tables, BIOS 1.15 there's about 0.6W 0.3W power usage during sleep.
(Edit: Measured again on a longer time horizon, now getting around 0.3W which is considerably better but still not optimal)

I've disabled the fingerprint reader, SD-card-reader and the USB always-on charge ports in BIOS.
Do you get the same Watt draw?

This is how I've measured:

Log current energy with service files on suspend and resume, needs upower

#/etc/systemd/system/log-energy-suspend.service
[Unit]
Description=Log energy level on suspend
Before=suspend.target

[Service]
Type=simple
# Need to refresh UPower state since by default it only measures every 120 seconds or so
ExecStartPre=/usr/bin/dbus-send --system --dest=org.freedesktop.UPower --type=method_call /org/freedesktop/UPower/devices/battery_BAT0 org.freedesktop.UPower.Device.Refresh
ExecStart=/bin/bash -c 'upower -i $(upower -e | grep BAT0) | grep "energy:" | awk \'{print $(NF-1)}\''

[Install]
WantedBy=suspend.target
#/etc/systemd/system/log-energy-resume.service
[Unit]
Description=Log energy level on resume
After=suspend.target

[Service]
Type=simple
ExecStartPre=/usr/bin/dbus-send --system --dest=org.freedesktop.UPower --type=method_call /org/freedesktop/UPower/devices/battery_BAT0 org.freedesktop.UPower.Device.Refresh
ExecStart=/bin/bash -c 'upower -i $(upower -e | grep BAT0) | grep "energy:" | awk \'{print $(NF-1)}\''

[Install]
WantedBy=suspend.target

Install into /etc/systemd/system and then run

systemctl daemon-reload
systemclt enable log-energy-{suspend,resume}.service

Suspend, wait a bit, then evaluate energy usage with this script:

suspend_msg=$(journalctl --no-pager -o short-unix -u log-energy-suspend.service | tail -n 1)
resume_msg=$(journalctl --no-pager -o short-unix -u log-energy-resume.service | tail -n 1)
suspend_ts=$(echo $suspend_msg | awk '{print $1}')
resume_ts=$(echo $resume_msg | awk '{print $1}')
suspend_energy=$(echo $suspend_msg | awk '{print $NF}')
resume_energy=$(echo $resume_msg | awk '{print $NF}')
if [ $LC_NUMERIC == "de_DE.UTF-8" ]
then
    # Fix decibel separator
    # In some locales the decibel separator is a comma instead of a dot
    # E.g energy is given in 30,4 Wh instead of 30.4 Wh
    suspend_energy=$(echo $suspend_energy | sed 's/,/\./')
    resume_energy=$(echo $resume_energy | sed 's/,/\./')
fi
energy_used=$(echo "scale=5; "$suspend_energy" - "$resume_energy | bc) # in Wh
time_in_suspend=$(echo "scale=5; "$resume_ts" - "$suspend_ts | bc) # in seconds
echo Used $energy_used Wh
echo Slept for $time_in_suspend seconds
time_in_suspend_hours=$(echo "scale=8; "$time_in_suspend" / 3600" | bc)
rate_during_suspend=$(echo "scale=10; "$energy_used" / "$time_in_suspend_hours | bc)
echo Rate during suspend: $rate_during_suspend W

(One could also use bare sysfs variables instead of upower like this:

ExecStart=/bin/bash -c "echo $(cat /sys/class/power_supply/BAT0/energy_now)"

But not every laptop supplies energy_now in sysfs. Some only report charge_now,
which theoretically could be combined with voltage_min_design to get energy_now
But anyway, upower is probably more accurate.)

Last edited by mrfaber (2018-05-02 03:40:16)

Offline

#83 2018-05-24 10:12:37

bookymonster
Member
Registered: 2018-05-24
Posts: 2

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

The link in the pinned message is broken, i.e. the fix that has worked for me in the past but now I've updated versions so I need to redo.

http://delta-xi.net/#056

Does anybody have a non broken link?

Offline

#84 2018-05-24 10:55:32

progandy
Member
Registered: 2012-05-17
Posts: 2,885

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

Change the link to with https, then it should work
https://delta-xi.net/#056


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#85 2018-05-24 11:25:29

bookymonster
Member
Registered: 2018-05-24
Posts: 2

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

thanks!

Offline

#86 2018-06-10 05:59:53

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

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

Looks like another BIOS version (1.22).  Anyone try it?  I plan to in the morning.

Offline

#87 2018-06-10 16:54:45

axboe
Member
Registered: 2018-04-12
Posts: 3

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

h54 wrote:

Looks like another BIOS version (1.22).  Anyone try it?  I plan to in the morning.

Installed it the other day - no change in ACPI tables, still needs the same procedure to enable S3. Works fine for me after that.

Offline

#88 2018-06-11 18:48:28

sixbay
Member
Registered: 2018-06-11
Posts: 1

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

UPDATE: (tl; dr: no issue to be resolved; ignore post unless you want to be glad you're not 'that guy')

After substantial googling, it seemed that the troubleshooting order of operations is: 1) connect to an external display to rule out graphics card issues; 2) disconnect the main battery, wait, then reconnect and power on; 3) disconnect the CMOS battery, wait, then reconnect and power on.

I tried each of these steps, but they did not fix the issue. I took the laptop into a repair shop for a second opinion. They repeated the same steps, which still did not fix the issue. The consensus is that the motherboard is toasted.

I have initiated the repair process through Lenovo, so we'll see how that goes. However, if anyone has insight as to why this might have happened, I'd like to hear it. I'm curious why such a seemingly benign change to the BIOS settings ("seemingly", to someone of my experience level) would have such decidedly not-benign consequences.

###########

New user here, so please bear with me. I'm also stuck using a phone browser for reasons that I will describe shortly.

I decided not to make a new topic since my issue is directly related to the deep sleep patch, but I am happy to start one if you all think it's appropriate. I've searched the forum for topics that appear to be related, but have found none (or maybe I'm not using the right keywords).

For context, I am using an X1 Yoga Gen 3 and my last `pacman -Syu` was early last week.

I read https://wiki.archlinux.org/index.php/Le … on_(Gen_6) and followed that article to this forum topic, which I then followed to https://delta-xi.net/#056 . In that last link it was stated that the patch process had been confirmed for the X1 Yoga G3. That being the case, I decided to follow the guide.

I executed the first step (boot into UEFI/BIOS, set Thunderbolt BIOS assist mode 'enabled'; set Secure boot 'disabled'). I saved and exited. The screen stayed black for ~3 minutes, at which point I tried Ctrl + Alt + F#s to see if I could make anything at all happen, but no luck. After another couple minutes, I unforgivingly powered down the machine. On reboot, the power comes on (the keyboard  illuminates briefly, and the 'Esc' and 'F1' LEDs  come on), but I cannot access the BIOS. I receive no prompts to the screen -- it stays black (but the backlight comes on).

So I've done something extremely stupid, and I could really use your collective help to fix it.

I really do appreciate your patience and assistance. Going to chalk this one up as a learning experience...

Last edited by sixbay (2018-06-11 23:51:05)

Offline

#89 2018-06-12 16:58:24

clews
Member
Registered: 2018-06-12
Posts: 1

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

sixbay wrote:

I executed the first step (boot into UEFI/BIOS, set Thunderbolt BIOS assist mode 'enabled'; set Secure boot 'disabled'). I saved and exited. The screen stayed black for ~3 minutes, at which point I tried Ctrl + Alt + F#s to see if I could make anything at all happen, but no luck. After another couple minutes, I unforgivingly powered down the machine. On reboot, the power comes on (the keyboard  illuminates briefly, and the 'Esc' and 'F1' LEDs  come on), but I cannot access the BIOS. I receive no prompts to the screen -- it stays black (but the backlight comes on).

So I've done something extremely stupid, and I could really use your collective help to fix it.

I really do appreciate your patience and assistance. Going to chalk this one up as a learning experience...

I had quite the same problem (screen-light turn on, keyboard responsive but nothing else. As far as I remember the change of TB setting worked for me, so perhaps it is not directly related). Don't think that you did something stupid, or at least you're not alone ;-)... Seems to be a problem with this new machine...

With on-site guarantee, Lenovo came by two times, changed twice the mainboard. The first try brought back the BIOS but the machine was unable to boot anything (Stick, NVMe). The technician supposed that the new MB is the problem. I proposed to the second technician that came a few days later to leave out all components and try to start up this way. It turned out, that the WWAN-Card (Fibocom L850-GL) prevented the boot process... For now, I have a new MB and a working X1Y3 without the WWAN card (not a problem, as it does not work with linux for now)... Not completely satisfied with this rather expensive product... New WWAN-Card is announced for mid-july... We'll see how things will go on...

Last edited by clews (2018-06-12 16:59:46)

Offline

Board footer

Powered by FluxBB