S3 sleep / suspend to ram on Ubuntu 18.04
#1
Hey,
It seems to me that the Pinebook Pro does only enter into S1 suspend when closing the lid or pressing the power button. At least the output of journalctl | grep "PM: suspend" | tail doesn't indicate any form of deep suspend and my battery drain is around 3% / h which seems quite high.
Does anyone know how to change this behavior? I would prefer a deeper suspend, even for the price of a longer wake-up time.
Ideally I would like to set the suspend mode to s3 which is suspend to ram (meaning mostly anything exept for the ram self refresh is turned off).

Thanks in advance!
#2
Um... unless I'm completely missing some recent change... ARM processors such as the RK3399 don't have ACPI sleep states such as S1 and S3!

3% / h does sound like something isn't being powered down. ARM processors are pretty good at going into a real low power sleep... i.e. my 11" Pinebook (1st gen, not the Pro) with the A64 cpu can be left in sleep mode for weeks, not the day and a half, that it seems your PBP would be in.

Out of curiosity (since I don't have a PBP yet, so this may not even work), does

Code:
echo mem > /sys/power/state

put it into sleep mode? Maybe it's not going to sleep properly?
#3
I was having problems with mine not sleeping properly overnight too. In my case it turned out that I was plugging/unplugging the machine after it'd gone to sleep which wakes it up.

It seems like it's not widely known that plugging/unplugging power will bring the machine out of sleep mode, and it's really easy to not notice this if the lid is already closed.

I'm not sure how long the machine stays awake before going back to sleep but the first night I had mine I put it to sleep then unplugged it and it was almost dead in the morning.
#4
Oh, I didn't realize that ARM worked differently in this regard as well!
Could the high stand-by consumption been related to mounting a sd-card as /home?
Maybe it prevents a complete shut down?
Where could I find a log to check something like that?

also it is not related to having the pbp plugged in or not since it happend while putting it to sleep on battery and (obviously, I guess) I didn't plug it in while it was sleeping.

echoing mem to power state seems not to be allowed to sudo or normal users
#5
Ok, here I am again:

echoing mem to power state does work while logged in as root and only then.
It suspends the pinebook pro but doesn't require a password when waking it up
it seems to me that it doesn't change battery consumption when compared to closing the lid.

Does anybody know how I can find out what keeps my pbp from suspending correctly?
#6
I've got the same problem:

After I closed the lid the laptop gets hot with dramatically increasing of power consumption.

Code:
sudo journalctl | grep "PM: suspend"
Jan 17 00:06:00 pinebookpro kernel: PM: suspend entry (s2idle)
Jan 17 00:06:16 pinebookpro kernel: PM: suspend devices took 1.050 seconds
Jan 17 00:06:16 pinebookpro kernel: PM: suspend exit

Code:
[Fri Jan 17 00:05:59 2020] PM: suspend entry (s2idle)
[Fri Jan 17 00:05:59 2020] Filesystems sync: 0.007 seconds
[Fri Jan 17 00:05:59 2020] dwmmc_rockchip fe310000.dwmmc: pre_suspend failed for non-removable host: -38
[Fri Jan 17 00:05:59 2020] Freezing user space processes ... (elapsed 0.025 seconds) done.
[Fri Jan 17 00:05:59 2020] OOM killer disabled.
[Fri Jan 17 00:05:59 2020] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[Fri Jan 17 00:05:59 2020] printk: Suspending console(s) (use no_console_suspend to debug)
[Fri Jan 17 00:06:00 2020] PM: suspend devices took 1.050 seconds
[Fri Jan 17 00:06:15 2020] usb usb5: root hub lost power or was reset
[Fri Jan 17 00:06:15 2020] usb usb6: root hub lost power or was reset
[Fri Jan 17 00:06:15 2020] usb usb7: root hub lost power or was reset
[Fri Jan 17 00:06:15 2020] usb usb8: root hub lost power or was reset
[Fri Jan 17 00:06:15 2020] PM: resume devices took 0.420 seconds
[Fri Jan 17 00:06:15 2020] OOM killer enabled.
[Fri Jan 17 00:06:15 2020] Restarting tasks ... done.
[Fri Jan 17 00:06:15 2020] PM: suspend exit
[Fri Jan 17 00:06:15 2020] vcc_sdio: unsupportable voltage range: 3300000-3000000uV
[Fri Jan 17 00:06:15 2020] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[Fri Jan 17 00:06:15 2020] mmc_host mmc1: Bus speed (slot 0) = 148500000Hz (slot req 150000000Hz, actual 148500000HZ div = 0)
[Fri Jan 17 00:06:16 2020] dwmmc_rockchip fe320000.dwmmc: Successfully tuned phase to 94
[Fri Jan 17 00:06:26 2020] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Debian Testing form the Unofficial Installer
#7
Which kernel does bullseye run, using that installer?
#8
ACPI is not x86 only, ARM can perfectly have it, and linux could implement it (since it's the OS responsibility), but, it looks like it didn't. I mean even without ACPI tables that obviously are not present yet in rockchip's BSPs, it would be doable to implement ACPI Suspend To RAM and Hibernate sleep states - with the help of uboot, whose devs again probably deemed this functionality "gay".
I suspect, that the state PBP is put into, when the lid is closed is S none, meaning it's not a sleep state at all, since by the definition in all the S states, processor doesn't run. that means it should be waken up. without the firmware, understaning it's STR (meaning no SDRAM init needed and the different path of the initialization, handoff to the OS etc are needed)  the normal sleep states aren't possible then. only some lame hacks, varying from machine to machine instead. supporting this unmanageable mess of millions ways of doing the same thing is hard, so here the situation. when a suppossed to be sleep is frying your laptop. this is the price of neglecting and dismissive attitude towards ACPI from "some" circles. it's basically about "freedom". of ACPI. and as a result of the sleep states and battery charge. Smile
#9
(01-16-2020, 05:17 PM)tophneal Wrote: Which kernel does bullseye run, using that installer?

Code:
uname -a
Linux pinebookpro 5.4.2-2-pinebookpro-arm64 #1 SMP PREEMPT Sat Jan 11 03:28:31 UTC 2020 aarch64 GNU/Linux
PBP ISO / Debian Bullseye (unofficial installer)
#10
(01-17-2020, 03:18 AM)wasgurd Wrote:
(01-16-2020, 05:17 PM)tophneal Wrote: Which kernel does bullseye run, using that installer?

Code:
uname -a
Linux pinebookpro 5.4.2-2-pinebookpro-arm64 #1 SMP PREEMPT Sat Jan 11 03:28:31 UTC 2020 aarch64 GNU/Linux

Anything running Debian Bullseye is, assuming you used my installer and didn't change it afterwards, configured to do something called suspend-to-idle.

It means that when the laptop is asked to suspend to memory the kernel will prevent any tasks from being scheduled and close down most of the device drivers. Then it just waits... in other words is relies on normal kernel power management (cpufreq, cpuidle, etc) to minimise standby power. In principle by eliminating wakeups then we ensure that cpuidle can descend to it's deepest sleep state.

There are some power savings in this state (for example all the radios will get turned off) but they are pretty modest. I compared an s2idle system against a system doing nothing with the backlight turned off... s2idle ended up saving about a watt. So, not completely useless, but if I am going away for more than an hour I generally do a real power off instead.

It is configured this way because I wasn't able to get the system to turn back on after going into a deeper suspend state. There are some power savings but more importantly the laptop shouldn't hang when you close the lid: most desktop environments are configured to automatically suspend on lid-close and adopting s2idle means we don't have to hack each one separately to avoid the suspend.
PineTime: wasp-os and MicroPython, Pinebook Pro:  Debian Bullseye


Possibly Related Threads…
Thread Author Replies Views Last Post
  Resume from suspend not working after flashing Tow-Boot to SPI xp19375 3 268 10-31-2022, 10:14 AM
Last Post: wdt
  PineBook Pro seems to go to deep sleep, but doesn't wake up pogo 1 520 08-10-2022, 08:27 AM
Last Post: wdt
  How to make manjaro sleep or hibernate? KDE? regretfulpineuser 0 443 06-20-2022, 12:56 AM
Last Post: regretfulpineuser
  Working suspend on Manjaro brzegorz 3 3,070 12-03-2021, 01:39 PM
Last Post: rik-shaw
  reset sound after suspend to memory (deep sleep) Der Geist der Maschine 16 11,480 10-18-2021, 07:31 PM
Last Post: Syonyk
Question Help: Pinebook Pro will not enter sleep [Manjaro 20.04] EverythingIsInput 49 49,157 05-07-2021, 06:21 AM
Last Post: line72
  After update in Ubuntu bionic mate system crashed Wawe 2 2,195 04-18-2021, 04:52 AM
Last Post: Wawe
  Anyone can get deep sleep fully works with NVME rootfs? plumlis 0 1,530 01-11-2021, 09:58 AM
Last Post: plumlis
  Ubuntu Installation on PBP narinderpal10 5 4,079 12-18-2020, 12:22 PM
Last Post: narinderpal10
  Ubuntu MATE 18.04 Can't boot after update hankg 2 2,301 12-15-2020, 01:53 AM
Last Post: BryanF

Forum Jump:


Users browsing this thread: 1 Guest(s)