PINE64
Sleep and external display - Are there any options? - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114)
+--- Thread: Sleep and external display - Are there any options? (/showthread.php?tid=18673)



Sleep and external display - Are there any options? - chris88233 - 09-01-2023

I've been trying lots of options for getting my Pinebook Pro to sleep (and then wake up), as well as to try to get an external display to work. I finally broke my Manjaro install and decided I needed to re-group.

I've tried:
  • Briefly fooled around with the `systemd/sleep.conf` configuration file
  • Tried Armbian, Fedora, and OpenSuSE (all from sdcard)
  • Tow-Boot 2021.something on SPI, then recently the 2022.something version on SPI
  • Wiped my SPI, back to booting using u-boot on the eMMC (as I understand). I then upgraded u-boot via some Manjaro package.
  • Tried a pre-built "Megous" kernel from here: https://github.com/megous/linux although I failed to get it to boot correctly
  • Tried downgrading to the Manjaro 5.15 kernel, which I read elsewhere allowed an external display to work. Surprisingly, this was the change that finally broke my Manjaro install.

My Pinebook was ordered August 2022.


Anything I haven't tried that worked for someone else? Should any of these ideas have worked?

To be clear - I'm not worried about fixing my Manjaro install.

Thank you!


RE: Sleep and external display - Are there any options? - wdt - 09-02-2023

Again....
s2, s2R, s3, STR, hibernate,,, just what are you trying to get?
I don't know if this will work for external monitor, don't have right hub to try
If you have nvme,,, don't bother, STR won't work
For me. with end of 2019 pbp,, right NOW, uptime 109 days (s2R, STR, s3 which are all the same)
5.8.14-1 kernel., mrfixit2.0 uboot,, edit to sleep.conf,, power button set to ask,, lid close to ignore
https://drive.google.com/drive/u/0/folders/1lL2-Mi_QRNa2EUyEuwe8HENMFznnrzV9
mrfixit on uSD, emmc uboot area blanked
Use ONLY power button to start sleep dialog, waken
BTW,,, this gives 14d sleep


RE: Sleep and external display - Are there any options? - chris88233 - 09-02-2023

(09-02-2023, 10:49 AM)wdt Wrote: Again....
s2, s2R, s3, STR, hibernate,,, just what are you trying to get?
I don't know if this will work for external monitor, don't have right hub to try
If you have nvme,,, don't bother,  STR won't work
For me. with end of 2019 pbp,, right NOW, uptime 109 days (s2R, STR, s3 which are all the same)
5.8.14-1 kernel., mrfixit2.0 uboot,,  edit to sleep.conf,, power button set to ask,, lid close to ignore
https://drive.google.com/drive/u/0/folders/1lL2-Mi_QRNa2EUyEuwe8HENMFznnrzV9
mrfixit on uSD, emmc uboot area blanked
Use ONLY power button to start sleep dialog, waken
BTW,,, this gives 14d sleep

I'd be happy with any sleep state other than s2idle.

When you say "mrfixit on uSD", are you booting from the microSD? Do you have anything on your SPI (or, does your version of the Pinebook Pro have an SPI?)

Excited to give this a try, thanks!


RE: Sleep and external display - Are there any options? - Der Geist der Maschine - 09-02-2023

(09-02-2023, 11:21 AM)chris88233 Wrote:
(09-02-2023, 10:49 AM)wdt Wrote: Again....
s2, s2R, s3, STR, hibernate,,, just what are you trying to get?
I don't know if this will work for external monitor, don't have right hub to try
If you have nvme,,, don't bother,  STR won't work
For me. with end of 2019 pbp,, right NOW, uptime 109 days (s2R, STR, s3 which are all the same)
5.8.14-1 kernel., mrfixit2.0 uboot,,  edit to sleep.conf,, power button set to ask,, lid close to ignore
https://drive.google.com/drive/u/0/folders/1lL2-Mi_QRNa2EUyEuwe8HENMFznnrzV9
mrfixit on uSD, emmc uboot area blanked
Use ONLY power button to start sleep dialog, waken
BTW,,, this gives 14d sleep

