Manjaro ARM 19.12 Official Release - PineBook Pro
(02-16-2020, 04:09 AM)geih Wrote: Hi all,

I'm running Manjaro (latest version, kernel 5.5.0-3.1) but S3 sleep was not working out of the box (used s2idle; dmesg was showing "PM: suspend entry (s2idle)").
Finally, I could get it running with the following steps:
  • adding "mem_sleep_default=deep" to the kernel command line (in /boot/boot.txt and then running mkscr); can be checked with:
Code:
[root@pinebookpro ~]# cat /sys/power/mem_sleep
 s2idle [deep]
  • changing the systemd-sleep settings in /etc/systemd/sleep.conf from "SuspendState=freeze" to "SuspendState=mem" (active after reboot or "systemctl daemon-reload")
Now, my system is using S3 sleep ("PM: suspend entry (deep)" in dmesg).

This is great, thank you for sharing!

Could you tell me where to add 'mem_sleep_default=deep' in boot.txt?

Code:
# After modifying, run ./mkscr

# MAC address (use spaces instead of colons)
setenv macaddr da 19 c8 7a 6d f4

part uuid ${devtype} ${devnum}:${bootpart} uuid
setenv bootargs console=ttyS2,1500000n8 root=PARTUUID=${uuid} rw rootwait bootsplash.bootfile=bootsplash-themes/manjaro/bootsplash append video=eDP-1:1920x1080@60
setenv fdtfile rockchip/rk3399-pinebook-pro.dtb

if load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /boot/Image; then
 if load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /boot/dtbs/${fdtfile}; then
   fdt addr ${fdt_addr_r}
   fdt resize
   fdt set /ethernet@fe300000 local-mac-address "[${macaddr}]"
   if load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} /boot/initramfs-linux.img; then
     # This upstream Uboot doesn't support compresses cpio initrd, use kernel option to
     # load initramfs
     setenv bootargs ${bootargs} initrd=${ramdisk_addr_r},20M ramdisk_size=10M
   fi;
   booti ${kernel_addr_r} - ${fdt_addr_r};
 fi;
fi
I'm guessing at the very end after the end of the if but I prefer to check with you before I messed up with my installation.
My sleep function wasn't working either, but noticed after the last one or two updates... And I forgot to shut down before closing the case.... It resumes just fine, has has since!
Dennis Hoshield
PBPro/ANSI/Manjaro
(02-16-2020, 09:37 AM)hectorzg Wrote: Could you tell me where to add 'mem_sleep_default=deep' in boot.txt?
I added it to the end of line 7, the one which begins with "setenv bootargs console=ttyS2..."
(02-16-2020, 04:09 AM)geih Wrote: ...
Finally, I could get it running with the following steps:
  • adding "mem_sleep_default=deep" to the kernel command line (in /boot/boot.txt and then running mkscr); can be checked with:
Code:
[root@pinebookpro ~]# cat /sys/power/mem_sleep
 s2idle [deep]
  • changing the systemd-sleep settings in /etc/systemd/sleep.conf from "SuspendState=freeze" to "SuspendState=mem" (active after  reboot or "systemctl daemon-reload")
Now, my system is using S3 sleep ("PM: suspend entry (deep)" in dmesg).

Thanks geih! I only did the second of your two items and that changed it for me so that barely any power is used during sleep, whereas before, it seemed like barely any was being saved.
@pine73
Hey your Inbox is disabled so I cant reply to you through your PM.
I hope you must have resolved the deep sleep issue by follow the above post.

The Measurement during our test was ~40mA in S3 so in 50hrs you should only have around 1-2% of power drain.
We had made some changes to the suspend config so for those you cannot get suspend in s3 deepsleep then please update the system with `sudo pacman -Syyuu`
Thanks.
iirc suspend config is via systemd in the pinebookpro-post-install repo/package.
(02-17-2020, 02:46 AM)spikerguy Wrote: @pine73
Hey your Inbox is disabled so I cant reply to you through your PM.
I hope you must have resolved the deep sleep issue by follow the above post.

The Measurement during our test was ~40mA in S3 so in 50hrs you should only have around 1-2% of power drain.
We had made some changes to the suspend config so for those you cannot get suspend in s3 deepsleep then please update the system with `sudo pacman -Syyuu`
Thanks.

@geih , Thank you for the info on adjusting the sleep settings.  Got that implemented -- testing now.

@spikerguy , Thank you for staying on top of this topic! Much appreciated (and I fixed my PM!).
Hello guys,

After following @geih directions I have S3 sleep working only when I type 'systemctl suspend', hit fn+Esc or even when I click start > leave > sleep but when I close the lid it does the previous sleeping function that consumes a lot of battery charge.

