03-07-2018 04:48 AM
03-07-2018 05:15 AM
Esonn: Thanks for pointing that out, totally missed the position of the brackets.
I fixed that up and manually suspended, dmesg output:
[ 278.839334] PM: suspend entry (deep)
[ 278.839335] PM: Syncing filesystems ... done.
[ 278.862253] Freezing user space processes ... (elapsed 0.003 seconds) done.
[ 278.866080] OOM killer disabled.
[ 278.866082] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 278.867923] Suspending console(s) (use no_console_suspend to debug)
[ 279.234822] e1000e: EEE TX LPI TIMER: 00000011
[ 279.380827] PM: suspend devices took 0.513 seconds
[ 279.433189] ACPI: Preparing to enter system sleep state S3
[ 279.507149] ACPI: EC: event blocked
[ 279.507150] ACPI: EC: EC stopped
[ 279.507151] PM: Saving platform NVS memory
[ 279.507164] Disabling non-boot CPUs ...
[ 279.516086] smpboot: CPU 1 is now offline
[ 279.529932] smpboot: CPU 2 is now offline
[ 279.543836] smpboot: CPU 3 is now offline
[ 279.560832] smpboot: CPU 4 is now offline
[ 279.571706] smpboot: CPU 5 is now offline
[ 279.583670] smpboot: CPU 6 is now offline
[ 279.593606] smpboot: CPU 7 is now offline
[ 279.597406] ACPI: Low-level resume complete
[ 279.597527] ACPI: EC: EC started
[ 279.597527] PM: Restoring platform NVS memory
[ 279.601066] Enabling non-boot CPUs ...
[ 279.601105] x86: Booting SMP configuration:
[ 279.601106] smpboot: Booting Node 0 Processor 1 APIC 0x2
[ 279.607213] cache: parent cpu1 should not be sleeping
[ 279.607326] CPU1 is up
[ 279.607349] smpboot: Booting Node 0 Processor 2 APIC 0x4
[ 279.608081] cache: parent cpu2 should not be sleeping
[ 279.608203] CPU2 is up
[ 279.608223] smpboot: Booting Node 0 Processor 3 APIC 0x6
[ 279.608977] cache: parent cpu3 should not be sleeping
[ 279.609110] CPU3 is up
[ 279.609130] smpboot: Booting Node 0 Processor 4 APIC 0x1
[ 279.609995] cache: parent cpu4 should not be sleeping
[ 279.610142] CPU4 is up
[ 279.610165] smpboot: Booting Node 0 Processor 5 APIC 0x3
[ 279.610920] cache: parent cpu5 should not be sleeping
[ 279.611067] CPU5 is up
[ 279.611088] smpboot: Booting Node 0 Processor 6 APIC 0x5
[ 279.611825] cache: parent cpu6 should not be sleeping
[ 279.611988] CPU6 is up
[ 279.612008] smpboot: Booting Node 0 Processor 7 APIC 0x7
[ 279.612750] cache: parent cpu7 should not be sleeping
[ 279.612928] CPU7 is up
[ 279.619322] ACPI: Waking up from system sleep state S3
[ 279.756061] thinkpad_acpi: unknown possible thermal alarm or keyboard event received
[ 279.756064] thinkpad_acpi: unhandled HKEY event 0x6032
[ 279.756066] thinkpad_acpi: please report the conditions when this event happened to firstname.lastname@example.org
[ 279.836116] ACPI: EC: event unblocked
[ 279.838572] thinkpad_acpi: unknown possible thermal alarm or keyboard event received
[ 279.838575] thinkpad_acpi: unhandled HKEY event 0x60b0
[ 279.838576] thinkpad_acpi: please report the conditions when this event happened to email@example.com
[ 279.844433] usb 2-3: Disable of device-initiated U1 failed.
[ 279.847937] usb 2-3: Disable of device-initiated U2 failed.
[ 279.851489] usb 2-3: usb_reset_and_verify_device Failed to disable LTM
[ 280.051258] nvme nvme0: Shutdown timeout set to 8 seconds
[ 280.065867] usb 1-7: reset full-speed USB device number 2 using xhci_hcd
[ 280.305913] usb 1-9: reset full-speed USB device number 4 using xhci_hcd
[ 280.545545] usb 1-8: reset high-speed USB device number 3 using xhci_hcd
[ 280.592045] psmouse serio1: synaptics: queried max coordinates: x [..5676], y [..4760]
[ 280.627249] psmouse serio1: synaptics: queried min coordinates: x [1266..], y [1094..]
[ 280.705256] usb 1-7:1.0: rebind failed: -517
[ 280.705268] usb 1-7:1.1: rebind failed: -517
[ 280.705609] PM: resume devices took 0.870 seconds
[ 280.706126] OOM killer enabled.
[ 280.706128] Restarting tasks ...
[ 280.706711] Bluetooth: hci0: Bootloader revision 0.0 build 26 week 38 2015
[ 280.707795] Bluetooth: hci0: Device revision is 16
[ 280.707798] Bluetooth: hci0: Secure boot is enabled
[ 280.707801] Bluetooth: hci0: OTP lock is enabled
[ 280.707803] Bluetooth: hci0: API lock is enabled
[ 280.707805] Bluetooth: hci0: Debug lock is disabled
[ 280.707809] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[ 280.708432] Bluetooth: hci0: Found device firmware: intel/ibt-12-16.sfi
[ 280.713945] done.
[ 280.718237] thermal thermal_zone6: failed to read out thermal zone (-61)
[ 280.722202] [drm] RC6 on
[ 280.737294] PM: suspend exit
Should I be concerned about these lines?
[ 279.607213] cache: parent cpu1 should not be sleeping [ 279.607326] CPU1 is up
03-07-2018 05:34 AM
@JeremyS[ 279.607213] cache: parent cpu1 should not be sleeping [ 279.607326] CPU1 is up
Should I be concerned about these lines?
I don't think so, they show up in my log too. Try to measure energy consumption with deep sleep now. If it does not work, I'm a bit out of ideas. All people I know who successfully have a working deep sleep by now use Arch; however, if it is indeed an issue with Fedora, there must be an explanation why it doesn't work as intended, and probably a solution. I'm afread I can't install Fedora in parallel to try that out.
I compared my dmesg output to yours. It's mostly identical, however I don't have lines reading "PM: suspend devices took..." and "PM: resume devices took" - doesn't seem to relevant for me though.
03-07-2018 09:40 AM
Deep sleep is now working for me!
Unfortunately, I'm not sure what changed. The only thing I can think of is that regenerating the grub config while setting up hibernate somehow did the trick. I manually added /acpi_override to the newly generated grub config at /boot/efi/EFI/fedora/grub.cfg, rebooted, and now it works.
Just slept for 9 hours and woke up with 98.2% charge, with an average draw while sleeping of .11 watts.
Esonn: Thanks again for all of your help. Very much appreciated.
JeremyS: If there's any info I can give to help you sort it out, let me know.
03-07-2018 08:10 PM - edited 03-07-2018 08:21 PM
Woo hoo, mine is working now too. Looks like it was just because s2idle was being used. I did a sleep test overnight and it was drained 1.64Wh over 8 hours (0.2W~).
walkie: One final question, how did you manage to get it to default to [deep] after restart? I though this would do it but it doesn't seem to be working:
$ cat /etc/default/grub GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora/root rd.luks.uuid=luks-c8d7890a-60ff-42a3-96b3-8886e094955e rd.lvm.lv=fedora/01 rhgb quiet resume=/dev/dm-2 mem_sleep_default=deep"
Edit: I got it to stick by editing the grub.cfg file directly:
linuxefi /vmlinuz-4.15.6-300.fc27.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.luks.uuid=luks-c8d7890a-60ff-42a3-96b3-8886e094955e rd.lvm.lv=fedora/01 rhgb quiet resume=/dev/dm-2 LANG=en_AU.UTF-8 mem_sleep_default=deep initrdefi /acpi_override /initramfs-4.15.6-300.fc27.x86_64.img
Still not sure why it doesn't work in GRUB_CMDLINE_LINUX? I regenerated the grub.cfg file after editing GRUB_CMDLINE_LINUX too.
In any case, thanks again for all the help!
03-08-2018 04:46 PM
I've been following this thread with interest, and finally took the plunge to make it happen.
I'm not on Arch or Fedora though, but Mint 18.3
The IASL in the apt-repository doesn't seem to build the output cleanly, so I grabbed/built the latest from Intel (2/20 iirc). That builds it cleanly without issues. I even made a little makefile to handle it as I have tried it a number of times.
Unfortunately, the arch initrd commands don't work for me, so I've tried to improvise using the 01_acpi entry in /etc/grub.d with my acpi_override and dsdt.aml in /boot. Running update-grub update sees the new DSDT, but after a restart it just sits and spins with the Lenovo splash screen showing, the keyboard flashing, then darkness.... The process then repeats until I boot off a USB drive from the splash screen and manually repair the grub config. I've tried with both the cpio file and the raw dsdt file pointed and there is no discernable difference. I can only assume I'm building my initrd incorrectly, but the right steps are eluding me.
Has anybody had success with the patched DSDT on debian/ubuntu/mint? If so, what was the secret sauce?
03-12-2018 11:01 AM - edited 03-12-2018 11:04 AM
JeremyS (and anyone following this thread with Ubuntu 18.04 like me)
I believe GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT are not read by grub unless it's actually written into grub.cfg file. On Ubuntu it will be the command update-grub and I'm guessing there are equivalents in Fedora. I was also having your problem that deep sleep does not become the default on boot. It turns out that mem_sleep_default=deep has to be written into grub.cfg.
Btw, update-grub will regenerate a new grub.cfg file, obviously if you had put /acpi_override in there before, then you will have to edit it again to include it.