I'd be happy with any sleep state other than s2idle.

When you say "mrfixit on uSD", are you booting from the microSD? Do you have anything on your SPI (or, does your version of the Pinebook Pro have an SPI?)


I have roughly the same setup as wdt. MrxFixit uboot 2.0 (on emmc - blank spi - but that should not matter), Daniel Thompon's kernel 5.7 (which got removed from his website by now) and Debian 12 on emmc. It gives (probably) around 14 days of suspend to memory. It comes with some caveats, though:

  • Suspend fails when the GPU is in use. That can happen in cases as trivial as having opened a multimedia enriched website
    Code:
    $ journalctl | grep "failed to suspend"
    Jun 10 15:54:19 debian kernel: PM: Device ff9a0000.gpu failed to suspend: error -16


  • Upon coming back from suspend to memory, audio is gone because the audio driver in my kernel version does not implement suspend and resume callback functions. Audio can be revived brute force by unbinding and rebinding the sound driver. This crashes the kernel if the driver is accessed in the split-second between unbinding and rebinding. So, make sure not to play any sound when executing this command:
    Code:
    $ sudo tee /sys/bus/i2c/drivers/es8316/{un,}bind <<< 1-0011


  • The Pinebook Pro wakes up from suspend to memory in the moment it gets connected to external power or unconnected from external power.



RE: Sleep and external display - Are there any options? - chris88233 - 09-02-2023

(09-02-2023, 12:18 PM)Der Geist der Maschine Wrote: ...
  • Suspend fails when the GPU is in use. That can happen in cases as trivial as having opened a multimedia enriched website 
...
  • Upon coming back from suspend to memory, audio is gone because the audio driver in my kernel version does not implement suspend and resume callback functions. Audio can be revived brute force by unbinding and rebinding the sound driver. This crashes the kernel if the driver is accessed in the split-second between unbinding and rebinding. So, make sure not to play any sound when executing this command:
...
  • The Pinebook Pro wakes up from suspend to memory in the moment it gets connected to external power or unconnected from external power.

I can live with this.

Have you - or anyone else - tried any of the kernels from the "megous" user? It looks this person works with the PinePhone mostly, but when you dig in here: https://xff.cz/kernels/ There are kernels for the PineBook Pro.


Appreciate all the input


RE: Sleep and external display - Are there any options? - wdt - 09-02-2023

>The Pinebook Pro wakes up from suspend to memory in the moment it gets connected to external power or unconnected from external power.
in /etc/rc.local
echo disabled > /sys/devices/platform/dc-charger/power/wakeup
------
Nothing on SPI
to boot from emmc a uSD with ONLY tow-boot on it, do define a partition on uSD (any size) and format it
some uboots error when there is nothing but unformated space on the uboot media
----
and, BTW, some tow-boot versions do STR, just not very well, ie ~7-8d
and some (versions) don't work at all
AFAIK, none of the manjaro uboots will give STR


RE: Sleep and external display - Are there any options? - Der Geist der Maschine - 09-03-2023

(09-02-2023, 06:35 PM)wdt Wrote: >The Pinebook Pro wakes up from suspend to memory in the moment it gets connected to external power or unconnected from external power.
in /etc/rc.local
echo disabled  > /sys/devices/platform/dc-charger/power/wakeup

Great!

Dude, you still live in the 1980s. Nowadays, udev is the way to go. Here is my udev rule:

Code:
$ cat /etc/udev/rules.d/90-powersupply.rules
SUBSYSTEM=="power_supply", ACTION=="add", RUN+="/bin/sh -c 'echo disabled > /sys/devices/platform/dc-charger/power/wakeup'"



RE: Sleep and external display - Are there any options? - wdt - 09-04-2023

1980's? You mean DOS3.3? I don't want to remember that
I always have trouble with the quotes, just where and what