I've looked online and played with /etc/systemd/logind.conf and /etc/systemd/sleep.conf , even changing it from KDE's Energy saving settings hasn't fix this.

I also tried reinstalling 'community/pinebookpro-post-install 20200202-1' but it didn't help.

Edit: I found out that when I close the laptop it goes to suspend and the screen turns off but after a couple of seconds it wakes up and shows the lockscreen, so it stays on wasting the battery with the lid closed.

I'm not sure what is causing this.
I've been struggling for quite some time to fix the S3 sleep with no luck.

I did fresh install, updated the system, updated with "pacman -Syyuu", reflashed u-boot as suggested by pacman, made sure "/etc/systemd/sleep.conf" sleep is set to "mem" instead of "freeze", checked the "/sys/power/mem_sleep" if its set to deep sleep, ensured that the kernel image contains the latest updates (CONFIG_ROCKCHIP_SIP, CONFIG_ROCKCHIP_SUSPEND_MODE), but no, whenever I put the laptop to sleep, it never wakes up, even using "rtcwake" to wake-up after some time, it doesn't work.

The deep sleep state is totally busted for me, no matter what I try. Followed everything people here say it should be done, but nop, nothing works, except the freeze sleep state.
(02-17-2020, 07:28 PM)xNix Wrote: I've been struggling for quite some time to fix the S3 sleep with no luck.

I did fresh install, updated the system, updated with "pacman -Syyuu", reflashed u-boot as suggested by pacman, made sure "/etc/systemd/sleep.conf" sleep is set to "mem" instead of "freeze", checked the "/sys/power/mem_sleep" if its set to deep sleep, ensured that the kernel image contains the latest updates (CONFIG_ROCKCHIP_SIP, CONFIG_ROCKCHIP_SUSPEND_MODE), but no, whenever I put the laptop to sleep, it never wakes up, even using "rtcwake" to wake-up after some time, it doesn't work.

The deep sleep state is totally busted for me, no matter what I try. Followed everything people here say it should be done, but nop, nothing works, except the freeze sleep state.

 @spikerguy , @geih , I am in the same boat as @xNix . Followed all the recommendations, but still losing power in Suspend to the rate of 6% per hour. (+-)

Here's the "dmesg | grep suspend"

[12917.186214] PM: suspend entry (deep)

[12917.202835] dwmmc_rockchip fe310000.dwmmc: pre_suspend failed for non-removable host: -38
[12917.210256] printk: Suspending console(s) (use no_console_suspend to debug)
[12917.586553] vdd_log: Entering suspend 3, enabling forcibly, was on
[12917.655712] vbus_5vout: Entering suspend 3, disabling forcibly, was off
[12917.655731] vcc5v0_otg: Entering suspend 3, disabling forcibly, was on
[12917.655754] vcc3v3_panel: Entering suspend 3, disabling forcibly, was on
[12917.655768] vcc3v0_sd: Entering suspend 3, disabling forcibly, was on
[12917.655795] vcc5v0_usb: Entering suspend 3, disabling forcibly, was on
[12919.909163] PM: suspend exit

Here's "cat /sys/power/mem_sleep"
s2idle [deep]

ANY IDEAS what's going on?

Cheers!


Possibly Related Threads...
Thread Author Replies Views Last Post
  Manjaro SD card boot issue aeastw 0 30 11 hours ago
Last Post: aeastw
  Manjaro ARM 20.04 spikerguy 5 535 Today, 12:04 AM
Last Post: Der Geist der Maschine
  Slow WiFi on Manjaro Default Image 20.04 for PBP SuperUJ 8 201 Yesterday, 08:16 PM
Last Post: nekojet
Question Help: Pinebook Pro will not enter sleep [Manjaro 20.04] EverythingIsInput 0 43 Yesterday, 02:41 PM
Last Post: EverythingIsInput
  postmarketOS/Alpine edge image for the Pinebook Pro MartijnBraam 51 4,924 Yesterday, 07:07 AM
Last Post: pmjohann
  gcc v7.1 or higher distro? Manjaro have it? mgrabenstein 3 86 05-26-2020, 10:57 AM
Last Post: xmixahlx
  Pinebook Pro Temps? 65C while playing music via youtube w nothing but a static image jazzmans 4 192 05-26-2020, 10:54 AM
Last Post: xmixahlx
  Manjaro and Arch repository with privacy oriented software as400 17 1,821 05-26-2020, 03:06 AM
Last Post: as400
  An unofficial Debian Installer for Pinebook Pro danielt 343 33,769 05-25-2020, 01:30 AM
Last Post: e-minguez
  Trying to Install Manjaro-ARM-kde-plasma-pbpro-20.04 stefan.schumacher 2 156 05-23-2020, 02:44 AM
Last Post: stefan.schumacher

Forum Jump:


Users browsing this thread: 1 Guest(s)